:root {
  color-scheme: light;
  --page: #f4f5f0;
  --surface: #ffffff;
  --surface-muted: #e8ebe4;
  --text: #17201b;
  --muted: #5f6862;
  --line: #cdd3cc;
  --accent: #16734a;
  --accent-strong: #0d5636;
  --highlight: #ef6b4a;
  --header-bg: rgba(244, 245, 240, 0.94);
  --shadow: 0 16px 40px rgba(23, 32, 27, 0.08);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system,
    sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #151a17;
  --surface: #202723;
  --surface-muted: #2a332e;
  --text: #f1f4ef;
  --muted: #b3bdb6;
  --line: #3d4841;
  --accent: #66c493;
  --accent-strong: #8bd8ae;
  --highlight: #ff876a;
  --header-bg: rgba(21, 26, 23, 0.94);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--page);
  color: var(--text);
  line-height: 1.65;
  letter-spacing: 0;
}

button,
a,
input {
  font: inherit;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 72px;
  padding: 10px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 10px;
  color: var(--text);
  font-weight: 750;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--text);
  background: var(--highlight);
  color: #17110f;
  font-size: 12px;
}

.main-nav {
  display: flex;
  gap: clamp(18px, 3vw, 38px);
}

.main-nav a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.main-nav a:hover {
  color: var(--accent);
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  justify-self: end;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.icon-button.small {
  width: 34px;
  height: 34px;
}

.intro {
  padding: clamp(58px, 9vw, 110px) clamp(20px, 8vw, 120px) 0;
}

.intro-copy {
  width: min(820px, 100%);
}

.eyebrow,
.section-number,
.project-type,
.section-note {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(48px, 8vw, 92px);
  line-height: 1;
  letter-spacing: 0;
}

.intro-text {
  width: min(680px, 100%);
  margin: 28px 0 32px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
}

.primary-action {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  padding: 10px 18px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.primary-action:hover {
  background: var(--accent-strong);
}

.photo-band {
  height: clamp(190px, 32vw, 390px);
  margin: clamp(48px, 8vw, 86px) calc(clamp(20px, 8vw, 120px) * -1) 0;
  overflow: hidden;
  background: var(--surface-muted);
}

.photo-band img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
  filter: saturate(0.82) contrast(1.02);
}

.section {
  padding: clamp(64px, 9vw, 112px) clamp(20px, 8vw, 120px);
  border-bottom: 1px solid var(--line);
}

.section h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.15;
  letter-spacing: 0;
}

.about-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: clamp(40px, 8vw, 120px);
}

.about-copy {
  align-self: end;
  color: var(--muted);
  font-size: 18px;
}

.about-copy p:first-child {
  margin-top: 0;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.learning-section {
  background: var(--surface);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 44px;
}

.progress-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-text,
.section-note {
  margin: 0;
  white-space: nowrap;
}

.task-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.task-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  padding: 24px 4px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.task-item:hover {
  background: var(--surface-muted);
}

.task-item input {
  width: 20px;
  height: 20px;
  margin: 3px 0 0;
  accent-color: var(--accent);
}

.task-item strong,
.task-item small {
  display: block;
}

.task-item strong {
  font-size: 18px;
}

.task-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 14px;
}

.task-item:has(input:checked) strong {
  color: var(--muted);
  text-decoration: line-through;
}

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

.project-card {
  min-height: 270px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.project-card h3 {
  margin: 52px 0 10px;
  font-size: 26px;
  letter-spacing: 0;
}

.project-card > p:not(.project-type) {
  max-width: 520px;
  color: var(--muted);
}

.project-card a {
  display: inline-block;
  margin-top: 22px;
  color: var(--accent);
  font-weight: 700;
}

.featured-project {
  border-color: var(--accent);
}

.empty-project {
  background: var(--surface-muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 34px clamp(20px, 5vw, 72px);
  color: var(--muted);
  font-size: 14px;
}

.site-footer p {
  margin: 0;
}

:focus-visible {
  outline: 3px solid var(--highlight);
  outline-offset: 3px;
}

@media (max-width: 720px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: space-between;
    padding: 10px 0 2px;
  }

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

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .project-card {
    min-height: 230px;
  }

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
