:root {
      --ink: #171717;
      --paper: #f7f7f5;
      --muted: #666;
      --line: rgba(0, 0, 0, .08);
      --accent: #000;
      --accent-bright: #333;
      --mint: #f0fdf4;
      --blue: #eff6ff;
      --yellow: #fefce8;
      --lavender: #faf5ff;
      --max: 1240px;
      --pad: clamp(22px, 5vw, 72px);
    }
    * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
    html { scroll-behavior: smooth; }
    body {
      margin: 0;
      background: var(--paper);
      color: var(--ink);
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      line-height: 1.5;
      -webkit-font-smoothing: antialiased;
    }
    a { color: inherit; text-decoration: none; }
    ::selection { background: var(--accent); color: white; }
    .shell { width: min(100% - 2 * var(--pad), var(--max)); margin-inline: auto; }
    .topbar {
      position: fixed;
      top: 20px;
      left: 50%;
      transform: translateX(-50%);
      z-index: 50;
      width: min(calc(100% - 44px), 820px);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px 24px;
      background: var(--topbar-bg);
      border: 1px solid var(--line);
      border-radius: 999px;
      font-size: 11px;
      letter-spacing: .14em;
      text-transform: uppercase;
      backdrop-filter: blur(12px);
      box-shadow: 0 8px 32px rgba(0, 0, 0, .06);
    }
    .topbar-actions { display: flex; align-items: center; gap: 16px; }
    .wordmark { margin-left: 4px; font-size: 13px; font-weight: 800; letter-spacing: .12em; }
    .nav { display: flex; gap: clamp(16px, 3vw, 36px); color: var(--muted); }
    .nav a { transition: color .2s ease; }
    .nav a:hover { color: var(--accent); }
    .menu-toggle { display: none; }
    .hero { min-height: 680px; padding: clamp(100px, 8vw, 140px) 0 90px; position: relative; overflow: hidden; }
    .hero-grid {
      display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(220px, .7fr);
      gap: 44px; align-items: end; position: relative; z-index: 1;
    }
    .eyebrow {
      color: var(--accent); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; font-weight: 700;
    }
    h1 {
      margin: 22px 0 24px; font-size: clamp(66px, 12.5vw, 168px);
      letter-spacing: -.095em; line-height: .82; font-weight: 760; max-width: 900px;
    }
    h1 span { display: inline-block; }
    .hero-title-line {
      animation:
        title-enter .8s cubic-bezier(.22, 1, .36, 1) both,
        title-glow 4s ease-in-out 1.2s infinite;
    }
    .hero-title-line:nth-child(2) { animation-delay: .13s, 1.33s; }
    .hero-title-line:nth-child(3) { animation-delay: .26s, 1.46s; }
    h1 .outline { color: transparent; -webkit-text-stroke: 1px var(--ink); }
    @keyframes title-enter {
      from { opacity: 0; transform: translateY(72px); filter: blur(8px); }
      to { opacity: 1; transform: translateY(0); filter: blur(0); }
    }
    @keyframes title-glow {
      0%, 100% { transform: translateY(0); text-shadow: 0 0 0 transparent; }
      50% { transform: translateY(-5px); text-shadow: 0 10px 24px rgba(0,0,0,.12); }
    }
    .hero-copy { max-width: 420px; color: var(--muted); font-size: clamp(15px, 1.45vw, 18px); }
    .hero-copy strong { color: var(--ink); font-weight: 550; }
    .hero-side { border-left: 1px solid var(--line); padding: 12px 0 12px 24px; margin-bottom: 8px; }
    .hero-side .label { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .16em; margin-bottom: 9px; }
    .hero-side p { margin: 0 0 24px; font-size: 14px; color: var(--ink); }
    .hero-side p:last-child { margin-bottom: 0; }
    .hero-orbit {
      position: absolute; right: -140px; top: 60px; width: 450px; height: 450px;
      border: 1px solid rgba(0,0,0,.12); border-radius: 50%; pointer-events: none;
    }
    .hero-orbit::before, .hero-orbit::after {
      content: ""; position: absolute; inset: 48px; border: 1px solid rgba(0,0,0,.09); border-radius: 50%;
    }
    .hero-orbit::after { inset: 105px; }
    .orbit-cross,
    .orbit-planet {
      position: absolute;
      left: 0;
      top: 0;
      border-radius: 50%;
      offset-distance: 18%;
      animation: orbit-dot 12s linear infinite;
    }
    .orbit-cross {
      width: 8px;
      height: 8px;
      background: var(--blue);
      box-shadow: 0 0 35px 8px rgba(0,0,0,.16);
      offset-path: ellipse(225px 225px at 50% 50%);
    }
    .orbit-planet {
      width: 7px;
      height: 7px;
      background: var(--ink);
      box-shadow: 0 0 16px 3px rgba(0,0,0,.12);
    }
    .orbit-planet--outer {
      offset-path: ellipse(225px 225px at 50% 50%);
      animation-duration: 15s;
      animation-delay: -5s;
    }
    .orbit-planet--middle {
      width: 6px;
      height: 6px;
      offset-path: ellipse(177px 177px at 50% 50%);
      animation-duration: 10s;
      animation-delay: -3s;
    }
    .orbit-planet--inner {
      width: 5px;
      height: 5px;
      offset-path: ellipse(120px 120px at 50% 50%);
      animation-duration: 7s;
      animation-delay: -2s;
    }
    @keyframes orbit-dot {
      to { offset-distance: 118%; }
    }
    .space-scene {
      position: absolute;
      inset: 0;
      pointer-events: none;
      overflow: hidden;
    }
    .star {
      position: absolute;
      width: 2px;
      height: 2px;
      background: var(--ink);
      border-radius: 50%;
      opacity: .6;
      animation: twinkle 3s ease-in-out infinite;
    }
    .star-1 { top: 15%; left: 10%; animation-delay: 0s; }
    .star-2 { top: 25%; right: 15%; animation-delay: .5s; }
    .star-3 { top: 40%; left: 25%; animation-delay: 1s; }
    .star-4 { top: 55%; right: 20%; animation-delay: 1.5s; }
    .star-5 { top: 70%; left: 15%; animation-delay: 2s; }
    .star-6 { top: 35%; right: 35%; animation-delay: 2.5s; }
    @keyframes twinkle {
      0%, 100% { opacity: .3; }
      50% { opacity: .9; }
    }
    .hero-bottom { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-top: 88px; }
    .scroll-note { display: flex; gap: 12px; align-items: center; color: var(--muted); text-transform: uppercase; letter-spacing: .13em; font-size: 10px; }
    .scroll-line { height: 1px; width: 42px; background: var(--accent); }
    .hero-caption { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-align: right; text-transform: uppercase; }
    .section { padding: 110px 0; border-top: 1px solid var(--line); }
    .section-head { display: grid; grid-template-columns: 150px 1fr; gap: 24px; margin-bottom: 55px; }
    .section-index { color: var(--accent); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; padding-top: 9px; }
    h2 { font-size: clamp(38px, 6vw, 76px); line-height: .98; letter-spacing: -.065em; margin: 0; font-weight: 650; }
    .about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 8vw, 110px); }
    .education { max-width: 520px; }
    .edu-item { padding: 24px 0; border-bottom: 1px solid var(--line); }
    .edu-item:last-child { border-bottom: none; }
    .edu-title { font-size: 16px; font-weight: 600; color: var(--ink); margin: 0 0 6px; }
    .edu-major { color: var(--accent); font-size: 13px; margin: 0 0 8px; font-weight: 500; }
    .edu-meta { color: var(--muted); font-size: 12px; margin: 0; }
    .achievements { max-width: 520px; }
    .achievement-item { background: var(--mint); padding: 20px; margin-bottom: 14px; border-radius: 2px; }
    .achievement-item:last-child { margin-bottom: 0; }
    .achievement-year { color: var(--accent); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; margin-bottom: 6px; }
    .achievement-title { color: var(--ink); font-size: 14px; font-weight: 600; margin: 0; }
    .achievement-org { color: var(--muted); font-size: 12px; margin: 4px 0 0; }
    .experience { margin-top: 64px; }
    .experience-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .experience-item { padding: 22px; border: 1px solid var(--line); background: var(--paper); }
    .experience-title { margin: 0 0 6px; color: var(--ink); font-size: 16px; font-weight: 600; }
    .experience-meta, .experience-description, .experience-skills { margin: 0; color: var(--muted); font-size: 12px; }
    .experience-meta + .experience-meta { margin-top: 2px; }
    .experience-description { margin-top: 12px; }
    .experience-skills { margin-top: 12px; color: var(--accent); font-weight: 500; }
    .experience-skills + .experience-skills { margin-top: 4px; }
    .projects-grid { display: grid; gap: 22px; }
    .project-card { 
      border: 1px solid var(--line); 
      background: var(--paper); 
      transition: border-color .2s ease, transform .2s ease;
      cursor: pointer;
    }
    .project-card:hover { border-color: var(--ink); transform: translateY(-3px); }
    .project-card summary { 
      list-style: none; 
      padding: clamp(24px, 4vw, 38px); 
      cursor: pointer;
      user-select: none;
    }
    .project-card summary::-webkit-details-marker { display: none; }
    .project-card summary::after { 
      content: "+"; 
      float: right; 
      color: var(--accent); 
      font-size: 28px; 
      line-height: 1; 
      transition: transform .2s ease;
      font-weight: 300;
    }
    .project-card[open] summary::after { content: "−"; }
    .project-card[open] { transform: none; }
    .project-details-wrap { 
      padding: 0 clamp(24px, 4vw, 38px) clamp(24px, 4vw, 38px); 
      animation: expand .3s ease both; 
    }
    @keyframes expand { 
      from { opacity: 0; transform: translateY(-10px); } 
      to { opacity: 1; transform: translateY(0); } 
    }
    .project-kicker { color: var(--accent); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; margin-bottom: 14px; }
    .project-title { margin: 0; font-size: clamp(28px, 4vw, 48px); letter-spacing: -.06em; line-height: 1.1; }
    .project-summary { color: var(--muted); font-size: 15px; margin: 20px 0 28px; line-height: 1.6; }
    .project-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-bottom: 24px; }
    .project-detail { border-top: 1px solid var(--line); padding-top: 14px; }
    .project-detail h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
    .project-detail p { color: var(--muted); font-size: 12px; margin: 0; line-height: 1.5; }
    .stack-list { display: flex; flex-wrap: wrap; gap: 8px; }
    .stack-list span { border: 1px solid var(--line); padding: 7px 11px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
    .architecture { border-left: 1px solid var(--line); padding-left: 28px; margin-top: 24px; }
    .architecture h3 { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 20px; color: var(--accent); font-weight: 700; }
    .architecture ol { margin: 0; padding: 0; list-style: none; counter-reset: arch; }
    .architecture li { 
      counter-increment: arch; 
      border-bottom: 1px solid var(--line); 
      padding: 16px 0; 
      color: var(--muted); 
      font-size: 13px; 
      line-height: 1.6;
    }
    .architecture li:last-child { border-bottom: none; }
    .architecture li::before { 
      content: "0" counter(arch); 
      color: var(--accent); 
      font-size: 10px; 
      letter-spacing: .1em; 
      margin-right: 14px; 
      font-weight: 700; 
    }
    .architecture strong { color: var(--ink); font-weight: 600; }
    .contact { background: var(--lavender); color: var(--ink); padding: clamp(65px, 10vw, 130px) 0; }
    .contact-grid { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: end; }
    .contact h2 { font-size: clamp(38px, 6vw, 76px); line-height: .98; letter-spacing: -.065em; margin: 0 0 24px; font-weight: 650; max-width: 760px; }
    .contact p { color: var(--muted); max-width: 460px; font-size: 14px; margin: 0; }
    .social-links { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
    .social-link {
      display: inline-flex; align-items: center; gap: 10px; background: var(--ink); color: var(--paper);
      padding: 15px 18px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; transition: opacity .2s ease;
    }
    .social-link:hover { opacity: 0.8; }
    .social-link .arrow { color: var(--accent-bright); font-size: 16px; }
    footer {
      padding: 32px 0;
      background: var(--paper);
      color: var(--muted);
      font-size: 11px;
      letter-spacing: .08em;
      text-transform: uppercase;
      border-top: 1px solid var(--line);
    }
    .footer-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
    .footer-row a { color: var(--ink); font-weight: 600; transition: color .2s ease; }
    .footer-row a:hover { color: var(--accent); }
    .chat-toggle {
      position: fixed; bottom: 22px; right: 22px; width: 58px; height: 58px;
      z-index: 100;
      border-radius: 18px; background: var(--ink); color: var(--paper); border: none;
      cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 99;
      box-shadow: 0 12px 28px rgba(0,0,0,.2); transition: transform .25s ease, background .25s ease;
    }
    .chat-toggle::after { content: ""; position: absolute; inset: -5px; border: 1px solid var(--accent); border-radius: 22px; opacity: .55; }
    .chat-toggle:hover { transform: translateY(-4px) rotate(-4deg); background: var(--accent); }
    .chat-toggle.hidden { display: none; }
    .chat-box {
      position: fixed; bottom: 96px; right: 22px; width: min(380px, calc(100vw - 32px)); height: 540px;
      background: rgba(247, 247, 245, .72);
      border: 1px solid var(--line); border-radius: 24px; overflow: hidden;
      box-shadow: 0 24px 70px rgba(20, 24, 32, .2), 0 2px 8px rgba(20, 24, 32, .08), inset 0 1px 0 rgba(255, 255, 255, .8);
      display: flex; flex-direction: column; z-index: 101; isolation: isolate;
      opacity: 0; pointer-events: none; transform: translateY(18px) scale(.97); transform-origin: bottom right;
      transition: opacity .25s ease, transform .25s ease;
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
    }
    .chat-box::before {
      content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
      background: radial-gradient(ellipse at 0% 0%, rgba(255, 255, 255, .78), transparent 48%),
        radial-gradient(ellipse at 100% 100%, rgba(196, 214, 255, .24), transparent 52%);
    }
    .chat-box > * { position: relative; z-index: 1; }
    .chat-box.open { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
    .chat-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; background: rgba(255, 255, 255, .28); color: var(--ink); border-bottom: 1px solid rgba(255, 255, 255, .55); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); }
    .chat-profile { display: flex; align-items: center; gap: 11px; }
    .chat-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--paper); font-size: 11px; font-weight: 800; letter-spacing: .04em; }
    .chat-header h3 { margin: 0; font-size: 15px; letter-spacing: .02em; font-weight: 600; }
    .chat-status { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
    .chat-status::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #83d3a6; }
    .chat-close { background: transparent; border: none; border-radius: 50%; color: var(--accent); font-size: 26px; cursor: pointer; width: 32px; height: 32px; line-height: 1; transition: opacity .2s ease; }
    .chat-close:hover { opacity: 0.6; }
    .chat-messages {
      position: relative;
      isolation: isolate;
      flex: 1;
      overflow-y: auto;
      padding: 12px 12px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      background: rgba(255, 255, 255, .12);
    }
    .chat-messages::before,
    .chat-messages::after { content: none; }

    .chat-message {
      position: relative;
      z-index: 1;
    }
    .chat-messages::-webkit-scrollbar { width: 0; }
    .chat-messages::-webkit-scrollbar-thumb { background: transparent; }
    .chat-message { display: flex; font-size: 14px; line-height: 1.4; animation: messageIn .25s ease both; margin: 0 8px; }
    .chat-message.user { justify-content: flex-end; }
    .chat-bubble { max-width: 75%; padding: 10px 13px; border-radius: 18px; white-space: pre-line; word-wrap: break-word; background: var(--paper); }
    .chat-answer { max-width: 92%; padding: 12px; border: 1px solid rgba(255, 255, 255, .72); border-radius: 18px 18px 18px 5px; background: rgba(255, 255, 255, .58); box-shadow: 0 4px 14px rgba(20, 24, 32, .07), inset 0 1px 0 rgba(255, 255, 255, .75); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
    .chat-answer-title { margin-bottom: 9px; color: var(--ink); font-size: 13px; font-weight: 700; }
    .chat-answer-tags { display: flex; flex-wrap: wrap; gap: 6px; }
    .chat-answer-tag { padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; background: rgba(247, 247, 245, .78); color: var(--ink); font-size: 11px; line-height: 1.3; }
    .chat-message.user .chat-bubble { background: rgba(23, 23, 23, .88) !important; color: var(--paper); border: 1px solid rgba(255, 255, 255, .16); border-bottom-right-radius: 5px; box-shadow: 0 6px 18px rgba(0,0,0,.14); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
    .chat-message.bot .chat-bubble { background: rgba(255, 255, 255, .58) !important; color: var(--ink); border: 1px solid rgba(255, 255, 255, .72); border-bottom-left-radius: 5px; box-shadow: 0 4px 14px rgba(20, 24, 32, .07), inset 0 1px 0 rgba(255, 255, 255, .75); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
    .chat-suggestions { display: flex; gap: 8px; overflow-x: auto; padding: 10px 18px 8px; background: rgba(255, 255, 255, .2); border-top: 1px solid rgba(255, 255, 255, .42); backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%); }
    .chat-suggestions::-webkit-scrollbar { display: none; }
    .chat-suggestion { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; background: rgba(247,247,245,.12); color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; font-weight: 600; }
    .chat-suggestion:hover { border-color: var(--accent); color: var(--accent); }
    .chat-input-group { display: flex; gap: 8px; padding: 10px 14px 14px; background: rgba(255, 255, 255, .22); border-top: 1px solid rgba(255, 255, 255, .48); align-items: center; backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); }
    .chat-input-group input { flex: 1; min-width: 0; border: 1px solid rgba(255, 255, 255, .78); border-radius: 999px; padding: 10px 16px; font-size: 14px; font-family: inherit; background: rgba(255, 255, 255, .5); color: var(--ink); outline: none; box-shadow: inset 0 1px 3px rgba(20, 24, 32, .06); }
    .chat-input-group input:focus { border-color: rgba(0, 0, 0, .28); box-shadow: 0 0 0 3px rgba(255,255,255,.42), inset 0 1px 3px rgba(20, 24, 32, .06); }
    .chat-input-group input::placeholder { color: var(--muted); }
    .chat-send { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; padding: 0; background: var(--ink); color: var(--paper); border: none; border-radius: 14px; cursor: pointer; transition: transform .2s ease, background .2s ease, opacity .2s ease; }
    .chat-send svg { width: 19px; height: 19px; }
    .chat-send span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
    .chat-send:hover { transform: translateY(-2px); background: var(--accent-bright); }
    .chat-send:active { transform: scale(.94); }
    @keyframes messageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
    .page-loader {
      position: fixed;
      inset: 0;
      z-index: 100;
      display: grid;
      place-items: center;
      background: var(--paper);
      transition: opacity .7s ease, visibility .7s ease;
    }
    .page-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
    .loader-inner { text-align: center; color: var(--ink); }
    .loader-name {
      font-size: 12px;
      letter-spacing: .2em;
      text-transform: uppercase;
      margin-bottom: 18px;
      font-weight: 600;
      opacity: 0;
      transform: translateY(10px);
      animation: nameReveal .9s cubic-bezier(.22, 1, .36, 1) forwards;
    }
    .loader-track {
      width: 180px;
      height: 2px;
      background: rgba(0,0,0,.1);
      overflow: hidden;
      opacity: 0;
      animation: trackReveal .4s ease 1s forwards;
    }
    .loader-bar { width: 45%; height: 100%; background: var(--accent); animation: loading 1.2s ease-in-out 1.15s infinite; }
    @keyframes nameReveal {
      0% { opacity: 0; transform: translateY(10px); letter-spacing: .5em; }
      100% { opacity: 1; transform: translateY(0); letter-spacing: .2em; }
    }
    @keyframes trackReveal { to { opacity: 1; } }
    @keyframes loading { from { transform: translateX(-100%); } to { transform: translateX(400%); } }
    .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
    .reveal.visible { opacity: 1; transform: translateY(0); }
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
      .reveal { opacity: 1; transform: none; }
    }
    @media (max-width: 1100px) {
      .hero-grid { grid-template-columns: minmax(0, 1.2fr) minmax(200px, .8fr); gap: 28px; }
      h1 { font-size: clamp(64px, 10vw, 112px); }
      .section { padding: 88px 0; }
      .section-head { grid-template-columns: 120px 1fr; gap: 20px; }
      .project-details { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
    }
    @media (max-width: 760px) {
      .topbar {
        position: fixed;
        top: max(12px, env(safe-area-inset-top));
        width: calc(100% - 20px);
        padding: 11px 12px;
        gap: 8px;
        font-size: 10px;
      }
      .topbar.menu-open { background: rgba(247, 247, 245, .96); }
      .menu-toggle {
        display: flex;
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        padding: 0;
        color: var(--ink);
        background: transparent;
        border: 1px solid var(--line);
        border-radius: 50%;
        cursor: pointer;
      }
      .menu-toggle span {
        width: 19px;
        height: 2px;
        background: currentColor;
        transition: transform .2s ease, opacity .2s ease;
      }
      .menu-open .menu-toggle span:first-child { transform: translateY(7px) rotate(45deg); }
      .menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
      .menu-open .menu-toggle span:last-child { transform: translateY(-7px) rotate(-45deg); }
      .nav {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        left: 0;
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 8px;
        color: var(--ink);
        background: rgba(247, 247, 245, .98);
        border: 1px solid rgba(23, 23, 23, .12);
        border-radius: 18px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, .08);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-8px) scale(.98);
        transform-origin: top center;
        transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
      }
      .menu-open .nav {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0) scale(1);
      }
      .nav a { display: block; min-height: 48px; padding: 14px 16px; color: var(--ink); font-size: 14px; font-weight: 650; letter-spacing: .08em; }
      .nav a + a { border-top: 1px solid var(--line); }
      .hero { min-height: 100vh; min-height: 100svh; padding-top: 88px; }
      .hero-grid, .contact-grid { grid-template-columns: 1fr; }
      .hero-copy { font-size: 16px; }
      .hero-side { max-width: 420px; margin-top: 20px; }
      .hero-side p { font-size: 15px; }
      .hero-bottom { margin-top: 52px; align-items: start; }
      .hero-caption { max-width: 145px; }
      .hero-orbit { right: -275px; top: 30px; }
      .section { padding: 72px 0; }
      .section-head { grid-template-columns: 1fr; gap: 12px; margin-bottom: 32px; }
      .section-index { font-size: 11px; }
      .about-grid { grid-template-columns: 1fr; gap: 28px; }
      .edu-title, .experience-title { font-size: 17px; }
      .edu-major { font-size: 14px; }
      .edu-meta, .experience-meta, .experience-description, .experience-skills { font-size: 14px; }
      .achievement-title { font-size: 15px; }
      .achievement-org { font-size: 14px; }
      .experience { margin-top: 36px; }
      .experience-grid { grid-template-columns: 1fr; gap: 12px; }
      .experience-item { padding: 18px; }
      .project-card summary { padding: 22px; }
      .project-details-wrap { padding: 0 22px 22px; }
      .project-summary { font-size: 16px; }
      .project-details { grid-template-columns: 1fr; gap: 16px; }
      .project-detail p, .architecture li { font-size: 14px; }
      .stack-list span { font-size: 11px; }
      .architecture { border-left: 0; border-top: 1px solid var(--line); padding: 22px 0 0; margin-top: 24px; }
      .contact-grid { align-items: start; }
      .contact p { font-size: 16px; }
      .social-links { flex-direction: row; width: 100%; }
      .social-link { width: auto; min-height: 48px; align-items: center; }
      .footer-row { flex-direction: column; gap: 8px; text-align: center; }
      .chat-toggle {
        width: 54px;
        height: 54px;
        right: max(24px, calc(env(safe-area-inset-right) + 12px));
        bottom: max(56px, calc(env(safe-area-inset-bottom) + 40px));
      }
      .chat-box {
        right: max(12px, env(safe-area-inset-right));
        bottom: calc(120px + env(safe-area-inset-bottom));
        width: min(400px, calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)));
        height: min(540px, calc(100vh - 110px));
        height: min(540px, calc(100dvh - 110px));
        border-radius: 20px;
      }
      .chat-header { padding: 14px 16px; }
      .chat-messages { padding: 12px 8px; }
      .chat-suggestions { padding-inline: 12px; }
      .chat-input-group { padding: 10px 12px max(12px, env(safe-area-inset-bottom)); }
    }
    @media (max-height: 500px) {
      .chat-box {
        height: min(540px, calc(100vh - 110px));
        height: min(540px, calc(100dvh - 110px));
      }
    }
    @media (max-width: 480px) {
      :root { --pad: 20px; }
      .topbar { width: calc(100% - 16px); padding: 10px 10px; gap: 6px; font-size: 9px; }
      .wordmark { margin-left: 6px; font-size: 14px; }
      .nav { gap: 6px; }
      .nav a { padding: 14px 16px; font-size: 14px; letter-spacing: .08em; }
      h1 { font-size: clamp(64px, 19vw, 82px); font-weight: 700; line-height: .92; }
      h1 .outline { -webkit-text-stroke-width: 1.25px; }
      .eyebrow { font-size: 10px; letter-spacing: .12em; }
      .hero { padding-top: 82px; }
      .hero-bottom { gap: 12px; }
      .scroll-note { font-size: 9px; gap: 8px; }
      .scroll-line { width: 26px; }
      .section { padding: 60px 0; }
      .section-subheading { font-size: 17px; }
      .achievement-item { padding: 16px; }
      .project-card summary { padding: 18px; }
      .project-details-wrap { padding: 0 18px 18px; }
      .project-title { font-size: clamp(26px, 8vw, 36px); }
      .social-links { flex-direction: column; }
      .social-link { width: fit-content; min-height: 46px; }
      .chat-toggle { width: 50px; height: 50px; }
      .chat-box { bottom: calc(116px + env(safe-area-inset-bottom)); }
    }

    .section-subheading { margin: 0 0 20px; color: var(--ink); font-size: 18px; font-weight: 600; }
    .project-link { color: var(--ink); text-decoration: underline; }
