:root {
  --bg: #fcfaf6;
  --bg-soft: #fffdf9;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: #ffffff;
  --panel-inset: #f7f7f3;
  --text: #171717;
  --muted: #66615a;
  --line: rgba(25, 20, 13, 0.08);
  --shadow: 0 30px 80px rgba(31, 28, 22, 0.08);
  --shadow-soft: 0 18px 45px rgba(61, 56, 48, 0.08);
  --mint: #c9f1df;
  --mint-strong: #8fe2bc;
  --lilac: #d8caf8;
  --sky: #d8eafe;
  --peach: #ffd9c9;
  --black: #0a0a0a;
  --radius-xl: 36px;
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --max-width: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", "PingFang SC", "Hiragino Sans GB", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(201, 241, 223, 0.7), transparent 26%),
    radial-gradient(circle at top right, rgba(216, 202, 248, 0.52), transparent 22%),
    linear-gradient(180deg, #fffefc 0%, var(--bg) 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.3;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.55)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d9d2cb' fill-opacity='0.18'%3E%3Ccircle cx='4' cy='4' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

button,
a,
textarea,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

.page-shell {
  width: min(var(--max-width), calc(100% - 40px));
  margin: 24px auto 60px;
}

.topbar {
  position: sticky;
  top: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 252, 248, 0.84);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 220px;
}

.brand-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #f7f2eb);
  border: 1px solid rgba(28, 19, 10, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.brand-mark svg {
  width: 40px;
  height: 40px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: "Noto Serif SC", serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.brand-role {
  font-size: 0.84rem;
  color: var(--muted);
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.nav-pill {
  padding: 14px 22px;
  border-radius: 999px;
  color: rgba(23, 23, 23, 0.78);
  font-weight: 700;
  transition: transform 0.28s ease, background 0.28s ease, color 0.28s ease, box-shadow 0.28s ease;
}

.nav-pill:hover,
.nav-pill:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.nav-pill.is-active {
  color: white;
  background: var(--black);
  box-shadow: 0 16px 30px rgba(12, 12, 12, 0.18);
}

.page-stage {
  margin-top: 30px;
}

.resume-page {
  display: none;
  animation: fadeSlide 0.55s ease;
}

.resume-page.is-active {
  display: block;
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  border-radius: var(--radius-xl);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.glass-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.72));
}

.inset-card {
  background: var(--panel-inset);
  border: 1px solid rgba(15, 15, 15, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
}

.hero-copy {
  padding: 42px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  color: #8b8178;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.section-heading h2 {
  margin: 0;
  font-family: "Noto Serif SC", serif;
  line-height: 1.02;
}

.hero-copy h1 {
  font-size: clamp(3.6rem, 7vw, 6.6rem);
  letter-spacing: -0.04em;
}

.hero-copy h1 span {
  color: #7d5ae0;
}

.hero-title {
  margin: 18px 0 16px;
  color: #8b68d9;
  font-size: clamp(1.25rem, 2.2vw, 2rem);
  font-weight: 700;
}

.hero-desc,
.section-heading p,
.timeline-card p,
.project-body p,
.skill-panel,
.featured-copy p,
.mini-work p,
.note-card p,
.experience-overview p,
.insight-card p {
  color: var(--muted);
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin: 22px 0 28px;
  color: #3c372f;
  font-weight: 600;
}

.hero-actions,
.matcher-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 148px;
  min-height: 56px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.button-primary {
  background: var(--black);
  color: white;
  box-shadow: 0 16px 32px rgba(12, 12, 12, 0.2);
}

.button-secondary {
  background: var(--mint);
  color: var(--black);
}

.button-dark {
  background: var(--black);
  color: white;
}

.button-ghost {
  background: rgba(12, 12, 12, 0.06);
  color: var(--text);
}

.hero-portrait {
  position: relative;
  min-height: 640px;
  display: grid;
  place-items: center;
}

.portrait-outline {
  position: absolute;
  inset: 42px 30px 12px;
  border: 4px solid #54d3b0;
  border-radius: 44% 56% 45% 55% / 34% 36% 64% 66%;
  transform: rotate(-6deg);
}

.portrait-card {
  width: min(440px, 100%);
  padding: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
  border-color: transparent;
  box-shadow: none;
}

.portrait-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  border-radius: 42px;
  filter: saturate(1.02) contrast(1.02);
}

.floating-note {
  position: absolute;
  padding: 14px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  font-weight: 700;
}

.note-a {
  left: 20px;
  top: 110px;
}

.note-b {
  right: 10px;
  bottom: 100px;
  background: rgba(201, 241, 223, 0.94);
}

.matcher,
.experience-overview,
.metrics-board,
.featured-work {
  margin-top: 26px;
}

.matcher,
.featured-work,
.experience-overview,
.metrics-board {
  padding: 28px;
}

.matcher {
  max-width: 620px;
  padding: 18px 18px 16px;
  border-radius: 30px;
}

.matcher-head {
  margin-bottom: 10px;
}

.matcher-label {
  display: inline-block;
  color: #7f786f;
  font-size: 0.92rem;
  font-weight: 800;
}

.matcher-inline {
  display: flex;
  align-items: center;
  gap: 12px;
}

.matcher-inline input {
  flex: 1;
  height: 64px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid rgba(18, 17, 14, 0.1);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.03);
}

.matcher-inline input:focus-visible {
  outline: 2px solid rgba(125, 90, 224, 0.14);
}

.matcher-submit {
  min-width: 160px;
  min-height: 64px;
}

.matcher-demo-link {
  margin-top: 10px;
  padding: 0 8px;
  color: #7d5ae0;
  font-size: 0.9rem;
  font-weight: 700;
}

.summary-grid,
.skills-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.insight-card,
.skill-panel {
  padding: 28px;
}

.accent-mint {
  background: linear-gradient(180deg, rgba(201, 241, 223, 0.76), rgba(255, 255, 255, 0.82));
}

.section-heading {
  margin-bottom: 28px;
  text-align: center;
}

.section-heading.align-left,
.section-heading.compact {
  text-align: left;
}

.section-heading h2 {
  font-size: clamp(2.6rem, 4vw, 4.6rem);
  margin-bottom: 10px;
}

.timeline {
  position: relative;
  display: grid;
  gap: 22px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 26px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, rgba(12, 12, 12, 0.12), rgba(12, 12, 12, 0));
}

.timeline-card {
  position: relative;
  padding: 30px 34px 30px 72px;
}

.timeline-card::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 38px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--mint-strong), #fff);
  box-shadow: 0 0 0 8px rgba(201, 241, 223, 0.35);
}

.timeline-date,
.timeline-role,
.project-company,
.note-label {
  color: #6e665f;
  font-weight: 700;
}

.timeline-card h3,
.project-body h3,
.skill-panel h3,
.featured-copy h3,
.note-card h4,
.mini-work h4,
.experience-overview h3 {
  margin: 10px 0;
  font-size: 1.6rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.project-card {
  overflow: hidden;
  transition: transform 0.32s ease, box-shadow 0.32s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 26px 50px rgba(33, 31, 27, 0.14);
}

.project-cover {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.project-cover-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-mint {
  background: linear-gradient(135deg, #effaf5, #dff7ea 45%, #d1f5f0);
}

.cover-lilac {
  background: linear-gradient(135deg, #f5f0ff, #e8dcff 45%, #d9f0ff);
}

.cover-sky {
  background: linear-gradient(135deg, #eef9ff, #d8eafe 48%, #edf7f8);
}


.project-body {
  padding: 24px;
}

.text-link {
  margin-top: 18px;
  padding: 0;
  font-weight: 800;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.tag-list span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(201, 241, 223, 0.7);
  font-weight: 700;
}

.tag-list.dense span {
  background: rgba(12, 12, 12, 0.05);
}

.exploration-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.featured-media {
  height: 260px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.8), rgba(233, 241, 255, 0.84));
  overflow: hidden;
  position: relative;
}

.featured-media-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-copy {
  margin-top: 20px;
}

.mini-work-list {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.mini-work {
  padding: 22px 24px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(18, 18, 18, 0.3);
  backdrop-filter: blur(10px);
  z-index: 40;
}

.modal-backdrop.is-visible {
  display: flex;
}

.modal-panel {
  width: min(1020px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 28px;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.16);
}

.modal-close {
  margin-left: auto;
  display: block;
  min-width: 92px;
  min-height: 48px;
  border-radius: 999px;
  background: var(--black);
  color: white;
  font-weight: 800;
}

.modal-header,
.project-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin: 18px 0 24px;
}

.score-badge {
  min-width: 126px;
  padding: 22px 16px;
  border-radius: 28px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 225, 213, 0.95), rgba(255, 242, 234, 0.95));
}

.score-badge strong {
  display: block;
  margin-top: 6px;
  font-size: 2.4rem;
}

.matcher-result-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}

.result-main,
.result-side {
  padding: 24px;
}

.result-main {
  grid-row: span 2;
}

.score-row {
  display: grid;
  grid-template-columns: 96px 1fr 48px;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.score-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.08);
  overflow: hidden;
}

.score-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8dc6ff, #72a9f6);
}

.bullet-list,
#project-actions {
  display: grid;
  gap: 12px;
}

.bullet-list p,
#project-actions li,
#summary-text,
#risk-text,
#project-background,
#project-subtitle {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.risk-box,
.project-results {
  margin-top: 18px;
}

.project-modal-section {
  padding: 20px 0;
  border-top: 1px solid rgba(12, 12, 12, 0.08);
}

.project-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.project-results .result-chip {
  padding: 18px;
  border-radius: 22px;
  background: rgba(12, 12, 12, 0.04);
  font-weight: 700;
}

@media (max-width: 1100px) {
  .hero-grid,
  .exploration-layout,
  .matcher-result-grid {
    grid-template-columns: 1fr;
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .page-shell {
    width: min(100% - 20px, var(--max-width));
  }

  .topbar {
    position: static;
    border-radius: 30px;
    flex-direction: column;
    align-items: stretch;
  }

  .brand {
    min-width: auto;
  }

  .main-nav {
    justify-content: flex-start;
  }

  .hero-copy,
  .timeline-card,
  .experience-overview,
  .skill-panel,
  .featured-work,
  .modal-panel {
    padding: 22px;
  }

  .matcher {
    padding: 18px;
  }

  .hero-portrait {
    min-height: 480px;
  }

  .summary-grid,
  .skills-layout,
  .project-grid,
  .project-results {
    grid-template-columns: 1fr;
  }

  .modal-header,
  .project-modal-head {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .hero-copy h1 {
    font-size: 3rem;
  }

  .section-heading h2 {
    font-size: 2.4rem;
  }

  .matcher-inline {
    flex-direction: column;
    align-items: stretch;
  }

  .matcher-submit {
    width: 100%;
    min-width: 0;
  }

  .score-row {
    grid-template-columns: 1fr;
  }

  .floating-note {
    position: static;
    margin-top: 12px;
    display: inline-flex;
  }

  .hero-portrait {
    display: block;
    min-height: auto;
  }

  .portrait-outline {
    inset: 24px 12px 12px;
  }
}
