@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&display=swap");

:root {
  color-scheme: dark;
  --bg: #222b2d;
  --surface: #2a3538;
  --text: #eef3f2;
  --muted: #aebbb9;
  --line: #435154;
  --accent: #62cdbf;
  --accent-soft: #294542;
  --accent-contrast: #10201f;
  --grid: transparent;
  --shadow: rgba(0, 0, 0, 0.12);
  --sans: "IBM Plex Sans", "Segoe UI", sans-serif;
  --max-width: 1120px;
  --radius: 2px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f1e9;
  --surface: #f9f7f1;
  --text: #232622;
  --muted: #62645e;
  --line: #bdbab1;
  --accent: #9e432e;
  --accent-soft: #e7d7ce;
  --accent-contrast: #ffffff;
  --grid: rgba(35, 38, 34, 0.025);
  --shadow: rgba(70, 58, 48, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    var(--bg);
  background-size: 64px 64px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 180ms ease, color 180ms ease;
}

a {
  color: inherit;
}

button,
summary {
  font: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 1rem;
  left: 1rem;
  padding: 0.65rem 1rem;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
main,
.site-footer {
  width: min(calc(100% - 3rem), var(--max-width));
  margin-inline: auto;
}

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

.wordmark {
  display: inline-flex;
  gap: 0.65rem;
  align-items: center;
  font-weight: 600;
  text-decoration: none;
}

.wordmark-mark {
  width: 8px;
  height: 8px;
  background: var(--accent);
  transform: rotate(45deg);
}

.header-actions,
.site-nav {
  display: flex;
  align-items: center;
}

.header-actions {
  gap: 1.5rem;
}

.site-nav {
  gap: 1.8rem;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 150ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  color: var(--accent);
}

.theme-toggle {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.theme-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-icon-moon {
  display: none;
}

:root[data-theme="light"] .theme-icon-moon {
  display: block;
}

:root[data-theme="light"] .theme-icon-sun {
  display: none;
}

.hero {
  min-height: 510px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(270px, 0.55fr);
  gap: clamp(3rem, 10vw, 9rem);
  align-items: center;
  padding-block: clamp(4rem, 8vw, 6rem);
}

.hero-copy {
  min-width: 0;
}

.eyebrow,
.project-status {
  margin: 0;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1,
h2,
h3 {
  margin-top: 0;
  font-weight: 500;
}

.hero h1 {
  max-width: 720px;
  margin: 0.8rem 0 1.25rem;
  font-size: clamp(3rem, 6vw, 5.6rem);
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.hero-intro {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
}

.focus-index {
  padding: 1.25rem;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  box-shadow: 16px 16px 0 var(--shadow);
}

.focus-index > p {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.focus-index ol {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.focus-index li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 0.75rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.84rem;
}

.focus-index li span {
  color: var(--accent);
  font-size: 0.68rem;
}

.section {
  padding-block: clamp(4.5rem, 8vw, 7rem);
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.55fr);
  gap: 3rem;
  align-items: end;
  margin-bottom: 2.5rem;
}

.section-heading h2,
.contact-teaser h2,
.contact-intro h1 {
  max-width: 720px;
  margin: 0.55rem 0 0;
  font-size: clamp(2.15rem, 4.5vw, 4rem);
  letter-spacing: -0.05em;
  line-height: 1.03;
}

.section-heading > p {
  margin: 0;
  color: var(--muted);
}

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

.project-item {
  border-bottom: 1px solid var(--line);
}

.project-item summary {
  display: grid;
  grid-template-columns: 55px minmax(180px, 1fr) minmax(160px, 0.55fr) 24px;
  gap: 1rem;
  align-items: center;
  padding: 1.3rem 0;
  cursor: pointer;
  list-style: none;
}

.project-item summary::-webkit-details-marker {
  display: none;
}

.project-item summary:hover .project-title,
.project-item summary:focus-visible .project-title {
  color: var(--accent);
}

.project-number,
.project-type {
  color: var(--muted);
  font-size: 0.72rem;
}

.project-title {
  font-size: 1.15rem;
  font-weight: 500;
  transition: color 150ms ease;
}

.project-toggle {
  position: relative;
  width: 18px;
  height: 18px;
}

.project-toggle::before,
.project-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform 150ms ease;
}

.project-toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.project-item[open] .project-toggle::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.project-item[open] {
  background: color-mix(in srgb, var(--accent-soft) 36%, transparent);
}

.project-item[open] summary {
  padding-inline: 1.25rem;
}

.project-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem 3rem;
  padding: 0 1.25rem 1.75rem 5.7rem;
}

.project-details > p {
  max-width: 700px;
  margin: 0;
  color: var(--muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 0.22rem 0.5rem;
  border: 1px solid var(--line);
  font-size: 0.65rem;
}

.project-status {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.65rem;
}

.principles-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 1px;
  background: var(--line);
  list-style: none;
}

.principles-list li {
  min-height: 220px;
  padding: 1.5rem;
  background: var(--surface);
}

.principles-list li > span {
  color: var(--accent);
  font-size: 0.68rem;
}

.principles-list h3 {
  margin: 3.5rem 0 0.55rem;
  font-size: 1.2rem;
}

.principles-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-teaser {
  display: grid;
  grid-template-columns: 1fr 0.7fr;
  gap: clamp(3rem, 9vw, 9rem);
  margin-bottom: 5rem;
  padding: clamp(2.5rem, 6vw, 4.5rem);
  border: 1px solid var(--line);
  background: var(--surface);
}

.contact-teaser > div:last-child {
  align-self: end;
}

.contact-teaser > div:last-child p {
  margin: 0 0 1.25rem;
  color: var(--muted);
}

.text-link {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
  text-underline-offset: 0.3rem;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--accent);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  padding-block: 1.5rem 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  text-underline-offset: 0.25rem;
}

/* Contact */

.contact-shell {
  min-height: calc(100vh - 82px - 75px);
  padding-block: clamp(4rem, 9vw, 8rem);
}

.contact-intro {
  display: grid;
  grid-template-columns: 1fr 0.65fr;
  gap: clamp(3rem, 10vw, 10rem);
  align-items: end;
  padding-bottom: clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid var(--line);
}

.contact-intro > div:last-child {
  color: var(--muted);
}

.contact-intro > div:last-child p {
  margin-top: 0;
}

.contact-methods {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(3rem, 6vw, 5rem);
  padding: 1px;
  background: var(--line);
}

.contact-method {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: var(--surface);
}

.contact-method span {
  color: var(--accent);
  font-size: 0.68rem;
}

.contact-method h2 {
  margin: auto 0 0.5rem;
  font-size: 1.2rem;
}

.contact-method p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

/* Resume */

.resume-shell {
  padding-block: clamp(4rem, 8vw, 7rem);
}

.resume-intro {
  display: flex;
  gap: 3rem;
  align-items: end;
  justify-content: space-between;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line);
}

.resume-intro h1 {
  margin: 0.8rem 0 0.25rem;
  font-size: clamp(3rem, 7vw, 5.8rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.resume-role {
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.resume-meta {
  display: grid;
  gap: 0.25rem;
  color: var(--muted);
  font-size: 0.72rem;
  text-align: right;
}

.resume-grid {
  display: grid;
  grid-template-columns: minmax(190px, 0.3fr) minmax(0, 1fr);
  gap: clamp(3rem, 7vw, 7rem);
  padding-block: 4rem;
}

.resume-sidebar {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.resume-section-label {
  margin: 0;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.resume-skill-list {
  display: grid;
  gap: 0;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.resume-skill-list li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}

.resume-small-copy,
.sidebar-entry {
  color: var(--muted);
  font-size: 0.85rem;
}

.sidebar-entry {
  display: grid;
  margin-top: 1rem;
}

.sidebar-entry strong {
  color: var(--text);
  font-weight: 500;
}

.resume-main {
  display: grid;
  gap: 4rem;
}

.resume-section {
  display: grid;
  gap: 2rem;
}

.resume-summary {
  max-width: 800px;
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.7;
}

.experience-entry {
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}

.experience-entry header {
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.experience-entry h2,
.resume-project h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 500;
}

.experience-entry header p,
.resume-project span {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.experience-entry ul {
  margin: 1.25rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

.experience-entry li + li {
  margin-top: 0.6rem;
}

.resume-project {
  display: grid;
  grid-template-columns: minmax(180px, 0.4fr) 1fr;
  gap: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.resume-project p {
  margin: 0;
  color: var(--muted);
}

.resume-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
}

@media (max-width: 820px) {
  .site-header,
  main,
  .site-footer {
    width: min(calc(100% - 2rem), var(--max-width));
  }

  .hero,
  .section-heading,
  .contact-teaser,
  .contact-intro {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    gap: 3rem;
  }

  .focus-index {
    max-width: 480px;
  }

  .principles-list,
  .contact-methods {
    grid-template-columns: 1fr;
  }

  .principles-list li,
  .contact-method {
    min-height: 190px;
  }

  .resume-intro {
    align-items: start;
    flex-direction: column;
  }

  .resume-meta {
    text-align: left;
  }

  .resume-grid {
    grid-template-columns: 1fr;
  }

  .resume-sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .site-header {
    min-height: 72px;
  }

  .wordmark > span:last-child {
    display: none;
  }

  .header-actions {
    gap: 1rem;
  }

  .site-nav {
    gap: 1rem;
  }

  .site-nav a {
    font-size: 0.78rem;
  }

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

  .hero {
    padding-block: 4rem;
  }

  .hero h1 {
    font-size: clamp(3rem, 15vw, 4.4rem);
  }

  .section {
    padding-block: 4.5rem;
  }

  .project-item summary {
    grid-template-columns: 32px 1fr 20px;
    gap: 0.65rem;
  }

  .project-type {
    display: none;
  }

  .project-details {
    grid-template-columns: 1fr;
    padding: 0 1rem 1.5rem 3rem;
  }

  .project-item[open] summary {
    padding-inline: 1rem;
  }

  .principles-list li {
    min-height: 170px;
  }

  .principles-list h3 {
    margin-top: 2.5rem;
  }

  .resume-sidebar {
    grid-template-columns: 1fr;
  }

  .experience-entry header,
  .resume-project {
    grid-template-columns: 1fr;
    flex-direction: column;
    gap: 0.75rem;
  }

  .resume-actions,
  .site-footer {
    align-items: start;
    flex-direction: column;
    gap: 0.7rem;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

@media print {
  :root,
  :root[data-theme="light"] {
    color-scheme: light;
    --bg: #ffffff;
    --surface: #ffffff;
    --text: #161918;
    --muted: #4f5552;
    --line: #cdd1cf;
    --accent: #6e3325;
    --grid: transparent;
  }

  body {
    background: #ffffff;
    color: var(--text);
    font-size: 10pt;
  }

  .site-header,
  .site-footer,
  .resume-actions {
    display: none;
  }

  .resume-shell {
    width: 100%;
    padding: 0;
  }

  .resume-intro {
    padding-bottom: 1.5rem;
  }

  .resume-intro h1 {
    font-size: 36pt;
  }

  .resume-grid {
    gap: 2.5rem;
    padding-block: 2rem 0;
  }

  .resume-main,
  .resume-sidebar {
    gap: 1.5rem;
  }

  .experience-entry,
  .resume-project {
    break-inside: avoid;
  }
}
