:root{
    --bg: #08070d;
    --bg-panel: #100e1a;
    --bg-card: #16121f;
    --violet: #8b5cf6;
    --violet-bright: #b69cff;
    --violet-deep: #3d2467;
    --plum-line: #2a2038;
    --text: #f1eef9;
    --text-dim: #9d96b3;
    --text-faint: #6c6584;
    --green: #7ee787;
    --gold: #e6c07b;
    --radius: 10px;
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
  }

  *{ margin:0; padding:0; box-sizing:border-box; }

  html{ scroll-behavior:smooth; }

  body{
    background: var(--bg);
    background-image:
      radial-gradient(circle at 12% 8%, rgba(139,92,246,0.14), transparent 42%),
      radial-gradient(circle at 88% 78%, rgba(139,92,246,0.10), transparent 45%);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }

  ::selection{ background: var(--violet-deep); color: var(--text); }

  a{ color: inherit; text-decoration:none; }

  :focus-visible{
    outline: 2px solid var(--violet-bright);
    outline-offset: 3px;
    border-radius: 4px;
  }

  .wrap{
    max-width: 880px;
    margin: 0 auto;
    padding: 0 28px;
  }

  /* ---------- NAV ---------- */
  header.nav{
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
    background: rgba(8,7,13,0.72);
    border-bottom: 1px solid var(--plum-line);
  }
  .nav-inner{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding: 16px 28px;
    max-width: 880px;
    margin: 0 auto;
  }
  .nav-mark{
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--violet-bright);
    letter-spacing: 0.5px;
  }
  .nav-mark span{ color: var(--text-faint); }
  .nav-links{
    display:flex;
    gap: 26px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-dim);
  }
  .nav-links a:hover{ color: var(--violet-bright); }

  /* ---------- HERO / TERMINAL ---------- */
  .hero{
    padding: 72px 0 40px;
  }
  .eyebrow{
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--green);
    margin-bottom: 18px;
    display:flex;
    align-items:center;
    gap: 8px;
  }
  .eyebrow::before{
    content:"";
    width: 7px; height:7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
    display:inline-block;
  }

  .hero-grid{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap: 48px;
    flex-wrap: wrap-reverse;
  }
  .hero-text{ flex: 1 1 380px; }

  .hero-photo-frame{
    position: relative;
    width: 210px;
    height: 210px;
    flex-shrink: 0;
  }
  .hero-photo-frame::before{
    content:"";
    position: absolute;
    inset: -9px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--violet-bright), transparent 55%, var(--violet));
    filter: blur(7px);
    opacity: 0.75;
    animation: spin-ring 7s linear infinite;
  }
  @keyframes spin-ring{ to{ transform: rotate(360deg); } }
  .hero-photo{
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--bg);
    display: block;
  }

  .typewriter{
    font-family: var(--font-mono);
    font-size: 1.05rem;
    color: var(--violet-bright);
    margin-bottom: 14px;
    min-height: 1.4em;
  }
  .typewriter .cursor{
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--violet-bright);
    margin-left: 3px;
    vertical-align: -0.15em;
    animation: blink 0.9s step-end infinite;
  }
  @keyframes blink{ 50%{ opacity: 0; } }

  .hero-name{
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.2rem, 5.5vw, 3.1rem);
    letter-spacing: -0.02em;
    margin: 0 0 10px;
  }
  .hero-name .accent{ color: var(--violet-bright); }
  .hero-role{
    font-size: 1.05rem;
    color: var(--text-dim);
    max-width: 560px;
  }
  .cta-row{
    display:flex;
    gap: 14px;
    margin-top: 30px;
    flex-wrap: wrap;
  }
  .btn{
    font-family: var(--font-mono);
    font-size: 13.5px;
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid var(--plum-line);
    transition: border-color .15s ease, transform .15s ease, background .15s ease;
    display: inline-block;
  }
  .btn.primary{
    background: var(--violet);
    color: #0a0812;
    font-weight: 600;
    border-color: transparent;
  }
  .btn.primary:hover{ background: var(--violet-bright); transform: translateY(-1px); }
  .btn.ghost{ color: var(--text); }
  .btn.ghost:hover{ border-color: var(--violet-bright); color: var(--violet-bright); }

  /* ---------- SECTION SCAFFOLD ---------- */
  section{
    padding: 64px 0;
    border-top: 1px solid var(--plum-line);
  }
  .sec-head{
    display:flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 30px;
  }
  .sec-path{
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--text-faint);
  }
  .sec-title{
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.5rem;
  }

  /* ---------- ABOUT ---------- */
  .about-grid{
    display:grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 40px;
  }
  .about-text p{ color: var(--text-dim); margin-bottom: 14px; font-size: 15px; }
  .about-text strong{ color: var(--text); font-weight: 600; }

  .facts{
    background: var(--bg-card);
    border: 1px solid var(--plum-line);
    border-radius: var(--radius);
    padding: 22px;
    font-family: var(--font-mono);
    font-size: 13px;
  }
  .facts dt{ color: var(--text-faint); margin-top: 14px; }
  .facts dt:first-child{ margin-top: 0; }
  .facts dd{ color: var(--text); margin-top: 3px; }

  /* ---------- SKILLS ---------- */
  .skill-groups{
    display:grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
  }
  .skill-card{
    background: var(--bg-card);
    border: 1px solid var(--plum-line);
    border-radius: var(--radius);
    padding: 20px 20px 18px;
  }
  .skill-card h3{
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--violet-bright);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
  }
  .chip-row{ display:flex; flex-wrap:wrap; gap: 8px; }
  .chip{
    font-family: var(--font-mono);
    font-size: 12.5px;
    padding: 6px 11px;
    background: #1c1730;
    border: 1px solid var(--plum-line);
    border-radius: 6px;
    color: var(--text-dim);
  }

  /* ---------- EXPERIENCE (git log motif) ---------- */
  .log{
    position: relative;
    padding-left: 28px;
  }
  .log::before{
    content:"";
    position: absolute;
    left: 5px; top: 6px; bottom: 6px;
    width: 1px;
    background: var(--plum-line);
  }
  .commit{
    position: relative;
    padding-bottom: 30px;
  }
  .commit:last-child{ padding-bottom: 0; }
  .commit::before{
    content:"";
    position: absolute;
    left: -28px; top: 4px;
    width: 11px; height: 11px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--violet-bright);
  }
  .commit-hash{
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-faint);
  }
  .commit-msg{
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    margin: 4px 0 6px;
  }
  .commit-meta{
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--text-faint);
    margin-bottom: 8px;
  }
  .commit-body{
    color: var(--text-dim);
    font-size: 14.5px;
    max-width: 620px;
  }

  /* ---------- PROJECTS ---------- */
  .projects{
    display:grid;
    grid-template-columns: repeat(auto-fit, minmax(250px,1fr));
    gap: 18px;
  }
  .proj-card{
    background: var(--bg-card);
    border: 1px solid var(--plum-line);
    border-radius: var(--radius);
    padding: 22px;
    transition: border-color .15s ease, transform .15s ease;
  }
  .proj-card:hover{ border-color: var(--violet); transform: translateY(-3px); }
  .proj-tag{
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--green);
    margin-bottom: 10px;
    display:block;
  }
  .proj-card h3{
    font-family: var(--font-display);
    font-size: 1.05rem;
    margin-bottom: 8px;
  }
  .proj-card p{ color: var(--text-dim); font-size: 13.5px; margin-bottom: 14px; }
  .proj-stack{ display:flex; flex-wrap:wrap; gap:6px; }
  .proj-stack span{
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-faint);
  }
  .proj-stack span:not(:last-child)::after{ content:"·"; margin-left:6px; color: var(--plum-line); }

  /* ---------- CONTACT ---------- */
  .contact-panel{
    background: linear-gradient(160deg, #17102b, #0d0b15);
    border: 1px solid var(--plum-line);
    border-radius: var(--radius);
    padding: 40px 34px;
    text-align: left;
  }
  .contact-panel .sec-title{ margin-bottom: 10px; }
  .contact-panel p{ color: var(--text-dim); max-width: 460px; margin-bottom: 24px; font-size: 15px; }
  .contact-links{ display:flex; gap: 14px; flex-wrap: wrap; }

  footer{
    padding: 30px 0 50px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-faint);
    display:flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
  }

  @media (max-width: 680px){
    .about-grid{ grid-template-columns: 1fr; }
    .nav-links{ display:none; }
    .hero-photo-frame{ width: 150px; height: 150px; }
  }

  @media (prefers-reduced-motion: reduce){
    html{ scroll-behavior:auto; }
    *{ transition: none !important; animation: none !important; }
  }