/* ────────────────────────────────────────────────────
GEIST MONO via @font-face  (CDN)
──────────────────────────────────────────────────── */
@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400;500&display=swap");

/* ────────────────────────────────────────────────────
TOKENS
──────────────────────────────────────────────────── */
:root {
  /* DARK (default) — deep blacks + violet accents */
  --bg: #0a0a0a;
  --bg-surface: #111111;
  --bg-raised: #1a1a1a;
  --bg-hover: #222222;
  --fg: #f5f5f5;
  --fg-2: #a8a8a8;
  --fg-3: #666666;
  --border: #2a2a2a;
  --border-hi: #3d3d3d;
  --accent: #8b5cf6;
  /* violet-500 */
  --accent-hi: #a78bfa;
  /* violet-400 */
  --accent-dim: rgba(139, 92, 246, 0.18);

  /* tag palette — dark, high contrast */
  --t-lang-bg: #052e16;
  --t-lang-fg: #86efac;
  --t-lang-bd: #166534;
  --t-ml-bg: #2e1065;
  --t-ml-fg: #c4b5fd;
  --t-ml-bd: #5b21b6;
  --t-web-bg: #0c2a4a;
  --t-web-fg: #7dd3fc;
  --t-web-bd: #0369a1;
  --t-tools-bg: #2d1a00;
  --t-tools-fg: #fcd34d;
  --t-tools-bd: #92400e;
  --t-data-bg: #3b0d0d;
  --t-data-fg: #fca5a5;
  --t-data-bd: #991b1b;

  --radius: 3px;
  --nav-h: 58px;
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg-surface: #f5f5f5;
  --bg-raised: #ebebeb;
  --bg-hover: #e0e0e0;
  --fg: #0a0a0a;
  --fg-2: #3d3d3d;
  --fg-3: #777777;
  --border: #d4d4d4;
  --border-hi: #a3a3a3;
  --accent: #6d28d9;
  --accent-hi: #5b21b6;
  --accent-dim: rgba(109, 40, 217, 0.1);

  --t-lang-bg: #dcfce7;
  --t-lang-fg: #14532d;
  --t-lang-bd: #86efac;
  --t-ml-bg: #ede9fe;
  --t-ml-fg: #3b0764;
  --t-ml-bd: #c4b5fd;
  --t-web-bg: #e0f2fe;
  --t-web-fg: #0c4a6e;
  --t-web-bd: #7dd3fc;
  --t-tools-bg: #fef9c3;
  --t-tools-fg: #713f12;
  --t-tools-bd: #fde047;
  --t-data-bg: #fee2e2;
  --t-data-fg: #7f1d1d;
  --t-data-bd: #fca5a5;
}

/* ────────────────────────────────────────────────────
RESET & BASE
──────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 15px;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
  transition:
    background 0.3s,
    color 0.3s;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* SCROLLBAR */
::-webkit-scrollbar {
  width: 3px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
}

/* FONT ROLES */
.font-heading {
  font-family: "Geist Mono", monospace;
}

.font-secondary {
  font-family: "Inter", sans-serif;
}

/* body */
.font-tag {
  font-family: "Geist Mono", monospace;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: "Geist Mono", monospace;
  line-height: 1.1;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ────────────────────────────────────────────────────
NAV
──────────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 5vw, 3.5rem);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition:
    background 0.3s,
    border-color 0.3s;
}

.nav-logo {
  font-family: "Geist Mono", monospace;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--fg);
  display: inline-flex;
  align-items: center;
}

.nav-logo span {
  color: var(--accent);
}

.nav-logo img {
  display: block;
  height: 34px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 0;
  list-style: none;
}

.nav-links a {
  font-family: "Inter", sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg);
  padding: 0.45rem 0.9rem;
  transition: color 0.18s;
}

.nav-links a:hover {
  color: var(--accent-hi);
}

.nav-links a.active {
  color: var(--accent);
}

/* theme toggle — hero version */
.theme-btn {
  background: none;
  border: 1px solid var(--border-hi);
  cursor: pointer;
  padding: 0.38rem 1rem;
  color: var(--fg-2);
  font-size: 0.75rem;
  border-radius: var(--radius);
  transition:
    border-color 0.18s,
    background 0.18s,
    color 0.18s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Geist Mono", monospace;
  letter-spacing: 0.08em;
}

.theme-btn:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 3px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--fg);
  transition: all 0.3s;
}

.mob-nav {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  z-index: 199;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.mob-nav.open {
  display: block;
}

.mob-nav a {
  display: block;
  padding: 0.9rem 1.5rem;
  color: var(--fg-2);
  font-family: "Inter", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  transition:
    color 0.18s,
    background 0.18s;
}

.mob-nav a:hover {
  color: var(--fg);
  background: var(--bg-surface);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ────────────────────────────────────────────────────
LAYOUT HELPERS
──────────────────────────────────────────────────── */
.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 6vw, 4.5rem);
}

section {
  padding: clamp(3.5rem, 6vw, 5rem) 0;
}

section > .wrap > * + * {
  margin-top: 0;
}

hr.div {
  border: none;
  border-top: 1px solid var(--border);
}

.sec-label {
  font-family: "Geist Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.sec-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--fg);
  margin-bottom: 2.5rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.sec-title em {
  color: var(--accent);
  font-style: normal;
}

/* ────────────────────────────────────────────────────
REVEAL ANIMATION
──────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* ────────────────────────────────────────────────────
TAGS (shared across all sections)
──────────────────────────────────────────────────── */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag {
  font-family: "Geist Mono", monospace;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius);
  position: relative;
  cursor: default;
  border-width: 1px;
  border-style: solid;
  line-height: 1.4;
}

.tag .tt {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-raised);
  border: 1px solid var(--border-hi);
  color: var(--fg);
  font-family: "Inter", sans-serif;
  font-size: 0.68rem;
  padding: 0.3rem 0.65rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 40;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.tag:hover .tt {
  opacity: 1;
}

.tag.lang {
  background: var(--t-lang-bg);
  color: var(--t-lang-fg);
  border-color: var(--t-lang-bd);
}

.tag.ml {
  background: var(--t-ml-bg);
  color: var(--t-ml-fg);
  border-color: var(--t-ml-bd);
}

.tag.web {
  background: var(--t-web-bg);
  color: var(--t-web-fg);
  border-color: var(--t-web-bd);
}

.tag.tools {
  background: var(--t-tools-bg);
  color: var(--t-tools-fg);
  border-color: var(--t-tools-bd);
}

.tag.data {
  background: var(--t-data-bg);
  color: var(--t-data-fg);
  border-color: var(--t-data-bd);
}

/* ────────────────────────────────────────────────────
HERO / ABOUT
──────────────────────────────────────────────────── */
#about {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: var(--nav-h);
}

#about .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-name {
  font-size: clamp(3.2rem, 10vw, 7rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: var(--fg);
  margin-bottom: 1.4rem;
  animation: fu 0.7s 0.1s ease both;
}

.hero-bio {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--fg-2);
  max-width: 500px;
  font-weight: 400;
  margin-bottom: 2.5rem;
  animation: fu 0.7s 0.18s ease both;
}

.hero-bio strong {
  color: var(--fg);
  font-weight: 600;
}

.socials {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1.2rem;
  animation: fu 0.7s 0.3s ease both;
}

.btn-s {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.25rem;
  border: 1px solid var(--border-hi);
  background: var(--bg-surface);
  color: var(--fg);
  font-size: 0.95rem;
  font-weight: 500;
  font-family: "Inter", sans-serif;
  transition:
    border-color 0.18s,
    background 0.18s,
    transform 0.15s;
}

.btn-s:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-2px);
}

.btn-s svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.btn-resume {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 2.2rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: "Inter", sans-serif;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
  transition:
    background 0.18s,
    transform 0.15s;
  animation: fu 0.7s 0.38s ease both;
}

.btn-resume:hover {
  background: var(--accent-hi);
  transform: translateY(-2px);
}

@keyframes fu {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* ────────────────────────────────────────────────────
PROJECTS
──────────────────────────────────────────────────── */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1px;
  background: var(--border);
  margin-bottom: 1.5rem;
}

.proj-card {
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  transition: background 0.2s;
}

.proj-card:hover {
  background: var(--bg-raised);
}

/* hidden projects */
.proj-card.hidden-proj {
  display: none;
}

.proj-card.hidden-proj.show {
  display: flex;
}

.proj-img {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-raised);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.proj-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.proj-img .ph {
  font-family: "Geist Mono", monospace;
  font-size: 0.66rem;
  color: var(--fg-3);
  letter-spacing: 0.1em;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
}

.proj-body {
  padding: 1.35rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.proj-title {
  font-family: "Geist Mono", monospace;
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.proj-desc {
  color: var(--fg);
  font-size: 0.95rem;
  line-height: 1.7;
  flex: 1;
  margin-bottom: 0.9rem;
}

.proj-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: "Geist Mono", monospace;
  letter-spacing: 0.04em;
  transition:
    color 0.18s,
    gap 0.15s;
}

.proj-link:hover {
  color: var(--accent-hi);
  gap: 0.6rem;
}

/* show-more button */
.show-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 0.25rem;
}

.btn-showmore {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.5rem;
  background: none;
  border: 1px solid var(--border-hi);
  color: var(--fg-2);
  cursor: pointer;
  font-family: "Geist Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition:
    border-color 0.18s,
    color 0.18s,
    background 0.18s;
}

.btn-showmore:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.btn-showmore svg {
  width: 13px;
  height: 13px;
  transition: transform 0.25s;
}

.btn-showmore.open svg {
  transform: rotate(180deg);
}

/* ────────────────────────────────────────────────────
RESEARCH — horizontal card stacked
──────────────────────────────────────────────────── */
.res-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
}

.res-item {
  background: var(--bg-surface);
  display: grid;
  grid-template-columns: minmax(320px, 42%) minmax(0, 1fr);
  cursor: pointer;
  overflow: hidden;
  transition: background 0.2s;
}

.res-item:hover {
  background: var(--bg-raised);
}

.res-img {
  background: var(--bg-raised);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  height: 100%;
}

.res-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.res-img img.research-thumb {
  object-fit: cover;
  padding: 0;
  background: transparent;
}

.res-img .ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  height: 100%;
  padding: 1.5rem;
  font-family: "Geist Mono", monospace;
  font-size: 0.64rem;
  color: var(--fg-3);
  text-align: center;
  letter-spacing: 0.06em;
}

.res-img .ph .icon {
  font-size: 2rem;
  line-height: 1;
}

.res-body {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.res-venue {
  font-family: "Geist Mono", monospace;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.res-title {
  font-family: "Geist Mono", monospace;
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}

.res-authors {
  font-size: 0.88rem;
  color: var(--fg-2);
  margin-bottom: 0.7rem;
  font-family: "Inter", sans-serif;
  font-weight: 500;
}

.res-desc {
  color: var(--fg);
  font-size: 0.95rem;
  line-height: 1.7;
  flex: 1;
  margin-bottom: 0.9rem;
}

.res-links {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.res-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: "Geist Mono", monospace;
  font-size: 0.73rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: opacity 0.18s;
}

.res-link:hover {
  opacity: 0.75;
}

.res-link svg {
  width: 12px;
  height: 12px;
}

/* color-coded research links */
.res-link.paper {
  color: #f97316;
}

/* orange */
.res-link.code {
  color: #22d3ee;
}

/* cyan */
.res-link.slides {
  color: #a3e635;
}

/* lime */
.res-link.arxiv {
  color: #fb7185;
}

/* rose */
[data-theme="light"] .res-link.paper {
  color: #c2410c;
}

[data-theme="light"] .res-link.code {
  color: #0369a1;
}

[data-theme="light"] .res-link.slides {
  color: #4d7c0f;
}

[data-theme="light"] .res-link.arxiv {
  color: #be123c;
}

/* research item with image on the right */
.res-item.img-right {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 42%);
}

.res-item.img-right .res-img {
  order: 2;
}

.res-item.img-right .res-body {
  order: 1;
}

.research-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.research-modal.open {
  display: flex;
}

.research-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(2px);
}

.research-modal-dialog {
  position: relative;
  width: min(1120px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  background: var(--bg-surface);
  border: 1px solid var(--border-hi);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0.75rem;
  padding: 1rem;
  z-index: 1;
}

.research-modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.65rem;
  background: none;
  border: 1px solid var(--border-hi);
  color: var(--fg);
  width: 2rem;
  height: 2rem;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}

.research-modal-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.research-modal-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.6rem;
  padding-right: 2.4rem;
}

.research-modal-head h3 {
  font-family: "Geist Mono", monospace;
  font-size: 1rem;
  letter-spacing: -0.01em;
  font-weight: 400;
}

.research-modal-head p {
  font-family: "Geist Mono", monospace;
  font-size: 0.78rem;
  color: var(--fg-2);
  letter-spacing: 0.08em;
}

.research-modal-viewer {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  min-height: min(68vh, 760px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 0.75rem;
}

.research-modal-status {
  font-family: "Geist Mono", monospace;
  font-size: 0.76rem;
  color: var(--fg-2);
  letter-spacing: 0.05em;
}

#researchPdfCanvas {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.research-modal-controls {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
}

.research-nav-btn {
  font-family: "Geist Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--border-hi);
  background: var(--bg);
  color: var(--fg);
  padding: 0.5rem 0.8rem;
  cursor: pointer;
}

.research-nav-btn:hover:enabled {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.research-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

body.no-scroll {
  overflow: hidden;
}

.skills-wrap {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
}

.skill-box {
  background: var(--bg-surface);
  padding: 1.4rem;
  transition: background 0.2s;
}

.skill-box:hover {
  background: var(--bg-raised);
}

.skill-cat {
  font-family: "Geist Mono", monospace;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}

.skill-cat.lang {
  color: var(--t-lang-fg);
}

.skill-cat.ml {
  color: var(--t-ml-fg);
}

.skill-cat.web {
  color: var(--t-web-fg);
}

.skill-cat.tools {
  color: var(--t-tools-fg);
}

.skill-cat.data {
  color: var(--t-data-fg);
}

/* horizontal wrap — tags flow left to right, wrap naturally */
.skill-tag-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* ────────────────────────────────────────────────────
EXPERIENCE — timeline
──────────────────────────────────────────────────── */
.exp-wrap {
  position: relative;
}

.exp-line {
  position: absolute;
  left: 6px;
  top: 10px;
  bottom: 18px;
  width: 1px;
  background: var(--border-hi);
}

.exp-item {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 0 1.6rem;
  margin-bottom: 3rem;
}

.exp-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 3px var(--accent-dim);
  margin-top: 5px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.exp-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.2rem;
  flex-wrap: wrap;
}

.exp-logo {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: var(--bg-raised);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-family: "Geist Mono", monospace;
  color: var(--fg-3);
  flex-shrink: 0;
  overflow: hidden;
}

.exp-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.exp-role {
  font-family: "Geist Mono", monospace;
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.exp-at {
  color: var(--fg-3);
  margin: 0 0.1rem;
}

.exp-co {
  color: var(--accent-hi);
  font-weight: 400;
  font-size:
  font-family: "Geist Mono", monospace;
}

.exp-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}

.exp-period {
  font-family: "Geist Mono", monospace;
  font-size: 0.9rem;
  color: var(--fg);
  letter-spacing: 0.03em;
  font-weight: 500;
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
}

.exp-desc {
  color: var(--fg);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 0.9rem;
}

.exp-desc ul {
  list-style: none;
}

.exp-desc li {
  padding-left: 1.3em;
  position: relative;
  margin-bottom: 0.35rem;
}

.exp-desc li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* linked keywords in job descriptions */
.exp-desc a {
  color: var(--accent-hi);
  border-bottom: 1px solid var(--accent-dim);
  transition:
    border-color 0.15s,
    color 0.15s;
}

.exp-desc a:hover {
  color: var(--fg);
  border-color: var(--accent);
}

/* ────────────────────────────────────────────────────
EDUCATION — vertical stacked rows with logo
──────────────────────────────────────────────────── */
.edu-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
}

.edu-item {
  background: var(--bg-surface);
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0;
  transition: background 0.2s;
}

.edu-item:hover {
  background: var(--bg-raised);
}

.edu-logo {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.6rem 0 1.6rem 1.6rem;
}

.edu-logo-inner {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background: var(--bg-raised);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Geist Mono", monospace;
  font-size: 0.6rem;
  color: var(--fg-3);
  flex-shrink: 0;
  overflow: hidden;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.edu-logo-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.edu-body {
  padding: 1.6rem 1.6rem 1.6rem 1rem;
}

.edu-type {
  font-family: "Geist Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.3rem;
  font-weight: 500;
}

.edu-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.2rem;
}

.edu-deg {
  font-family: "Geist Mono", monospace;
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.edu-period {
  font-family: "Geist Mono", monospace;
  font-size: 0.9rem;
  color: var(--fg);
  font-weight: 500;
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
}

.edu-school {
  color: var(--fg);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.edu-detail {
  font-size: 0.93rem;
  color: var(--fg-2);
  line-height: 1.65;
}

/* ────────────────────────────────────────────────────
FOOTER
──────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 2.5rem;
  color: var(--fg-3);
  font-family: "Geist Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}

/* ────────────────────────────────────────────────────
RESPONSIVE
──────────────────────────────────────────────────── */
@media (max-width: 780px) {
  .nav-links,
  .theme-btn-desktop {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .res-item {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .res-item.img-right {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .res-img {
    min-height: auto;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .res-item.img-right .res-img {
    order: 1;
  }

  .res-item.img-right .res-body {
    order: 2;
  }

  .proj-grid {
    grid-template-columns: 1fr;
  }

  .research-modal {
    padding: 0.5rem;
  }

  .research-modal-dialog {
    width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
    padding: 0.75rem;
  }

  .research-modal-viewer {
    min-height: 58vh;
  }
}

@media (max-width: 520px) {
  .socials {
    flex-direction: column;
    align-items: center;
  }

  .edu-grid {
    grid-template-columns: 1fr;
  }

  .res-item,
  .res-item.img-right {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .res-img {
    aspect-ratio: 16 / 9;
    min-height: auto;
    height: auto;
  }

  .res-body {
    padding: 1rem;
  }

  .research-modal-head h3 {
    font-size: 0.9rem;
  }

  .research-nav-btn {
    font-size: 0.72rem;
    padding: 0.48rem 0.62rem;
  }
}
