:root {
  color-scheme: light;
  --ink: #101820;
  --muted: #637083;
  --paper: #f8f6f0;
  --surface: #ffffff;
  --line: #ddd8ca;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --coral: #c95f45;
  --shadow: 0 18px 45px rgba(16, 24, 32, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), transparent 38%),
    linear-gradient(315deg, rgba(201, 95, 69, 0.1), transparent 32%),
    var(--paper);
  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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(20px, 5vw, 72px);
  background: rgba(248, 246, 240, 0.86);
  border-bottom: 1px solid rgba(221, 216, 202, 0.7);
  backdrop-filter: blur(16px);
}

.brand,
.nav,
.hero-actions,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.85rem;
}

.nav {
  flex-wrap: wrap;
  gap: clamp(12px, 3vw, 28px);
  color: var(--muted);
  font-size: 0.95rem;
}

.nav a {
  border-bottom: 2px solid transparent;
  text-decoration: none;
}

.nav a:hover,
.nav a.active,
.site-footer a:hover,
.project-card a:hover,
.inline-links a:hover,
.profile-links a:hover {
  color: var(--accent-strong);
}

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

.profile-hero {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(320px, 1.3fr);
  align-items: center;
  gap: clamp(28px, 6vw, 82px);
  min-height: calc(92vh - 72px);
  padding: clamp(44px, 8vw, 96px) clamp(20px, 5vw, 72px) clamp(40px, 7vw, 80px);
}

.profile-card {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(100%, 420px);
  padding: clamp(22px, 4vw, 34px);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(221, 216, 202, 0.92);
  border-radius: 8px;
  box-shadow: var(--shadow);
  justify-self: center;
  text-align: center;
}

.profile-card::before {
  position: absolute;
  inset: 14px;
  z-index: -1;
  content: "";
  background: #ead6b8;
  border: 1px solid rgba(16, 24, 32, 0.1);
  border-radius: 8px;
  transform: rotate(-3deg);
}

.profile-card img {
  width: min(74vw, 260px);
  aspect-ratio: 1;
  object-fit: cover;
  border: 8px solid var(--surface);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(16, 24, 32, 0.12);
}

.profile-card h1 {
  width: 100%;
  max-width: none;
  margin: 18px 0 0;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.18;
}

.profile-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.profile-links {
  display: grid;
  width: 100%;
  gap: 10px;
  margin-top: 20px;
}

.profile-links a,
.reserved-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(221, 216, 202, 0.9);
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.reserved-link {
  color: var(--muted);
  opacity: 0.78;
}

.link-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: currentColor;
}

.inline-links a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.hero-copy {
  max-width: 720px;
}

.hero-copy h2 {
  max-width: 12ch;
  font-size: clamp(3.2rem, 7vw, 6.5rem);
}

.about-copy h2 {
  max-width: none;
  font-size: clamp(2.4rem, 5vw, 4.4rem);
}

.about-text {
  display: grid;
  gap: 16px;
  max-width: 840px;
  margin-top: 24px;
}

.about-text p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.14rem);
  line-height: 1.78;
}

.eyebrow,
.project-kicker {
  margin: 0 0 12px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
}

h1 {
  max-width: 10ch;
  font-size: clamp(4.6rem, 10vw, 8.9rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
}

h3 {
  font-size: 1.28rem;
}

.intro {
  max-width: 720px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 18px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  background: var(--ink);
  color: var(--paper);
}

.button.secondary {
  background: transparent;
}

.button:hover {
  transform: translateY(-1px);
}

.section {
  padding: clamp(52px, 8vw, 92px) clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
}

.page-hero {
  padding: clamp(56px, 9vw, 110px) clamp(20px, 5vw, 72px) clamp(36px, 6vw, 72px);
}

.page-hero h1 {
  max-width: 12ch;
}

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

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  gap: clamp(24px, 5vw, 60px);
  max-width: 1120px;
}

.about-grid > p,
.contact-section > p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.facts {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.facts li,
.project-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(221, 216, 202, 0.9);
  border-radius: 8px;
}

.facts li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
}

.facts span {
  color: var(--muted);
}

.facts strong {
  text-align: right;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(220px, 0.35fr) minmax(0, 0.65fr);
  gap: clamp(24px, 5vw, 64px);
}

.split-section .section-heading {
  margin-bottom: 0;
}

.list-panel {
  display: grid;
  gap: 14px;
}

.resume-item,
.timeline-item,
.publication-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.resume-item:first-child,
.timeline-item:first-child,
.publication-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.resume-date,
.timeline-date,
.publication-year {
  color: var(--coral);
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
}

.resume-item p,
.timeline-item p,
.publication-item p,
.interest-grid p {
  margin: 10px 0 0;
  color: var(--muted);
}

.tech-stack {
  color: var(--accent-strong) !important;
  font-size: 0.95rem;
  font-weight: 800;
}

.education-details {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.education-details li::marker {
  color: var(--accent);
}

.interests-section {
  background: rgba(255, 255, 255, 0.35);
}

.interest-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.interest-grid article {
  min-height: 210px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(221, 216, 202, 0.9);
  border-radius: 8px;
}

.timeline {
  position: relative;
}

.timeline::before {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 112px;
  width: 1px;
  content: "";
  background: var(--line);
}

.timeline-item {
  position: relative;
  border-top: 0;
}

.timeline-item::before {
  position: absolute;
  top: 28px;
  left: 107px;
  width: 11px;
  height: 11px;
  content: "";
  background: var(--accent);
  border: 2px solid var(--paper);
  border-radius: 50%;
}

.projects-section {
  background: rgba(255, 255, 255, 0.35);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.project-card {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  padding: 22px;
  box-shadow: 0 10px 28px rgba(16, 24, 32, 0.06);
}

.project-card h2 {
  font-size: 1.35rem;
}

.project-card p:not(.project-kicker) {
  margin: 16px 0 26px;
  color: var(--muted);
}

.project-card a {
  margin-top: auto;
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.publication-list {
  display: grid;
  gap: 6px;
}

.publication-item {
  max-width: 1040px;
}

.authors {
  color: var(--ink) !important;
  font-weight: 800;
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
}

.resource-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 800;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
}

.contact-section .section-heading,
.contact-section p {
  grid-column: 1;
}

.contact-section .button {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.site-footer {
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(20px, 5vw, 72px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer a {
  text-decoration: none;
}

@media (max-width: 800px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-hero,
  .about-grid,
  .split-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .profile-hero {
    min-height: auto;
  }

  .hero-copy h2 {
    font-size: clamp(2.6rem, 13vw, 4.6rem);
  }

  h1 {
    font-size: clamp(3.7rem, 18vw, 5.4rem);
  }

  .project-grid,
  .interest-grid {
    grid-template-columns: 1fr;
  }

  .resume-item,
  .timeline-item,
  .publication-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .timeline::before,
  .timeline-item::before {
    display: none;
  }

  .contact-section .button {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }
}

@media (max-width: 480px) {
  .nav {
    width: 100%;
    gap: 10px 16px;
    justify-content: flex-start;
  }

  .facts li {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .facts strong {
    text-align: left;
  }

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