/* ═══════════════════════════════════════════════════════
   style.css — tokens, layout, components
   (motion & ambience live in effects.css)
   ═══════════════════════════════════════════════════════ */

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

/* ── TOKENS ── */
:root {
  /* light — "paper lab" */
  --bg0:    #EFF4F9;
  --bg1:    #FFFFFF;
  --panel:  rgba(255,255,255,.66);
  --line:   rgba(23,43,77,.13);
  --line2:  rgba(23,43,77,.24);
  --t1:     #15202F;
  --t2:     #47586D;
  --t3:     #7C8CA2;
  --cy:     #0B87A8;
  --cy-raw: 11,135,168;
  --am:     #B45309;
  --am-raw: 180,83,9;
  --btn-bg: linear-gradient(135deg, #0E7490, #0B87A8);
  --btn-tx: #F4FBFD;
  --glow:   rgba(11,135,168,.18);
  --shadow: 0 12px 40px rgba(21,32,47,.10);
  --nav-bg: rgba(246,250,253,.74);
  --font:   'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --disp:   'Chakra Petch', 'Inter', sans-serif;
  --mono:   'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
}
html.dark {
  /* dark — "lab at night" */
  --bg0:    #070B14;
  --bg1:    #0C1220;
  --panel:  rgba(148,180,220,.05);
  --line:   rgba(146,170,205,.14);
  --line2:  rgba(146,170,205,.28);
  --t1:     #E9F0F8;
  --t2:     #9FAEC4;
  --t3:     #5F7089;
  --cy:     #3EE0F0;
  --cy-raw: 62,224,240;
  --am:     #FFB454;
  --am-raw: 255,180,84;
  --btn-bg: linear-gradient(135deg, #3EE0F0, #19B8D0);
  --btn-tx: #062229;
  --glow:   rgba(62,224,240,.22);
  --shadow: 0 18px 50px rgba(2,6,14,.55);
  --nav-bg: rgba(7,11,20,.66);
}

html { background: var(--bg0); scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  color: var(--t1);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(var(--cy-raw), .28); }
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--cy); outline-offset: 3px; border-radius: 4px; }

/* mono text never ligates — terminals show literal glyphs */
.bootlog, .term-body, .ticker-set span { font-variant-ligatures: none; }

/* ═══ SHELL — split screen ═══════════════════════════════
   Fixed identity rail left, scrolling content right.
   Collapses to stacked flow under 1024px.               */
.shell {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 clamp(1.3rem, 4vw, 3.5rem);
}

/* ── RAIL ── */
.rail {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  display: flex; flex-direction: column;
  justify-content: space-between;
  padding: clamp(3rem, 8vh, 5.5rem) 0 clamp(2rem, 5vh, 3.5rem);
}

.bootlog {
  font-family: var(--mono); font-size: 12px; color: var(--t3);
  margin-bottom: 1.4rem; white-space: nowrap; overflow: hidden;
  max-width: 100%;
}
.bootlog b { color: var(--cy); font-weight: 500; }

.hero-name {
  font-family: var(--disp);
  font-size: clamp(2.3rem, 3.2vw, 3rem);
  font-weight: 700; letter-spacing: .01em; line-height: 1.05;
  text-transform: uppercase;
  color: var(--t1); margin-bottom: 1.1rem;
}
.hero-name .ln { display: block; }
.hero-name .w  { display: inline-flex; } /* words never break between tokens */

.rail-role {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--t2); padding: 8px 16px; border-radius: 30px;
  border: 1px solid var(--line2);
  margin-bottom: 1.2rem;
}
.role-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--am); }

.rail-tag { font-size: .95rem; color: var(--t2); line-height: 1.7; max-width: 34ch; }

/* rail nav — numbered index, marker grows on active */
.rail-nav { display: flex; flex-direction: column; gap: .35rem; margin: 2.5rem 0; }
.rnav {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: .08em; text-transform: lowercase;
  color: var(--t3); text-decoration: none;
  padding: 7px 0;
}
.rnav i { font-style: normal; font-size: 10px; color: var(--t3); width: 2ch; }
.rnav .rline {
  width: 24px; height: 1px; background: var(--t3);
  transition: width .35s cubic-bezier(.22,1,.36,1), background .25s;
}
.rnav:hover, .rnav.active { color: var(--t1); }
.rnav:hover .rline  { width: 44px; background: var(--t1); }
.rnav.active .rline { width: 64px; background: var(--cy); }
.rnav.active i      { color: var(--cy); }

.rail-foot { display: flex; flex-direction: column; gap: 1.1rem; }
.rail-socials { display: flex; align-items: center; gap: .55rem; }
.soc {
  width: 38px; height: 38px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--t2); border: 1px solid var(--line);
  text-decoration: none; background: transparent; cursor: pointer;
  transition: color .2s, border-color .2s, transform .2s, box-shadow .25s;
}
.soc:hover { color: var(--cy); border-color: var(--cy); transform: translateY(-2px); box-shadow: 0 0 16px var(--glow); }

/* ── BUTTONS — mono voice, instrument style ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase;
  padding: 12px 20px; border-radius: 10px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .2s ease, box-shadow .25s ease, border-color .2s, color .2s;
  will-change: transform;
}
.btn-p { background: var(--btn-bg); color: var(--btn-tx); }
.btn-p:hover { box-shadow: 0 6px 24px var(--glow), 0 0 0 1px rgba(var(--cy-raw),.35); transform: translateY(-2px); }
.btn-g { background: transparent; color: var(--t1); border-color: var(--line2); }
.btn-g:hover { border-color: var(--cy); color: var(--cy); transform: translateY(-2px); }

.icon-sun { display: none; }
html.dark .icon-moon { display: none; }
html.dark .icon-sun  { display: block; }

/* ═══ TOPBAR — mobile / tablet only ═══ */
.topbar {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  height: 60px; padding: 0 1.3rem;
  background: var(--nav-bg);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid transparent;
  align-items: center; justify-content: space-between;
  transition: border-color .3s, box-shadow .3s;
}
.topbar.scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 30px rgba(2,6,14,.18); }
.tb-brand {
  font-family: var(--disp); font-size: 14px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--t1); text-decoration: none;
}
.tb-brand em { font-style: normal; color: var(--cy); }
.tb-right { display: flex; align-items: center; gap: .55rem; }

.burger {
  width: 38px; height: 38px;
  background: transparent; border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; position: relative; z-index: 360;
}
.burger span {
  position: absolute; left: 10px; right: 10px; height: 2px;
  background: var(--t1); border-radius: 2px;
  transition: transform .3s ease, top .3s ease;
}
.burger span:nth-child(1) { top: 13px; }
.burger span:nth-child(2) { top: 21px; }
.burger.open span:nth-child(1) { top: 17px; transform: rotate(45deg); }
.burger.open span:nth-child(2) { top: 17px; transform: rotate(-45deg); }

.m-menu {
  position: fixed; inset: 0; z-index: 350;
  background: var(--nav-bg);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 2.2rem; gap: .3rem;
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.m-menu.open { opacity: 1; pointer-events: all; }
.m-menu a {
  font-family: var(--disp); font-size: 1.8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .03em;
  color: var(--t1); text-decoration: none; padding: .5rem 0;
  display: flex; align-items: baseline; gap: 1rem;
  opacity: 0; transform: translateY(18px);
  transition: opacity .4s ease, transform .4s cubic-bezier(.22,1,.36,1), color .2s;
}
.m-menu a i { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--cy); }
.m-menu a:hover { color: var(--cy); }
.m-menu.open a { opacity: 1; transform: translateY(0); }
.m-menu.open a:nth-child(1) { transition-delay: .04s; }
.m-menu.open a:nth-child(2) { transition-delay: .08s; }
.m-menu.open a:nth-child(3) { transition-delay: .12s; }
.m-menu.open a:nth-child(4) { transition-delay: .16s; }
.m-menu.open a:nth-child(5) { transition-delay: .2s; }
.m-menu.open a:nth-child(6) { transition-delay: .24s; }
.m-menu .m-foot { margin-top: 1.8rem; display: flex; flex-wrap: wrap; gap: 1.3rem; opacity: 0; transition: opacity .4s ease .3s; }
.m-menu.open .m-foot { opacity: 1; }
.m-menu .m-foot a {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  color: var(--t2); padding: 0; transform: none; opacity: 1; transition-delay: 0s;
}

/* ═══ CONTENT COLUMN ═══ */
.content { min-width: 0; padding-top: clamp(3rem, 8vh, 5.5rem); }
.content > section { padding: 0 0 clamp(4rem, 9vh, 6.5rem); }

.eyebrow {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  letter-spacing: .08em; color: var(--cy); margin-bottom: 1rem;
}
.eyebrow::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--line2), transparent);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 1s cubic-bezier(.22,1,.36,1) .15s;
}
.on .eyebrow::after { transform: scaleX(1); }

.sec-h {
  font-family: var(--disp); font-size: clamp(1.45rem, 2.6vw, 1.9rem);
  font-weight: 700; letter-spacing: .015em; text-transform: uppercase;
  margin-bottom: 2rem; color: var(--t1);
}

/* ── GLASS PANEL BASE (spotlight overlay in effects.css) ── */
.glass {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}
.glass:hover { border-color: var(--line2); box-shadow: var(--shadow); }

/* ═══ ABOUT ═══ */
.about-text p { font-size: .98rem; color: var(--t2); line-height: 1.8; margin-bottom: 1rem; max-width: 68ch; }
.about-row {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(230px, .78fr);
  gap: 1.4rem; align-items: start;
  margin-top: 2.2rem;
}

/* terminal profile card — always dark, both themes */
.term {
  background: #0A0F1A;
  border: 1px solid rgba(146,170,205,.22);
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(2,6,14,.45), 0 0 0 1px rgba(62,224,240,.05);
  overflow: hidden;
}
.term-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 15px; border-bottom: 1px solid rgba(146,170,205,.14);
  background: rgba(146,170,205,.04);
}
.term-led { width: 8px; height: 8px; border-radius: 50%; background: #34D399; box-shadow: 0 0 8px rgba(52,211,153,.7); }
.term-ttl { font-family: var(--mono); font-size: 11px; color: #5F7089; }
.term-body { padding: 1.1rem 1.2rem 1.3rem; font-family: var(--mono); font-size: 12.5px; line-height: 2.1; }
.term-body .cmd { color: #9FAEC4; }
.term-body .cmd b { color: #3EE0F0; font-weight: 500; }
.term-row { display: flex; gap: .9rem; }
.term-row .k { color: #5F7089; min-width: 7ch; flex-shrink: 0; }
.term-row .v { color: #E9F0F8; }
.term-row .v.hi { color: #FFB454; }
.term-cur { display: inline-block; width: 8px; height: 14px; background: #3EE0F0; vertical-align: middle; }

.hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.stat {
  padding: 14px 18px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.stat-v { font-family: var(--disp); font-size: 1.4rem; font-weight: 700; line-height: 1; color: var(--am); }
.stat-l { font-family: var(--mono); font-size: 9.5px; font-weight: 500; color: var(--t3); text-transform: uppercase; letter-spacing: .12em; margin-top: 6px; }

/* ═══ TICKER ═══ */
.ticker {
  border-block: 1px solid var(--line);
  overflow: hidden; padding: 12px 0;
  margin-bottom: clamp(4rem, 9vh, 6.5rem);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track { display: flex; width: max-content; }
.ticker-set { display: flex; flex-shrink: 0; }
.ticker-set span {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  color: var(--t3); white-space: nowrap; padding: 0 1.3rem;
  display: flex; align-items: center; gap: 2.6rem;
}
.ticker-set span::after { content: '◆'; font-size: 7px; color: var(--cy); opacity: .6; }

/* ═══ PROJECTS ═══ */
.proj-wrap { perspective: 1100px; }
.proj-card {
  padding: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 20px;
  transform-style: preserve-3d;
  will-change: transform;
  overflow: hidden;
}
/* giant index numeral watermark */
.proj-card::before {
  content: attr(data-num);
  position: absolute; top: -1.4rem; right: .4rem;
  font-family: var(--disp); font-weight: 700;
  font-size: clamp(5rem, 11vw, 7.5rem); line-height: 1;
  color: var(--t1); opacity: .05;
  pointer-events: none;
  transition: opacity .35s ease;
}
.proj-card:hover::before { opacity: .1; }

.proj-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.2rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.proj-meta { flex: 1; min-width: 230px; }
.proj-num { font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: var(--cy); margin-bottom: 9px; letter-spacing: .05em; }
.proj-title {
  font-family: var(--disp); font-size: clamp(1.1rem, 2vw, 1.28rem);
  font-weight: 600; letter-spacing: .01em; line-height: 1.3; color: var(--t1);
}
.gh-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 600;
  letter-spacing: .06em; text-transform: lowercase;
  color: var(--t2); padding: 9px 16px; border-radius: 9px;
  text-decoration: none; white-space: nowrap; flex-shrink: 0;
  border: 1px solid var(--line2);
  position: relative; z-index: 1;
  transition: color .2s, border-color .2s, box-shadow .25s, transform .2s;
}
.gh-btn:hover { color: var(--cy); border-color: var(--cy); box-shadow: 0 0 18px var(--glow); transform: translateY(-2px); }

.proj-ul { list-style: none; margin-bottom: 1.4rem; }
.proj-ul li {
  font-size: 13.5px; color: var(--t2); line-height: 1.75;
  padding: 4px 0 4px 22px; position: relative;
}
.proj-ul li::before {
  content: '»'; position: absolute; left: 2px; top: 4px;
  color: var(--cy); font-family: var(--mono); font-size: 13px;
}
.proj-ul strong { color: var(--am); font-weight: 600; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  padding: 5px 12px; border-radius: 7px;
  color: var(--t2); border: 1px solid var(--line);
  transition: border-color .2s, color .2s;
}
.tag.a { color: var(--cy); border-color: rgba(var(--cy-raw),.35); background: rgba(var(--cy-raw),.06); }
.tag.b { color: var(--am); border-color: rgba(var(--am-raw),.4);  background: rgba(var(--am-raw),.06); }

.proj-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 11px; margin-top: 1.4rem; }
.stat-mini { padding: 12px 16px; border-radius: 11px; border: 1px solid var(--line); background: rgba(var(--am-raw), .035); }
.ps-v { font-family: var(--disp); font-size: 1.18rem; font-weight: 700; color: var(--am); line-height: 1; }
.ps-l { font-family: var(--mono); font-size: 9px; font-weight: 500; color: var(--t3); text-transform: uppercase; letter-spacing: .12em; margin-top: 5px; }

/* ═══ SKILLS ═══ */
.sk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 265px), 1fr)); gap: 16px; }
.sk-card { padding: 1.6rem; }
.sk-cat {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--cy); margin-bottom: 1.2rem;
}
.sk-cat::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line2), transparent); }
.sk-items { display: flex; flex-wrap: wrap; gap: 8px; }
.sk-item {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  color: var(--t2); padding: 6px 13px; border-radius: 7px;
  border: 1px solid var(--line);
  transition: color .2s, border-color .2s, transform .2s;
}
.sk-item:hover { color: var(--cy); border-color: rgba(var(--cy-raw),.4); transform: translateY(-2px); }

/* ═══ GITHUB ═══ */
.gh-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 13px; margin-bottom: 16px; }
.gh-stat-card {
  padding: 1.4rem .9rem; text-align: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 13px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: border-color .25s, transform .25s, box-shadow .3s;
}
.gh-stat-card:hover { border-color: rgba(var(--am-raw),.45); transform: translateY(-4px); box-shadow: 0 12px 32px rgba(var(--am-raw),.09); }
.gh-stat-v { font-family: var(--disp); font-size: 1.75rem; font-weight: 700; color: var(--am); line-height: 1; display: block; }
.gh-stat-l { font-family: var(--mono); font-size: 9px; font-weight: 500; color: var(--t3); text-transform: uppercase; letter-spacing: .11em; margin-top: 8px; display: block; }

.gh-mid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; margin-bottom: 16px; }
#gh-langs-card, #gh-streak-card { padding: 1.6rem; min-height: 180px; }
.gh-empty { font-family: var(--mono); font-size: 12px; color: var(--t3); margin-top: .5rem; line-height: 1.7; }

.lang-bar-item { margin-bottom: .85rem; }
.lang-bar-label {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  color: var(--t2); margin-bottom: 6px;
}
.lang-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.lang-bar-track {
  height: 6px; border-radius: 6px; overflow: hidden;
  background: rgba(var(--cy-raw), .08); border: 1px solid var(--line);
}
.lang-bar-fill { height: 100%; border-radius: 6px; width: 0; transition: width 1.3s cubic-bezier(.4,0,.2,1); }

.streak-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 1rem; }
.streak-item { text-align: center; padding: 1.1rem .4rem; border-radius: 11px; border: 1px solid var(--line); background: rgba(var(--am-raw), .035); }

#gh-heatmap-card { padding: 1.6rem; }
.gh-year-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.gh-year-btn {
  font-family: var(--mono); font-size: 11.5px; font-weight: 600;
  padding: 5px 12px; border-radius: 7px;
  background: transparent; color: var(--t2);
  border: 1px solid var(--line); cursor: pointer;
  transition: color .2s, border-color .2s;
}
.gh-year-btn:hover { color: var(--cy); border-color: rgba(var(--cy-raw),.4); }
.gh-year-btn.active { color: var(--cy); border-color: var(--cy); background: rgba(var(--cy-raw),.07); }
.contrib-year-total { font-family: var(--mono); font-size: 12.5px; color: var(--t2); margin-bottom: .8rem; }
.contrib-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; flex-wrap: wrap; gap: .75rem; }
.contrib-title { font-family: var(--disp); font-size: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--t1); }
.contrib-scroll { overflow-x: auto; padding-bottom: 4px; }
.contrib-months { position: relative; height: 16px; margin-bottom: 4px; }
.contrib-month-lbl { position: absolute; font-family: var(--mono); font-size: 9.5px; color: var(--t3); font-weight: 500; white-space: nowrap; }
.contrib-grid { display: flex; gap: 4px; }
.contrib-col  { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.contrib-cell { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.contrib-cell[data-level="-1"] { background: transparent; }
.contrib-cell[data-level="0"]  { background: rgba(var(--cy-raw), .06); border: 1px solid var(--line); }
.contrib-cell[data-level="1"]  { background: rgba(var(--cy-raw), .28); }
.contrib-cell[data-level="2"]  { background: rgba(var(--cy-raw), .5); }
.contrib-cell[data-level="3"]  { background: rgba(var(--cy-raw), .72); }
.contrib-cell[data-level="4"]  { background: rgba(var(--cy-raw), .95); box-shadow: 0 0 6px var(--glow); }
.contrib-legend {
  display: flex; align-items: center; gap: 4px; margin-top: 10px;
  justify-content: flex-end;
  font-family: var(--mono); font-size: 9.5px; color: var(--t3); font-weight: 500;
}

/* ═══ RESEARCH ═══ */
.pub-card { padding: clamp(1.5rem, 3vw, 2.2rem); }
.pub-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.pub-lbl { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--cy); margin-bottom: .8rem; }
.pub-ttl { font-family: var(--disp); font-size: 1.12rem; font-weight: 600; line-height: 1.35; margin-bottom: .6rem; color: var(--t1); }
.pub-meta { font-family: var(--mono); font-size: 12px; color: var(--t3); margin-bottom: 5px; }
.pub-doi { font-family: var(--mono); font-size: 12px; color: var(--cy); text-decoration: none; font-weight: 500; }
.pub-doi:hover { text-decoration: underline; }

/* ═══ EDUCATION ═══ */
.edu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.edu-card { padding: clamp(1.4rem, 3vw, 1.9rem); }
.edu-lbl { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--t3); margin-bottom: 1rem; }
.edu-deg { font-family: var(--disp); font-size: 1.12rem; font-weight: 600; margin-bottom: 6px; color: var(--t1); }
.edu-sch { font-size: 13px; color: var(--t2); margin-bottom: 1.4rem; line-height: 1.55; }
.edu-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.edu-pill {
  font-family: var(--mono); font-size: 11.5px; font-weight: 500;
  padding: 6px 13px; border-radius: 7px;
  color: var(--t2); border: 1px solid var(--line);
}
.edu-pill.hi { color: var(--cy); border-color: rgba(var(--cy-raw),.35); background: rgba(var(--cy-raw),.06); }

.cert-row {
  display: flex; flex-direction: column; align-items: flex-start; gap: .55rem;
  padding: .9rem 0; border-bottom: 1px solid var(--line);
}
.cert-row:first-of-type { border-top: 1px solid var(--line); margin-top: 1.1rem; }
.cert-name { font-size: 13.5px; font-weight: 600; color: var(--t1); }
.cert-org  { font-family: var(--mono); font-size: 11px; color: var(--t3); }
.cert-date { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--am); white-space: nowrap; }
.cert-btn {
  display: inline-flex; align-items: center;
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 7px;
  color: var(--cy); border: 1px solid rgba(var(--cy-raw),.4);
  text-decoration: none; white-space: nowrap; flex-shrink: 0;
  transition: background .2s, box-shadow .25s;
}
.cert-btn:hover { background: rgba(var(--cy-raw),.1); box-shadow: 0 0 14px var(--glow); }
.cert-right { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .6rem; }

/* ═══ FOOTER (inside content column) ═══ */
.foot {
  border-top: 1px solid var(--line);
  padding: 1.8rem 0 2.4rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.foot-name { font-family: var(--mono); font-size: 12px; color: var(--t2); }
.foot-links { display: flex; gap: 1.4rem; }
.foot-links a { font-family: var(--mono); font-size: 12px; color: var(--t2); text-decoration: none; font-weight: 500; transition: color .2s; }
.foot-links a:hover { color: var(--cy); }

/* ═══ RESUME MODAL ═══ */
.r-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(4,8,16,.55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.r-overlay.open { opacity: 1; pointer-events: all; }
.r-box {
  background: var(--bg1);
  border: 1px solid var(--line2); border-radius: 16px;
  padding: 2rem 2rem 1.6rem;
  width: min(340px, 90vw);
  box-shadow: var(--shadow);
  position: relative;
  transform: translateY(12px) scale(.97);
  transition: transform .22s ease, opacity .22s ease;
  opacity: 0;
}
.r-overlay.open .r-box { transform: translateY(0) scale(1); opacity: 1; }
.r-close {
  position: absolute; top: .75rem; right: .9rem;
  background: none; border: none; cursor: pointer;
  color: var(--t3); font-size: 17px; line-height: 1;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; transition: background .15s, color .15s;
}
.r-close:hover { background: rgba(var(--cy-raw),.1); color: var(--t1); }
.r-title { font-family: var(--disp); font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--t1); margin-bottom: .35rem; }
.r-sub   { font-family: var(--mono); font-size: 11.5px; color: var(--t3); margin-bottom: 1.4rem; }
.r-actions { display: flex; gap: .7rem; }
.r-actions .btn { flex: 1; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1024px) {
  .shell { display: block; }
  .topbar { display: flex; }
  .rail {
    position: static; height: auto;
    padding: 6.5rem 0 0; gap: 1.6rem;
  }
  .rail-nav { display: none; }
  .hero-name { font-size: clamp(2.4rem, 8vw, 3.4rem); }
  .rail-tag { max-width: 60ch; }
  .content { padding-top: 3.5rem; }
}
@media (max-width: 560px) {
  .about-row { grid-template-columns: 1fr; }
  .rail-foot .btn { width: 100%; }
  .m-menu a { font-size: 1.5rem; }
}
