:root {
  color-scheme: light;
  --bg: #f7f6f2;
  --surface: #ffffff;
  --surface-strong: #eeece5;
  --text: #171717;
  --muted: #61605b;
  --line: #d8d5ca;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --shadow: 0 18px 45px rgba(23, 23, 23, 0.08);
  --radius: 8px;
  --max: 1120px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101312;
  --surface: #181c1b;
  --surface-strong: #222927;
  --text: #f2f2ed;
  --muted: #b8bab2;
  --line: #313936;
  --accent: #93c5fd;
  --accent-strong: #bfdbfe;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

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

.site-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px clamp(18px, 4vw, 44px);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  backdrop-filter: blur(18px);
}

.home-link,
.theme-toggle,
.inline-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: none;
}

.home-link,
.inline-action {
  gap: 9px;
  padding: 0 14px;
  font-size: 0.93rem;
  font-weight: 650;
}

.home-link:hover,
.inline-action:hover,
.link-card:hover,
.project-card:hover {
  border-color: color-mix(in srgb, var(--accent) 65%, var(--line));
}

.theme-toggle {
  width: 64px;
  padding: 0;
  cursor: pointer;
}

.theme-toggle__track {
  position: relative;
  display: block;
  width: 46px;
  height: 24px;
  border-radius: 999px;
  background: var(--surface-strong);
}

.theme-toggle__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  transition: transform 180ms ease;
}

:root[data-theme="dark"] .theme-toggle__thumb {
  transform: translateX(22px);
}

.theme-toggle__moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle__sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle__moon {
  display: block;
}

.site-main {
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
  padding: 56px 0 88px;
}

.hero {
  display: grid;
  align-items: end;
  padding: clamp(96px, 15vh, 180px) 0 50px;
}

.hero__copy {
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  margin: 0;
  font-size: clamp(3.4rem, 10vw, 7.4rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.subtitle {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 3vw, 1.65rem);
  font-weight: 650;
}

.intro {
  max-width: 700px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.links-section,
.work-section {
  padding: 24px 0 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  line-height: 1;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 44px;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.link-card i {
  color: var(--accent);
  font-size: 1.2rem;
}

.project-grid {
  display: grid;
  gap: 16px;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 34%);
  gap: 24px;
  min-height: 230px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: none;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.project-card:hover,
.link-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.project-card__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-card h3 {
  margin: 0;
  font-size: clamp(1.8rem, 4.7vw, 3.35rem);
  line-height: 1;
  letter-spacing: 0;
}

.project-years {
  margin: 12px 0 0;
  color: var(--accent);
  font-size: 0.93rem;
  font-weight: 750;
}

.project-description {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.03rem;
}

.project-card__media {
  height: 190px;
  min-height: 0;
  overflow: hidden;
  align-self: center;
  border-radius: var(--radius);
  background: var(--surface-strong);
}

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

.project-card__media--placeholder {
  position: relative;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--surface)) 0 25%, transparent 25% 50%, color-mix(in srgb, var(--accent) 10%, var(--surface)) 50% 75%, transparent 75%),
    var(--surface-strong);
  background-size: 28px 28px;
}

.project-card__media--placeholder span {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid var(--accent);
  border-radius: 999px;
  background: var(--surface);
}

.project-card__media--placeholder span:nth-child(1) {
  top: 30%;
  left: 26%;
}

.project-card__media--placeholder span:nth-child(2) {
  top: 52%;
  left: 52%;
}

.project-card__media--placeholder span:nth-child(3) {
  right: 24%;
  bottom: 28%;
}

.project-page,
.simple-page {
  max-width: 920px;
  margin: 0 auto;
}

.project-hero,
.simple-page__header {
  padding: 34px 0 28px;
}

.project-hero h1 {
  margin-top: 16px;
  font-size: clamp(2.6rem, 6.5vw, 4.85rem);
  line-height: 1;
}

.simple-page__header h1 {
  margin-top: 16px;
  font-size: clamp(3rem, 8vw, 5.8rem);
}

.project-lede,
.simple-page__header p {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.22rem);
}

.project-hero__image {
  margin: 30px 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.project-hero__image img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

.project-content {
  padding-top: 8px;
  color: var(--text);
  font-size: 1.04rem;
}

.project-content h2 {
  margin: 56px 0 14px;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1.08;
}

.project-content h3 {
  margin: 34px 0 12px;
  font-size: 1.45rem;
  line-height: 1.15;
}

.project-content p,
.project-content li {
  color: var(--muted);
}

.project-content a {
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.project-content img {
  width: 100%;
  margin: 18px 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.project-content figure {
  margin: 24px 0;
}

.project-content iframe {
  border: 0;
}

.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.pdf-frame {
  width: 100%;
  min-height: 78vh;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

hr {
  height: 1px;
  margin: 42px 0;
  border: 0;
  background: var(--line);
}

blockquote {
  margin: 24px 0;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--accent);
}

ul,
ol {
  padding-left: 1.25rem;
}

@media (max-width: 760px) {
  .site-bar {
    padding: 12px 14px;
  }

  .site-main {
    width: min(100% - 28px, var(--max));
    padding-top: 34px;
  }

  .hero {
    padding: 82px 0 44px;
  }

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

  .project-card {
    min-height: 0;
    gap: 18px;
  }

  .project-card__media {
    height: auto;
    aspect-ratio: 16 / 10;
    order: -1;
  }

  .project-content {
    font-size: 1rem;
  }
}
