:root {
  --bg: #f6f7f3;
  --bg-strong: #ffffff;
  --ink: #171c20;
  --muted: #5f6b73;
  --line: #d9dfdf;
  --teal: #0b746a;
  --teal-dark: #07564f;
  --blue: #2459c4;
  --coral: #d85b45;
  --gold: #b9791f;
  --graphite: #263238;
  --soft-teal: #dcefeb;
  --soft-blue: #e1e9f8;
  --soft-coral: #f6e4de;
  --shadow: 0 22px 70px rgba(28, 39, 45, 0.12);
  --radius: 8px;
  --max: 1180px;
  --header-h: 72px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(180deg, rgba(246, 247, 243, 0.82), rgba(246, 247, 243, 0.9)),
    linear-gradient(90deg, rgba(11, 116, 106, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(11, 116, 106, 0.045) 1px, transparent 1px),
    url("assets/site-background.jpg");
  background-attachment: fixed, fixed, fixed, fixed;
  background-position: center, 0 0, 0 0, center top;
  background-repeat: no-repeat, repeat, repeat, no-repeat;
  background-size: auto, 42px 42px, 42px 42px, cover;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  transform: translateY(-150%);
  background: var(--ink);
  color: white;
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
}

.skip-link:focus {
  transform: translateY(0);
}

.page-grid {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.section-band {
  position: relative;
  padding: 88px 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--header-h);
  background: rgba(246, 247, 243, 0.84);
  border-bottom: 1px solid rgba(217, 223, 223, 0.75);
  backdrop-filter: blur(18px);
}

.site-header.has-shadow {
  box-shadow: 0 12px 30px rgba(28, 39, 45, 0.08);
}

.nav-shell {
  width: min(var(--max), calc(100% - 40px));
  min-height: var(--header-h);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand,
.nav-links a,
.button,
.text-link {
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
}

.brand-mark {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: white;
  border-radius: var(--radius);
  font-size: 0.85rem;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-links a {
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.55rem 0.85rem;
  transition: color 160ms ease, background 160ms ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  background: rgba(11, 116, 106, 0.09);
  color: var(--teal-dark);
}

.nav-toggle {
  display: none;
  width: 2.7rem;
  height: 2.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-strong);
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 1.2rem;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  transition: transform 160ms ease;
}

.hero {
  min-height: calc(92vh - var(--header-h));
  display: grid;
  align-items: center;
  padding-top: 64px;
  padding-bottom: 72px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -24px;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(246, 247, 243, 0.94), rgba(246, 247, 243, 0.72) 52%, rgba(246, 247, 243, 0.46)),
    linear-gradient(180deg, rgba(246, 247, 243, 0.2), rgba(246, 247, 243, 0.86)),
    url("assets/site-background.jpg") center 58% / cover no-repeat;
  animation: skyDrift 24s ease-in-out infinite alternate;
  will-change: transform, filter;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.62fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

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

.hero-portrait {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(23, 28, 32, 0.14);
  border-radius: var(--radius);
  background: var(--bg-strong);
  box-shadow: var(--shadow);
}

.hero-portrait::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, transparent 52%, rgba(12, 18, 22, 0.72)),
    linear-gradient(135deg, rgba(11, 116, 106, 0.12), transparent 38%);
  pointer-events: none;
}

.hero-portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 28%;
}

.hero-portrait figcaption {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 3;
  color: white;
}

.hero-portrait figcaption span {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-portrait figcaption strong {
  display: block;
  max-width: 16rem;
  font-size: 1.15rem;
  line-height: 1.18;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 1rem;
  color: var(--ink);
  font-size: clamp(4rem, 10vw, 8.2rem);
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  max-width: 780px;
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.65rem;
  font-size: 1.12rem;
  line-height: 1.25;
}

.hero-tagline {
  max-width: 760px;
  margin-bottom: 1rem;
  color: var(--graphite);
  font-size: clamp(1.45rem, 3vw, 2.4rem);
  line-height: 1.15;
  font-weight: 750;
}

.hero-summary,
.about-copy p,
.contact-card p {
  color: var(--muted);
  font-size: 1.03rem;
}

.hero-summary {
  max-width: 680px;
  margin-bottom: 1.7rem;
}

.hero-actions,
.link-row,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.button {
  min-height: 2.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid rgba(23, 28, 32, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  font-weight: 800;
  padding: 0.72rem 1rem;
  box-shadow: 0 8px 24px rgba(28, 39, 45, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(28, 39, 45, 0.13);
}

.button-primary {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}

.about-band {
  background: rgba(255, 255, 255, 0.72);
  border-block: 1px solid rgba(217, 223, 223, 0.72);
}

.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 5rem);
}

.about-copy {
  columns: 1;
}

.interest-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 3rem;
}

.interest-card,
.project-switcher,
.publication-card,
.timeline-item,
.leadership-card,
.skill-card,
.contact-card {
  border: 1px solid rgba(23, 28, 32, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 34px rgba(28, 39, 45, 0.07);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.interest-card:hover,
.project-switcher:hover,
.publication-card:hover,
.timeline-item:hover,
.leadership-card:hover,
.skill-card:hover,
.contact-card:hover {
  border-color: rgba(11, 116, 106, 0.28);
  box-shadow: 0 20px 54px rgba(28, 39, 45, 0.12);
  transform: translateY(-3px);
}

.interest-card {
  min-height: 218px;
  padding: 1.25rem;
}

.interest-card span {
  color: var(--coral);
  font-size: 0.8rem;
  font-weight: 900;
}

.interest-card p,
.project-content p,
.publication-card p,
.timeline-body li,
.leadership-card li,
.skill-card p {
  color: var(--muted);
}

.section-heading {
  margin-bottom: 2rem;
}

.section-heading h2 {
  margin-bottom: 0.6rem;
}

.section-note {
  color: var(--muted);
}

.project-label {
  margin-bottom: 0.5rem;
  color: var(--teal-dark);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-switcher {
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(220, 239, 235, 0.72)),
    var(--bg-strong);
}

.project-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.project-tab {
  position: relative;
  min-height: 4rem;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.2;
  padding: 0.75rem 0.7rem;
  transition: background 160ms ease, color 160ms ease;
  overflow: hidden;
}

.project-tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--coral);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
}

.project-tab:last-child {
  border-right: 0;
}

.project-tab:hover,
.project-tab.is-active {
  background: var(--ink);
  color: white;
}

.project-tab.is-active::after {
  opacity: 1;
  animation: tabProgress 5.2s linear forwards;
}

.project-stage {
  display: grid;
  min-height: 520px;
}

.project-slide {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
  padding: clamp(1rem, 3vw, 2rem);
  opacity: 0;
  pointer-events: none;
  transform: translateX(28px);
  visibility: hidden;
  transition: opacity 420ms ease, transform 420ms ease, visibility 420ms ease;
}

.project-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  visibility: visible;
}

.project-media {
  position: relative;
  display: grid;
  min-height: 390px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(23, 28, 32, 0.1);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(38, 50, 56, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(38, 50, 56, 0.05) 1px, transparent 1px),
    white;
  background-size: 32px 32px;
}

.project-media img {
  width: 100%;
  max-height: 410px;
  object-fit: contain;
  padding: 1rem;
  transition: opacity 180ms ease, transform 420ms ease;
}

.project-slide.is-active .project-media img {
  animation: projectDrift 5.5s ease-in-out infinite alternate;
}

.project-video,
.project-embed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.project-media:hover img,
.project-media:focus img,
.project-media.is-playing img {
  opacity: 0;
}

.project-media:hover .project-video,
.project-media:focus .project-video,
.project-media.is-playing .project-video,
.project-media:hover .project-embed,
.project-media:focus .project-embed,
.project-media.is-playing .project-embed {
  opacity: 1;
}

.media-hint {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  z-index: 4;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: var(--radius);
  background: rgba(23, 28, 32, 0.78);
  color: white;
  font-size: 0.75rem;
  font-weight: 900;
  padding: 0.4rem 0.55rem;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.project-media.is-playing .media-hint,
.project-media:hover .media-hint,
.project-media:focus .media-hint {
  opacity: 0;
  transform: translateY(4px);
}

.project-content {
  padding: 0.25rem;
}

.project-content h3 {
  font-size: clamp(1.45rem, 2.6vw, 2.45rem);
}

.pipeline-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.pipeline-steps span {
  border: 1px solid rgba(11, 116, 106, 0.18);
  border-radius: var(--radius);
  background: rgba(220, 239, 235, 0.72);
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 850;
  padding: 0.4rem 0.55rem;
}

.project-media-abstract {
  background:
    radial-gradient(circle at 18% 20%, rgba(36, 89, 196, 0.14), transparent 26%),
    radial-gradient(circle at 82% 78%, rgba(216, 91, 69, 0.15), transparent 28%),
    linear-gradient(90deg, rgba(38, 50, 56, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(38, 50, 56, 0.06) 1px, transparent 1px),
    white;
  background-size: auto, auto, 36px 36px, 36px 36px;
}

.project-media-abstract img {
  height: 100%;
  max-height: none;
  min-height: inherit;
  object-fit: cover;
  padding: 0;
  animation: none !important;
}

@keyframes projectDrift {
  from {
    transform: translateY(0) scale(1);
  }

  to {
    transform: translateY(-8px) scale(1.015);
  }
}

@keyframes skyDrift {
  from {
    filter: saturate(1) brightness(1);
    transform: translate3d(-10px, -8px, 0) scale(1.02);
  }

  to {
    filter: saturate(1.08) brightness(1.03);
    transform: translate3d(14px, 10px, 0) scale(1.04);
  }
}

@keyframes tabProgress {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

.text-link {
  display: inline-flex;
  align-items: center;
  color: var(--teal-dark);
  font-weight: 850;
  text-underline-offset: 0.2em;
  transition: color 160ms ease;
}

.text-link:hover {
  color: var(--coral);
  text-decoration: underline;
}

.publication-band {
  background:
    linear-gradient(180deg, rgba(225, 233, 248, 0.68), rgba(246, 247, 243, 0.85));
}

.publication-list {
  display: grid;
  gap: 0.85rem;
}

.publication-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.1rem;
}

.publication-card h3 {
  margin-bottom: 0.35rem;
}

.publication-card p {
  margin-bottom: 0.7rem;
}

.venue-badge {
  width: fit-content;
  border-radius: var(--radius);
  background: var(--ink);
  color: white;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 0.45rem 0.6rem;
}

.venue-badge.muted {
  background: var(--soft-coral);
  color: #8b3c2e;
}

.timeline {
  position: relative;
  display: grid;
  gap: 1rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: calc(180px + 0.5rem);
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2rem;
  padding: 1.25rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: calc(180px + 1.25rem + 0.5rem);
  top: 1.75rem;
  width: 10px;
  height: 10px;
  border: 2px solid var(--bg-strong);
  border-radius: 50%;
  background: var(--coral);
  transform: translateX(-50%);
  box-shadow: 0 0 0 4px rgba(216, 91, 69, 0.16);
}

.timeline-date {
  color: var(--teal-dark);
  font-size: 0.86rem;
  font-weight: 900;
}

.timeline-place {
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-weight: 750;
}

.timeline-body ul {
  margin: 0;
  padding-left: 1.15rem;
}

.timeline-body li + li {
  margin-top: 0.45rem;
}

.education-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.leadership-band {
  background:
    linear-gradient(180deg, rgba(246, 247, 243, 0.78), rgba(255, 255, 255, 0.72));
}

.leadership-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.leadership-card {
  padding: 1.25rem;
}

.leadership-card ul {
  margin: 0;
  padding-left: 1.15rem;
}

.leadership-card li + li {
  margin-top: 0.45rem;
}

.skills-band {
  background: rgba(255, 255, 255, 0.72);
  border-block: 1px solid rgba(217, 223, 223, 0.72);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.skill-card {
  padding: 1.2rem;
}

.skill-card h3 {
  color: var(--teal-dark);
}

.contact-band {
  padding-bottom: 72px;
}

.contact-card {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 2rem;
  align-items: center;
  padding: clamp(1.25rem, 4vw, 2rem);
  background:
    linear-gradient(135deg, white, rgba(220, 239, 235, 0.82));
}

.contact-card h2 {
  font-size: clamp(1.8rem, 3.2vw, 3.4rem);
}

.contact-actions {
  justify-content: flex-end;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem;
  color: var(--muted);
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.9rem;
}

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

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 520ms ease, transform 520ms ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

  .hero {
    min-height: auto;
  }

  .interest-grid,
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .project-stage {
    min-height: 760px;
  }

  .contact-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  :root {
    --header-h: 64px;
  }

  body {
    background-attachment: scroll, scroll, scroll, scroll;
  }

  .section-band {
    padding: 62px 0;
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-toggle.is-open span:first-child {
    transform: translateY(3.5px) rotate(45deg);
  }

  .nav-toggle.is-open span:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
  }

  .nav-links {
    position: absolute;
    left: 20px;
    right: 20px;
    top: calc(var(--header-h) - 4px);
    display: grid;
    gap: 0.25rem;
    padding: 0.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
    transform-origin: top;
    transform: scaleY(0.96);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
  }

  .nav-links.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: scaleY(1);
  }

  .hero {
    padding-top: 44px;
  }

  h1 {
    font-size: clamp(3.2rem, 17vw, 5.2rem);
  }

  .hero-actions .button,
  .contact-actions .button {
    width: 100%;
  }

  .interest-grid,
  .skills-grid,
  .education-grid,
  .leadership-grid {
    grid-template-columns: 1fr;
  }

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

  .project-tab {
    border-bottom: 1px solid var(--line);
  }

  .project-tab:nth-child(2n) {
    border-right: 0;
  }

  .project-stage {
    min-height: 780px;
  }

  .project-media {
    min-height: 300px;
  }

  .publication-card,
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

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

@media (max-width: 460px) {
  .page-grid,
  .nav-shell {
    width: min(var(--max), calc(100% - 28px));
  }

  .brand span:last-child {
    display: none;
  }

  h2 {
    font-size: clamp(1.8rem, 11vw, 2.6rem);
  }

  .interest-card,
  .leadership-card,
  .skill-card,
  .timeline-item,
  .publication-card {
    padding: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
