  @font-face {
    font-family: 'Inter';
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    src: url(/assets/fonts/inter.woff2) format('woff2');
  }
  @font-face {
    font-family: 'JetBrains Mono';
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    src: url(/assets/fonts/jetbrains-mono.woff2) format('woff2');
  }

  :root {
    --bg: #0b0a08;
    --bg-raised: #17130f;
    --bg-card: #1c1712;
    --fg: #f2ece1;
    --fg-muted: #a89a89;
    --fg-faint: #6f6459;
    --line: #2c2620;
    --accent: #d9a62a;
    --accent-dim: #7a5f1a;
    --font-display: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', 'Cascadia Code', monospace;
  }

  * { box-sizing: border-box; }

  html { background: var(--bg); }

  body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
  }

  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.05;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 1;
  }

  main, footer { position: relative; z-index: 2; }

  h1, h2 { text-wrap: balance; font-family: var(--font-display); margin: 0; }

  p { margin: 0; }

  a {
    color: inherit;
    text-decoration-color: var(--accent-dim);
    text-underline-offset: 3px;
    transition: text-decoration-color .15s ease;
  }
  a:hover { text-decoration-color: var(--accent); }
  a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 2px;
  }

  .eyebrow, .label, .fact dt, footer .meta {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  .wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 32px;
  }

  /* Lang switch */
  .lang-switch {
    padding: 24px 0 0;
    text-align: right;
    font-family: var(--font-mono);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
  .lang-switch .lang-current { color: var(--fg); font-weight: 600; }
  .lang-switch .lang-sep { color: var(--fg-faint); padding: 0 6px; }
  .lang-switch .lang-link { color: var(--fg-faint); }
  .lang-switch .lang-link:hover { color: var(--accent); }

  /* Hero */
  .hero {
    padding: 64px 0 0;
  }
  .eyebrow {
    font-size: 12px;
    color: var(--fg-muted);
    margin-bottom: 20px;
  }
  h1 {
    font-size: clamp(30px, 4.4vw, 46px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.01em;
  }
  .dek {
    margin-top: 22px;
    font-size: 17px;
    line-height: 1.6;
    color: var(--fg-muted);
    max-width: 62ch;
  }
  .dek strong { color: var(--fg); font-weight: 600; }

  /* Ledger */
  .ledger { padding: 56px 0; }
  .ledger .row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 32px;
    padding: 22px 0;
    border-top: 1px solid var(--line);
  }
  .ledger .row:last-child { border-bottom: 1px solid var(--line); }
  .fact dt {
    font-size: 11px;
    color: var(--fg-faint);
    padding-top: 3px;
    padding-left: 16px;
    position: relative;
  }
  .fact dt::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 1px;
  }
  .fact dd {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: var(--fg-muted);
    font-variant-numeric: tabular-nums;
  }
  .fact dd strong { color: var(--fg); font-weight: 600; }

  /* Two-column section grammar (shared by focus + contact) */
  .split {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 40px;
    padding: 56px 0;
    border-top: 1px solid var(--line);
  }
  .split h2 {
    font-size: clamp(24px, 3vw, 30px);
    font-weight: 800;
    letter-spacing: -0.01em;
  }

  .cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: 6px;
    padding: 26px;
  }
  .card h3 {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 600;
  }
  .card p {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--fg-muted);
  }
  .card-link {
    display: inline-block;
    margin-top: 14px;
    font-size: 13.5px;
    font-weight: 600;
  }

  .chips { display: flex; flex-wrap: wrap; gap: 10px; }
  .chip {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: .03em;
    color: var(--fg-muted);
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 14px;
  }

  .contact-body p {
    font-size: 17px;
    line-height: 1.65;
    color: var(--fg-muted);
    max-width: 56ch;
  }
  .links {
    list-style: none;
    display: flex;
    gap: 28px;
    margin: 28px 0 0;
    padding: 0;
    flex-wrap: wrap;
  }
  .links a {
    font-weight: 600;
    font-size: 15px;
  }

  footer {
    border-top: 1px solid var(--line);
    padding: 28px 0 56px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  footer .meta { font-size: 11px; color: var(--fg-faint); }
  footer a { font-size: 12px; color: var(--fg-faint); }

  @media (max-width: 760px) {
    .wrap { padding: 0 20px; }
    .split { grid-template-columns: 1fr; gap: 20px; }
    .cards { grid-template-columns: 1fr; }
    .ledger .row { grid-template-columns: 1fr; gap: 8px; }
  }

  /* ── system frame (shared with project cards) ─────────── */
  :root {
    --line-2: rgba(242, 236, 225, .16);
  }
  .fr-head, .fr-foot, .fr-tag { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em; }

  .showcase { margin-top: 40px; }
  .frame {
    margin: -26px -26px 18px;
    width: calc(100% + 52px);
    border: 1px solid var(--line-2);
    border-radius: 5px 5px 0 0;
    background: var(--bg);
    overflow: hidden;
    box-shadow: 0 24px 60px -32px rgba(0,0,0,.85);
  }
  .showcase .frame { margin: 0; width: 100%; border-radius: 8px; }
  .fr-head, .fr-foot {
    display: flex; justify-content: space-between; gap: 12px;
    font-size: 9.5px; color: var(--fg-faint); padding: 9px 12px;
  }
  .fr-head { border-bottom: 1px solid var(--line); }
  .fr-head b { color: var(--accent); font-weight: 600; }
  .fr-foot { border-top: 1px solid var(--line); }
  .fr-foot span:last-child { color: var(--fg-muted); }
  .fr-foot b { color: var(--fg); font-variant-numeric: tabular-nums; }

  .fr-view { position: relative; line-height: 0; overflow: hidden; aspect-ratio: 16 / 9; --mx: 50%; --my: 50%; }
  .fr-view img {
    width: 100%; height: 100%; display: block; object-fit: cover;
    filter: grayscale(1) contrast(1.1) brightness(.9);
    transform: scale(1.05); opacity: 0;
    transition: transform 1.6s cubic-bezier(.16,1,.3,1), opacity 1.2s ease;
  }
  .frame.in .fr-view img { transform: none; opacity: 1; }
  .fr-view::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background:
      linear-gradient(rgba(242,236,225,.05) 1px, transparent 1px) 0 0/100% 25%,
      linear-gradient(90deg, rgba(242,236,225,.05) 1px, transparent 1px) 0 0/12.5% 100%,
      radial-gradient(120% 90% at var(--mx) var(--my), rgba(217,166,42,.10), transparent 55%),
      radial-gradient(140% 110% at 50% 50%, transparent 45%, rgba(6,5,4,.7));
  }
  .scan {
    position: absolute; left: 0; right: 0; top: 0; height: 100%; pointer-events: none;
    transform: translateY(-100%); opacity: 0;
    background: linear-gradient(to bottom,
      transparent 0, transparent calc(100% - 72px),
      rgba(217,166,42,.14) calc(100% - 22px),
      rgba(217,166,42,.55) 100%);
  }
  .frame.in .scan { animation: sweep 7s cubic-bezier(.45,0,.55,1) 1.1s infinite; }
  @keyframes sweep {
    0% { transform: translateY(-100%); opacity: 0; }
    5% { opacity: .95; }
    24% { transform: translateY(0); opacity: .95; }
    30%, 100% { transform: translateY(0); opacity: 0; }
  }
  .fr-box {
    position: absolute;
    border: 1px solid rgba(217,166,42,.85);
    box-shadow: 0 0 0 1px rgba(10,9,7,.45), 0 0 30px rgba(217,166,42,.16) inset;
    opacity: 0; transform: scale(1.12);
    transition: opacity .5s ease 1.5s, transform .9s cubic-bezier(.16,1,.3,1) 1.5s;
  }
  .frame.in .fr-box { opacity: 1; transform: none; animation: breathe 5s ease-in-out 2.6s infinite; }
  @keyframes breathe { 0%, 100% { border-color: rgba(217,166,42,.85); } 50% { border-color: rgba(217,166,42,.42); } }
  .fr-box i { position: absolute; width: 11px; height: 11px; border: 1.5px solid var(--accent); font-style: normal; }
  .fr-box .tl { top: -1.5px; left: -1.5px; border-right: 0; border-bottom: 0; }
  .fr-box .tr { top: -1.5px; right: -1.5px; border-left: 0; border-bottom: 0; }
  .fr-box .bl { bottom: -1.5px; left: -1.5px; border-right: 0; border-top: 0; }
  .fr-box .br { bottom: -1.5px; right: -1.5px; border-left: 0; border-top: 0; }
  .fr-tag {
    position: absolute; top: -1px; left: -1px; transform: translateY(-100%);
    background: var(--accent); color: #120d02;
    font-size: 9.5px; font-weight: 600; padding: 3px 7px; white-space: nowrap;
    line-height: 1.3; font-variant-numeric: tabular-nums;
  }

  @media (prefers-reduced-motion: reduce) {
    .fr-view img { transition: none; opacity: 1; transform: none; }
    .scan, .frame.in .scan { animation: none; opacity: 0; }
    .fr-box, .frame.in .fr-box { transition: none; animation: none; opacity: 1; transform: none; }
  }
