/* Skip Links for Keyboard Navigation */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px;
    z-index: 100;
    text-decoration: none;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: bold;
}

.skip-link:focus {
    top: 0;
}

/* Screen Reader Only Content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Visible for All Interactive Elements */
*:focus-visible {
    outline: 3px solid #000;
    outline-offset: 2px;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Mobile first approach */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.4;
    color: #000;
    background: #d3d3d3;
    min-height: 100vh;
}

/* Grainy texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.08;
    z-index: 1;
    pointer-events: none;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(0,0,0,.1) 2px, rgba(0,0,0,.1) 4px),
        repeating-linear-gradient(-45deg, transparent, transparent 2px, rgba(0,0,0,.1) 2px, rgba(0,0,0,.1) 4px);
}

/* Main Layout - Mobile First */
main {
    position: relative;
    z-index: 2;
    padding: 20px;
    min-height: 100vh;
}

/* Container for wider desktop layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

/* Left Column Container - Mobile */
.left-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

/* Hero Section - Brutalist Style */
.hero-section {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px 40px;
}

@media (min-width: 768px) {
    .hero-section {
        margin-bottom: 60px;
        padding: 80px 20px 60px;
    }
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: -2px;
    text-transform: uppercase;
    margin-bottom: 20px;
    line-height: 0.9;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .hero-section h1 {
        font-size: 4rem;
        letter-spacing: -3px;
    }
    
    .hero-gif img {
        width: 400px;
    }
}

@media (min-width: 1024px) {
    .hero-gif img {
        width: 600px;
    }
}

@media (min-width: 1200px) {
    .hero-gif img {
        width: 800px;
    }
}

.hero-section .tagline {
    font-size: 1.1rem;
    line-height: 1.5;
    max-width: 600px;
    margin: 0 auto 30px;
    font-weight: 500;
    color: #333;
}

.hero-gif {
    margin: 40px auto;
}

.hero-gif img {
    width: 800px;
    height: auto;
    filter: grayscale(100%) contrast(1.2);
    opacity: 0.9;
    max-width: 90%;
}

/* Info Grid - Mobile */
.info-grid-left {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.info-block {
    padding: 12px;
    background: #fff;
    border: 2px solid #000;
}

.info-block:active {
    box-shadow: 3px 3px 0 #000;
    transform: translate(-1px, -1px);
}

.info-block h3 {
    font-size: 1rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.info-block p {
    line-height: 1.3;
    color: #333;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.info-block ul {
    list-style: none;
}

.info-block ul li {
    padding: 3px 0;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 500;
    font-size: 0.8rem;
    line-height: 1.3;
}

.info-block ul li:last-child {
    border-bottom: none;
}

/* Form Section - Mobile */
.form-section {
    margin-top: 40px;
    margin-bottom: 80px;
}

.form-section h2 {
    font-size: 1.8rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 30px;
    text-align: center;
    letter-spacing: -1px;
}

.form-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

/* Project form specific styles */
.project-form {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

@media (min-width: 768px) {
    .form-row {
        flex-direction: row;
    }
    
    .form-row .form-group {
        flex: 1;
    }
}

.form-title {
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input,
.form-group textarea {
    background: #fff;
    border: 2px solid #000;
    padding: 12px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 1rem;
    min-height: 44px;
    width: 100%;
}

.form-group input:hover,
.form-group textarea:hover {
    background: #f5f5f5;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    background: #fff;
    box-shadow: 3px 3px 0 #000;
    transform: translate(-1px, -1px);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* File input - Mobile */
.file-input {
    padding: 12px;
    border: 2px dashed #000;
    background: #e8e8e8;
    cursor: pointer;
    font-size: 0.9rem;
    min-height: 44px;
}

.file-input:hover {
    background: #fff;
}

.file-help {
    font-size: 0.75rem;
    color: #666;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Drag and Drop File Upload Area */
.file-upload-wrapper {
    position: relative;
    width: 100%;
}

.file-drop-area {
    border: 3px dashed #000;
    background: #f0f0f0;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.file-drop-area:hover,
.file-drop-area.drag-over {
    background: #fff;
    box-shadow: 5px 5px 0 #000;
    transform: translate(-2px, -2px);
}

.file-drop-area .drop-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    font-weight: 900;
    letter-spacing: -2px;
}

.file-drop-area .drop-text {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.file-drop-area .drop-subtext {
    font-size: 0.85rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.file-drop-area input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

/* Selected Files List */
.selected-files-list {
    margin-top: 20px;
    border: 3px solid #000;
    background: #fff;
    padding: 0;
    display: none;
}

.selected-files-list.has-files {
    display: block;
}

.selected-files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 2px solid #000;
    background: #e8e8e8;
}

.selected-files-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.total-size {
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.files-container {
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8f8f8;
    border: 2px solid #000;
    margin-bottom: 10px;
}

.file-item:hover {
    background: #fff;
    box-shadow: 3px 3px 0 #000;
    transform: translate(-1px, -1px);
}

.file-item:last-child {
    margin-bottom: 0;
}

.file-details {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 700;
    font-size: 0.9rem;
    word-break: break-all;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.file-size {
    font-size: 0.8rem;
    color: #666;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.file-remove {
    background: #000;
    color: #fff;
    border: none;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    letter-spacing: 1px;
    margin-left: 10px;
    flex-shrink: 0;
}

.file-remove:hover {
    background: #ff0000;
    box-shadow: 2px 2px 0 #000;
    transform: translate(-1px, -1px);
}

/* File validation messages */
.file-error {
    background: #fff;
    border: 3px solid #ff0000;
    color: #ff0000;
    padding: 12px;
    margin-top: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.file-success {
    background: #fff;
    border: 3px solid #000;
    color: #000;
    padding: 12px;
    margin-top: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(211, 211, 211, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    background: #fff;
    padding: 40px;
    border: 3px solid #000;
    text-align: center;
    box-shadow: 8px 8px 0 #000;
}

.loading-spinner::after {
    content: "";
    display: block;
    width: 50px;
    height: 50px;
    margin: 20px auto 0;
    border: 4px solid #000;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1.2rem;
}

/* Admin Table Responsive */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 2px solid #000;
    background: #fff;
}

.submissions-table table {
    min-width: 768px;
    width: 100%;
}

@media (max-width: 767px) {
    .submissions-table {
        padding: 1rem;
    }
    
    .table-wrapper {
        margin: 0 -1rem;
        padding: 0;
    }
    
    .submissions-table th,
    .submissions-table td {
        font-size: 0.85rem;
        padding: 0.5rem;
    }
    
    .file-drop-area {
        padding: 30px 15px;
        min-height: 150px;
    }
    
    .file-drop-area .drop-icon {
        font-size: 2.5rem;
    }
    
    .file-drop-area .drop-text {
        font-size: 1rem;
    }
}

/* Submit Button - Mobile */
.btn-submit,
.btn,
.btn-primary {
    background: #000;
    color: #fff;
    border: none;
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-submit:active,
.btn:active,
.btn-primary:active {
    background: #fff;
    color: #000;
    box-shadow: 3px 3px 0 #000;
    transform: translate(-1px, -1px);
}

.btn-submit:hover,
.btn:hover,
.btn-primary:hover {
    background: #fff;
    color: #000;
    box-shadow: 3px 3px 0 #000;
    transform: translate(-1px, -1px);
}

/* Download All Button */
.btn-download-all {
    background: #000;
    color: #fff;
    border: 3px solid #000;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 15px;
}

.btn-download-all:hover {
    background: #fff;
    color: #000;
    box-shadow: 4px 4px 0 #000;
    transform: translate(-1px, -1px);
}

/* Right Column - Hidden on mobile */
.info-section {
    display: none;
}

/* Footer - Brutalist Style */
footer {
    padding: 40px 20px;
    text-align: center;
    background: transparent;
    border-top: 3px solid #000;
    position: relative;
    z-index: 10;
    margin-top: 80px;
}

footer p {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    margin: 0;
    color: #333;
}

/* Admin Login Button */
.admin-login-btn {
    background: #000;
    color: #fff;
    border: 2px solid #000;
    padding: 8px 16px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    display: inline-block;
    min-height: 32px;
    line-height: 1.2;
}

.admin-login-btn:hover {
    background: #fff;
    color: #000;
    box-shadow: 2px 2px 0 #000;
    transform: translate(-1px, -1px);
}

.admin-login-btn:active {
    box-shadow: 1px 1px 0 #000;
    transform: translate(0, 0);
}

.admin-login-btn:focus-visible {
    outline: 3px solid #000;
    outline-offset: 2px;
}

/* Required field indicator */
.required {
    color: #000;
    font-weight: bold;
}

/* Flash messages */
.flash-messages {
    margin-bottom: 20px;
}

.flash {
    padding: 10px;
    margin-bottom: 10px;
    border: 2px solid #000;
    background: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
}

.flash-success {
    background: #e8f5e9;
}

.flash-error {
    background: #ffebee;
}

.flash-info {
    background: #e3f2fd;
}

/* Tablet breakpoint (768px and up) */
@media (min-width: 768px) {
    main {
        padding: 30px;
    }
    
    .container {
        padding: 0;
    }
    
    .hero-section h1 {
        font-size: 3.5rem;
    }
    
    .hero-section p {
        font-size: 1.1rem;
        max-width: 600px;
    }
    
    .info-grid-left {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .info-block {
        padding: 15px;
    }
    
    .info-block h3 {
        font-size: 1.1rem;
    }
    
    .form-title {
        font-size: 1.8rem;
    }
    
    .btn-submit,
    .btn,
    .btn-primary {
        width: auto;
        padding: 14px 40px;
    }
    
    .info-block:hover {
        box-shadow: 3px 3px 0 #000;
        transform: translate(-1px, -1px);
    }
}

/* Desktop breakpoint (1024px and up) */
@media (min-width: 1024px) {
    /* Allow scrolling on desktop for better usability */
    html, body {
        height: auto;
        overflow: auto;
    }
    
    body {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }
    
    main {
        flex: 1;
        padding: 40px;
        overflow: visible;
    }
    
    .container {
        padding: 0;
    }
    
    .left-column {
        flex: 1;
        padding-right: 30px;
        overflow-y: auto;
        gap: clamp(16px, 2vh, 24px);
    }
    
    .hero-section h1 {
        font-size: clamp(3rem, 5vw, 4.5rem);
    }
    
    .hero-section p {
        max-width: 500px;
    }
    
    .info-grid-left {
        grid-template-columns: repeat(2, 1fr);
        gap: clamp(12px, 1.5vh, 16px);
    }
    
    .info-block {
        padding: clamp(10px, 1.2vh, 14px);
    }
    
    .info-block h3 {
        font-size: clamp(0.9rem, 1.1vw, 1rem);
        margin-bottom: clamp(4px, 0.5vh, 6px);
    }
    
    .info-block p {
        font-size: clamp(0.75rem, 0.9vw, 0.85rem);
        margin-bottom: clamp(4px, 0.5vh, 6px);
    }
    
    .info-block ul li {
        font-size: clamp(0.65rem, 0.8vw, 0.75rem);
        padding: clamp(2px, 0.3vh, 3px) 0;
    }
    
    .form-section {
        margin-top: clamp(20px, 2vh, 30px);
    }
    
    .form-title {
        font-size: clamp(1.3rem, 1.8vw, 1.6rem);
        margin-bottom: clamp(10px, 1.2vh, 15px);
    }
    
    .contact-form {
        gap: clamp(10px, 1.2vh, 14px);
    }
    
    .form-group label {
        font-size: clamp(0.75rem, 0.9vw, 0.85rem);
    }
    
    .form-group input,
    .form-group textarea {
        padding: clamp(8px, 1vh, 12px);
        font-size: clamp(0.85rem, 1vw, 0.95rem);
        min-height: 40px;
    }
    
    .form-group textarea {
        min-height: clamp(60px, 8vh, 80px);
    }
    
    .btn-submit {
        padding: clamp(10px, 1.2vh, 14px) clamp(28px, 3vw, 36px);
        font-size: clamp(0.85rem, 1vw, 0.95rem);
    }
    
    footer {
        flex-shrink: 0;
        padding: clamp(12px, 1.5vh, 18px) clamp(20px, 3vw, 40px);
    }
}

/* Large desktop breakpoint (1440px and up) */
@media (min-width: 1440px) {
    .info-grid-left {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .hero-section h1 {
        font-size: 4rem;
    }
    
    .form-container {
        max-width: 800px;
    }
}

/* Very small height screens */
@media (max-height: 600px) and (min-width: 1024px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .form-title {
        font-size: 1.2rem;
    }
    
    .info-block ul li:nth-child(n+4) {
        display: none;
    }
    
    .form-group textarea {
        min-height: 50px;
    }
}

/* Remove animations for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}