:root {
  color-scheme: dark;
  --page: #181612;
  --text: #f8eee0;
  --muted: #bdb1a2;
  --line: #41382e;
  --panel: #262019;
  --accent: #ffb77f;
  --button-bg: #f5b284;
  --button-text: #2f1c12;
  --rail: 1120px;
  --gutter: clamp(20px, 5vw, 56px);
}

:root[data-theme="light"] {
  color-scheme: light;
  --page: #f7f2e9;
  --text: #28221b;
  --muted: #64584b;
  --line: #d8cbbc;
  --panel: #efe6d8;
  --accent: #98431d;
  --button-bg: #39271c;
  --button-text: #fff5e9;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 24px; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 16px/1.7 "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
:is(a, button):focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 10;
  transform: translateY(-150%);
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--page);
}

.skip-link:focus { transform: none; }

.site-header, .page {
  width: min(calc(100% - 2 * var(--gutter)), var(--rail));
  margin-inline: auto;
}

.site-header {
  min-height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.signature {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -.045em;
}

.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.site-nav { display: flex; align-items: center; gap: clamp(10px, 3vw, 34px); }

.site-nav a {
  display: inline-grid;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
}

.site-nav a:hover { color: var(--text); }
#page-controls { min-width: 44px; min-height: 44px; display: grid; place-items: center; justify-self: end; }

.theme-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.theme-button:hover { background: var(--panel); }
.theme-button svg { width: 19px; height: 19px; }

.cover {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 90px);
  align-items: center;
  padding-block: clamp(38px, 5vw, 70px) clamp(40px, 5.4vw, 78px);
  border-bottom: 1px solid var(--line);
}

.kicker {
  color: var(--accent);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: .09em;
}

.cover h1 {
  margin: 16px 0 25px;
  font-size: clamp(56px, 7.1vw, 105px);
  font-weight: 750;
  line-height: 1.02;
  letter-spacing: -.065em;
}

.cover h1 span {
  display: block;
  margin-top: .11em;
  font: italic 400 .61em/.98 Georgia, "Times New Roman", serif;
  letter-spacing: -.06em;
}

.cover-lede {
  font-size: clamp(20px, 2.1vw, 29px);
  font-weight: 650;
  line-height: 1.48;
  letter-spacing: -.025em;
}

.cover-bio { max-width: 30em; margin-top: 14px; color: var(--muted); }
.cover-actions, .contact-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; }
.cover-actions { margin-top: 24px; }

.primary-link, .text-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 650;
}

.primary-link {
  padding-inline: 16px;
  border-radius: 7px;
  background: var(--button-bg);
  color: var(--button-text);
  transition: opacity .18s;
}

.primary-link:hover { opacity: .86; }
.text-link { color: var(--accent); }
:is(.text-link, .footer a):hover { text-decoration: underline; text-underline-offset: 5px; }

.cover-art {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1.06;
  border-radius: 14px;
  background: #9b5127;
}

.cover-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  object-position: 50% 53%;
}

.cover-portfolio {
  position: absolute;
  right: 18px;
  bottom: 18px;
  isolation: isolate;
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  padding-inline: 15px;
  border-radius: 999px;
  color: #fffaf2;
  font-size: 13px;
  font-weight: 680;
  text-shadow: 0 1px 3px #291408;
}

#portfolio-lens { position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; }
#portfolio-lens:empty { background: #2b160dd9; }
.portfolio-glass { width: 100%; height: 100%; border-radius: inherit; }
.cover-portfolio:hover { text-decoration: underline; text-underline-offset: 4px; }
.cover-portfolio:focus-visible { outline-color: #fff4e7; outline-offset: -4px; }

.section { padding-block: clamp(36px, 5.3vw, 76px); border-bottom: 1px solid var(--line); }
.section-heading { margin-bottom: clamp(18px, 2.8vw, 34px); }
.section-heading h2 { font-size: clamp(30px, 3.4vw, 48px); line-height: 1.2; letter-spacing: -.05em; }

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.24fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(22px, 5vw, 70px);
}

.feature-image { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); }
.feature-image img, .work img { display: block; width: 100%; height: auto; aspect-ratio: 8/5; object-fit: cover; }
.feature-content h3 { margin: 5px 0 13px; font-size: clamp(28px, 3.4vw, 43px); line-height: 1.12; letter-spacing: -.05em; }
.feature-content > p:not(.kicker) { color: var(--muted); margin-bottom: 10px; }
.more-heading { margin: clamp(32px, 5vw, 62px) 0 18px; font-size: 20px; }
.work-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px clamp(14px, 2vw, 26px); }
.work { min-width: 0; }
.work img { margin-bottom: 10px; border: 1px solid var(--line); border-radius: 9px; background: #12110f; object-fit: contain; transition: opacity .18s; }
.work:hover img { opacity: .82; }
.work h4 { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; font-size: 17px; line-height: 1.35; }
.work h4 span { color: var(--accent); font-size: 13px; }
.work p { margin-top: 5px; color: var(--muted); font-size: 14px; }

.about-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0; }
.about-list > div { padding-top: 14px; border-top: 1px solid var(--line); }
.about-list dt { margin-bottom: 5px; font-size: 18px; font-weight: 650; }
.about-list dd { margin: 0; color: var(--muted); }
.contact { display: flex; justify-content: space-between; align-items: center; gap: 12px 30px; flex-wrap: wrap; }
.contact .section-heading { margin: 0; }

.footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 22px 0 34px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 820px) {
  .cover { gap: 26px; }
  .cover h1 { margin-bottom: 18px; font-size: clamp(55px, 9vw, 78px); }
  .cover-art { aspect-ratio: .92; }
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 650px) {
  .site-header { min-height: 61px; gap: 5px; }
  .site-nav { gap: 2px; }
  .cover { grid-template-columns: 1fr; gap: 26px; padding-block: 30px 32px; }
  .cover h1 { margin: 12px 0 17px; font-size: clamp(48px, 13vw, 72px); }
  .cover-lede { font-size: clamp(19px, 5.4vw, 25px); }
  .cover-bio { margin-top: 10px; }
  .cover-actions { margin-top: 17px; }
  .cover-art { aspect-ratio: 1.42; }
  .cover-image { object-position: 50% 54%; }
  .cover-portfolio { right: 12px; bottom: 12px; }
  .feature, .about-list { grid-template-columns: 1fr; }
  .feature { align-items: start; }
  .contact { align-items: start; flex-direction: column; }
}

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