:root {
  --bg: #fbfaf6;
  --paper: #fffefa;
  --ink: #252525;
  --muted: #77746d;
  --soft: #ebe7dc;
  --line: #ddd8ca;
  --blue: #91b9dd;
  --green: #c9d7c6;
  --shadow: 0 18px 40px rgba(44, 39, 32, 0.12);
  --nav-w: 232px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 70% 10%, rgba(201, 215, 198, 0.22), transparent 28%),
    linear-gradient(180deg, var(--bg), #f8f5ee 78%, #f4f0e6);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.7;
}

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

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  padding: 8px 12px;
  background: var(--ink);
  color: #fff;
  transform: translateY(-140%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-nav {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  width: var(--nav-w);
  padding: 54px 0 0 66px;
  background: linear-gradient(90deg, rgba(251, 250, 246, 0.96), rgba(251, 250, 246, 0.72), transparent);
}

.nav-link {
  display: block;
  width: max-content;
  margin-bottom: 22px;
  color: #5f5e5a;
  letter-spacing: 0.18em;
  transition: color 180ms ease, transform 180ms ease;
}

.nav-link span {
  font-size: 17px;
  font-weight: 600;
}

.nav-link small {
  margin-left: 8px;
  color: #b5b1aa;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.nav-link:hover,
.nav-link.active {
  color: #171717;
  transform: translateX(3px);
}

.nav-note {
  display: block;
  margin-top: 34px;
  font-family: Georgia, serif;
  font-size: 32px;
}

main {
  min-height: 100vh;
  padding-left: 0;
}

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 104px 48px;
}

.hero {
  position: relative;
  display: block;
  min-height: 100vh;
  max-width: none;
  padding-top: 46px;
  padding-bottom: 56px;
  overflow: hidden;
}

.hero-copy {
  position: absolute;
  left: clamp(320px, 20vw, 420px);
  bottom: clamp(120px, 14vh, 175px);
  z-index: 7;
  width: max-content;
  padding-bottom: 0;
}

.date-mark {
  margin: 0 0 14px;
  color: #c6c1b8;
  font-family: "Times New Roman", serif;
  font-size: 12px;
  letter-spacing: 0.24em;
}

.hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(40px, 3.7vw, 58px);
  font-weight: 400;
  line-height: 0.95;
  white-space: nowrap;
}

.hero-tags {
  margin: 22px 0 8px;
  color: #55524c;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero-line {
  max-width: 270px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.collage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(980px, 58vw);
  transform: translate(-50%, -50%);
}

.hero-collage {
  width: 100%;
  height: auto;
  user-select: none;
}

.hero-signature {
  position: absolute;
  right: clamp(64px, 9vw, 150px);
  bottom: clamp(76px, 10vh, 128px);
  z-index: 4;
  margin: 0;
  font-family: "Bradley Hand", "Segoe Print", cursive;
  font-size: clamp(30px, 3.5vw, 54px);
  letter-spacing: 0.03em;
}

.section-heading {
  display: grid;
  grid-template-columns: 54px minmax(180px, max-content) minmax(220px, 1fr);
  gap: 18px;
  align-items: baseline;
  margin-bottom: 52px;
}

.section-heading span {
  color: #b8b1a5;
  font-family: Georgia, serif;
  font-size: 18px;
}

.section-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4vw, 56px);
  font-weight: 400;
  line-height: 1;
}

.section-heading p {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.timeline {
  position: relative;
  display: grid;
  gap: 28px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 188px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: var(--line);
}

.timeline-item {
  display: grid;
  grid-template-columns: 150px 76px minmax(0, 1fr);
  align-items: start;
}

.time {
  padding-top: 26px;
  color: #8c877c;
  font-family: Georgia, serif;
  font-size: 14px;
}

.node {
  position: relative;
  z-index: 1;
  width: 13px;
  height: 13px;
  margin: 32px auto 0;
  border: 2px solid #8ea47f;
  border-radius: 50%;
  background: var(--bg);
}

.experience-card,
.project-card {
  background: rgba(255, 254, 250, 0.72);
  border: 1px solid rgba(221, 216, 202, 0.86);
  border-radius: 8px;
}

.experience-card {
  padding: 28px 30px;
  box-shadow: 0 10px 28px rgba(52, 48, 40, 0.06);
}

.company {
  margin: 0 0 4px;
  color: #8a857b;
  font-size: 13px;
}

.experience-card h3,
.project-body h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0;
}

.positioning {
  margin: 12px 0 16px;
  color: #514d46;
}

.experience-card ul {
  margin: 0;
  padding-left: 1.1em;
  color: #5a564f;
  font-size: 14px;
}

.experience-card li + li {
  margin-top: 8px;
}

.experience-summary strong,
.experience-detail strong {
  color: #34322e;
  font-weight: 650;
}

.result {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--soft);
  color: #31412f;
  font-weight: 600;
}

.result span {
  position: relative;
}

.result span + span::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 0.62em;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #9caf91;
}

.experience-detail {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 360ms ease, opacity 180ms ease, margin-top 260ms ease;
}

.experience-detail > p {
  min-height: 0;
  margin: 0;
  overflow: hidden;
  color: #5a564f;
  font-size: 14px;
}

.experience-detail > p + p {
  margin-top: 10px;
}

.experience-card.is-expanded .experience-detail {
  max-height: 720px;
  margin-top: 18px;
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .experience-detail,
  .experience-toggle i {
    transition: none;
  }
}

.experience-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
  padding: 7px 0;
  border: 0;
  background: transparent;
  color: #666158;
  cursor: pointer;
  font-size: 13px;
}

.experience-toggle:hover,
.experience-toggle:focus-visible {
  color: #2f3e2e;
}

.experience-toggle:focus-visible {
  outline: 2px solid rgba(142, 164, 127, 0.65);
  outline-offset: 4px;
  border-radius: 2px;
}

.experience-toggle i {
  width: 7px;
  height: 7px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 180ms ease;
}

.experience-toggle[aria-expanded="true"] i {
  transform: rotate(225deg) translate(-1px, -1px);
}

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

.project-card {
  overflow: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 32px rgba(52, 48, 40, 0.08);
}

.project-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1.45;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--soft);
  background: #f4f0e8;
  color: var(--ink);
  cursor: pointer;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

.project-media:hover img {
  transform: scale(1.04);
}

.project-media > span:last-child {
  position: absolute;
  right: 14px;
  bottom: 12px;
  padding: 5px 10px;
  background: rgba(255, 254, 250, 0.9);
  border: 1px solid rgba(221, 216, 202, 0.92);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.project-body {
  padding: 20px;
}

.project-body > p:first-child {
  margin: 0 0 6px;
  color: #9a9488;
  font-family: Georgia, serif;
  font-size: 13px;
}

.project-body > p:not(:first-child) {
  margin: 12px 0 16px;
  color: #5a564f;
  font-size: 14px;
}

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

.tags span {
  padding: 4px 9px;
  background: #f0ede4;
  border-radius: 999px;
  color: #666158;
  font-size: 12px;
}

.chart-art {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 16px;
  padding: 54px 42px 38px;
  background:
    linear-gradient(90deg, rgba(37, 37, 37, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(37, 37, 37, 0.05) 1px, transparent 1px),
    linear-gradient(135deg, #f7f4ed, #e9f0ed);
  background-size: 34px 34px, 34px 34px, auto;
}

.chart-art::after {
  content: "Risk -84.6%";
  position: absolute;
  top: 28px;
  left: 32px;
  color: #4e5b4d;
  font-family: Georgia, serif;
  font-size: 24px;
}

.chart-art i {
  display: block;
  width: 14%;
  min-height: 36px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #8db6d6, #9fae8e);
}

.about {
  padding-bottom: 72px;
}

.polaroid-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 18px;
}

.polaroid {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  min-height: 330px;
  padding: 12px 12px 18px;
  border: 0;
  background: #fdfbf5;
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.polaroid:hover,
.polaroid:focus-visible {
  transform: translateY(-8px);
  outline: none;
}

.photo {
  position: relative;
  display: block;
  aspect-ratio: 0.88;
  overflow: hidden;
  background: #111;
}

.photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #101010;
  transition: opacity 420ms ease;
}

.photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background: rgba(255, 255, 255, 0.8);
  opacity: 0;
}

.polaroid.revealed .photo::before {
  opacity: 0;
}

.polaroid.revealed .photo::after {
  animation: shutter 460ms ease;
}

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

.caption {
  color: #6a655d;
  font-size: 13px;
  line-height: 1.55;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 280ms ease, transform 280ms ease;
}

.caption strong {
  display: block;
  margin-bottom: 6px;
  color: #2d2c29;
  font-family: Georgia, serif;
  font-size: 17px;
  font-weight: 400;
}

.polaroid.revealed .caption {
  opacity: 1;
  transform: translateY(0);
}

.footer {
  display: flex;
  justify-content: center;
  gap: 26px;
  padding: 36px 24px 54px;
  color: #777169;
  border-top: 1px solid var(--soft);
  font-size: 14px;
}

.footer p {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, serif;
}

.project-dialog {
  width: min(620px, calc(100% - 36px));
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(35, 31, 27, 0.24);
}

.project-dialog::backdrop {
  background: rgba(32, 29, 24, 0.28);
  backdrop-filter: blur(3px);
}

.project-dialog p:first-of-type {
  margin: 0 0 8px;
  color: #999286;
  font-family: Georgia, serif;
  letter-spacing: 0.08em;
}

.project-dialog h3 {
  margin: 0 0 18px;
  font-size: 28px;
}

.dialog-result {
  color: #344430;
  font-weight: 600;
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #6f6960;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

@keyframes floatIn {
  from {
    opacity: 0;
    translate: 0 18px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes shutter {
  0%,
  100% {
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 1023px) {
  :root {
    --nav-w: 0px;
  }

  .site-nav {
    inset: 0 0 auto 0;
    display: flex;
    gap: 22px;
    width: 100%;
    padding: 15px 22px;
    overflow-x: auto;
    background: rgba(251, 250, 246, 0.94);
    border-bottom: 1px solid rgba(221, 216, 202, 0.72);
    backdrop-filter: blur(12px);
  }

  .nav-link {
    flex: 0 0 auto;
    margin: 0;
  }

  .nav-link span {
    font-size: 13px;
  }

  .nav-link small,
  .nav-note {
    display: none;
  }

  main {
    padding-left: 0;
  }

  .section {
    padding: 90px 28px;
  }

  .hero {
    display: grid;
    max-width: 1180px;
    margin: 0 auto;
    grid-template-columns: 1fr;
    gap: 20px;
    padding-top: 92px;
  }

  .hero-copy {
    position: relative;
    left: auto;
    bottom: auto;
    padding-bottom: 0;
    text-align: center;
    width: auto;
  }

  .hero-line {
    margin-inline: auto;
  }

  .hero-signature {
    right: 32px;
    bottom: 72px;
  }

  .collage {
    position: relative;
    left: auto;
    top: auto;
    width: min(760px, 90vw);
    height: auto;
    margin-left: 0;
    justify-self: center;
    transform: none;
  }

  .section-heading {
    grid-template-columns: 42px 1fr;
  }

  .section-heading p {
    grid-column: 2;
  }

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

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

  .footer {
    padding-left: 24px;
  }
}

@media (max-width: 767px) {
  .section {
    padding: 72px 18px;
  }

  .hero {
    min-height: 860px;
  }

  .hero-signature {
    right: 20px;
    bottom: 60px;
    font-size: 32px;
  }

  .collage {
    min-height: 0;
  }

  .timeline::before {
    display: none;
  }

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

  .time {
    padding-top: 0;
  }

  .node {
    display: none;
  }

  .experience-card {
    padding: 22px;
  }

  .result {
    display: grid;
    gap: 6px;
  }

  .result span + span::before {
    display: none;
  }

  .experience-toggle {
    min-height: 44px;
    margin-top: 10px;
  }

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

  .polaroid {
    min-height: 390px;
    transform: none;
  }

  .footer {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
}
