:root {
  --bg: #fffaf6;
  --bg-elevated: rgba(255,255,255,.68);
  --panel: rgba(255,255,255,.72);
  --panel-solid: #fffefa;
  --text: #17120f;
  --muted: #736860;
  --soft: #9b8f87;
  --line: rgba(62,42,28,.12);
  --line-strong: rgba(62,42,28,.2);
  --accent: #f36b21;
  --accent-2: #ff8a45;
  --accent-soft: rgba(243,107,33,.12);
  --green-0: #ece9e3;
  --green-1: #b9e6c5;
  --green-2: #6bc486;
  --green-3: #2f9857;
  --green-4: #176a39;
  --shadow: 0 24px 70px rgba(78,50,30,.10);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --nav-height: 74px;
  --nav-height-scrolled: 56px;
  --max: 1100px;
}
html[data-theme="dark"] {
  --bg: #100d0b;
  .navbar { border-color: rgba(255,122,47,.6); }
  .avail-dot { background: #2ecc71; box-shadow: 0 0 0 5px rgba(46,204,113,.18); }
  --bg-elevated: rgba(26,21,18,.7);
  --panel: rgba(28,23,20,.72);
  --panel-solid: #1a1512;
  --text: #fff8f2;
  --muted: #b5a79c;
  --soft: #847870;
  --line: rgba(255,232,214,.10);
  --line-strong: rgba(255,232,214,.18);
  --accent: #ff7a2f;
  --accent-2: #ff9b62;
  --accent-soft: rgba(255,122,47,.13);
  --green-0: #232723;
  --green-1: #174428;
  --green-2: #1f6f3d;
  --green-3: #2c9956;
  --green-4: #45c96f;
  --shadow: 0 24px 80px rgba(0,0,0,.32);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Manrope, system-ui, sans-serif; line-height: 1.65; overflow-x: hidden; transition: background .35s ease, color .35s ease; }
::selection { background: var(--accent); color: white; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(#ea580c, #c2410c); border-radius: 8px; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
.noise { position: fixed; inset: 0; pointer-events: none; opacity: .035; z-index: -1; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E"); }
.ambient { position: fixed; border-radius: 50%; filter: blur(90px); pointer-events: none; z-index: -2; opacity: .22; }
.ambient-one { width: 500px; height: 500px; background: var(--accent); top: -230px; right: -190px; }
.ambient-two { width: 420px; height: 420px; background: #ffc187; left: -300px; top: 38vh; opacity: .12; }
.cursor-glow { position: fixed; width: 190px; height: 190px; border-radius: 50%; background: radial-gradient(circle at center, rgba(243,107,33,.18) 0%, rgba(243,107,33,.05) 40%, transparent 70%); pointer-events: none; z-index: 9999; will-change: transform; transition: transform .05s linear; left: 0; top: 0; }
.cursor-glow.active { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .cursor-glow { transition: none; }
}
.page-progress { position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 200; background: transparent; }
.page-progress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg,var(--accent),var(--accent-2)); box-shadow: 0 0 18px var(--accent); }
.nav-wrap { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 0 32px; pointer-events: none; transform: translateY(18px); will-change: transform, padding; transition: transform 0.7s cubic-bezier(.25,.46,.45,.94), padding 0.7s cubic-bezier(.25,.46,.45,.94); }
.nav-wrap.scrolled { transform: translateY(0); padding: 0; }
.nav-wrap.scrolled .navbar { width: 100%; border-radius: 0 0 16px 16px; border-top: none; border-left: none; border-right: none; min-height: var(--nav-height-scrolled); padding: 6px 16px; }
.navbar { width: min(var(--max), calc(100vw - 40px)); min-height: var(--nav-height); margin: auto; padding: 10px 12px 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 22px; border: 1px solid rgba(243,107,33,.6); border-radius: 20px; background: var(--bg-elevated); backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%); box-shadow: 0 10px 35px rgba(55,35,20,.08); pointer-events: auto; transition: width 0.7s cubic-bezier(.25,.46,.45,.94), border-radius 0.7s cubic-bezier(.25,.46,.45,.94), padding 0.7s cubic-bezier(.25,.46,.45,.94), min-height 0.7s cubic-bezier(.25,.46,.45,.94); }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.brand-mark { width: 38px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 12px; background: var(--text); color: var(--bg); font-family: "DM Mono", monospace; font-size: 13px; }
.brand-name { font-size: 14px; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { color: var(--muted); font-size: 13px; font-weight: 700; padding: 10px 12px; border-radius: 10px; transition: .2s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--accent-soft); }
.nav-actions { display: flex; gap: 8px; }
.icon-button, .menu-button { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); color: var(--text); display: grid; place-items: center; cursor: pointer; transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.icon-button:hover, .menu-button:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.icon-button svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-button .moon { display: none; }
html[data-theme="dark"] .icon-button .sun { display: none; }
html[data-theme="dark"] .icon-button .moon { display: block; }
.menu-button { display: none; position: relative; }
.menu-button span { width: 17px; height: 1.5px; background: currentColor; position: absolute; transition: .25s ease; }
.menu-button span:first-child { transform: translateY(-4px); }
.menu-button span:last-child { transform: translateY(4px); }
.menu-button.open span:first-child { transform: rotate(45deg); }
.menu-button.open span:last-child { transform: rotate(-45deg); }
.section-shell { width: min(var(--max), calc(100% - 64px)); margin-inline: auto; }
.hero { min-height: 100svh; display: grid; grid-template-columns: 1.35fr .65fr; align-items: center; gap: 90px; padding-top: 150px; padding-bottom: 90px; position: relative; }
.eyebrow, .kicker { text-transform: uppercase; letter-spacing: .14em; font-size: 11px; font-weight: 800; color: var(--accent); }
.eyebrow.avail-pill { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line-strong); box-shadow: var(--shadow); color: var(--muted); font-size: 12px; letter-spacing: .03em; margin-bottom: 26px; }
.avail-pill .avail-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.5); animation: availPulse 2.2s ease-in-out infinite; }
@keyframes availPulse { 70% { box-shadow: 0 0 0 9px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 7px var(--accent-soft); animation: dotBlink 1.4s ease-in-out infinite; }
@keyframes dotBlink { 0%, 100% { opacity: 1; box-shadow: 0 0 0 7px var(--accent-soft); } 50% { opacity: .25; box-shadow: 0 0 0 3px var(--accent-soft); } }
.hero h1 { margin: 0; font-family: "Playfair Display", Georgia, serif; font-size: clamp(3rem,7.5vw,5.2rem); line-height: 1.02; letter-spacing: -1.5px; font-weight: 800; font-style: italic; max-width: 780px; }
.hero h1 em { background: linear-gradient(135deg,var(--accent),var(--accent-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.hero-role { margin-top: 18px; font-family: "DM Mono", monospace; font-size: clamp(1rem, 2.4vw, 1.35rem); color: var(--muted); min-height: 1.6em; }
.hero-role .caret { display: inline-block; width: 2px; height: 1.1em; background: var(--accent); margin-left: 3px; vertical-align: text-bottom; animation: blink 0.8s steps(1) infinite; }
.hero-lead { max-width: 700px; color: var(--muted); font-size: clamp(17px,2vw,22px); line-height: 1.55; margin: 34px 0 30px; }
.hero-actions, .closing-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button { min-height: 48px; padding: 0 18px; border-radius: 14px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 800; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button.primary { background: var(--accent); color: white; box-shadow: 0 12px 25px rgba(243,107,33,.23); }
.button.primary:hover { box-shadow: 0 16px 35px rgba(243,107,33,.3); }
.button.secondary { background: var(--text); color: var(--bg); }
.button.ghost { background: transparent; color: var(--muted); border-color: var(--line-strong); }
.avail-status { display: inline-flex; align-items: center; gap: 9px; min-height: 48px; padding: 0 18px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--muted); font-size: 13px; font-weight: 700; }
.avail-dot { width: 9px; height: 9px; border-radius: 50%; background: #1db954; box-shadow: 0 0 0 5px rgba(29,185,84,.18); animation: greenBlink 1.4s ease-in-out infinite; }
@keyframes greenBlink { 0%, 100% { opacity: 1; box-shadow: 0 0 0 5px rgba(29,185,84,.18); } 50% { opacity: .3; box-shadow: 0 0 0 2px rgba(29,185,84,.12); } }
.hero-card { position: relative; padding: 32px; border-radius: var(--radius-xl); border: 1px solid var(--line); background: linear-gradient(145deg,var(--panel),rgba(255,255,255,.12)); backdrop-filter: blur(20px); box-shadow: var(--shadow); }
.portrait-wrap { width: 160px; height: 160px; margin: -95px auto 26px; position: relative; }
.portrait { width: 100%; height: 100%; border-radius: 44px; object-fit: cover; border: 5px solid var(--panel-solid); display: block; position: relative; z-index: 2; background: var(--panel-solid); transform: rotate(6deg); }
.portrait-ring { position: absolute; inset: -9px; border: 1px solid var(--accent); border-radius: 50px; z-index: 1; opacity: .45; transform: rotate(6deg); }
.hero-card-copy { display: grid; gap: 5px; text-align: center; }
.hero-card-copy strong { font-size: 18px; letter-spacing: -.02em; }
.hero-card-copy > span:last-child { color: var(--muted); font-size: 13px; }
.mini-label { color: var(--accent); text-transform: uppercase; letter-spacing: .12em; font-size: 10px; font-weight: 800; }
.score-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.score-grid > div { text-align: center; }
.score { display: block; font-family: "Playfair Display", Georgia, serif; font-size: 28px; font-weight: 700; }
.score-label { display: block; color: var(--soft); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; margin-top: 2px; }
.scroll-cue { position: absolute; bottom: 28px; left: 0; display: flex; align-items: center; gap: 12px; color: var(--soft); text-transform: uppercase; letter-spacing: .15em; font-size: 9px; font-weight: 800; }
.scroll-cue i { width: 44px; height: 1px; background: var(--line-strong); position: relative; overflow: hidden; }
.scroll-cue i:after { content:""; position:absolute; inset:0; background:var(--accent); transform:translateX(-100%); animation: sweep 2.2s ease-in-out infinite; }
@keyframes sweep { 50%,100% { transform: translateX(100%); } }
.github-section { padding-top: 80px; }
.section-heading { max-width: 760px; margin-bottom: 46px; }
.section-heading h2, .closing h2 { font-family: "Playfair Display", Georgia, serif; font-size: clamp(2.1rem,4.4vw,3.1rem); line-height: 1.15; letter-spacing: -.045em; margin: 8px 0 15px; font-style: italic; display: flex; align-items: center; gap: 18px; opacity: 1 !important; transform: none !important; }

.section-heading p:not(.kicker) { color: var(--muted); max-width: 620px; }
.type-on-view { min-height: 1.05em; }
.type-caret {
  display: inline-block; width: 2px; height: .75em; margin-left: 5px; background: var(--accent); animation: blink 1.2s steps(1) infinite; vertical-align: -.02em;
}
.section-badge {
  display: inline-block; width: 14px; height: 46px; border-radius: 4px; background: linear-gradient(135deg,var(--accent),var(--accent-2)); box-shadow: 0 0 24px rgba(243,107,33,.55); flex-shrink: 0; margin-right: 10px; vertical-align: middle; animation: badgeGlow 2.2s ease-in-out infinite;
}
@keyframes badgeGlow {
  0%, 100% { box-shadow: 0 0 6px rgba(243,107,33,.35); }
  50% { box-shadow: 0 0 28px rgba(243,107,33,.9); }
}
@keyframes blink { 50% { opacity: 0; } }
.github-panel { border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--panel); backdrop-filter: blur(18px); padding: 28px; box-shadow: var(--shadow); }
.github-topline { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.github-person { display: flex; align-items: center; gap: 13px; }
.github-person img { width: 48px; height: 48px; object-fit: cover; border-radius: 15px; border: 1px solid var(--line); }
.github-person div { display: grid; }
.github-person strong { font-size: 14px; }
.github-person a { color: var(--muted); font: 400 11px "DM Mono",monospace; }
.github-stats { display: flex; gap: 30px; }
.github-stats div { text-align: right; }
.github-stats span { display: block; font: 500 22px "DM Mono", monospace; }
.github-stats small { color: var(--soft); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
.calendar-shell { overflow-x: auto; scrollbar-width: thin; padding: 28px 0 18px; }
.calendar-scroll { min-width: 760px; }
.gh-months { display: grid; grid-template-rows: 1fr; gap: 4px; margin: 0 0 7px; font: 400 10px "DM Mono", monospace; color: var(--soft); }
.gh-months span { white-space: nowrap; overflow: hidden; text-overflow: clip; }
.contribution-calendar { min-width: 760px; display: grid; grid-template-columns: repeat(53, 1fr); grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; gap: 4px; }
.calendar-day { aspect-ratio: 1; min-width: 10px; border-radius: 3px; background: var(--green-0); outline: 1px solid color-mix(in srgb, var(--line) 45%, transparent); position: relative; transition: transform .15s ease, filter .15s ease; }
.calendar-day.empty { background: transparent; outline: none; }
.calendar-day:hover { transform: scale(1.45); z-index: 4; filter: saturate(1.2); }
.calendar-day[data-level="1"] { background: var(--green-1); }
.calendar-day[data-level="2"] { background: var(--green-2); }
.calendar-day[data-level="3"] { background: var(--green-3); }
.calendar-day[data-level="4"] { background: var(--green-4); }
.calendar-loading { grid-column: 1/-1; color: var(--muted); font: 400 12px "DM Mono",monospace; padding: 36px 0; }
.github-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; color: var(--soft); font-size: 10px; }
.legend { display: flex; align-items: center; gap: 5px; }
.legend i { width: 11px; height: 11px; border-radius: 3px; background: var(--green-0); }
.legend i[data-level="1"] { background: var(--green-1); }.legend i[data-level="2"] { background: var(--green-2); }.legend i[data-level="3"] { background: var(--green-3); }.legend i[data-level="4"] { background: var(--green-4); }
main > section:not(.hero):not(.github-section) { padding-top: 145px; }
.timeline { border-left: 1px solid var(--line-strong); margin-left: 9px; display: grid; gap: 26px; }
.timeline-card { margin-left: 33px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); position: relative; transition: transform .25s ease, border-color .25s ease; }
.timeline-card:hover { transform: translateX(6px); border-color: rgba(243,107,33,.35); }
.timeline-card:before { content:""; position: absolute; left: -41px; top: 34px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.timeline-meta { display:flex; justify-content:space-between; color:var(--soft); font:400 10px "DM Mono",monospace; text-transform:uppercase; letter-spacing:.08em; }
.timeline-card h3 { margin: 12px 0 2px; font-size: 24px; letter-spacing: -.03em; }
.role { margin:0; color:var(--muted); font-size:13px; font-weight:400; }
.timeline-card ul, .teaching-card ul { color: var(--muted); padding-left: 19px; margin: 20px 0 0; font-size: 13px; }
.timeline-card ul strong { color: var(--accent); }
.timeline-card li+li, .teaching-card li+li { margin-top: 9px; }
.interest-grid { display:flex; flex-wrap:wrap; gap:14px; margin-bottom:48px; }
.interest-grid span { display:inline-flex; align-items:center; gap:10px; border:1px solid var(--line); background:var(--panel); backdrop-filter:blur(12px); border-radius:999px; padding:13px 22px; font-weight:600; font-size:14px; transition:transform .3s ease,border-color .3s ease,box-shadow .3s ease,color .3s ease; cursor:default; }
.interest-grid span:hover { border-color:rgba(243,107,33,.45); transform:translateY(-4px) scale(1.03); box-shadow:0 14px 34px rgba(70,40,20,.1); color:var(--accent); }
.interest-grid small { color:var(--soft); font:400 9px "DM Mono",monospace; margin-left:2px; }
.int-pulse { width:9px; height:9px; border-radius:50%; background:var(--accent); box-shadow:0 0 0 0 rgba(243,107,33,.5); animation:intPulse 2.4s ease-in-out infinite; flex-shrink:0; }
@keyframes intPulse { 70% { box-shadow:0 0 0 9px rgba(243,107,33,0); } 100% { box-shadow:0 0 0 0 rgba(243,107,33,0); } }
.publication-list { display:grid; gap:16px; }
.publication { display:flex; gap:22px; align-items:flex-start; padding:28px; border:1px solid var(--line); border-radius:var(--radius-lg); background:linear-gradient(145deg,var(--panel),rgba(255,255,255,.04)); backdrop-filter:blur(18px); position:relative; overflow:hidden; transition:transform .3s ease,border-color .3s ease,box-shadow .3s ease; }
.publication:before { content:""; position:absolute; inset:0 0 auto 0; height:3px; background:linear-gradient(90deg,var(--accent),var(--accent-2)); transform:scaleX(0); transform-origin:left; transition:transform .45s ease; }
.publication:after { content:""; position:absolute; width:190px; height:190px; border-radius:50%; border:1.5px solid var(--accent); opacity:.18; top:-95px; right:-95px; transform:scale(1); will-change:transform,opacity; transition:transform .6s cubic-bezier(.22,1,.36,1),opacity .6s ease; }
.publication:hover { transform:translateY(-6px); border-color:rgba(243,107,33,.4); box-shadow:0 22px 55px rgba(70,40,20,.12); }
.publication:hover:before { transform:scaleX(1); }
.publication:hover:after { transform:scale(1.6); opacity:.45; }
.pub-index { font:800 15px "DM Mono",monospace; color:#fff; background:linear-gradient(135deg,var(--accent),var(--accent-2)); -webkit-background-clip:padding-box; border-radius:12px; width:52px; height:52px; display:grid; place-items:center; box-shadow:0 10px 24px rgba(243,107,33,.35); flex-shrink:0; position:relative; z-index:1; }
.pub-body { display:grid; gap:12px; position:relative; z-index:1; }
.publication h3 { margin:0; font-size:18px; letter-spacing:-.02em; font-weight:500; line-height:1.4; }
.publication h3 strong { color:var(--text); font-weight:800; }
.publication h3 em { color:var(--soft); font-style:italic; }
.publication:hover h3 strong { color:var(--accent); transition:color .3s ease; }
.pub-state { justify-self:flex-start; font:600 10px "DM Mono",monospace; letter-spacing:.08em; text-transform:uppercase; padding:6px 13px; border-radius:999px; white-space:nowrap; }
.pub-state.submitted { background:rgba(47,152,87,.12); color:#2f9857; border:1px solid rgba(47,152,87,.35); }
.pub-state.prep { background:rgba(243,107,33,.12); color:var(--accent); border:1px solid rgba(243,107,33,.35); }
.project-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.project-card { min-height:130px; display:flex; flex-direction:column; justify-content:space-between; border:1px solid var(--line); border-radius:var(--radius-lg); background:var(--panel); padding:14px 16px 12px; position:relative; overflow:hidden; transition:transform .28s ease,border-color .28s ease,box-shadow .28s ease; }
.project-card:before { content:""; position:absolute; width:110px; height:110px; border-radius:50%; border:1.5px solid var(--accent); opacity:.18; top:-55px; right:-55px; transform:scale(1); will-change:transform,opacity; transition:transform .6s cubic-bezier(.22,1,.36,1),opacity .6s ease; }
.project-card:hover { transform:translateY(-5px); border-color:rgba(243,107,33,.35); box-shadow:0 18px 45px rgba(70,40,20,.08); }
.project-card:hover:before { transform:scale(1.8); opacity:.4; }
.project-index { color:var(--soft); font:400 9px "DM Mono",monospace; position:relative; }
.project-card h3 { font-size:15px; line-height:1.3; letter-spacing:-.025em; margin:10px 0 6px; position:relative; }
.project-tech { color:var(--muted); font-size:10px; margin:0 0 8px; position:relative; }
.project-links { display:flex; gap:8px; flex-wrap:wrap; position:relative; }
.project-links a { font:500 10px "DM Mono",monospace; color:var(--accent); border-bottom:1px solid transparent; }
.project-links a:hover { border-color:currentColor; }
.project-card.no-link .project-links { min-height:0; }
.subsection-heading { margin:120px 0 36px; }
.subsection-heading h3 { font-family:"Playfair Display",Georgia,serif; font-size:clamp(1.7rem,3.5vw,2.4rem); line-height:1.15; letter-spacing:-.04em; margin:7px 0; font-style: italic; display: flex; align-items: center; gap: 14px; opacity: 1 !important; transform: none !important; }

.academic .project-card { min-height:130px; }
.teaching-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; align-items:start; }
.teaching-card { border:1px solid var(--line); border-radius:var(--radius-lg); padding:26px; background:var(--panel); backdrop-filter:blur(14px); box-shadow:0 10px 30px rgba(78,50,30,.05); transition:transform .4s cubic-bezier(.22,1,.36,1),border-color .3s ease; }
.teaching-card:hover { transform:translateY(-6px); border-color:rgba(243,107,33,.45); }
.teach-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:4px; }
.teach-org { font-family:"Playfair Display",Georgia,serif; font-style:italic; font-weight:800; font-size:1.45rem; background:linear-gradient(135deg,var(--accent),var(--accent-2)); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
.teach-badge { font-size:.72rem; font-weight:600; color:var(--accent); background:var(--accent-soft); border:1px solid rgba(243,107,33,.3); padding:5px 12px; border-radius:999px; }
.teach-org-note { color:var(--soft); font-size:.82rem; margin-bottom:14px; }
.teaching-card .list-clean { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:11px; }
.list-clean li { position:relative; padding-left:20px; font-size:.88rem; color:var(--muted); }
.list-clean li:before { content:""; position:absolute; left:0; top:9px; width:7px; height:7px; border-radius:2px; background:linear-gradient(135deg,var(--accent),var(--accent-2)); transform:rotate(45deg); }
.list-clean strong { color:var(--text); }
.teaching-card .list-clean li+li { margin-top:0; }
.teaching-card a { color:var(--accent); }
.honors-list { display:grid; grid-template-columns:1fr 1fr; gap:0 50px; counter-reset:honor; }
.honor { counter-increment:honor; display:grid; grid-template-columns:42px 1fr; gap:14px; padding:18px 0; border-top:1px solid var(--line); font-size:13px; }
.honor:before { content:counter(honor, decimal-leading-zero); color:var(--accent); font:500 10px "DM Mono",monospace; padding-top:3px; }
.honor strong { color:var(--accent); }
.skills-layout { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.skill-card { border:1px solid var(--line); border-radius:var(--radius-lg); background:var(--panel); padding:24px; min-height:220px; }
.skill-card h3 { font-size:16px; margin:22px 0 4px; }.skill-card p { color:var(--muted); font-size:12px; margin:0 0 12px; }.skill-card a { color:var(--accent); }
.language-skill { display:flex; align-items:center; justify-content:space-between; gap:15px; margin-top:28px; font-size:13px; }
.level { display:flex; gap:5px; }.level i { width:9px; height:9px; border-radius:50%; background:var(--accent); }.level i.off { background:transparent; border:1px solid var(--line-strong); }
.tag-cloud { display:flex; flex-wrap:wrap; gap:7px; margin-top:24px; }.tag-cloud span { padding:8px 10px; border-radius:10px; background:var(--accent-soft); color:var(--text); font-size:10px; font-weight:700; }
.reference-groups { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.reference-group { border:1px solid var(--line); border-radius:var(--radius-lg); background:var(--panel); padding:26px; }
.reference-group h3 { margin:0 0 26px; font-size:18px; letter-spacing:-.025em; }
.reference-group a { display:grid; gap:3px; padding:15px 0; border-top:1px solid var(--line); transition:padding .2s ease; }.reference-group a:hover { padding-left:7px; }.reference-group a:hover strong { color:var(--accent); }
.reference-group strong { font-size:13px; transition:color .2s ease; }.reference-group span { color:var(--muted); font-size:10px; font-family:"DM Mono",monospace; }
.closing { margin-top:150px; margin-bottom:100px; padding:80px; border-radius:var(--radius-xl); border:1px solid var(--line); background:linear-gradient(135deg,var(--panel),var(--accent-soft)); position:relative; overflow:hidden; }
.closing:after { content:"HK"; position:absolute; right:-30px; bottom:-100px; font:700 280px/1 "Playfair Display",serif; color:var(--accent); opacity:.055; pointer-events:none; }
.closing h2 { max-width:850px; position:relative; z-index:1; }.closing h2 em { color:var(--accent); }.closing-actions { margin-top:32px; position:relative; z-index:1; }
.footer { border-top:1px solid var(--line); min-height:100px; display:flex; align-items:center; justify-content:space-between; color:var(--soft); font:400 10px "DM Mono",monospace; }
.toast { position:fixed; left:50%; bottom:24px; transform:translate(-50%,20px); opacity:0; pointer-events:none; z-index:300; padding:11px 15px; border-radius:12px; background:var(--text); color:var(--bg); font-size:11px; box-shadow:var(--shadow); transition:.25s ease; }.toast.show { opacity:1; transform:translate(-50%,0); }
.reveal { opacity:0; transform:translateY(26px); transition:opacity .75s cubic-bezier(.2,.75,.25,1), transform .75s cubic-bezier(.2,.75,.25,1); will-change:opacity,transform; }.reveal.delay-1 { transition-delay:.08s; }.reveal.delay-2 { transition-delay:.16s; }.reveal.in-view { opacity:1; transform:none; }
@media (max-width: 980px) {
  .nav-links { position:absolute; left:0; right:0; top:calc(100% + 8px); padding:10px; flex-direction:column; align-items:stretch; border:1px solid var(--line); border-radius:18px; background:var(--bg-elevated); backdrop-filter:blur(22px); opacity:0; transform:translateY(-8px) scale(.98); pointer-events:none; transition:.2s ease; }
  .nav-links.open { opacity:1; transform:none; pointer-events:auto; }.nav-links a { padding:12px; }.menu-button { display:grid; }
  .hero { grid-template-columns:1fr; gap:105px; padding-top:170px; }.hero-copy { max-width:760px; }.hero-card { max-width:480px; margin-inline:auto; width:100%; }.scroll-cue { display:none; }
  .project-grid, .teaching-grid, .skills-layout { grid-template-columns:1fr 1fr; }.teaching-card:last-child { grid-column:1/-1; }
}
@media (max-width: 680px) {
  :root { --nav-height:64px; --nav-height-scrolled:52px; }.section-shell { width:min(100% - 40px,var(--max)); }.nav-wrap { top:10px; padding:0 20px; }.navbar { width:100%; border-radius:17px; }.brand-name { display:none; }
  .hero { padding-top:135px; padding-bottom:65px; gap:95px; }.hero h1 { font-size:clamp(3rem,7.5vw,5.2rem); }.hero-lead { font-size:16px; }.hero-card { padding:24px; }.portrait-wrap { width:140px; height:140px; margin-top:-82px; }
  .section-heading h2, .closing h2 { font-size:clamp(2.1rem,4.4vw,3.1rem); }.github-panel { padding:18px; }.github-topline { align-items:flex-start; flex-direction:column; }.github-stats { width:100%; justify-content:space-between; gap:10px; }.github-stats div { text-align:left; }.github-stats span { font-size:18px; }.github-footer { align-items:flex-start; flex-direction:column; }
  main > section:not(.hero):not(.github-section) { padding-top:110px; }.project-grid, .teaching-grid, .skills-layout, .reference-groups, .honors-list { grid-template-columns:1fr; }.teaching-card:last-child { grid-column:auto; }
  .publication { gap:16px; padding:22px; }.pub-index { width:46px; height:46px; font-size:13px; }.timeline-card { margin-left:24px; padding:20px; }.timeline-card:before { left:-32px; }.timeline-meta { flex-direction:column; gap:4px; }
  .subsection-heading { margin-top:90px; }.closing { margin-top:110px; padding:38px 24px; }.closing:after { font-size:180px; }.footer { min-height:110px; flex-direction:column; justify-content:center; gap:8px; align-items:flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; }
  html { scroll-behavior:smooth; }
  .nav-wrap, .navbar { transition-duration: 0.7s !important; }
  .publication:after, .project-card:before { transition-duration:.6s !important; transition-property:transform,opacity; }
  .reveal { transition-duration:.75s !important; }
  .section-badge { animation: badgeGlow 2.2s ease-in-out infinite !important; }
  .type-caret { animation: blink 1.2s steps(1) infinite !important; }
  .status-dot { animation: dotBlink 1.4s ease-in-out infinite !important; }
  .avail-dot { animation: greenBlink 1.4s ease-in-out infinite !important; }
}
@media print {
  .nav-wrap,.page-progress,.noise,.ambient,.scroll-cue,.hero-actions,.github-section,.closing,.footer,.toast { display:none!important; }
  body { background:#fff; color:#111; }.section-shell { width:100%; }.hero { min-height:auto; display:block; padding:30px 0; }.hero h1 { font-size:54px; }.hero-card { margin:40px 0 0; max-width:none; box-shadow:none; }.portrait-wrap { margin:0 0 15px; width:100px; height:100px; }.reveal { opacity:1!important; transform:none!important; }.project-grid,.skills-layout,.teaching-grid { grid-template-columns:1fr 1fr; }.project-card,.skill-card,.teaching-card,.timeline-card,.reference-group { break-inside:avoid; box-shadow:none; }.section-heading h2 { font-size:38px; } main>section:not(.hero):not(.github-section){padding-top:50px;}
}
