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

  html {
    scroll-behavior: smooth;
  }

  :root {
    --bg: #F3F1EC;
    --fg: #000000;
    --fg-muted: #6B6A63;
    --nav-border: rgba(0,0,0,0.06);
    --nav-link: #4B4A45;
    --btn-outline-border: rgba(0,0,0,0.14);
    --btn-outline-hover: rgba(0,0,0,0.03);
    --accent: #FF5A1F;
    --accent-hover: #F04E15;
  }

  html[data-theme="dark"] {
    --bg: #0A0A0A;
    --fg: #F3F1EC;
    --fg-muted: #9A968C;
    --nav-border: rgba(255,255,255,0.08);
    --nav-link: #B8B4AA;
    --btn-outline-border: rgba(255,255,255,0.18);
    --btn-outline-hover: rgba(255,255,255,0.06);
    --accent: #FF5A1F;
    --accent-hover: #FF7440;
  }

  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    color: var(--fg);
    background: var(--bg);
    transition: background 0.25s ease, color 0.25s ease;
  }

  /* ---------- Navigation ---------- */

  nav {
    position: sticky;
    top: 0;
    z-index: 3;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(16px, 3vw, 26px) clamp(16px, 4vw, 52px);
    border-bottom: 1px solid var(--nav-border);
    transition: border-color 0.25s ease;
  }

  .nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  .nav-dot {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
  }

  .nav-dot circle {
    fill: var(--fg);
    transition: fill 0.25s ease;
  }

  .nav-wordmark {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
  }

  .nav-links {
    display: flex;
    align-items: center;
    gap: 40px;
  }

  .nav-links a {
    font-size: 14.5px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--nav-link);
    text-decoration: none;
    transition: color 0.15s ease;
  }

  .nav-links a:hover {
    color: var(--fg);
  }

  .nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .mobile-menu-toggle,
  .mobile-menu {
    display: none;
  }

  /* ---------- Nav dropdown (full-width panel) ---------- */

  .nav-dropdown {
    position: static;
  }

  .nav-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14.5px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--nav-link);
    font-family: inherit;
    padding: 0;
    transition: color 0.15s ease;
  }

  .nav-dropdown:hover .nav-dropdown-trigger {
    color: var(--fg);
  }

  .nav-dropdown-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-top: 1px solid var(--nav-border);
    padding: 56px 52px;
    display: flex;
    gap: 90px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    z-index: 10;
  }

  .nav-dropdown:hover .nav-dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .dropdown-col-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--fg-muted);
    margin-bottom: 22px;
  }

  .dropdown-links {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .dropdown-links.large a {
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -0.01em;
  }

  .dropdown-links.small {
    gap: 12px;
  }

  .dropdown-links.small a {
    font-size: 15px;
    font-weight: 600;
  }

  .dropdown-links a {
    color: var(--fg);
    text-decoration: none;
    transition: opacity 0.15s ease;
  }

  .dropdown-links a:hover {
    opacity: 0.6;
  }

  @media (max-width: 900px) {
    .nav-dropdown-panel { display: none; }
  }

  /* Dim the page content behind the open dropdown, like the reference */
  .hero {
    transition: filter 0.25s ease, opacity 0.25s ease;
  }

  nav:has(.nav-dropdown:hover) ~ .hero {
    filter: blur(6px);
    opacity: 0.5;
    pointer-events: none;
  }

  /* ---------- Theme toggle ---------- */

  .theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--btn-outline-border);
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, border-color 0.25s ease;
  }

  .theme-toggle:hover {
    background: var(--btn-outline-hover);
  }

  .theme-toggle svg {
    width: 16px;
    height: 16px;
  }

  .theme-toggle circle,
  .theme-toggle path {
    fill: var(--fg);
    stroke: var(--fg);
    transition: fill 0.25s ease, stroke 0.25s ease;
  }

  .theme-toggle .sun-rays path {
    fill: none;
  }

  .theme-toggle .sun-rays {
    display: none;
  }

  html[data-theme="dark"] .theme-toggle .moon {
    display: none;
  }

  html[data-theme="dark"] .theme-toggle .sun-rays {
    display: block;
  }

  /* ---------- Buttons ---------- */

  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 11px 24px;
    border-radius: 24px;
    font-size: 14.5px;
    font-weight: 500;
    letter-spacing: -0.01em;
    cursor: pointer;
    border: none;
    white-space: nowrap;
    transition: opacity 0.15s ease, background 0.15s ease, transform 0.15s ease;
  }

  .btn-ghost {
    background: transparent;
    color: var(--fg);
  }

  .btn-ghost:hover {
    opacity: 0.6;
  }

  .btn-outline {
    background: transparent;
    color: var(--fg);
    border: 1px solid var(--btn-outline-border);
  }

  .btn-outline:hover {
    background: var(--btn-outline-hover);
  }

  .btn-primary {
    background: var(--accent);
    color: #fff;
    padding-left: 20px;
  }

  .btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
  }

  .btn-dot {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }

  /* ---------- Hero (asymmetric) ---------- */

  .hero {
    position: relative;
    min-height: 88vh;
    display: flex;
    align-items: center;
    overflow: hidden;
  }

  #pixel-field {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.24;
  }

  .hero-grid {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(24px, 5vh, 40px);
    padding: clamp(28px, 6vh, 56px) 24px clamp(56px, 10vh, 90px);
    text-align: center;
  }

  .wordmark {
    display: block;
    width: 90vw;
    max-width: 820px;
    height: auto;
  }

  .wordmark circle {
    fill: var(--fg);
    transition: r 0.12s ease-out, fill 0.12s ease-out;
  }

  .hero-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 26px;
    max-width: 460px;
  }

  .hero-right h1 {
    font-size: 38px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    font-weight: 400;
    color: var(--fg);
    text-align: center;
  }

  .hero-right h1 strong {
    font-weight: 700;
  }

  .tagline {
    font-size: 16px;
    font-weight: 400;
    letter-spacing: -0.005em;
    color: var(--fg-muted);
    line-height: 1.65;
    text-align: center;
  }

  .hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
  }

  /* ---------- Responsive ---------- */

  @media (max-width: 900px) {
    nav {
      padding: 16px max(16px, env(safe-area-inset-right)) 16px max(16px, env(safe-area-inset-left));
    }
    .nav-links { display: none; }
    .nav-actions .theme-toggle { display: none; }
    .mobile-menu-toggle {
      display: inline-flex;
      width: 36px;
      height: 36px;
      padding: 9px 7px;
      flex-direction: column;
      justify-content: center;
      gap: 5px;
      border: 1px solid var(--btn-outline-border);
      border-radius: 50%;
      background: transparent;
      cursor: pointer;
    }

    .mobile-menu-toggle span {
      display: block;
      width: 100%;
      height: 1px;
      background: var(--fg);
      transition: transform 0.2s ease;
    }

    .mobile-menu-toggle[aria-expanded="true"] span:first-child {
      transform: translateY(3px) rotate(45deg);
    }

    .mobile-menu-toggle[aria-expanded="true"] span:last-child {
      transform: translateY(-3px) rotate(-45deg);
    }

    .mobile-menu {
      display: block;
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      z-index: 10;
      max-height: calc(100vh - 68px);
      max-height: calc(100dvh - 68px);
      overflow-y: auto;
      overscroll-behavior: contain;
      padding: 28px max(16px, env(safe-area-inset-right)) 30px max(16px, env(safe-area-inset-left));
      background: var(--bg);
      border-bottom: 1px solid var(--nav-border);
      opacity: 0;
      visibility: hidden;
      transform: translateY(-8px);
      transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    }

    .mobile-menu.is-open {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
    }

    .mobile-menu > a {
      display: block;
      color: var(--fg);
      font-size: 28px;
      font-weight: 600;
      letter-spacing: -0.02em;
      text-decoration: none;
    }

    .mobile-menu-divider {
      height: 1px;
      margin: 26px 0 18px;
      background: var(--nav-border);
    }

    .mobile-theme-toggle {
      display: flex;
      width: 100%;
      align-items: center;
      justify-content: space-between;
      padding: 0;
      border: 0;
      background: none;
      color: var(--nav-link);
      font: inherit;
      font-size: 15px;
      cursor: pointer;
      text-align: left;
    }

    .mobile-theme-icon {
      display: inline-flex;
      width: 22px;
      height: 22px;
    }

    .mobile-theme-icon svg {
      width: 100%;
      height: 100%;
    }

    .mobile-theme-icon circle,
    .mobile-theme-icon path {
      fill: var(--fg);
      stroke: var(--fg);
    }

    .mobile-theme-icon .sun-rays path {
      fill: none;
    }

    .mobile-theme-icon .sun-rays,
    html[data-theme="dark"] .mobile-theme-icon .moon {
      display: none;
    }

    html[data-theme="dark"] .mobile-theme-icon .sun-rays {
      display: block;
    }
    .hero-grid { padding: 32px 20px 64px; }
    .hero-right h1 { font-size: 28px; }
  }

  @media (max-height: 520px) and (orientation: landscape) {
    .hero-grid {
      gap: 14px;
      padding: 12px 24px 24px;
    }

    .wordmark { width: min(52vw, 500px); }
    .hero-right { gap: 12px; }
    .hero-right h1 { font-size: 24px; }
    .tagline { font-size: 13px; line-height: 1.4; }
  }

  /* ---------- Shared section heading styles ---------- */

  /* ---------- Works section ---------- */

  .works {
    padding: 90px 52px 110px;
    scroll-margin-top: 96px;
  }

  .works-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 60px;
    max-width: 1400px;
    margin: 0 auto 44px;
    flex-wrap: wrap;
  }

  .works-heading {
    font-size: 56px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--fg);
    max-width: 620px;
    flex: 1 1 480px;
  }

  .works-heading .underline {
    text-decoration: underline;
    text-decoration-thickness: 4px;
    text-underline-offset: 6px;
  }

  .works-copy {
    font-size: 19px;
    line-height: 1.55;
    color: var(--fg);
    max-width: 380px;
    flex: 1 1 320px;
    padding-top: 6px;
  }

  .works-card {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    border-radius: 18px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    min-height: 320px;
    background: #1a2a44; /* fallback base tone if video hasn't loaded */
  }

  .works-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(0, 0, 0, 0.24);
    pointer-events: none;
  }

  .reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  .works-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* Subtle animated grain overlay on top of the video */
  .works-grain {
    position: absolute;
    inset: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    opacity: 0.05;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    animation: grainShift 8s steps(8) infinite;
  }

  @keyframes grainShift {
    0%   { transform: translate(0, 0); }
    12%  { transform: translate(-3%, 2%); }
    24%  { transform: translate(2%, -4%); }
    36%  { transform: translate(-4%, -2%); }
    48%  { transform: translate(3%, 3%); }
    60%  { transform: translate(-2%, 4%); }
    72%  { transform: translate(4%, -3%); }
    84%  { transform: translate(-3%, -3%); }
    100% { transform: translate(0, 0); }
  }

  .works-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 40px 8%;
    text-align: center;
  }

  .works-title-block {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
  }

  .works-wordmark {
    width: 560px;
    max-width: 78vw;
    height: auto;
    padding-top: 6px;
  }

  .works-wordmark circle {
    fill: #fff;
  }

  .works-word {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 121px;
    font-weight: 300;
    letter-spacing: -0.03em;
    color: #fff;
    text-shadow: 0 2px 20px rgba(0,0,0,0.25);
    position: relative;
    bottom: 13px;
  }

  .works-tagline {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.5;
    color: rgba(255,255,255,0.92);
    text-shadow: 0 1px 12px rgba(0,0,0,0.2);
  }

  .works-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #F3F1EC;
    color: #000;
    padding: 11px 22px;
    border-radius: 24px;
    font-size: 14.5px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    margin-top: 14px;
    cursor: pointer;
    transition: transform 0.15s ease;
  }

  .works-btn:hover {
    transform: translateY(-1px);
  }

  @media (max-width: 760px) {
    .works { padding: 50px 20px 70px; }
    .works-header { gap: 24px; margin-bottom: 28px; }
    .works-heading { font-size: 32px; }
    .works-copy { font-size: 15px; }
    .works-card { min-height: 280px; }
    .works-title-block { gap: 14px; }
    .works-wordmark { width: min(260px, 78vw); }
    .works-word { font-size: 56px; top: 0; }
    .works-tagline { font-size: 15px; }
  }

  @media (max-width: 480px) {
    .works-card { aspect-ratio: auto; min-height: 300px; }
    .works-overlay { gap: 14px; padding: 28px 24px; }
    .works-title-block { flex-direction: column; align-items: center; gap: 4px; }
    .works-wordmark { width: min(230px, 74vw); }
    .works-word { font-size: 50px; }
    .works-tagline { max-width: 250px; }
    .works-btn { margin-top: 4px; }
  }

  /* ---------- Footer ---------- */

  .site-footer {
    background: #0A0A0A;
    padding: 120px 24px 40px;
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  .footer-top {
    display: flex;
    justify-content: center;
  }

  .footer-wordmark {
    width: 100%;
    max-width: 1400px;
    height: auto;
  }

  .footer-wordmark circle {
    fill: #F3F1EC;
  }

  .footer-bottom {
    max-width: 1400px;
    margin: 56px auto 0;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
  }

  .footer-copy {
    font-size: 13.5px;
    color: rgba(255,255,255,0.4);
  }

  .footer-links {
    display: flex;
    gap: 28px;
  }

  .footer-links a {
    font-size: 13.5px;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    transition: color 0.2s ease;
  }

  .footer-links a:hover {
    color: #FF7440;
  }

  @media (max-width: 560px) {
    .site-footer { padding: 70px 20px 30px; }
    .footer-bottom { flex-direction: column; align-items: flex-start; gap: 16px; }
  }
