:root {
  color-scheme: light dark;
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #151716;
  --muted: #626864;
  --quiet: #5f6661;
  --line: #d8dcd8;
  --accent: #0b617b;
  --accent-text: #ffffff;
  --header: rgba(247, 247, 245, 0.94);
  --measure: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111412;
    --surface: #181c19;
    --text: #f2f4f2;
    --muted: #b3bbb5;
    --quiet: #a7b0aa;
    --line: #343a36;
    --accent: #7ac7df;
    --accent-text: #0b1518;
    --header: rgba(17, 20, 18, 0.94);
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #151716;
  --muted: #626864;
  --quiet: #5f6661;
  --line: #d8dcd8;
  --accent: #0b617b;
  --accent-text: #ffffff;
  --header: rgba(247, 247, 245, 0.94);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111412;
  --surface: #181c19;
  --text: #f2f4f2;
  --muted: #b3bbb5;
  --quiet: #a7b0aa;
  --line: #343a36;
  --accent: #7ac7df;
  --accent-text: #0b1518;
  --header: rgba(17, 20, 18, 0.94);
}

@view-transition {
  navigation: auto;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

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

button {
  font: inherit;
}

.icon {
  display: block;
  width: 18px;
  height: 18px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

h1 {
  margin-block: 0;
  font-size: 2em;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: -100px;
  left: 8px;
  padding: 8px 12px;
  background: var(--text);
  color: var(--bg);
}

.skip-link:focus {
  top: 8px;
}

.masthead {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px max(24px, calc((100vw - var(--measure)) / 2));
  border-bottom: 1px solid var(--line);
  background: var(--header);
  backdrop-filter: blur(10px);
}

.wordmark {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.masthead nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.masthead nav a {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: color 150ms ease;
}

.masthead nav a:hover,
.masthead nav a[aria-current="page"] {
  color: var(--text);
}

.theme-toggle {
  display: inline-grid;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  place-items: center;
  transition: background-color 150ms ease, color 150ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: var(--surface);
  color: var(--text);
}

.minimal-hero,
.project-index,
.minimal-profile-links {
  width: min(var(--measure), calc(100% - 48px));
  margin: 0 auto;
}

.minimal-hero {
  display: grid;
  min-height: 560px;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: clamp(56px, 10vw, 136px);
  align-items: center;
  padding: 92px 0;
  border-bottom: 1px solid var(--line);
}

.minimal-hero-copy {
  max-width: 760px;
}

.discipline,
.section-label {
  margin: 0 0 16px;
  color: var(--quiet);
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  letter-spacing: 0.03em;
}

.minimal-hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(52px, 8vw, 88px);
  font-weight: 400;
  line-height: 0.98;
}

.founder-line {
  margin: 24px 0 0;
  font-size: 18px;
  font-weight: 700;
}

.founder-line a {
  color: var(--text);
  text-decoration: none;
}

.founder-line a:hover {
  color: var(--accent);
}

.hero-statement {
  max-width: 680px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.credential-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 16px 0 0;
  padding: 0;
  color: var(--quiet);
  font-size: 12px;
  list-style: none;
}

.credential-line li + li::before {
  margin-right: 18px;
  color: var(--line);
  content: "·";
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: center;
  margin-top: 30px;
}

.hero-links a {
  font-size: 13px;
  font-weight: 700;
}

.hero-links .primary-link {
  padding: 9px 13px;
  border: 1px solid var(--accent);
  border-radius: 3px;
  background: var(--accent);
  color: var(--accent-text);
  text-decoration: none;
  transition: opacity 150ms ease, transform 150ms ease;
}

.hero-links .primary-link:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.minimal-portrait {
  margin: 0;
}

.minimal-portrait img {
  width: 260px;
  height: 260px;
  aspect-ratio: 1;
  object-fit: cover;
}

.project-index {
  padding: 88px 0 100px;
}

.minimal-section-heading {
  margin-bottom: 34px;
}

.minimal-section-heading .section-label {
  margin-bottom: 7px;
}

.minimal-section-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 5vw, 50px);
  font-weight: 400;
}

.minimal-project-list {
  border-top: 1px solid var(--line);
}

.minimal-project {
  display: grid;
  grid-template-columns: 42px minmax(240px, 1fr) minmax(180px, 0.55fr) auto;
  gap: 24px;
  align-items: center;
  padding: 25px 0;
  border-bottom: 1px solid var(--line);
  transition: background-color 160ms ease, padding 160ms ease;
}

.minimal-project:hover {
  padding-right: 10px;
  padding-left: 10px;
  background: var(--surface);
}

.project-number,
.project-title p,
.project-tech {
  color: var(--quiet);
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
}

.project-title p {
  margin: 0 0 5px;
}

.project-title h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-weight: 400;
}

.project-title h3 a {
  color: var(--text);
  text-decoration: none;
}

.project-title h3 a:hover {
  color: var(--accent);
}

.project-tech {
  margin: 0;
  line-height: 1.6;
}

.project-actions {
  display: flex;
  gap: 14px;
  white-space: nowrap;
}

.project-actions a {
  font-size: 12px;
  font-weight: 700;
}

.minimal-profile-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.minimal-profile-links > a {
  display: flex;
  min-height: 118px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}

.minimal-profile-links > a:hover {
  background: var(--surface);
  color: var(--accent);
}

.minimal-profile-links span,
.minimal-profile-links small {
  display: block;
}

.minimal-profile-links div > span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
}

.minimal-profile-links small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.footer {
  display: flex;
  width: min(var(--measure), calc(100% - 48px));
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  margin: 80px auto 0;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.footer div,
.footer span {
  display: block;
}

.footer strong {
  color: var(--text);
}

.footer div:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  justify-content: flex-end;
  text-align: right;
}

@media (prefers-reduced-motion: no-preference) {
  .minimal-hero-copy > *,
  .minimal-portrait,
  .minimal-project {
    opacity: 0;
    transform: translateY(10px);
    animation: enter 480ms ease forwards;
  }

  .minimal-hero-copy > :nth-child(2) {
    animation-delay: 50ms;
  }

  .minimal-hero-copy > :nth-child(3) {
    animation-delay: 100ms;
  }

  .minimal-hero-copy > :nth-child(4) {
    animation-delay: 150ms;
  }

  .minimal-hero-copy > :nth-child(5),
  .minimal-portrait {
    animation-delay: 200ms;
  }

  .minimal-project:nth-child(2) {
    animation-delay: 40ms;
  }

  .minimal-project:nth-child(3) {
    animation-delay: 80ms;
  }

  .minimal-project:nth-child(4) {
    animation-delay: 120ms;
  }

  .minimal-project:nth-child(5) {
    animation-delay: 160ms;
  }

  .minimal-project:nth-child(6) {
    animation-delay: 200ms;
  }

  @keyframes enter {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

@media (max-width: 760px) {
  .masthead {
    padding-inline: 16px;
  }

  .masthead nav {
    gap: 13px;
  }

  .masthead nav a:nth-child(2) {
    display: none;
  }

  .theme-toggle {
    width: 34px;
    height: 34px;
  }

  .minimal-hero,
  .project-index,
  .minimal-profile-links,
  .footer {
    width: calc(100% - 32px);
  }

  .minimal-hero {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 38px;
    padding: 64px 0;
  }

  .minimal-hero h1 {
    font-size: clamp(46px, 14vw, 64px);
  }

  .founder-line {
    font-size: 16px;
  }

  .credential-line {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 12px;
  }

  .credential-line li + li::before {
    display: none;
  }

  .minimal-portrait img {
    width: min(220px, 68vw);
    height: min(220px, 68vw);
  }

  .project-index {
    padding: 66px 0 76px;
  }

  .minimal-project {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 6px 12px;
    padding: 22px 0;
  }

  .minimal-project:hover {
    padding-right: 0;
    padding-left: 0;
  }

  .project-title {
    min-width: 0;
  }

  .project-title h3 {
    overflow-wrap: anywhere;
  }

  .project-tech {
    grid-column: 2;
  }

  .project-actions {
    grid-column: 2;
    margin-top: 6px;
  }

  .minimal-profile-links {
    grid-template-columns: 1fr;
  }

  .minimal-profile-links > a {
    min-height: 92px;
  }

  .footer,
  .footer div:last-child {
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-start;
    text-align: left;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
