:root {
  color-scheme: light;
  --background: #f8f8f6;
  --surface: #f0f0ed;
  --text: #232523;
  --muted: #737770;
  --rule: #dcded8;
  --accent: #aa542c;
  --accent-soft: #f1e4dd;
  --font-heading: "Montserrat", Arial, sans-serif;
  --font-body: "DM Sans", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --background: #191c1b;
    --surface: #252a28;
    --text: #edece7;
    --muted: #a2aaa3;
    --rule: #373d3a;
    --accent: #e3a07b;
    --accent-soft: #3a2b25;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #191c1b;
  --surface: #252a28;
  --text: #edece7;
  --muted: #a2aaa3;
  --rule: #373d3a;
  --accent: #e3a07b;
  --accent-soft: #3a2b25;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--background);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  transition: background-color 180ms ease, color 180ms ease;
}

a { color: inherit; }
button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }

.site-shell {
  width: min(100% - 80px, 1080px);
  min-height: 100svh;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
}

.site-header {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.065em;
  text-decoration: none;
}
.wordmark span { font-weight: 400; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle, .header-icon-link {
  width: 38px;
  height: 38px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text);
  background: transparent;
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease;
}
.theme-toggle { cursor: pointer; }
.theme-toggle:hover, .header-icon-link:hover { background: var(--surface); border-color: var(--muted); }
.header-icon-link svg { width: 17px; height: 17px; }
.theme-icon { width: 17px; height: 17px; }
.theme-icon-sun { display: none; }
:root[data-theme="dark"] .theme-icon-sun { display: block; }
:root[data-theme="dark"] .theme-icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-icon-moon { display: none; }
}

.projects { padding-top: clamp(50px, 6vw, 72px); }

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 19px;
  border-bottom: 1px solid var(--text);
}
.section-heading h1 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.025em; }
.project { border-bottom: 1px solid var(--rule); }
.project-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 28px;
  align-items: start;
  padding: 30px 0 32px;
  text-decoration: none;
}
.project-copy h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(27px, 3vw, 35px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.042em;
  transition: color 150ms ease;
}
.project-link:hover h2 { color: var(--accent); }
.project-description { max-width: 65ch; margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.project-destination {
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: 9px;
  padding-top: 11px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
  overflow-wrap: anywhere;
}
.project-arrow { flex: none; color: var(--accent); font-size: 17px; line-height: 1; transition: transform 150ms ease; }
.project-link:hover .project-arrow { transform: translate(3px, -3px); }
.project-title-line { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; }
.status { padding: 5px 9px; border-radius: 3px; background: var(--accent-soft); color: var(--accent); font-size: 10px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }

.site-footer {
  margin-top: auto;
  padding: 70px 0 37px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 14px 25px; }
.footer-links a { font-size: 13px; font-weight: 500; text-decoration-color: var(--rule); text-underline-offset: 5px; }
.footer-links a:hover { color: var(--accent); text-decoration-color: currentColor; }
.footer-links a span { color: var(--accent); }
@media (max-width: 600px) {
  .site-shell { width: min(100% - 36px, 1080px); }
  .site-header { min-height: 76px; }
  .projects { padding-top: 46px; }
  .project-link { grid-template-columns: minmax(0, 1fr); gap: 11px; padding-block: 25px; }
  .project-copy h2 { font-size: clamp(26px, 7vw, 33px); }
  .project-description { font-size: 13px; }
  .project-destination { justify-content: flex-start; padding-top: 0; text-align: left; }
  .site-footer { padding-block: 55px 35px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body, .theme-toggle, .header-icon-link, .project-copy h2, .project-arrow { transition: none; }
}
