:root {
  --color-primary: #004226;
  --color-secondary: #b3a286;
  --color-accent: #002147;
  --color-text: #171717;
  --color-muted: #62666f;
  --color-border: #e8e8e8;
  --color-surface: #ffffff;
  --color-soft: #f6f7f6;
  --shadow-soft: 0 18px 45px rgba(0, 33, 71, 0.1);
  --radius: 18px;
  --max-width: 1120px;
  --timeline-axis-left: 175px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #ffffff 0%, #f8f8f7 100%);
  color: var(--color-text);
  font-family:
    "Poppins",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration-color: rgba(0, 66, 38, 0.26);
  text-underline-offset: 0.18em;
}

a:hover,
a:focus-visible {
  color: var(--color-accent);
  text-decoration-color: currentColor;
}

.button {
  font: inherit;
  display: inline-grid;
  place-items: center;
  flex: 0 0 48px;
  width: 48px;
  height: 32px;
  border-radius: 10px;
  background: rgba(0, 66, 38, 0.08);
  color: var(--color-primary);
  font-size: 1rem;
  font-weight: 700;
}

.button-row {
  display: flex;
  margin: 0 0 24px;
}

.button-row--left {
  justify-content: flex-start;
}

.button-row--center {
  justify-content: center;
}

.button-row--right {
  justify-content: flex-end;
}

.content-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  min-width: 48px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(0, 66, 38, 0.08);
  color: var(--color-primary);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
}

.content-button:hover,
.content-button:focus-visible {
  border-color: rgba(179, 162, 134, 0.55);
  background: var(--color-soft);
  outline: none;
}

.content-button__inner {
  display: inline-grid;
  place-items: center;
}

.content-button__inner .svg-icon {
  width: 20px;
  height: 20px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--max-width), calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0 14px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
}

.site-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  font-weight: 700;
  text-decoration: none;
}

.mark-dot {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: var(--color-primary);
  box-shadow: 0 0 0 5px rgba(179, 162, 134, 0.18);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-nav a {
  color: var(--color-muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  color: var(--color-primary);
}

.site-main {
  width: min(var(--max-width), calc(100% - 40px));
  margin: 0 auto;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: start;
  gap: 58px;
  padding: 84px 0 74px;
}

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

.section-heading h1,
.section-heading h2 {
  margin: 0;
  color: var(--color-text);
  font-size: clamp(2.1rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.05;
}

.section-heading span {
  display: block;
  width: 54px;
  height: 5px;
  margin-top: 18px;
  border-radius: 999px;
  background: var(--color-secondary);
}

.prose {
  max-width: 760px;
  text-align: left;
}

.prose p {
  margin: 0 0 22px;
}

.prose > h1:first-child,
.page-content > h1:first-child {
  margin: 0 0 26px;
  color: var(--color-text);
  font-size: clamp(2.1rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.05;
}

.prose > h1:first-child::after,
.page-content > h1:first-child::after {
  content: "";
  display: block;
  width: 54px;
  height: 5px;
  margin-top: 18px;
  border-radius: 999px;
  background: var(--color-secondary);
}

.profile-card {
  position: sticky;
  top: 96px;
  padding: 20px 20px 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.profile-image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.profile-identity {
  margin: 22px 0 20px;
}

.profile-identity h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.2;
}

.profile-identity p {
  margin: 4px 0;
  color: var(--color-muted);
  font-size: 0.92rem;
}

.profile-identity strong {
  display: inline-flex;
  margin-top: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--color-soft);
  color: var(--color-accent);
  font-size: 0.82rem;
}

.profile-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--color-border);
  list-style: none;
}

.profile-links a,
.email-link {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--color-text);
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.profile-links a:hover,
.profile-links a:focus-visible,
.email-link:hover,
.email-link:focus-visible {
  border-color: rgba(179, 162, 134, 0.55);
  background: var(--color-soft);
  outline: none;
}

.link-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(0, 66, 38, 0.08);
  color: var(--color-primary);
  font-size: 0.82rem;
  font-weight: 700;
}

.email-fallback {
  display: block;
  margin: 6px 0 0;
  color: var(--color-muted);
  font-size: 0.82rem;
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-section {
  padding: 74px 0 34px;
}

.page-intro,
.page-content > p,
.page-content > ul,
.page-content > ol {
  max-width: 820px;
}

.content-section {
  padding: 56px 0;
  border-top: 1px solid var(--color-border);
}

.page-section > .content-section {
  padding-top: 26px;
  border-top: 0;
}

.content-divider {
  width: min(100%, 960px);
  height: 1px;
  margin: 0 0 28px;
  background: var(--color-border);
}

.cv-panel,
.skills-panel,
.publication-card,
.teaching-card,
.project-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: 0 12px 30px rgba(0, 33, 71, 0.06);
}

.cv-panel {
  padding: 26px;
}

.cv-section-block {
  max-width: 960px;
}

.cv-section-block + .cv-section-block {
  margin-top: 22px;
}

.cv-panel-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.cv-panel-heading h2,
.skills-panel h3,
.publication-card h3,
.project-card h3 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.25;
}

.cv-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(179, 162, 134, 0.18);
  color: var(--color-primary);
}

.svg-icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-icon {
  fill: currentColor;
  stroke: none;
}

.timeline {
  position: relative;
  display: grid;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: var(--timeline-axis-left);
  width: 2px;
  background: var(--color-border);
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 72px;
}

.timeline li::before {
  content: "";
  position: absolute;
  top: 9px;
  left: var(--timeline-axis-left);
  width: 10px;
  height: 10px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--color-secondary);
  box-shadow: 0 0 0 1px rgba(179, 162, 134, 0.6);
  transform: translateX(-50%);
}

.timeline-period {
  margin: 4px 0 0;
  color: var(--color-primary);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: right;
}

.timeline-content h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.timeline-content p {
  margin: 7px 0 0;
  color: var(--color-muted);
  font-size: 0.94rem;
}

.timeline-content .institution {
  color: var(--color-text);
  font-weight: 600;
}

.item-links,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.item-links a,
.card-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(0, 66, 38, 0.08);
  color: var(--color-primary);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.item-links a:hover,
.item-links a:focus-visible,
.card-actions a:hover,
.card-actions a:focus-visible {
  border-color: rgba(179, 162, 134, 0.55);
  background: var(--color-soft);
  outline: none;
}

.skills-panel {
  margin-top: 22px;
  padding: 26px;
  max-width: 960px;
}

.skills-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px 28px;
  margin-top: 20px;
}

.skill-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--color-text);
  font-size: 0.92rem;
  font-weight: 600;
}

.skill-label span:last-child {
  color: var(--color-muted);
  font-weight: 500;
}

.skill-track {
  height: 8px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--color-soft);
}

.skill-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    var(--color-primary),
    var(--color-secondary)
  );
}

.publication-list,
.teaching-list,
.project-grid {
  display: grid;
  gap: 18px;
}

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

.publication-card,
.teaching-card,
.project-card {
  padding: 24px;
}

.publication-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
}

.publication-card p,
.project-card p {
  margin: 8px 0 0;
  color: var(--color-muted);
}

.publication-media {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: var(--color-soft);
  aspect-ratio: 1 / 1;
}

.publication-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.publication-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--color-muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.publication-body h2 {
  margin: 0;
  color: var(--color-primary);
  font-size: 1.16rem;
  line-height: 1.35;
}

.teaching-list {
  margin: 18px 0 42px;
  max-width: 960px;
}

.teaching-card {
  position: relative;
  border-left: 6px solid var(--color-primary);
}

.teaching-card.is-inactive {
  padding-bottom: 58px;
  border-left-color: rgba(0, 66, 38, 0.28);
  background: rgba(0, 66, 38, 0.035);
}

.teaching-card h2 {
  margin: 0;
  color: var(--color-primary);
  font-size: 1.16rem;
  line-height: 1.35;
}

.teaching-card.is-inactive h2 {
  color: rgba(0, 66, 38, 0.68);
}

.teaching-card p {
  margin: 8px 0 0;
  color: var(--color-muted);
}

.teaching-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  font-size: 0.92rem;
}

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

.teaching-status {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(179, 162, 134, 0.18);
  color: #6d614f;
  font-size: 0.8rem;
  font-weight: 700;
}

.publication-authors {
  color: var(--color-text);
  font-weight: 500;
}

.publication-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  font-size: 0.92rem;
}

.publication-meta span,
.publication-meta time,
.publication-meta a {
  color: var(--color-muted);
}

.citation-missing {
  color: #9f1239;
  font-weight: 600;
}

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

.empty-note {
  margin: 0;
  padding: 22px 24px;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
}

.publication-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 18px 0 0;
}

.publication-actions .card-actions,
.publication-actions .tag-list {
  margin-top: 0;
}

.publication-actions .tag-list {
  margin-left: auto;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(179, 162, 134, 0.38);
  background: rgba(179, 162, 134, 0.14);
  color: #6d614f;
  font-size: 0.82rem;
  font-weight: 600;
}

.award-list {
  display: grid;
  gap: 18px;
}

.award-item {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--color-border);
}

.award-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.award-year {
  margin: 2px 0 0;
  color: var(--color-primary);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: right;
}

.award-item h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.award-item p {
  margin: 7px 0 0;
  color: var(--color-muted);
  font-size: 0.94rem;
}

.award-item .institution {
  color: var(--color-text);
  font-weight: 600;
}

.site-footer {
  width: min(var(--max-width), calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 44px;
  color: var(--color-muted);
  font-size: 0.9rem;
}

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

  .site-nav {
    width: 100%;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .site-nav a {
    flex: 0 0 auto;
    padding: 8px 10px;
    border-radius: 999px;
    background: var(--color-soft);
  }

  .hero-section {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 50px;
  }

  .profile-card {
    position: static;
    max-width: 360px;
    margin: 0 auto;
  }

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

  .timeline::before {
    left: 4px;
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-left: 26px;
  }

  .timeline li::before {
    left: 0;
  }

  .timeline-period {
    text-align: left;
  }

  .award-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .award-year {
    text-align: left;
  }

  .publication-actions .tag-list {
    margin-left: 0;
  }
}

@media (max-width: 560px) {
  .site-header,
  .site-main,
  .site-footer {
    width: min(100% - 28px, var(--max-width));
  }

  .section-heading h2 {
    font-size: 2.1rem;
  }

  .cv-panel,
  .skills-panel,
  .publication-card,
  .teaching-card,
  .project-card {
    padding: 20px;
    border-radius: 14px;
  }

  .publication-card {
    grid-template-columns: 1fr;
  }

  .card-actions {
    margin-top: 16px;
  }
}
