:root {
  color-scheme: light;
  --bg: #fbf3ec;
  --surface: #fffaf5;
  --surface-strong: #f7e7dc;
  --text: #2b211d;
  --muted: #76675f;
  --line: rgba(85, 55, 44, 0.15);
  --accent: #9f4f45;
  --accent-strong: #7f3838;
  --sage: #63766a;
  --rose: #d59b90;
  --gold: #bd8951;
  --shadow: 0 24px 70px rgba(103, 62, 45, 0.14);
}

body.dark {
  color-scheme: dark;
  --bg: #1b1715;
  --surface: #251f1c;
  --surface-strong: #332822;
  --text: #fff8ef;
  --muted: #cbbdb3;
  --line: rgba(255, 248, 239, 0.15);
  --accent: #e2a398;
  --accent-strong: #f0b9af;
  --sage: #aab9a8;
  --rose: #c98d84;
  --gold: #d6ad73;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(213, 155, 144, 0.35), transparent 28rem),
    radial-gradient(circle at 88% 16%, rgba(99, 118, 106, 0.2), transparent 30rem),
    linear-gradient(180deg, rgba(255, 250, 245, 0.9), rgba(247, 231, 220, 0.42)),
    var(--bg);
  color: var(--text);
}

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: 1rem;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  backdrop-filter: blur(18px);
}

.brand,
.nav,
.theme-toggle {
  background: rgba(255, 250, 242, 0.72);
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(29, 37, 34, 0.07);
}

body.dark .brand,
body.dark .nav,
body.dark .theme-toggle {
  background: rgba(25, 33, 31, 0.72);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  font-weight: 800;
  color: var(--accent-strong);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--text);
  color: var(--surface);
  font-size: 0.75rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 4px;
  border-radius: 999px;
}

.nav a {
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 9px 12px;
}

.nav a:hover,
.nav a:focus-visible {
  background: var(--surface-strong);
  color: var(--text);
}

.theme-toggle {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
}

.theme-icon {
  font-size: 1.15rem;
  line-height: 1;
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.62fr);
  align-items: center;
  gap: clamp(28px, 5vw, 70px);
  padding: clamp(46px, 7vw, 82px) 0 30px;
}

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

.eyebrow,
.project-kicker {
  margin: 0 0 12px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 24px;
  font-size: clamp(3rem, 6.2vw, 5.7rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.18rem;
}

.hero-lede {
  max-width: 660px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: clamp(1.04rem, 2vw, 1.32rem);
  line-height: 1.8;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
  padding: 0 18px;
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.button.secondary {
  background: var(--surface);
  color: var(--text);
}

.profile-card {
  display: grid;
  gap: 18px;
  justify-self: end;
  width: min(100%, 410px);
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(255, 250, 245, 0.92), rgba(247, 231, 220, 0.95)),
    var(--surface);
  box-shadow: var(--shadow);
}

body.dark .profile-card {
  background: linear-gradient(160deg, var(--surface), var(--surface-strong));
}

.portrait {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-strong);
}

.portrait-large {
  min-height: 470px;
}

.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
}

.profile-name {
  margin-bottom: 4px;
  font-size: 1.35rem;
  font-weight: 800;
}

.profile-role {
  margin-bottom: 0;
  color: var(--muted);
}

.quick-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0;
}

.quick-facts div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.32);
}

body.dark .quick-facts div {
  background: rgba(255, 255, 255, 0.04);
}

.quick-facts dt {
  color: var(--muted);
  font-size: 0.78rem;
}

.quick-facts dd {
  margin: 6px 0 0;
  font-weight: 800;
}

.section {
  scroll-margin-top: 94px;
  padding: 78px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(180px, 0.32fr) minmax(0, 1fr);
  align-items: end;
  gap: 24px;
  margin-bottom: 34px;
}

.compact-heading {
  margin-bottom: 22px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.9;
}

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

.vertical-timeline {
  position: relative;
  gap: 0;
}

.vertical-timeline::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 174px;
  width: 1px;
  content: "";
  background: linear-gradient(180deg, transparent, var(--rose), var(--sage), transparent);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 32px;
  padding: 0 0 34px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.vertical-timeline .timeline-item:last-child {
  padding-bottom: 0;
}

body.dark .timeline-item {
  background: transparent;
}

.timeline-date {
  color: var(--accent-strong);
  font-weight: 800;
  padding-top: 18px;
}

.timeline-body {
  position: relative;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 245, 0.72);
  box-shadow: 0 16px 44px rgba(103, 62, 45, 0.08);
}

body.dark .timeline-body {
  background: rgba(37, 31, 28, 0.78);
}

.timeline-body::before {
  position: absolute;
  top: 24px;
  left: -39px;
  width: 13px;
  height: 13px;
  border: 4px solid var(--bg);
  border-radius: 50%;
  content: "";
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--rose);
}

.timeline-meta {
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 0.92rem;
  font-weight: 800;
}

.experience-groups {
  display: grid;
  gap: 14px;
}

.info-block,
.strategy-block {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 231, 220, 0.32);
}

body.dark .info-block,
body.dark .strategy-block {
  background: rgba(255, 248, 239, 0.04);
}

.info-block h4,
.strategy-block h4 {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 0.98rem;
}

.info-block p,
.strategy-block p {
  margin: 0;
}

.timeline-list,
.project-points {
  margin: 14px 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
  line-height: 1.75;
}

.timeline-list li + li,
.project-points li + li {
  margin-top: 6px;
}

.timeline-body p,
.project-content p,
.contact-section p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.project-stack {
  counter-reset: project;
  display: grid;
  gap: 22px;
}

.project-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 50px rgba(37, 31, 20, 0.08);
}

.refined-projects .project-card {
  counter-increment: project;
}

.refined-projects .project-card::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 6px;
  content: "";
  background: linear-gradient(180deg, var(--accent), var(--rose), var(--sage));
}

.featured-project {
  display: grid;
  grid-template-columns: minmax(280px, 0.38fr) minmax(0, 1fr);
}

.project-visual {
  min-height: 178px;
  background-size: cover;
}

.visual-one {
  background:
    linear-gradient(120deg, rgba(127, 56, 56, 0.78), rgba(99, 118, 106, 0.56)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.42) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.24) 0 1px, transparent 1px 22px);
}

.visual-two {
  background:
    radial-gradient(circle at 24% 28%, rgba(255, 255, 255, 0.78) 0 4%, transparent 4.2%),
    radial-gradient(circle at 72% 62%, rgba(255, 255, 255, 0.72) 0 7%, transparent 7.2%),
    linear-gradient(135deg, rgba(213, 155, 144, 0.92), rgba(189, 137, 81, 0.64));
}

.visual-three {
  background:
    linear-gradient(135deg, rgba(43, 33, 29, 0.82), rgba(99, 118, 106, 0.78)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.24) 0 8px, transparent 8px 18px);
}

.project-content {
  padding: clamp(22px, 3vw, 32px);
}

.project-card-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.project-card-head h3 {
  margin-bottom: 0;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
}

.project-card-head::before {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  content: counter(project, decimal-leading-zero);
  background: var(--surface-strong);
  color: var(--accent-strong);
  font-size: 0.86rem;
  font-weight: 800;
}

.project-card-head > div {
  grid-column: 2;
}

.project-card-head > span {
  grid-column: 3;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 800;
}

.project-content h4 {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-size: 0.94rem;
}

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

.project-result {
  border-color: rgba(159, 79, 69, 0.26);
  background: rgba(213, 155, 144, 0.18);
}

body.dark .project-result {
  background: rgba(226, 163, 152, 0.08);
}

.project-detail-grid,
.project-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.project-detail-grid > div,
.project-summary-grid > div {
  padding: 16px;
  border-left: 3px solid var(--rose);
  background: rgba(247, 231, 220, 0.34);
}

body.dark .project-detail-grid > div,
body.dark .project-summary-grid > div {
  background: rgba(255, 248, 239, 0.04);
}

.education-section {
  padding-top: 58px;
}

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

.education-list article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 245, 0.56);
}

body.dark .education-list article {
  background: rgba(255, 248, 239, 0.04);
}

.education-list span {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 800;
}

.education-list h3 {
  margin-bottom: 8px;
}

.education-list p {
  margin: 0;
  color: var(--muted);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
  gap: 34px;
}

.split-section .section-heading {
  display: block;
  margin-bottom: 0;
}

.skills-panel {
  display: grid;
  gap: 26px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

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

.tags span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 36px;
  align-items: center;
  padding-bottom: 96px;
}

.contact-links {
  display: grid;
  gap: 10px;
}

.contact-links a {
  display: flex;
  align-items: center;
  min-height: 46px;
  border-bottom: 1px solid var(--line);
  color: var(--accent-strong);
  font-weight: 800;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer a {
  color: var(--text);
  font-weight: 800;
}

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

  .nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    overflow-x: auto;
    border-radius: 8px;
  }

  .hero,
  .section-heading,
  .split-section,
  .contact-section,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 44px 0 54px;
  }

  .profile-card {
    justify-self: stretch;
    max-width: 560px;
  }

  .portrait-large {
    min-height: 0;
  }

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

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

  .project-card-head {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .project-card-head > span {
    grid-column: 2;
    grid-row: auto;
    justify-self: start;
  }

  .project-detail-grid,
  .project-summary-grid,
  .education-list {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-left: 28px;
  }

  .vertical-timeline::before {
    left: 6px;
  }

  .timeline-date {
    padding-top: 0;
  }

  .timeline-body::before {
    left: -29px;
  }

  .site-footer {
    padding-bottom: 34px;
  }
}

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

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

  .theme-toggle {
    width: 42px;
    height: 42px;
  }

  h1 {
    font-size: clamp(2.55rem, 13vw, 3.9rem);
  }

  .quick-facts {
    grid-template-columns: 1fr;
  }

  .portrait {
    max-height: 620px;
  }

  .section {
    padding: 64px 0;
  }
}
