  :root{
    --bg:#0c1119;
    --panel:#131a26;
    --panel-border:#232c3d;
    --text:#e9edf5;
    --muted:#8b95a9;
    --accent:#e0a458;      /* the one accent color for interactive/UI elements */
    --world-a:#e0a458;     /* used only inside the rotation-teaser graphic */
    --world-b:#4f9d9d;
    --radius:10px;
  }
  *{ box-sizing:border-box; }
  html{ scroll-behavior:smooth; }
  @media (prefers-reduced-motion: reduce){
    html{ scroll-behavior:auto; }
    *{ animation-duration:0.001ms !important; animation-iteration-count:1 !important; transition-duration:0.001ms !important; }
  }
  body{
    margin:0; background:var(--bg); color:var(--text);
    font-family:'Inter', -apple-system, sans-serif;
    line-height:1.6;
  }
  h1,h2,h3{ font-family:'Space Grotesk', sans-serif; margin:0; letter-spacing:-0.01em; }
  a{ color:inherit; }
  .wrap{ max-width:760px; margin:0 auto; padding:0 24px; }
  section{ padding:88px 0; }
  section + section{ border-top:1px solid var(--panel-border); }

  /* nav */
  nav{
    position:sticky; top:0; z-index:20; backdrop-filter:blur(8px);
    background:rgba(12,17,25,.82); border-bottom:1px solid var(--panel-border);
  }
  nav .wrap{ display:flex; justify-content:space-between; align-items:center; padding:16px 24px; max-width:760px; }
  nav .brand{ font-family:'Space Grotesk', sans-serif; font-weight:600; font-size:22px; text-decoration:none; }
  nav .links{ display:flex; gap:22px; }
  nav .links a{ font-size:13.5px; color:var(--muted); text-decoration:none; }
  nav .links a:hover{ color:var(--text); }

  /* hero */
  #hero{ padding-top:80px; }
  #hero h1{ font-size:38px; font-weight:600; line-height:1.25; max-width:600px; }
  #hero p.lede{ color:var(--muted); font-size:16px; max-width:520px; margin-top:18px; }
  .cta-row{ display:flex; gap:12px; margin-top:32px; flex-wrap:wrap; }
  .btn{
    display:inline-block; padding:10px 20px; border-radius:7px; font-size:14px;
    text-decoration:none; font-weight:500; border:1px solid transparent;
  }
  .btn-primary{ background:var(--accent); color:#1a1305; }
  .btn-primary:hover{ opacity:.9; }
  .btn-secondary{ border-color:var(--panel-border); color:var(--text); }
  .btn-secondary:hover{ border-color:var(--accent); }

  /* section label */
  .label{ color:var(--muted); font-size:13px; margin-bottom:14px; }
  section h2{ font-size:24px; font-weight:600; margin-bottom:24px; }

  /* about */
  #about p{ color:#c7cddb; font-size:15.5px; max-width:600px; }
  .stat-row{ display:flex; gap:32px; margin-top:28px; flex-wrap:wrap; }
  .stat b{ display:block; font-family:'Space Grotesk',sans-serif; font-size:20px; }
  .stat span{ color:var(--muted); font-size:13px; }

  /* skills */
  .skill-group{ margin-bottom:18px; }
  .skill-group h4{ font-size:13px; color:var(--muted); font-weight:500; margin:0 0 8px; }
  .pill-row{ display:flex; flex-wrap:wrap; gap:8px; }
  .pill{
    font-size:13px; padding:5px 12px; border-radius:6px; background:var(--panel);
    border:1px solid var(--panel-border); color:#d5dae5;
  }

  /* projects grid */
  .grid{ display:grid; grid-template-columns:repeat(auto-fit, minmax(280px,1fr)); gap:18px; }
  .card{
    background:var(--panel); border:1px solid var(--panel-border); border-radius:var(--radius);
    overflow:hidden; cursor:pointer; transition:border-color .15s ease;
  }
  .card:hover{ border-color:#3a4358; }
  .card .frame{ position:relative; aspect-ratio:16/10; background:#060809; overflow:hidden; }
  .card video{ width:100%; height:100%; object-fit:cover; display:block; }
  .card--contain video{ object-fit:contain; }
  .play-hint{
    position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
    background:rgba(0,0,0,.15); opacity:1; transition:opacity .15s ease; pointer-events:none;
  }
  .card:hover .play-hint{ opacity:0; }
  .play-hint svg{ width:34px; height:34px; opacity:.85; }
  .card .meta{ padding:14px 16px; }
  .card .meta h3{ font-size:14.5px; font-weight:600; margin-bottom:3px; }
  .card .meta p{ margin:0; font-size:12.5px; color:var(--muted); }

  /* in-development teaser card */
  .card.teaser{ cursor:default; }
  .card.teaser:hover{ border-color:var(--panel-border); }
  .teaser .frame{ background:#0a0e14; display:flex; align-items:center; justify-content:center; }
  .rot-stage{ width:120px; height:120px; perspective:600px; }
  .rot-plane{
    width:100%; height:100%; position:relative; transform-style:preserve-3d;
    animation:rotateWorlds 6s ease-in-out infinite;
  }
  .rot-face{
    position:absolute; inset:0; border-radius:8px; backface-visibility:hidden;
    display:flex; align-items:center; justify-content:center;
    font-family:'Space Grotesk',sans-serif; font-size:12px; color:#0c1119; font-weight:600;
    background-image:
      linear-gradient(rgba(12,17,25,.18) 1px, transparent 1px),
      linear-gradient(90deg, rgba(12,17,25,.18) 1px, transparent 1px);
    background-size:14px 14px;
  }
  .rot-face.a{ background-color:var(--world-a); }
  .rot-face.b{ background-color:var(--world-b); transform:rotateY(180deg); }
  @keyframes rotateWorlds{
    0%, 38%{ transform:rotateY(0deg); }
    50%, 88%{ transform:rotateY(180deg); }
    100%{ transform:rotateY(360deg); }
  }
  .tag{
    display:inline-block; font-size:11.5px; padding:3px 9px; border-radius:5px;
    background:rgba(224,164,88,.12); color:var(--accent); margin-bottom:8px;
  }

  /* lightbox */
  #lightbox{
    position:fixed; inset:0; background:rgba(4,5,9,.92); display:none;
    align-items:center; justify-content:center; z-index:100; padding:24px;
  }
  #lightbox.open{ display:flex; }
  #lightbox .box{ max-width:860px; width:100%; max-height:85vh; display:flex; flex-direction:column; }
  #lightbox video{ flex:1 1 auto; min-height:0; width:100%; height:100%; object-fit:contain; border-radius:8px; background:#000; display:block; }
  #lightbox .cap{ display:flex; justify-content:space-between; align-items:baseline; margin-top:12px; flex-shrink:0; }
  #lightbox .cap h3{ font-size:15px; font-weight:600; }
  #lightbox .close{
    background:none; border:1px solid var(--panel-border); color:var(--text); border-radius:6px;
    padding:6px 12px; font-size:13px; cursor:pointer;
  }
  #lightbox .close:hover{ border-color:var(--accent); color:var(--accent); }

  /* contact / footer */
  #contact p{ color:var(--muted); max-width:480px; }
  .contact-links{ display:flex; gap:20px; margin-top:20px; flex-wrap:wrap; }
  .contact-links a{ font-size:14.5px; text-decoration:none; color:var(--text); border-bottom:1px solid var(--panel-border); padding-bottom:2px; }
  .contact-links a:hover{ border-color:var(--accent); color:var(--accent); }
