:root {
  --bg: #ffffff;
  --fg: #111111;
  --fg-muted: #6e6e68;
  --fg-faint: #adada6;
  --line: #eaeae4;
  --accent: #111111;
  --font-sans: 'Uncut Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --max-w: 720px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: var(--font-mono); }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

/* Hero */
.hero {
  padding: 88px 0 64px;
}

.hero__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 48px;
}

.hero__eyebrow {
  display: block;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin-bottom: 28px;
}

.hero__name {
  font-size: clamp(2.6rem, 6.5vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin-bottom: 22px;
}

.hero__title {
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 6px;
}

.hero__subtitle {
  color: var(--fg-muted);
  font-size: 0.98rem;
  max-width: 40ch;
  margin-bottom: 32px;
}

.hero__contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
  font-size: 13px;
  color: var(--fg-muted);
}

.hero__contact a {
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.hero__contact a:hover { color: var(--fg); }

.hero__photo {
  flex: none;
  width: 220px;
  height: 220px;
  object-fit: cover;
  object-position: 50% 22%;
}

/* Sticky tab nav */
.tabbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.tabbar__inner {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabbar__inner::-webkit-scrollbar { display: none; }

.tabbar a {
  flex: none;
  padding: 15px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-faint);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.tabbar a:hover { color: var(--fg); }
.tabbar a.active { color: var(--fg); border-color: var(--fg); }

/* Sections */
.section {
  padding: 52px 0;
  border-bottom: 1px solid var(--line);
}
.section:last-of-type { border-bottom: none; }

.section__label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-faint);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 26px;
}

.summary {
  font-size: 1.02rem;
  color: var(--fg-muted);
  max-width: 60ch;
}
.summary + .summary { margin-top: 14px; }

.summary__skills {
  display: flex;
  gap: 20px;
  align-items: baseline;
  margin-top: 26px;
}
.summary__skills h3 {
  font-size: 11.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-faint);
  flex: none;
}
.summary__skills .tags li:not(:last-child)::after { content: ', '; }

/* Experience / Education / Research entries */
.entry {
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.entry:first-of-type { border-top: none; padding-top: 0; }

.entry__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.entry__role {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.entry__role a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.entry__role a:hover { color: var(--fg); border-color: var(--fg); }

.entry__org {
  font-size: 0.9rem;
  color: var(--fg-muted);
  font-weight: 500;
  margin-top: 3px;
}
.entry__org a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.entry__org a:hover { color: var(--fg); border-color: var(--fg); }

.entry__loc { color: var(--fg-faint); font-weight: 400; }

.entry__date {
  font-size: 11.5px;
  color: var(--fg-faint);
  white-space: nowrap;
}

.entry__points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.entry__points li {
  color: var(--fg-muted);
  font-size: 0.94rem;
}

/* Tags */
.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--fg-faint);
}

.tags li { white-space: nowrap; }
.tags li:not(:last-child)::after { content: '  /  '; }

/* Talks */
.talks {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.talk {
  display: flex;
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.talk:first-child { border-top: none; padding-top: 0; }

.talk__year {
  color: var(--fg-faint);
  font-size: 12px;
  flex: none;
  width: 36px;
  padding-top: 2px;
}

.talk__title {
  font-size: 0.96rem;
  color: var(--fg);
  margin-bottom: 4px;
}

.talk__meta {
  font-size: 11.5px;
  color: var(--fg-faint);
}

/* Stealth unlock */
.stealth__hint {
  font-size: 12.5px;
  color: var(--fg-faint);
  margin-bottom: 16px;
}

.stealth__form {
  display: flex;
  gap: 8px;
  max-width: 340px;
}

.stealth__input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  font-size: 13px;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  outline: none;
}
.stealth__input:focus { border-color: var(--fg); }

.stealth__submit {
  padding: 10px 16px;
  font-size: 13px;
  background: var(--fg);
  color: var(--bg);
  border: 1px solid var(--fg);
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.stealth__submit:hover { opacity: 0.8; }
.stealth__submit:disabled { opacity: 0.5; cursor: default; }

.stealth__error {
  font-size: 12px;
  color: var(--fg);
  margin-top: 10px;
}

/* Projects */
.projects {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.project {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.project:first-child { border-top: none; padding-top: 0; }

.project__icon {
  flex: none;
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
}

.project__icon--mono {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  color: var(--fg-faint);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.project__title {
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.project__title a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.project__title a:hover { color: var(--fg); border-color: var(--fg); }
.project__title .mono {
  font-weight: 400;
  color: var(--fg-faint);
  font-size: 0.85em;
}

.project__desc {
  font-size: 0.92rem;
  color: var(--fg-muted);
  max-width: 56ch;
}

/* Skills */
.skills {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.skills__group {
  display: flex;
  gap: 20px;
  align-items: baseline;
}

.skills__group h3 {
  font-size: 11.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-faint);
  flex: none;
  width: 100px;
}

.skills__group .tags li:not(:last-child)::after { content: ', '; }

/* Footer */
.footer {
  padding: 40px 0 56px;
}
.footer p:first-child {
  color: var(--fg-faint);
  font-size: 12px;
}
.footer__links {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  font-size: 12.5px;
}
.footer__links a {
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer__links a:hover { color: var(--fg); }

@media (max-width: 640px) {
  .hero { padding: 48px 0 40px; }
  .hero__inner { flex-direction: column-reverse; gap: 28px; }
  .hero__photo { width: 140px; height: 140px; }
  .entry__head { flex-direction: column; gap: 6px; }
  .talk { gap: 14px; }
  .skills__group { flex-direction: column; gap: 4px; }
  .skills__group h3 { width: auto; }
}
