:root {
  --page: #f5f2ea;
  --surface: #fffaf0;
  --surface-strong: #ffffff;
  --ink: #16201a;
  --muted: #637067;
  --line: #d7d0c2;
  --green: #185c4d;
  --green-soft: #dbe9e4;
  --blue: #235c9d;
  --gold: #b57f19;
  --shadow: 0 18px 44px rgba(31, 39, 33, 0.09);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--page);
  background-image:
    linear-gradient(rgba(22, 32, 26, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 32, 26, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 242, 234, 0.88);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: var(--surface);
  font-weight: 900;
  letter-spacing: 0;
}

.brand-text {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease;
}

.nav-links a:hover {
  background: var(--green-soft);
  color: var(--green);
}

.nav-links .nav-cta {
  border: 1px solid var(--green);
  background: var(--green);
  color: var(--surface);
}

.nav-links .nav-cta:hover {
  background: #0f473c;
  color: var(--surface);
}

.section {
  margin: 0 0 84px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 28px;
  align-items: stretch;
  padding: 78px 0 0;
}

.hero-identity {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 30px;
  align-items: center;
  min-width: 0;
  padding: 34px 0 32px;
}

.profile-photo {
  width: 180px;
  height: 180px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow);
  object-fit: cover;
}

.profile-panel,
.stat-card,
.focus-card,
.timeline-item,
.project-card,
.skill-group,
.publication-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.86);
  box-shadow: var(--shadow);
}

.profile-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 24px;
}

.eyebrow,
.section-kicker,
.project-label {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 850px;
  margin-bottom: 16px;
  color: var(--ink);
  font-size: 72px;
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  color: var(--ink);
  font-size: 42px;
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 22px;
}

.hero-actions,
.project-links,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  grid-column: 1 / -1;
  padding-bottom: 16px;
}

.button,
.project-links a,
.contact-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover,
.project-links a:hover,
.contact-links a:hover {
  border-color: var(--green);
  background: var(--green-soft);
  transform: translateY(-2px);
}

.button.primary {
  border-color: var(--green);
  background: var(--green);
  color: var(--surface);
}

.link-icon {
  display: inline-grid;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.button.primary .link-icon {
  border-color: rgba(255, 250, 240, 0.42);
  background: var(--surface);
  color: var(--green);
}

.icon-email,
.icon-resume {
  background: var(--green-soft);
  color: var(--green);
}

.icon-github {
  border-color: #16201a;
  background: #16201a;
  color: #ffffff;
}

.icon-linkedin {
  border-color: #0a66c2;
  background: #0a66c2;
  color: #ffffff;
  font-size: 12px;
}

.icon-hf {
  border-color: #e8a302;
  background: #ffd35c;
  color: #312100;
}

.icon-demo {
  border-color: var(--blue);
  background: #e2edf8;
  color: var(--blue);
}

.icon-paper {
  width: 30px;
  border-color: var(--gold);
  background: #f7e8c2;
  color: #6f4a00;
}

.availability {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 8px 10px;
  border: 1px solid #b8d2c8;
  border-radius: var(--radius);
  background: var(--green-soft);
  color: var(--green);
  font-size: 13px;
  font-weight: 850;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #1f8f6c;
  box-shadow: 0 0 0 5px rgba(31, 143, 108, 0.16);
}

.profile-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.profile-list div {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.profile-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.profile-list dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  word-break: break-word;
}

.profile-list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 84px;
}

.stat-card {
  padding: 22px;
}

.stat-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 30px;
  line-height: 1;
  letter-spacing: 0;
}

.stat-card span {
  color: var(--muted);
  font-weight: 650;
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.focus-card {
  padding: 24px;
}

.focus-card p {
  margin: 0;
  color: var(--muted);
}

.two-column {
  display: grid;
  grid-template-columns: 0.85fr 1.4fr;
  gap: 42px;
  align-items: start;
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline-item {
  position: relative;
  padding: 24px;
}

.timeline-item::before {
  position: absolute;
  top: 28px;
  left: -8px;
  width: 14px;
  height: 14px;
  border: 3px solid var(--page);
  border-radius: 50%;
  background: var(--gold);
  content: "";
}

.timeline-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.timeline-top h3 {
  margin: 0;
}

.timeline-top span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  text-align: right;
}

.timeline-item p,
.focus-card p,
.project-card p,
.publication-card p,
.contact-section p {
  color: var(--muted);
  font-size: 16px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.project-card {
  display: flex;
  min-height: 292px;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.project-card:hover {
  border-color: #8fb09f;
  background: var(--surface-strong);
  transform: translateY(-4px);
}

.project-card.featured {
  border-color: #9bbdab;
  background: #f2faf6;
}

.skill-groups {
  display: grid;
  gap: 16px;
}

.skill-group {
  padding: 24px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tags span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.principle-grid p {
  min-height: 118px;
  margin: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.86);
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.publication-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px;
}

.contact-section {
  padding: 56px 0 62px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.contact-section h2 {
  max-width: 760px;
  margin-inline: auto;
}

.contact-section p {
  max-width: 680px;
  margin: 0 auto 26px;
  font-size: 18px;
}

.contact-links {
  justify-content: center;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 30px 0 42px;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--green);
  font-weight: 850;
  text-decoration: none;
}

@media (max-width: 980px) {
  .hero,
  .two-column {
    grid-template-columns: 1fr;
  }

  .stats-grid,
  .focus-grid,
  .project-grid,
  .principle-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .timeline-top {
    display: block;
  }

  .timeline-top span {
    display: block;
    margin-top: 4px;
    text-align: left;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 22px, 1180px);
  }

  .site-header {
    position: static;
    align-items: flex-start;
  }

  .nav-links {
    display: none;
  }

  .brand-text {
    font-size: 14px;
  }

  .section,
  .stats-grid {
    margin-bottom: 58px;
  }

  .hero {
    gap: 18px;
    padding-top: 44px;
  }

  .hero-identity {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-top: 10px;
  }

  .profile-photo {
    width: 132px;
    height: 132px;
  }

  h1 {
    font-size: 48px;
  }

  h2 {
    font-size: 32px;
  }

  .hero-copy {
    font-size: 19px;
  }

  .stats-grid,
  .focus-grid,
  .project-grid,
  .principle-grid {
    grid-template-columns: 1fr;
  }

  .publication-card,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .principle-grid p {
    min-height: auto;
  }
}
