/* ═══ FONTS (lokal gehostet) ═══════════════════════════════════════════════ */

@font-face {
  font-family: 'Bebas Neue';
  src: url('../fonts/BebasNeue-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DM Mono';
  src: url('../fonts/DMMono-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DM Mono';
  src: url('../fonts/DMMono-LightItalic.ttf') format('truetype');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'DM Mono';
  src: url('../fonts/DMMono-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DM Mono';
  src: url('../fonts/DMMono-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'DM Mono';
  src: url('../fonts/DMMono-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DM Mono';
  src: url('../fonts/DMMono-MediumItalic.ttf') format('truetype');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

/* ══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════
     CSS VARIABLES — change --accent to your CI cyan
     ═══════════════════════════════════════════ */
  :root {
    --bg: #0A0A0A;
    --fg: #E8E4DF;
    --fg-secondary: #B0AAA4;
    --fg-secondary: #B0AAA4;
    --accent: #00AEEF;
    --accent-dim: rgba(0, 174, 239, 0.12);
    --muted: #6B6660;
    --muted-light: #8A847E;
    --surface: #141311;
    --surface-2: #1C1A17;
    --nav-bg: rgba(10, 10, 10, 0.80);
    --font-display: 'Bebas Neue', sans-serif;
    --font-body: 'DM Mono', monospace;
  }

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

  ::selection {
    background: var(--accent);
    color: var(--bg);
  }

  html {
    scroll-behavior: smooth;
    font-size: 16px;
  }

  body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.6;
    overflow-x: hidden;
  }

  body.detail-open { overflow: hidden; }

  /* ─── UNIFIED CONTENT CONTAINER ─── */
  .content-wrap {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2.5rem;
  }

  /* ─── NAV (fixed, bg full width, content aligned) ─── */
  nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    height: 60px;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.10);
  }

  .nav-inner {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2.5rem;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  nav .logo {
    font-family: var(--font-display);
    font-size: 1.4rem;
    letter-spacing: 0.08em;
    color: var(--fg);
    text-decoration: none;
    display: flex;
    align-items: baseline;
    gap: 0;
  }

  nav .logo .dot {
    display: inline-block;
    width: 4px;
    height: 4px;
    background: var(--accent);
    margin-left: 0px;
    flex-shrink: 0;
    position: relative;
    bottom: 1px;
  }

  nav .nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
  }

  nav .nav-links a {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fg);
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
  }

  nav .nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
  }

  nav .nav-links a:hover::after { width: 100%; }

  /* ─── MOBILE NAV ─── */
  .nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--fg);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
  }

  /* ─── HERO ─── */
  .hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 4rem 0;
    padding-top: 80px;
    position: relative;
  }

  .hero-title {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 12vw, 11rem);
    line-height: 0.85;
    letter-spacing: 0.02em;
    color: var(--fg);
    margin-bottom: 2rem;
  }

  /* Square dot — sits on text baseline */
  .sq-dot {
    display: inline-block;
    width: 0.1em;
    height: 0.1em;
    background: var(--accent);
    margin-left: 0.02em;
    vertical-align: baseline;
  }

  .hero-subtitle {
    font-family: var(--font-body);
    font-weight: 300;
    font-style: italic;
    font-size: clamp(0.9rem, 1.8vw, 1.3rem);
    color: var(--fg-secondary);
    max-width: 550px;
    line-height: 1.7;
  }

  .scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.55rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
  }

  .scroll-wrap {
    position: absolute;
    bottom: 2.5rem;
    left: 0;
    right: 0;
  }

  .scroll-wrap .content-wrap {
    display: flex;
    justify-content: flex-end;
  }

  .scroll-indicator .line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
  }

  @keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 1; transform: scaleY(1); }
  }

  /* ─── SECTION COMMON ─── */
  section { padding: 6rem 0; }

  .section-label {
    font-family: var(--font-body);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
  }

  .section-label::before {
    content: '';
    width: 40px;
    height: 1px;
    background: var(--accent);
  }

  /* ─── ABOUT ─── */
  .about {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-top: 1px solid rgba(255,255,255,0.10);
    padding-top: 80px;
  }

  .about-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    align-items: start;
    margin-top: 2rem;
  }

  /* Portrait */
  .about-portrait {
    position: relative;
    background: transparent;
    align-self: start;
  }

  .about-portrait img {
    width: 100%;
    height: auto;
    display: block;
  }

  .about-portrait .portrait-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, var(--surface), var(--surface-2));
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .about-portrait .portrait-placeholder span {
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .about-portrait-label {
    position: absolute;
    bottom: 1rem;
    left: 0;
    font-size: 0.55rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
  }

  /* Right column: catchphrase + details stacked */
  .about-right {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  .about-statement {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.6vw, 2.4rem);
    line-height: 1.15;
    color: var(--fg);
  }

  .about-statement .em {
    color: var(--accent);
  }

  .about-details {}

  .about-details p {
    font-size: 0.8rem;
    line-height: 1.85;
    color: var(--fg-secondary);
    margin-bottom: 1.25rem;
  }

  .about-details p a {
    color: var(--fg-secondary);
    text-decoration: underline;
    text-decoration-color: rgba(176, 170, 164, 0.3);
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
  }

  .about-details p a:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
  }

  .about-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 1.5rem;
  }

  .about-tags span {
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.35rem 0.7rem;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--fg-secondary);
    transition: all 0.3s ease;
  }

  .about-tags span:hover {
    border-color: var(--accent);
    color: var(--accent);
  }

  /* ─── PORTFOLIO GRID ─── */
  .portfolio {
    border-top: 1px solid rgba(255,255,255,0.10);
  }

  .portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    margin-top: 2rem;
  }

  .project-card {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    cursor: pointer;
    background: var(--surface);
  }

  .project-card .placeholder {
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 0, 0.25, 1);
  }

  .project-card img.placeholder {
    object-fit: cover;
    display: block;
  }

  .gallery-item img.gallery-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.25, 0, 0.25, 1);
  }

  .project-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.4s ease;
  }

  .project-card:hover .project-card-overlay { opacity: 1; }
  .project-card:hover .placeholder { transform: scale(1.05); }

  .project-card-number {
    position: absolute;
    top: 1.5rem;
    left: 2rem;
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--accent);
    opacity: 0.5;
  }

  .project-card-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: 0.05em;
    line-height: 1;
    margin-bottom: 0.5rem;
  }

  .project-card-type {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
  }

  .project-card-cta {
    margin-top: 1rem;
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
  }

  .project-card:hover .project-card-cta { color: var(--fg); }

  .project-card-cta .arrow {
    display: inline-block;
    transition: transform 0.3s ease;
  }

  .project-card:hover .project-card-cta .arrow { transform: translateX(4px); }

  .project-card.featured,
  .portfolio-grid .project-card:first-child {
    grid-column: 1 / -1;
    aspect-ratio: 21/9;
  }

  /* ═══════════════════════════════════════════
     PROJECT DETAIL OVERLAY
     ═══════════════════════════════════════════ */
  .project-detail {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--bg);
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .project-detail.open { transform: translateY(0); }

  .detail-header {
    position: sticky;
    top: 0;
    z-index: 10;
    height: 60px;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.10);
  }

  .detail-header-inner {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2.5rem;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .detail-back {
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--fg);
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
  }

  .detail-back:hover { color: var(--accent); }
  .detail-back .back-arrow { transition: transform 0.3s ease; }
  .detail-back:hover .back-arrow { transform: translateX(-4px); }

  .detail-nav-arrows {
    display: flex;
    gap: 0.5rem;
  }

  .detail-nav-arrows button {
    width: 40px;
    height: 40px;
    background: var(--surface);
    border: 1px solid rgba(255,255,255,0.10);
    color: var(--fg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
  }

  .detail-nav-arrows button:hover {
    border-color: var(--accent);
    color: var(--accent);
  }

  .detail-nav-arrows button:disabled {
    opacity: 0.2;
    cursor: default;
    pointer-events: none;
  }

  /* Detail: Title bar above images */
  .detail-title-bar {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2.5rem 2.5rem 1.5rem;
  }

  .detail-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 5rem);
    letter-spacing: 0.02em;
    line-height: 0.9;
  }

  .detail-type {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-top: 0.5rem;
  }

  .detail-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.10);
  }

  .detail-fact {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .detail-fact-label {
    font-size: 0.55rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.25rem;
  }

  .detail-fact-value {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--fg);
  }

  /* Detail: Gallery FIRST (images before text) */
  .detail-gallery {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2.5rem;
  }

  .detail-gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
  }

  /* 1-spaltig für Projekte mit Portrait-Bildern */
  .detail-gallery-grid.single-col {
    grid-template-columns: 1fr;
  }

  .detail-gallery-grid.single-col .gallery-item {
    background: var(--bg);
  }

  .detail-gallery-grid.single-col .gallery-item img.gallery-placeholder,
  .detail-gallery-grid.single-col .gallery-item .gallery-placeholder {
    width: 100%;
    max-width: 1080px;
    height: auto !important;
    aspect-ratio: unset !important;
    object-fit: unset !important;
    margin: 0;
  }

  /* Hero-Bild: erstes Item full-width, 21:9 */
  .detail-gallery-grid .gallery-item:first-child {
    grid-column: 1 / -1;
  }

  .detail-gallery-grid.no-hero-grid .gallery-item:first-child {
    grid-column: auto;
  }

  .gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: var(--surface);
  }

  /* Querformat: 16:9 */
  .gallery-item .gallery-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.25, 0, 0.25, 1);
  }

  /* Hero-Bild: 21:9 */
  .detail-gallery-grid .gallery-item:first-child:not(.portrait) .gallery-placeholder {
    aspect-ratio: 21/9;
  }

  /* Hero ausgeschaltet → 16:9 */
  .detail-gallery-grid.no-hero-grid .gallery-item:first-child .gallery-placeholder {
    aspect-ratio: 16/9;
  }

  /* Portrait: full-width, natürliche Höhe, kein Crop */
  .gallery-item.portrait {
    grid-column: 1 / -1;
  }

  .gallery-item.portrait .gallery-placeholder {
    aspect-ratio: unset;
    object-fit: contain;
    height: auto;
    background: var(--bg);
  }

  .gallery-item:hover .gallery-placeholder { transform: scale(1.03); }

  .gallery-item-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(10,10,10,0.8) 0%, transparent 100%);
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.4s ease;
  }

  .gallery-item:hover .gallery-item-caption {
    opacity: 1;
    transform: translateY(0);
  }

  .gallery-item-caption span {
    font-size: 0.65rem;
    color: var(--muted-light);
    letter-spacing: 0.05em;
  }

  /* Detail: Description AFTER images */
  .detail-description {
    max-width: 1400px;
    margin: 3rem auto 0;
    padding: 3rem 2.5rem 6rem;
    border-top: 1px solid rgba(255,255,255,0.10);
  }

  .detail-desc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
  }

  .detail-desc-main {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.2vw, 2rem);
    line-height: 1.15;
    letter-spacing: 0.02em;
    color: var(--fg);
  }

  .detail-desc-secondary {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 300;
    line-height: 1.85;
    color: var(--muted-light);
  }

  .detail-desc-secondary p { margin-bottom: 1rem; }
  .detail-desc-secondary p:last-child { margin-bottom: 0; }

  .detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 1.5rem;
  }

  .detail-tags span {
    font-size: 0.55rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.3rem 0.6rem;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--muted);
  }

  /* ─── LIGHTBOX ─── */
  .lightbox {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(5, 5, 5, 0.97);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .lightbox.open {
    opacity: 1;
    pointer-events: auto;
  }

  .lightbox-close {
    position: absolute;
    top: 1.2rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--fg);
    font-size: 1.3rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
  }

  .lightbox-close:hover { color: var(--accent); }

  .lightbox-image-wrap {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .lightbox-image-wrap .gallery-placeholder {
    max-width: 90vw;
    max-height: 85vh;
    width: 1200px;
    aspect-ratio: 16/10;
  }

  .lightbox-caption {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    color: var(--muted);
    letter-spacing: 0.1em;
    text-align: center;
  }

  .lightbox-counter {
    position: absolute;
    top: 1.2rem;
    left: 1.5rem;
    font-size: 0.65rem;
    color: var(--muted);
    letter-spacing: 0.1em;
  }

  .lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--fg);
    width: 48px;
    height: 48px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
  }

  .lightbox-nav:hover {
    border-color: var(--accent);
    color: var(--accent);
  }

  .lightbox-prev { left: 1.5rem; }
  .lightbox-next { right: 1.5rem; }

  /* Touch devices: hide arrows, use swipe instead */
  @media (hover: none) and (pointer: coarse) {
    .lightbox-nav { display: none !important; }
  }

  /* ─── CONTACT ─── */
  .contact {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-top: 1px solid rgba(255,255,255,0.10);
  }

  .contact-heading {
    font-family: var(--font-display);
    font-size: clamp(3rem, 10vw, 10rem);
    line-height: 0.9;
    letter-spacing: 0.02em;
    margin-bottom: 3rem;
  }

  .contact-heading a {
    color: var(--fg);
    text-decoration: none;
    transition: color 0.3s ease;
  }

  .contact-heading a:hover { color: var(--accent); }

  .contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(255,255,255,0.10);
  }

  .contact-block h3 {
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.5rem;
  }

  .contact-block a,
  .contact-block p {
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--fg-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
  }

  .contact-block a:hover { color: var(--fg); }

  /* ─── FOOTER ─── */
  footer {
    border-top: 1px solid rgba(255,255,255,0.10);
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted-light);
  }

  .footer-inner {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .footer-legal {
    display: flex;
    gap: 0.5rem;
    align-items: center;
  }

  .footer-legal a {
    color: var(--muted-light);
    text-decoration: none;
    transition: color 0.3s ease;
  }

  .footer-legal a:hover { color: var(--accent); }

  .footer-sep { color: var(--muted-light); }

  /* ─── LEGAL OVERLAY (Impressum / Datenschutz) ─── */
  .legal-overlay {
    position: fixed;
    inset: 0;
    z-index: 250;
    background: var(--bg);
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .legal-overlay.open {
    transform: translateY(0);
  }

  .legal-header {
    position: sticky;
    top: 0;
    z-index: 10;
    height: 60px;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.10);
  }

  .legal-header-inner {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2.5rem;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .legal-close {
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--fg);
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: color 0.3s ease;
  }

  .legal-close:hover { color: var(--accent); }

  .legal-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 0.1em;
  }

  .legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2.5rem 6rem;
  }

  .legal-content h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    color: var(--fg);
  }

  .legal-content h3 {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
  }

  .legal-content p {
    font-size: 0.8rem;
    line-height: 1.85;
    color: var(--fg-secondary);
    margin-bottom: 1rem;
  }

  .legal-content a {
    color: var(--accent);
    text-decoration: none;
  }

  .legal-content .placeholder-hint {
    color: var(--accent);
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
  }

  /* ─── ANIMATIONS ─── */
  .reveal {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }

  .stagger-1 { transition-delay: 0.1s; }
  .stagger-2 { transition-delay: 0.2s; }
  .stagger-3 { transition-delay: 0.3s; }

  /* Detail content staggered entrance */
  .detail-title-bar,
  .detail-gallery,
  .detail-description {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  .project-detail.open .detail-title-bar {
    opacity: 1; transform: translateY(0); transition-delay: 0.25s;
  }
  .project-detail.open .detail-gallery {
    opacity: 1; transform: translateY(0); transition-delay: 0.4s;
  }
  .project-detail.open .detail-description {
    opacity: 1; transform: translateY(0); transition-delay: 0.55s;
  }

  /* ─── GRAIN OVERLAY ─── */
  body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
  }

  /* ─── CURSOR GLOW (hover devices only) ─── */
  .cursor-glow {
    display: none;
  }

  @media (hover: hover) {
    .cursor-glow {
      display: block;
      position: fixed;
      width: 250px;
      height: 250px;
      border-radius: 50%;
      background: radial-gradient(circle, rgba(0, 174, 239, 0.075) 0%, transparent 70%);
      pointer-events: none;
      z-index: 1;
      transform: translate(-50%, -50%);
    }
  }

  /* ─── TOUCH DEVICES: show portfolio overlays always ─── */
  @media (hover: none), (pointer: coarse) {
    .project-card-overlay {
      opacity: 1;
      background: rgba(10, 10, 10, 0.65);
    }

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

    .cursor-glow { display: none !important; }
  }

  /* ═══════════════════════════════════════════
     RESPONSIVE
     ═══════════════════════════════════════════ */
  @media (max-width: 1024px) {
    .about-grid {
      grid-template-columns: 200px 1fr;
      gap: 2rem;
    }
  }

  @media (max-width: 768px) {
    .nav-inner { padding: 0 1.5rem; }
    .content-wrap { padding: 0 1.5rem; }
    nav .nav-links { 
      display: none;
      position: absolute;
      top: 60px;
      left: 0;
      right: 0;
      background: var(--nav-bg);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      flex-direction: column;
      padding: 1.5rem 1.5rem;
      gap: 1.25rem;
      border-bottom: 1px solid rgba(255,255,255,0.10);
      align-items: flex-end;
    }
    nav .nav-links.open { display: flex; }
    .nav-toggle { display: block; }

    section { padding: 4rem 0; }
    .hero { padding-top: 80px; padding-bottom: 3rem; }
    .scroll-wrap { display: none; }

    .portfolio-grid { grid-template-columns: 1fr; }
    .project-card.featured { aspect-ratio: 16/9; }

    .contact-grid { grid-template-columns: 1fr; gap: 1.25rem; }

    .detail-header-inner { padding: 0 1.5rem; }
    .detail-title-bar { padding: 2rem 1.5rem 1rem; }
    .detail-gallery { padding: 0 1.5rem; }
    .detail-gallery-grid { grid-template-columns: 1fr; }
    .detail-description {
      padding: 2.5rem 1.5rem 4rem;
    }
    .detail-desc-grid {
      grid-template-columns: 1fr;
      gap: 2rem;
    }
    .detail-facts { flex-direction: column; gap: 0.75rem; }

    .lightbox-prev { left: 0.5rem; }
    .lightbox-next { right: 0.5rem; }
    .lightbox-nav { width: 36px; height: 36px; font-size: 0.9rem; }

    .footer-inner {
      padding: 1.5rem;
      flex-direction: column;
      gap: 0.5rem;
      align-items: flex-end;
      text-align: right;
    }

    .legal-header-inner { padding: 0 1.5rem; }
    .legal-content { padding: 2rem 1.5rem 4rem; }
  }

  @media (max-width: 640px) {
    .about-grid {
      grid-template-columns: 1fr;
      gap: 1.5rem;
    }

    .about-portrait {
      max-width: 180px;
    }
  }

  @media (max-width: 480px) {
    .hero-title {
      font-size: clamp(3rem, 18vw, 6rem);
    }
    .contact-heading {
      font-size: clamp(2.5rem, 14vw, 5rem);
    }
    .project-card-overlay { padding: 1.25rem; }
    .project-card-number { font-size: 2rem; top: 1rem; left: 1.25rem; }
  }