:root {
  --bg: #f2f4f7;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --text: #1f2633;
  --muted: #566077;
  --accent: #0e5f4f;
  --accent-2: #d56b2a;
  --line: #d8deea;
  --shadow-sm: 0 14px 34px rgba(31, 38, 51, 0.08);
  --shadow-md: 0 26px 54px rgba(31, 38, 51, 0.14);
  --radius-md: 14px;
  --radius-lg: 20px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
}

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

.page-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.45;
}

.orb-a {
  width: min(36vw, 460px);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(14, 95, 79, 0.42), rgba(14, 95, 79, 0.05) 70%);
  top: -140px;
  left: -70px;
}

.orb-b {
  width: min(34vw, 420px);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(213, 107, 42, 0.32), rgba(213, 107, 42, 0.04) 72%);
  right: -80px;
  top: 160px;
}

.grid-noise {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(86, 96, 119, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(86, 96, 119, 0.08) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), transparent 74%);
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(10px);
  background: rgba(242, 244, 247, 0.82);
  border-bottom: 1px solid rgba(216, 222, 234, 0.8);
}

nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  min-height: 72px;
  gap: 18px;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.hero-wrap {
  padding: 72px 0 40px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 350px);
  gap: 40px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(14, 95, 79, 0.24);
  background: rgba(14, 95, 79, 0.09);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

h1 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(2.4rem, 6.2vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  max-width: 760px;
  margin-bottom: 16px;
}

.hero-description,
.section-subtitle,
.card p,
.timeline-item p,
.cv-row span,
.profile-list span {
  color: var(--muted);
}

.hero-description {
  max-width: 680px;
  font-size: 1.04rem;
  margin-bottom: 22px;
}

.hero-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.highlight {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 11px;
  box-shadow: var(--shadow-sm);
}

.highlight strong {
  display: block;
  font-size: 1.12rem;
  line-height: 1.15;
}

.highlight span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(14, 95, 79, 0.55);
  box-shadow: 0 10px 22px rgba(31, 38, 51, 0.1);
}

.btn.primary,
.header-cta {
  background: #172031;
  color: #fff;
  border-color: #172031;
}

.btn.placeholder {
  cursor: default;
  border-style: dashed;
  color: var(--muted);
  background: var(--surface-2);
}

.btn.placeholder:hover {
  transform: none;
  border-color: var(--line);
  box-shadow: none;
}

.profile-card,
.card,
.timeline-item,
.cv-panel,
.cv-preview {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.profile-card {
  padding: 16px;
  position: relative;
}

.profile-photo {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  margin-bottom: 14px;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-card h2 {
  font-size: 1.08rem;
  margin-bottom: 9px;
}

.profile-list {
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
}

.profile-list div {
  display: grid;
  gap: 2px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.profile-list strong {
  font-size: 0.76rem;
  color: #34415b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

section {
  padding: 52px 0;
}

section:nth-of-type(odd):not(.hero-wrap) {
  background: rgba(255, 255, 255, 0.48);
}

.section-title {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.6rem, 3.5vw, 2.35rem);
  margin-bottom: 10px;
}

.section-subtitle {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: 0.96rem;
}

.grid,
.project-grid,
.skills,
.timeline {
  display: grid;
  gap: 14px;
}

.grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

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

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

.card {
  padding: 20px;
}

.card h3 {
  font-size: 1.05rem;
  line-height: 1.32;
  margin-bottom: 8px;
}

.card p {
  font-size: 0.93rem;
}

.project-card {
  border-top: 4px solid rgba(14, 95, 79, 0.62);
  display: flex;
  flex-direction: column;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 11px;
}

.project-domain {
  font-size: 0.73rem;
  padding: 5px 8px;
  border-radius: 7px;
  border: 1px solid var(--line);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.project-domain.academic {
  background: rgba(14, 95, 79, 0.1);
  color: #185449;
}

.project-domain.industry {
  background: rgba(213, 107, 42, 0.12);
  color: #8b4518;
}

.project-time {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 700;
}

.project-location {
  font-size: 0.73rem;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: #49556e;
}

.metric {
  margin-top: 13px;
  border: 1px solid rgba(14, 95, 79, 0.26);
  border-radius: 8px;
  background: rgba(14, 95, 79, 0.06);
  padding: 9px 10px;
  font-size: 0.86rem;
  color: #23483f;
  font-weight: 600;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.tag {
  font-size: 0.73rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf2f8;
  color: #4c5a74;
  font-weight: 600;
}

.project-links {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 14px;
}

.project-links .btn {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 0.78rem;
}

.manuscript-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.manuscript-status {
  display: inline-flex;
  align-self: flex-start;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
}

.timeline {
  gap: 12px;
}

.timeline-item {
  padding: 18px;
  display: grid;
  grid-template-columns: 175px 1fr;
  gap: 18px;
}

.time {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.88rem;
}

.timeline-item h3 {
  font-size: 1.03rem;
  margin-bottom: 5px;
}

.experience-meta {
  font-size: 0.85rem;
  color: #4c5a74;
  margin-bottom: 8px;
}

.experience-org-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.experience-highlights {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.experience-highlights li + li {
  margin-top: 6px;
}

.experience-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.experience-links .btn {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 0.78rem;
}

.reference-line {
  margin-bottom: 6px;
}

.reference-line:last-child {
  margin-bottom: 0;
}

.cv-panel {
  display: grid;
  grid-template-columns: 1fr 250px;
  gap: 18px;
  padding: 20px;
}

.cv-summary {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.cv-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
}

.cv-row + .cv-row {
  border-top: 1px solid var(--line);
}

.cv-actions {
  align-content: start;
}

.cv-actions .btn {
  width: 100%;
}

.cv-preview {
  margin-top: 14px;
  padding: 10px;
}

.cv-preview iframe {
  width: 100%;
  min-height: 980px;
  border: 0;
  border-radius: 10px;
  background: #f3f5f9;
}

.cv-fallback {
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--muted);
}

.cv-fallback a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

footer {
  border-top: 1px solid var(--line);
  text-align: center;
  padding: 28px 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

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

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

  .hero-highlights {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .profile-card {
    max-width: 450px;
  }

  .grid,
  .project-grid,
  .skills,
  .cv-panel {
    grid-template-columns: 1fr;
  }

  .cv-actions .btn {
    width: auto;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 28px, 1120px);
  }

  .nav-links,
  .header-cta {
    display: none;
  }

  .hero-wrap {
    padding-top: 42px;
  }

  h1 {
    font-size: 2.05rem;
    line-height: 1.1;
  }

  .hero-description {
    font-size: 0.98rem;
  }

  .hero-highlights {
    grid-template-columns: 1fr;
  }

  section {
    padding: 40px 0;
  }

  .timeline-item,
  .cv-row {
    grid-template-columns: 1fr;
  }

  .card,
  .timeline-item,
  .cv-panel,
  .cv-preview {
    padding: 16px;
  }

  .actions .btn,
  .cv-actions .btn {
    width: 100%;
  }

  .cv-preview iframe {
    min-height: 620px;
  }
}
