/* ===========================
   Custom Fonts
   =========================== */

/* PP Neue Montreal */
@font-face {
    font-family: 'PP Neue Montreal';
    src: url('../fonts/PPNeueMontreal-Thin.woff2') format('woff2');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PP Neue Montreal';
    src: url('../fonts/PPNeueMontreal-ThinItalic.woff2') format('woff2');
    font-weight: 100;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'PP Neue Montreal';
    src: url('../fonts/PPNeueMontreal-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PP Neue Montreal';
    src: url('../fonts/PPNeueMontreal-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PP Neue Montreal';
    src: url('../fonts/PPNeueMontreal-Italic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'PP Neue Montreal';
    src: url('../fonts/PPNeueMontreal-Book.woff2') format('woff2');
    font-weight: 450;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PP Neue Montreal';
    src: url('../fonts/PPNeueMontreal-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PP Neue Montreal';
    src: url('../fonts/PPNeueMontreal-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PP Neue Montreal';
    src: url('../fonts/PPNeueMontreal-BoldItalic.woff2') format('woff2');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* PP Supply Mono */
@font-face {
    font-family: 'PP Supply Mono';
    src: url('../fonts/PPSupplyMono-Ultralight.woff2') format('woff2');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PP Supply Mono';
    src: url('../fonts/PPSupplyMono-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PP Supply Mono';
    src: url('../fonts/PPSupplyMono-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PP Supply Mono';
    src: url('../fonts/PPSupplyMono-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ===========================
   CSS Reset & Variables
   =========================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brutalist Color Palette */
    --bg-primary: #f5f5f0;
    --bg-secondary: #ffffff;
    --bg-accent: #000000;
    --text-primary: #000000;
    --text-secondary: #1a1a1a;
    --text-muted: #666666;
    --accent-red: #ff3b30;
    --accent-orange: #ff6b35;
    --accent-lime: #c5ff00;
    --accent-blue: #0051ff;
    --border: #000000;
    --border-light: #cccccc;

    /* Typography - PP Neue Montreal & PP Supply Mono */
    --font-main: 'PP Neue Montreal', 'Helvetica Neue', 'Arial', sans-serif;
    --font-display: 'PP Neue Montreal', 'Helvetica Neue', 'Arial', sans-serif;
    --font-mono: 'PP Supply Mono', 'Courier New', monospace;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Grid */
    --grid-gap: 2px;
}

/* ===========================
   Base Styles
   =========================== */

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.4;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ===========================
   Language Toggle
   =========================== */

.lang-toggle {
    position: fixed;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    z-index: 1000;
    background: var(--bg-accent);
    border: 2px solid var(--border);
    border-radius: 0;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.lang-toggle:hover {
    background: var(--accent-red);
}

.lang-btn {
    font-size: 0.875rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.lang-btn.active {
    color: var(--accent-lime);
}

.lang-divider {
    color: #ffffff;
}

/* ===========================
   Navigation
   =========================== */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    background: var(--bg-primary);
    border-bottom: 3px solid var(--border);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-sm) var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
}

.nav-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
}

.nav-menu a:hover {
    border-bottom-color: var(--accent-red);
}

/* ===========================
   Hero Section
   =========================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl) var(--spacing-md);
    position: relative;
    background: var(--bg-primary);
    border-bottom: 3px solid var(--border);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(var(--border-light) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-light) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.3;
    pointer-events: none;
}

.hero-content {
    text-align: left;
    max-width: 1200px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(6rem, 15vw, 18rem);
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: 0;
    line-height: 0.85;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    text-transform: uppercase;
}

.hero-subtitle {
    font-size: clamp(1.5rem, 3vw, 3rem);
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    line-height: 1.1;
    max-width: 800px;
}

.hero-description {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    color: var(--text-muted);
    max-width: 700px;
    line-height: 1.5;
    font-weight: 400;
    border-left: 4px solid var(--accent-red);
    padding-left: var(--spacing-sm);
}

/* ===========================
   Section Styles
   =========================== */

section {
    padding: var(--spacing-xl) 0;
    border-bottom: 3px solid var(--border);
}

.section-title {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    text-align: left;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 0.9;
}

/* ===========================
   Services Section
   =========================== */

.services {
    background: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--grid-gap);
    border: 3px solid var(--border);
}

.service-card {
    background: var(--bg-primary);
    border: none;
    border-right: 3px solid var(--border);
    border-bottom: 3px solid var(--border);
    padding: var(--spacing-md);
    position: relative;
}

.service-card:nth-child(2n) {
    border-right: none;
}

.service-card:nth-child(n+3) {
    border-bottom: none;
}

.service-card::before {
    content: attr(data-number);
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    font-size: 3rem;
    font-weight: 700;
    color: var(--border-light);
    font-family: var(--font-display);
}

.service-icon {
    font-size: 1rem;
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.service-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: -0.01em;
    line-height: 1.1;
}

.service-description {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.5;
    font-weight: 400;
}

/* ===========================
   Projects Section
   =========================== */

.projects {
    background: var(--bg-primary);
}

.projects-filter {
    display: flex;
    justify-content: flex-start;
    gap: 0;
    margin-bottom: var(--spacing-lg);
    border: 3px solid var(--border);
    width: fit-content;
}

.filter-btn {
    background: var(--bg-secondary);
    border: none;
    border-right: 3px solid var(--border);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--font-main);
}

.filter-btn:last-child {
    border-right: none;
}

.filter-btn:hover {
    background: var(--accent-lime);
}

.filter-btn.active {
    background: var(--bg-accent);
    color: var(--accent-lime);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: var(--spacing-md);
}

.project-card {
    background: var(--bg-secondary);
    border: 3px solid var(--border);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.project-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: 8px 8px 0 var(--border);
}

.project-image {
    aspect-ratio: 4/3;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 3px solid var(--border);
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(var(--border-light) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-light) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.2;
}

.project-placeholder {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-muted);
    font-family: var(--font-display);
    text-transform: uppercase;
    z-index: 1;
}

.project-info {
    padding: var(--spacing-md);
    background: var(--bg-secondary);
}

.project-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
    line-height: 1.2;
}

.project-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
    font-family: var(--font-mono);
}

.project-card.hidden {
    display: none;
}

/* ===========================
   About Section
   =========================== */

.about {
    background: var(--bg-secondary);
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    border: 3px solid var(--border);
}

.about-section {
    background: var(--bg-primary);
    border: none;
    border-bottom: 3px solid var(--border);
    padding: var(--spacing-lg) var(--spacing-md);
    position: relative;
}

.about-section:last-child {
    border-bottom: none;
}

.about-section::before {
    content: '';
    position: absolute;
    top: var(--spacing-md);
    left: var(--spacing-md);
    width: 60px;
    height: 4px;
    background: var(--accent-red);
}

.about-subtitle {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    margin-top: var(--spacing-md);
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

.about-section p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 900px;
}

/* ===========================
   Contact Section
   =========================== */

.contact {
    background: var(--bg-primary);
}

.contact-content {
    text-align: left;
    max-width: 100%;
    margin: 0;
    padding: var(--spacing-lg);
    border: 3px solid var(--border);
    background: var(--bg-accent);
    color: var(--bg-primary);
}

.contact-text {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-lime);
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

.contact-email {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--bg-primary);
    text-decoration: none;
    margin-bottom: var(--spacing-lg);
    font-family: var(--font-mono);
    word-break: break-all;
}

.contact-email:hover {
    color: var(--accent-red);
}

.social-links {
    display: flex;
    justify-content: flex-start;
    gap: 0;
    margin-top: var(--spacing-md);
    border: 3px solid var(--bg-primary);
    width: fit-content;
}

.social-link {
    color: var(--bg-primary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border: none;
    border-right: 3px solid var(--bg-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: transparent;
}

.social-link:last-child {
    border-right: none;
}

.social-link:hover {
    background: var(--accent-orange);
    color: var(--bg-accent);
}

/* ===========================
   Footer
   =========================== */

.footer {
    background: var(--bg-primary);
    border-top: 3px solid var(--border);
    border-bottom: none;
    padding: var(--spacing-md) 0;
    text-align: center;
}

.footer p {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

/* ===========================
   Responsive Design
   =========================== */

@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        border-right: none;
        border-bottom: 3px solid var(--border);
    }

    .service-card:last-child {
        border-bottom: none;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        gap: var(--spacing-sm);
    }

    .nav-menu a {
        font-size: 0.75rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: 80vh;
        padding: var(--spacing-lg) var(--spacing-sm);
    }

    .hero-content {
        text-align: left;
    }

    section {
        padding: var(--spacing-lg) 0;
    }

    .lang-toggle {
        top: auto;
        bottom: var(--spacing-sm);
    }

    .contact-email {
        font-size: 1.5rem;
    }

    .social-links {
        flex-direction: column;
    }

    .social-link {
        border-right: none;
        border-bottom: 3px solid var(--bg-primary);
    }

    .social-link:last-child {
        border-bottom: none;
    }
}

@media (max-width: 480px) {
    .nav-container {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .logo {
        font-size: 2rem;
    }

    .projects-filter {
        flex-direction: column;
        width: 100%;
    }

    .filter-btn {
        border-right: none;
        border-bottom: 3px solid var(--border);
    }

    .filter-btn:last-child {
        border-bottom: none;
    }
}

/* ===========================
   Utility Classes
   =========================== */

.text-highlight {
    background: var(--accent-lime);
    color: var(--text-primary);
    padding: 0 0.25rem;
}

.accent-bar {
    width: 100%;
    height: 4px;
    background: var(--accent-red);
    margin: var(--spacing-md) 0;
}

/* Remove smooth animations for brutalist aesthetic */
* {
    transition: none !important;
    animation-duration: 0s !important;
}

button, a, .project-card {
    transition: transform 0.1s ease, background 0.05s ease, color 0.05s ease !important;
}

/* ===========================
   Project Modal
   =========================== */

.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    padding: var(--spacing-md);
    transition: opacity 0.15s ease, visibility 0.15s ease !important;
}

.project-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-primary);
    border: 3px solid var(--border);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal-close {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: var(--accent-red);
    border: 3px solid var(--border);
    width: 50px;
    height: 50px;
    font-size: 2rem;
    font-weight: 700;
    color: var(--bg-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    line-height: 1;
    font-family: var(--font-main);
}

.modal-close:hover {
    background: var(--border);
    color: var(--bg-primary);
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 var(--accent-red);
}

.modal-image {
    width: 100%;
    aspect-ratio: 16/10;
    background: var(--bg-secondary);
    border-bottom: 3px solid var(--border);
    position: relative;
    overflow: hidden;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal-image .project-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    font-weight: 700;
    color: var(--border-light);
    text-align: center;
}

.modal-info {
    padding: var(--spacing-lg);
}

.modal-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    font-family: var(--font-main);
}

.modal-meta {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--text-secondary);
    font-family: var(--font-main);
}

/* Mobile adjustments for modal */
@media (max-width: 768px) {
    .project-modal {
        padding: var(--spacing-sm);
    }

    .modal-content {
        max-height: 95vh;
    }

    .modal-close {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .modal-title {
        font-size: 1.75rem;
        padding-right: var(--spacing-lg);
    }

    .modal-meta {
        font-size: 1rem;
    }

    .modal-info {
        padding: var(--spacing-md);
    }
}
