:root {
  color-scheme: light;
  --bg: #f0f5f7;
  --bg-accent: #d4e8f0;
  --surface: rgba(255, 255, 255, 0.75);
  --surface-strong: rgba(255, 255, 255, 0.95);
  --border: rgba(26, 92, 77, 0.15);
  --text: #1a3a35;
  --muted: #5a7370;
  --accent: #1a5c4d;
  --accent-soft: rgba(26, 92, 77, 0.1);
  --shadow: 0 30px 80px rgba(26, 92, 77, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(74, 160, 140, 0.3), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(26, 92, 77, 0.2), transparent 22%),
    linear-gradient(180deg, #f5f8fa 0%, #eef3f6 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at center, black 45%, transparent 100%);
}

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

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

.hero {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 44px;
}

.hero-copy,
.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 40px;
}

.eyebrow,
.panel-label,
.section-heading span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--muted);
}

.eyebrow::before,
.panel-label::before,
.section-heading span::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

.hero h1 {
  margin: 18px 0 18px;
  display: grid;
  gap: 8px;
  font-size: clamp(3rem, 8vw, 5.2rem);
  line-height: 0.94;
  letter-spacing: -0.05em;
}

.hero h1 span {
  font-size: clamp(1.15rem, 3vw, 1.9rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--muted);
}

.hero-summary,
.section-heading p,
.thesis,
.reference-note,
.muted,
.bullet-list,
.meta-grid dd {
  color: var(--muted);
}

.hero-summary {
  max-width: 60ch;
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0 32px;
}

.primary-link,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  transition:
    transform 220ms ease,
    background-color 220ms ease,
    border-color 220ms ease,
    color 220ms ease,
    box-shadow 220ms ease;
}

.primary-link {
  color: #f6f3ea;
  background: linear-gradient(135deg, #1a5c4d, #2a8872);
  box-shadow: 0 14px 24px rgba(26, 92, 77, 0.25);
}

.ghost-link {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.45);
}

.primary-link:hover,
.ghost-link:hover,
.primary-link:focus-visible,
.ghost-link:focus-visible {
  transform: translateY(-2px);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.meta-grid div {
  padding: 16px 18px;
  border: 1px solid rgba(23, 33, 27, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.42);
}

.meta-grid dt {
  margin-bottom: 8px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.meta-grid dd {
  margin: 0;
  line-height: 1.5;
}

.hero-panel {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  background:
    linear-gradient(160deg, rgba(26, 92, 77, 0.08), rgba(74, 160, 140, 0.06)),
    var(--surface-strong);
}

.highlight-list,
.bullet-list {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.highlight-list li,
.bullet-list li {
  position: relative;
  padding-left: 18px;
  line-height: 1.6;
}

.highlight-list li + li,
.bullet-list li + li {
  margin-top: 12px;
}

.highlight-list li::before,
.bullet-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2a8872, #1a5c4d);
  transform: translateY(-50%);
}

.hero-orbit {
  position: absolute;
  right: -70px;
  bottom: -70px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 32%),
    radial-gradient(circle, rgba(26, 92, 77, 0.15), rgba(26, 92, 77, 0) 62%);
  filter: blur(2px);
}

.content-stack {
  display: grid;
  gap: 24px;
}

.section-grid {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 24px;
  align-items: start;
}

.section-grid-wide {
  align-items: stretch;
}

.section-heading {
  position: sticky;
  top: 20px;
  padding: 10px 8px;
}

.section-heading h2 {
  margin: 18px 0 14px;
  font-family: "Instrument Serif", serif;
  font-size: clamp(2.3rem, 4vw, 3.5rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.section-heading p {
  max-width: 32ch;
  line-height: 1.7;
}

.timeline,
.experience-grid,
.skills-grid {
  display: grid;
  gap: 18px;
}

.card {
  transform:
    perspective(1000px)
    rotateX(var(--rotate-x, 0deg))
    rotateY(var(--rotate-y, 0deg))
    translateY(0);
  transition:
    transform 320ms cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 320ms ease,
    border-color 320ms ease,
    background-color 320ms ease;
  will-change: transform;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      220px circle at var(--cursor-x, 50%) var(--cursor-y, 50%),
      rgba(255, 255, 255, 0.62),
      transparent 60%
    );
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}

.card:hover,
.card:focus-within {
  transform:
    perspective(1000px)
    rotateX(var(--rotate-x, 0deg))
    rotateY(var(--rotate-y, 0deg))
    translateY(-6px);
  box-shadow: 0 36px 100px rgba(21, 32, 24, 0.17);
  border-color: rgba(17, 75, 56, 0.22);
}

.card:hover::before,
.card:focus-within::before {
  opacity: 1;
}

.timeline-card,
.experience-card,
.skill-card,
.language-card {
  padding: 24px;
}

.timeline-top,
.experience-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.timeline-top h3,
.experience-top h3,
.skill-card h3 {
  margin: 0;
  font-size: 1.18rem;
}

.timeline-top p,
.experience-top p,
.thesis,
.reference-note {
  margin: 8px 0 0;
  line-height: 1.65;
}

.timeline-top span,
.experience-top span {
  flex-shrink: 0;
  align-self: flex-start;
  padding: 10px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.82rem;
  text-align: center;
}

.skills-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
}

.chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(17, 75, 56, 0.08);
  border: 1px solid rgba(17, 75, 56, 0.1);
  color: var(--accent);
  transition:
    transform 220ms ease,
    background-color 220ms ease;
}

.skill-card:hover .chip {
  background: rgba(17, 75, 56, 0.1);
}

.chip:hover {
  transform: translateY(-2px);
}

.language-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.language-row,
.license-box {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(23, 33, 27, 0.08);
}

.license-box {
  margin-top: 18px;
}

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

  .section-heading {
    position: static;
    padding: 0;
  }
}

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

  .hero-copy,
  .hero-panel,
  .timeline-card,
  .experience-card,
  .skill-card,
  .language-card {
    padding: 22px;
  }

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

  .timeline-top,
  .experience-top,
  .language-row,
  .license-box {
    flex-direction: column;
  }

  .hero h1 {
    font-size: clamp(2.6rem, 14vw, 4rem);
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}
