:root{
    --bg: #0A0A0F;
    --panel: #15151C;
    --panel-raised: #1B1B24;
    --line: #26262F;
    --text: #F1F0F5;
    --muted: #94939F;
    --accent: #7C5CFC;
    --accent-hover: #8F72FF;
    --accent-soft: rgba(124,92,252,0.14);
    --accent-glow: rgba(124,92,252,0.4);

    --font-display: "Space Grotesk", sans-serif;
    --font-body: "Inter", sans-serif;
    --font-mono: "JetBrains Mono", monospace;

    --maxw: 1160px;
  }

  *{ box-sizing: border-box; }
  html{ scroll-behavior: smooth; }
  @media (prefers-reduced-motion: reduce){ html{ scroll-behavior: auto; } }

  body{
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
  }
  a{ color: inherit; }
  ::selection{ background: var(--accent); color: #0A0A0F; }
  :focus-visible{ outline: 2px solid var(--accent); outline-offset: 3px; }

  .wrap{ max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
  .icon{ width: 16px; height: 16px; flex-shrink: 0; }

  /* ---------- NAV ---------- */
  .site-nav{
    position: fixed;
    top: 18px;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    justify-content: center;
    padding: 0 20px;
    pointer-events: none;
  }
  .nav-pill{
    pointer-events: all;
    position: relative;
    margin: 0 auto;
    background: rgba(15,15,20,0.6);
    backdrop-filter: blur(24px) saturate(180%) brightness(0.96);
    -webkit-backdrop-filter: blur(24px) saturate(180%) brightness(0.96);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 999px;
    padding: 7px 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.07);
    animation: navDropIn 0.55s cubic-bezier(0.34,1.3,0.64,1) both;
  }
  @keyframes navDropIn{ from{ opacity:0; transform:translateY(-60px); } to{ opacity:1; transform:translateY(0); } }
  @media (prefers-reduced-motion: reduce){ .nav-pill{ animation:none; } }
  #nav-hl{
    position: absolute;
    background: var(--accent);
    border-radius: 999px;
    box-shadow: 0 0 18px var(--accent-glow);
    transition: left 0.3s cubic-bezier(0.34,1.56,0.64,1), width 0.3s cubic-bezier(0.34,1.56,0.64,1);
    z-index: 0;
    pointer-events: none;
    display: none;
  }
  .logo{
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-body);
    font-size: 15.2px;
    font-weight: 700;
    text-decoration: none;
    color: var(--text);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    letter-spacing: -0.01em;
    padding: 4px 10px 4px 8px;
  }
  .logo .accent-word{ color: var(--accent); }

  nav.links{
    position: relative;
    display: flex;
    align-items: center;
    gap: 2px;
  }
  .nav-item{
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    color: var(--muted);
    font-family: var(--font-body);
    font-size: 13.6px;
    font-weight: 500;
    padding: 9px 16px;
    border-radius: 999px;
    transition: color 0.15s ease;
  }
  .nav-item:hover{ color: var(--text); }
  .nav-item.active{ color: #fff; }

  .nav-cta{
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-body);
    font-size: 13.6px;
    font-weight: 700;
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: 0 0 16px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.22);
    transition: background 0.15s ease, transform 0.15s ease;
    flex-shrink: 0;
    margin-left: 10px;
  }
  .nav-cta:hover{ background: var(--accent-hover); transform: translateY(-1px); }

  /* ---------- MOBILE NAV ---------- */
  #mob-top-header{
    display: none;
    position: fixed;
    top: 14px;
    left: 0;
    right: 0;
    z-index: 60;
    justify-content: center;
    pointer-events: none;
  }
  #mob-top-header .mh-pill{
    pointer-events: all;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px 8px 10px;
    background: rgba(15,15,20,0.6);
    backdrop-filter: blur(24px) saturate(180%) brightness(0.96);
    -webkit-backdrop-filter: blur(24px) saturate(180%) brightness(0.96);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 999px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.07);
    text-decoration: none;
    animation: navDropIn 0.55s cubic-bezier(0.34,1.3,0.64,1) both;
  }
  #mob-top-header .mh-icon{ width: 22px; height: 22px; flex-shrink: 0; color: var(--accent); }
  #mob-top-header .mh-txt{
    font-family: var(--font-body);
    font-size: 13.6px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
    white-space: nowrap;
  }
  #mob-top-header .mh-txt .accent-word{ color: var(--accent); }

  #mob-bottom-nav{
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 60;
    align-items: center;
    gap: 0;
    background: rgba(15,15,20,0.6);
    backdrop-filter: blur(24px) saturate(180%) brightness(0.96);
    -webkit-backdrop-filter: blur(24px) saturate(180%) brightness(0.96);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 999px;
    padding: 6px 6px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.07);
    animation: navBotIn 0.55s cubic-bezier(0.34,1.3,0.64,1) both;
  }
  @keyframes navBotIn{ from{ opacity:0; transform:translateX(-50%) translateY(60px); } to{ opacity:1; transform:translateX(-50%) translateY(0); } }
  @media (prefers-reduced-motion: reduce){
    #mob-top-header .mh-pill{ animation:none; }
    #mob-bottom-nav{ animation:none; }
  }
  #mnb-hl{
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 0;
    width: 0;
    border-radius: 999px;
    background: rgba(255,255,255,0.1);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
    transition: left 0.3s cubic-bezier(0.34,1.56,0.64,1), width 0.3s cubic-bezier(0.34,1.56,0.64,1);
    pointer-events: none;
    z-index: 0;
  }
  .mnb{
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 9px 16px;
    border-radius: 999px;
    color: var(--muted);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.15s ease;
    min-width: 52px;
  }
  .mnb.act{ color: var(--accent); }
  .mnb .icon{ width: 19px; height: 19px; }
  .mnb-wide{
    flex-direction: row;
    gap: 6px;
    padding: 9px 14px;
    min-width: unset;
  }
  .mnb-wide .icon{ width: 17px; height: 17px; }
  .mnb-label{
    font-family: var(--font-body);
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
  }
  .mnb-tip{
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15,15,20,0.92);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 5px 10px;
    font-family: var(--font-body);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s ease;
  }
  .mnb.tip-show .mnb-tip{ opacity: 1; }

  @media (max-width: 760px){
    .site-nav{ display: none; }
    #mob-top-header{ display: flex; }
    #mob-bottom-nav{ display: flex; }
    body{ padding-bottom: 92px; }
  }

  @media (min-width: 761px){
    #mob-top-header{ display: none !important; }
    #mob-bottom-nav{ display: none !important; }
  }

  /* ---------- HERO / CAROUSEL ---------- */
.hero{
    position: relative;
    min-height: 640px;
    display: flex;
    align-items: center;
    padding-top: 80px; /* ADD THIS: Adjust this number (e.g., 60px, 100px) to move it further down */
    padding-bottom: 0;
    overflow: hidden;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48"><path d="M48 0H0V48" fill="none" stroke="%23161620" stroke-width="1"/></svg>');
    background-repeat: repeat;
  }

  .hero-content{ max-width: 620px; }

  @keyframes heroReveal{ from{ opacity:0; transform:translateY(16px); } to{ opacity:1; transform:translateY(0); } }
  .hero-content .meta-row{ animation: heroReveal 0.6s cubic-bezier(0.2,1,0.4,1) both; animation-delay: 0.05s; }
  .hero-content h1{ animation: heroReveal 0.6s cubic-bezier(0.2,1,0.4,1) both; animation-delay: 0.12s; }
  .hero-content p.lede{ animation: heroReveal 0.6s cubic-bezier(0.2,1,0.4,1) both; animation-delay: 0.2s; }
  .hero-content .btn-row{ animation: heroReveal 0.6s cubic-bezier(0.2,1,0.4,1) both; animation-delay: 0.28s; }
  @media (prefers-reduced-motion: reduce){
    .hero-content .meta-row, .hero-content h1, .hero-content p.lede, .hero-content .btn-row{ animation:none; }
  }

  .meta-row{
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--accent);
    letter-spacing: 0.03em;
    margin: 0 0 18px;
  }
  .meta-row .sep{ color: var(--muted); margin: 0 8px; }

  .hero-content h1{
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(44px, 7vw, 76px);
    line-height: 0.98;
    margin: 0 0 20px;
    letter-spacing: -0.01em;
  }

  .hero-content p.lede{
    font-size: 16px;
    color: var(--muted);
    max-width: 50ch;
    margin: 0 0 30px;
  }

  .btn-row{ display:flex; gap: 12px; flex-wrap: wrap; }

  .btn{
    font-family: var(--font-body);
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
    padding: 13px 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items:center;
    gap: 9px;
    transition: background 0.15s ease, border-color 0.15s ease;
    border: 1px solid transparent;
  }
  .btn-primary{ background: var(--accent); color: #fff; box-shadow: 0 4px 18px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.18); }
  .btn-primary:hover{ background: var(--accent-hover); transform: translateY(-1px); }
  .btn-primary svg{ width: 13px; height: 13px; }
  .btn-ghost{ background: var(--panel-raised); border-color: var(--line); color: var(--text); }
  .btn-ghost:hover{ border-color: var(--muted); }

  /* ---------- SECTION SHARED ---------- */
  section.content-section{ padding: 90px 0; border-top: 1px solid var(--line); }

  .section-head{
    display:flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 48px;
    flex-wrap: wrap;
  }
  .section-head h2{
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 38px);
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.01em;
    max-width: 20ch;
  }
  .section-head p{ color: var(--muted); max-width: 38ch; margin: 0; font-size: 14.5px; }

  /* ---------- PROJECTS ---------- */
  .project-grid{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
  @media (max-width: 900px){ .project-grid{ grid-template-columns: 1fr; } }

  .card{
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.34,1.3,0.64,1), box-shadow 0.25s ease, border-color 0.25s ease;
    display:flex;
    flex-direction: column;
    scroll-margin-top: 120px;
  }
  .card:hover{
    transform: scale(1.025);
    border-color: #3a3a46;
    box-shadow: 0 16px 40px rgba(0,0,0,0.5);
    z-index: 2;
  }
  @media (prefers-reduced-motion: reduce){ .card:hover{ transform:none; } }

  .card-head{
    display:flex;
    justify-content: space-between;
    align-items:center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--panel-raised);
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
  }

  .card-body{ padding: 22px; flex:1; display:flex; flex-direction:column; }
  .card-body h3{ font-family: var(--font-display); font-size: 20px; margin: 0 0 10px; font-weight: 600; }
  .card-body p{ font-size: 14px; color: var(--muted); margin: 0 0 20px; flex: 1; }

  .tag-row{ display:flex; flex-wrap:wrap; gap: 8px; margin-bottom: 18px; }
  .chip{
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
    border: 1px solid var(--line);
    padding: 4px 9px;
    border-radius: 999px;
  }

  .card-link{
    font-family: var(--font-mono);
    font-size: 12.5px;
    text-decoration: none;
    color: var(--text);
    border-top: 1px solid var(--line);
    padding-top: 14px;
    display:inline-flex;
    align-items:center;
    gap: 6px;
    transition: color 0.15s ease, transform 0.15s cubic-bezier(0.34,1.3,0.64,1);
  }
  .card-link:hover{ color: var(--accent); transform: translateX(3px); }

  /* ---------- YOUTUBE ---------- */
  .yt-layout{ display:grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; }
  @media (max-width: 860px){ .yt-layout{ grid-template-columns: 1fr; } }
  .yt-copy p{ color: var(--muted); font-size: 15px; max-width: 44ch; }

  .video-list{ border-top: 1px solid var(--line); }
  .video-row{
    display:flex;
    align-items:center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 4px;
    border-bottom: 1px solid var(--line);
    border-radius: 8px;
    transition: background 0.2s ease, padding-left 0.2s cubic-bezier(0.34,1.3,0.64,1);
    cursor: default;
  }
  .video-row:hover{ background: var(--panel); padding-left: 12px; }
  .video-row .idx{ font-family: var(--font-mono); color: var(--muted); font-size: 12px; width: 28px; flex-shrink:0; }
  .video-row .title{ flex:1; font-size: 15px; }
  .video-row .len{ font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

  /* ---------- SCROLL REVEAL ---------- */
  .reveal{
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.2,1,0.4,1), transform 0.7s cubic-bezier(0.2,1,0.4,1);
  }
  .reveal.in{ opacity: 1; transform: none; }
  .project-grid .card:nth-child(1){ transition-delay: 0s; }
  .project-grid .card:nth-child(2){ transition-delay: 0.08s; }
  .project-grid .card:nth-child(3){ transition-delay: 0.16s; }
  @media (prefers-reduced-motion: reduce){
    .reveal{ opacity:1; transform:none; transition:none; }
  }