:root {
  color-scheme: light;
  --ink: #17201d;
  --muted: #63706a;
  --soft: #f4f1e8;
  --paper: #fffdf8;
  --line: #ded8ca;
  --green: #175c4c;
  --green-2: #0e3e36;
  --gold: #b9832f;
  --blue: #2f5f8f;
  --rust: #9c5138;
  --shadow: 0 22px 60px rgba(28, 41, 36, 0.13);
  --anchor-offset: 94px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 14% 8%, rgba(185, 131, 47, 0.16), transparent 26%),
    linear-gradient(180deg, #fffdf8 0%, #f4f1e8 48%, #fffdf8 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--green);
  color: white;
  font-size: 12px;
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 30px);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.site-nav a {
  position: relative;
  padding: 6px 0;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--green);
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: -3px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--green);
  content: "";
  opacity: 0;
  transform: scaleX(0.35);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.site-nav a.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

main {
  overflow: hidden;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.72fr);
  gap: clamp(30px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: clamp(54px, 7vw, 92px) clamp(20px, 5vw, 72px) 72px;
}

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

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 14px;
  font-size: clamp(52px, 7.5vw, 96px);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(30px, 4.2vw, 58px);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 22px;
  line-height: 1.25;
}

.hero-title {
  max-width: 660px;
  margin-bottom: 14px;
  color: var(--green-2);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 800;
  line-height: 1.32;
}

.hero-summary {
  max-width: 650px;
  color: var(--muted);
  font-size: 16.5px;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--green);
  border-radius: 8px;
  font-weight: 850;
}

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

.button.secondary {
  background: rgba(255, 255, 255, 0.48);
  color: var(--green);
}

.resume-panel {
  position: relative;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  justify-self: end;
  width: min(100%, 470px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(244, 241, 232, 0.58)),
    repeating-linear-gradient(90deg, transparent 0 17px, rgba(23, 92, 76, 0.04) 18px 19px);
  box-shadow: var(--shadow);
}

.resume-panel::before {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 50px;
  height: 50px;
  border-top: 3px solid var(--gold);
  border-right: 3px solid var(--gold);
  content: "";
  opacity: 0.86;
}

.portrait {
  position: relative;
  display: grid;
  width: 104px;
  aspect-ratio: 1;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(23, 92, 76, 0.2);
  border-radius: 50%;
  background: #f7f4ec;
  box-shadow: inset 0 0 0 14px rgba(255, 255, 255, 0.12);
}

.portrait img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 44%;
}

.quick-facts {
  display: grid;
  gap: 12px;
  margin: 0;
}

.quick-facts div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(222, 216, 202, 0.9);
}

.quick-facts dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.quick-facts dd {
  margin: 0;
  font-weight: 850;
}

.section {
  scroll-margin-top: var(--anchor-offset);
  padding: clamp(58px, 9vw, 112px) clamp(20px, 5vw, 72px);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 6vw, 76px);
  border-top: 1px solid var(--line);
}

.section-copy {
  color: var(--muted);
  font-size: 17px;
}

.section-copy p:last-child,
.contact-section p:last-child {
  margin-bottom: 0;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 34px;
}

.timeline {
  display: grid;
  gap: 18px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 22px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.timeline-date {
  color: var(--blue);
  font-weight: 900;
}

.timeline-content {
  max-width: 900px;
}

.timeline-content p {
  color: var(--muted);
}

.company-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 8px;
}

.company-heading h3 {
  margin-bottom: 0;
}

.text-link {
  display: inline-flex;
  margin-top: 2px;
  color: var(--green);
  font-size: 14px;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.company-link {
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(23, 92, 76, 0.2);
  border-radius: 999px;
  background: rgba(23, 92, 76, 0.06);
  font-size: 12px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.company-link:hover {
  background: rgba(23, 92, 76, 0.1);
}

.project-card .text-link {
  align-self: flex-start;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin: 4px 0 18px;
  padding: 7px 11px;
  border: 1px solid rgba(23, 92, 76, 0.2);
  border-radius: 8px;
  background: rgba(23, 92, 76, 0.06);
  font-size: 13px;
  line-height: 1.35;
  text-decoration: none;
  white-space: nowrap;
}

.project-card .text-link:hover {
  background: rgba(23, 92, 76, 0.1);
}

.role {
  margin-bottom: 10px;
  color: var(--green);
  font-weight: 900;
}

.muted {
  opacity: 0.78;
}

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

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 410px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.84);
  box-shadow: 0 14px 32px rgba(28, 41, 36, 0.08);
}

.project-card.featured {
  grid-column: span 2;
  background:
    linear-gradient(135deg, rgba(23, 92, 76, 0.08), rgba(185, 131, 47, 0.08)),
    rgba(255, 253, 248, 0.92);
}

.project-card.featured:first-child {
  grid-column: 1 / -1;
  min-height: 360px;
}

.project-card.placeholder {
  border-style: dashed;
  background: rgba(255, 253, 248, 0.46);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.project-meta span {
  padding: 5px 9px;
  border: 1px solid rgba(23, 92, 76, 0.18);
  border-radius: 999px;
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}

.project-card p,
.project-card li {
  color: var(--muted);
}

.project-card ul {
  display: grid;
  gap: 8px;
  margin: auto 0 0;
  padding-left: 18px;
}

.skill-section {
  background: #17201d;
  color: white;
}

.skill-section .section-kicker {
  color: #e0b45f;
}

.skill-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(24px, 6vw, 76px);
  align-items: start;
}

.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.03);
}

.skill-cloud span {
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #f7f1dd;
  font-size: 14px;
  font-weight: 800;
}

.skill-groups {
  display: grid;
  gap: 18px;
}

.skill-groups article {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.skill-groups p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.72);
}

.education-section {
  background: var(--paper);
}

.education-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 28px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.education-card p {
  color: var(--muted);
}

.subtle {
  color: var(--gold) !important;
  font-weight: 850;
}

.education-extra {
  margin-bottom: 6px;
  font-size: 14px;
}

.contact-section {
  scroll-margin-top: var(--anchor-offset);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 28px;
  align-items: center;
  padding: clamp(58px, 9vw, 112px) clamp(20px, 5vw, 72px);
  background: var(--green);
  color: white;
}

.contact-section p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.76);
}

.contact-card {
  display: grid;
  gap: 12px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.contact-card a,
.contact-card span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: white;
  font-weight: 850;
}

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: white;
  cursor: pointer;
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(23, 92, 76, 0.25);
}

.back-to-top.is-visible {
  display: block;
}

@media (max-width: 920px) {
  :root {
    --anchor-offset: 146px;
  }

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

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

  .hero,
  .intro-grid,
  .skill-layout,
  .education-card,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    gap: 26px;
    padding-top: 48px;
  }

  .resume-panel::before {
    width: 48px;
    height: 48px;
  }

  .portrait {
    width: 96px;
  }

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

  .project-card.featured {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 14px 18px;
  }

  .site-nav {
    gap: 16px;
    font-size: 13px;
  }

  .hero,
  .section,
  .contact-section {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero-actions {
    gap: 10px;
    margin-top: 22px;
  }

  .button {
    min-height: 40px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 800;
  }

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

  .project-card {
    min-height: auto;
  }

  .resume-panel {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
  }

  .resume-panel::before {
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-top-width: 2px;
    border-right-width: 2px;
  }

  .portrait {
    width: 82px;
    box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.12);
  }

  .quick-facts {
    gap: 10px;
  }

  .quick-facts div {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 8px;
    padding-top: 10px;
  }

  .quick-facts dt {
    font-size: 12px;
  }

  .quick-facts dd {
    font-size: 14px;
    line-height: 1.45;
  }

  .project-card,
  .education-card,
  .contact-card {
    padding: 20px;
  }
}

@media (max-width: 420px) {
  .resume-panel {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .portrait {
    width: 72px;
  }

  .quick-facts div {
    grid-template-columns: 64px minmax(0, 1fr);
  }
}
