 *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :root {
    --void: #0A0A0A;
    --surface: #111111;
    --card: #161616;
    --border: #222222;
    --text: #F0F0F0;
    --muted: #666666;
    --dim: #333333;
    --signal: #4D9FFF;
    --mono: 'Space Mono', monospace;
    --sans: 'Inter', sans-serif;
  }

  html { scroll-behavior: smooth; }

  body {
    background: var(--void);
    color: var(--text);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.7;
    overflow-x: hidden;
  }

  /* ── NAV RAIL ── */
  nav {
    position: fixed;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    z-index: 100;
  }

  nav a {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--muted);
    text-decoration: none;
    letter-spacing: 0.12em;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    transition: color 0.2s;
  }

  nav a:hover { color: var(--signal); }

  /* ── SECTIONS ── */
  section {
    min-height: 100vh;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 2rem 0 6rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  /* ── HERO ── */
  #hero {
    position: relative;
    padding-top: 6rem;
  }

  .prompt-line {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.08em;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .prompt-line::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text);
    flex-shrink: 0;
  }

  .hero-headline {
    font-family: var(--mono);
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 1.5rem;
  }

  .hero-headline .cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: var(--signal);
    margin-left: 4px;
    vertical-align: middle;
    animation: blink 1s step-end infinite;
  }

  @keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

  .hero-sub {
    font-family: var(--sans);
    font-size: 15px;
    color: var(--muted);
    font-weight: 300;
    max-width: 440px;
    margin-bottom: 3rem;
    line-height: 1.8;
  }

  .hero-links {
    display: flex;
    gap: 2rem;
    align-items: center;
  }

  .hero-links a {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    text-decoration: none;
    letter-spacing: 0.1em;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .hero-links a:hover { color: var(--text); }

  .hero-links a.primary {
    color: var(--signal);
    border: 1px solid var(--signal);
    padding: 0.5rem 1.2rem;
    letter-spacing: 0.12em;
    font-size: 10px;
  }

  .hero-links a.primary:hover {
    background: rgba(77, 159, 255, 0.08);
    color: var(--signal);
  }

  /* ── SECTION HEADER ── */
  .section-label {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 0.2em;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
  }

  .section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
    max-width: 120px;
  }

  /* ── ABOUT ── */
  #about { gap: 0; }

  .about-text {
    font-size: 15px;
    color: #A0A0A0;
    line-height: 1.9;
    max-width: 520px;
    margin-bottom: 3rem;
  }

  .about-text strong {
    color: var(--text);
    font-weight: 500;
  }

  .stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    max-width: 480px;
  }

  .stack-item {
    background: var(--card);
    padding: 0.8rem 1rem;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.06em;
    transition: background 0.15s, color 0.15s;
  }

  .stack-item:hover {
    background: var(--surface);
    color: var(--text);
  }

  /* ── PROJECTS ── */
  .project-list { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); }

  .project-item {
    background: var(--card);
    padding: 1.6rem 1.4rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: start;
    transition: background 0.15s;
    cursor: pointer;
    text-decoration: none;
  }

  .project-item:hover { background: var(--surface); }
  .project-item:hover .proj-arrow { color: var(--signal); transform: translate(2px, -2px); }

  .proj-num {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--dim);
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
  }

  .proj-title {
    font-family: var(--mono);
    font-size: 14px;
    color: var(--text);
    font-weight: 700;
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
  }

  .proj-desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
    max-width: 380px;
  }

  .proj-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.8rem;
  }

  .proj-tag {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.1em;
    padding: 2px 8px;
    border: 1px solid var(--dim);
    color: var(--muted);
  }

  .proj-arrow {
    font-size: 18px;
    color: var(--dim);
    transition: color 0.2s, transform 0.2s;
    margin-top: 4px;
  }

  /* ── WRITING ── */
  .writing-list { display: flex; flex-direction: column; gap: 0; }

  .writing-item {
    border-bottom: 1px solid var(--border);
    padding: 1.4rem 0;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    text-decoration: none;
    transition: padding-left 0.2s;
    cursor: pointer;
  }

  .writing-item:first-child { border-top: 1px solid var(--border); }
  .writing-item:hover { padding-left: 0.6rem; }
  .writing-item:hover .writing-title { color: var(--text); }
  .writing-item:hover .writing-date { color: var(--muted); }

  .writing-title {
    font-size: 14px;
    color: #888;
    font-weight: 400;
    transition: color 0.2s;
  }

  .writing-date {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--dim);
    white-space: nowrap;
    transition: color 0.2s;
  }

  /* ── CONTACT ── */
  #contact { min-height: 60vh; }

  .contact-line {
    font-family: var(--mono);
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-bottom: 2.5rem;
  }

  .contact-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
  }

  .contact-link {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    text-decoration: none;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
    border-bottom: 1px solid var(--dim);
    padding-bottom: 2px;
  }

  .contact-link:hover { color: var(--signal); border-color: var(--signal); }

  /* ── FOOTER ── */
  footer {
    text-align: center;
    padding: 3rem 2rem;
    font-family: var(--mono);
    font-size: 10px;
    color: var(--dim);
    letter-spacing: 0.1em;
  }

  /* ── MOBILE ── */
  @media (max-width: 640px) {
    nav { display: none; }
    section { padding: 4rem 1.5rem; min-height: auto; }
    #hero { min-height: 100vh; }
  }

  /* ── SCROLL FADE ── */
  .fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

  .fade-in.visible {
    opacity: 1;
    transform: translateY(0);
  }
