:root {
  --bg: #f2efe8;
  --bg-raised: #e9e4da;
  --text: #111110;
  --muted: #6e6a62;
  --line: rgba(17, 17, 16, 0.16);
  --line-strong: rgba(17, 17, 16, 0.36);
  --accent: #ff583d;
  --accent-contrast: #111110;
  --header: rgba(242, 239, 232, 0.86);
  --shadow: 0 35px 90px rgba(32, 27, 20, 0.18);
  --content: 1120px;
  --wide: 1320px;
  --display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, serif;
  --body: "Avenir Next", Avenir, "Helvetica Neue", Helvetica, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

html[data-theme="dark"] {
  --bg: #0d0d0d;
  --bg-raised: #171716;
  --text: #f1eee7;
  --muted: #aaa69d;
  --line: rgba(241, 238, 231, 0.15);
  --line-strong: rgba(241, 238, 231, 0.34);
  --accent: #ff6b50;
  --accent-contrast: #0d0d0d;
  --header: rgba(13, 13, 13, 0.86);
  --shadow: 0 38px 90px rgba(0, 0, 0, 0.46);
}

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

html {
  min-height: 100%;
  background: var(--bg);
  color-scheme: light;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

body {
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, transparent calc(50% - 0.5px), var(--line) 50%, transparent calc(50% + 0.5px)) top center / min(100% - 40px, var(--content)) 100% no-repeat,
    var(--bg);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 240ms ease, color 240ms ease;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
  font: inherit;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

::selection {
  background: var(--accent);
  color: var(--accent-contrast);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 0.75rem;
  transform: translateY(-180%);
}

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

.content-column,
.header-inner {
  width: min(calc(100% - 40px), var(--content));
  margin-inline: auto;
}

.content-wide {
  width: min(calc(100% - 40px), var(--wide));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: var(--header);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.header-inner {
  display: grid;
  min-height: 72px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
}

.monogram {
  width: fit-content;
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.08em;
}

.monogram span {
  color: var(--accent);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 32px);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.primary-nav a,
.social-links a {
  position: relative;
  color: var(--muted);
  transition: color 160ms ease;
}

.primary-nav a::after,
.social-links a::after {
  position: absolute;
  right: 0;
  bottom: -5px;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.primary-nav a:hover,
.social-links a:hover {
  color: var(--text);
}

.primary-nav a:hover::after,
.social-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.language-toggle,
.theme-toggle {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.language-toggle {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.language-toggle .is-active {
  color: var(--text);
  font-weight: 700;
}

.theme-toggle {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: border-color 160ms ease, transform 160ms ease;
}

.theme-toggle:hover {
  border-color: var(--line-strong);
  transform: rotate(8deg);
}

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

.theme-icon--moon,
html[data-theme="dark"] .theme-icon--sun {
  display: none;
}

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

.hero {
  position: relative;
  display: grid;
  min-height: calc(100svh - 72px);
  grid-template-columns: minmax(40px, 0.18fr) minmax(0, 0.82fr);
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-block: clamp(88px, 12vw, 154px) clamp(72px, 9vw, 112px);
}

.hero-index,
.section-marker {
  align-self: start;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
}

.hero-index {
  padding-top: 11px;
  animation: fade-in 700ms 140ms ease both;
}

.hero-main {
  max-width: 960px;
}

.eyebrow {
  color: var(--muted);
  font-family: var(--mono);
  font-size: clamp(0.68rem, 1vw, 0.76rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow {
  animation: fade-up 700ms 120ms ease both;
}

.hero h1 {
  margin-top: 18px;
  font-family: var(--display);
  font-size: clamp(5rem, 13vw, 10rem);
  font-weight: 400;
  letter-spacing: -0.09em;
  line-height: 0.77;
  animation: fade-up 850ms 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero h1 span,
.project-intro h2 span {
  color: var(--accent);
}

.hero-statement {
  max-width: 670px;
  margin-top: clamp(32px, 5vw, 54px);
  font-family: var(--display);
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  letter-spacing: -0.025em;
  line-height: 1.26;
  animation: fade-up 800ms 260ms ease both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 34px;
  animation: fade-up 800ms 340ms ease both;
}

.text-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 0.75rem;
  transition: border-color 160ms ease, color 160ms ease;
}

.text-link span:last-child {
  transition: transform 160ms ease;
}

.text-link:hover {
  border-color: var(--text);
}

.text-link:hover span:last-child {
  transform: translate(2px, -2px);
}

.text-link--primary {
  color: var(--accent);
}

.hero-note {
  position: absolute;
  right: 0;
  bottom: 26px;
  max-width: 240px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.66rem;
  text-align: right;
  animation: fade-in 900ms 480ms ease both;
}

.section,
.project-intro,
.contact-section {
  display: grid;
  grid-template-columns: minmax(40px, 0.18fr) minmax(220px, 0.28fr) minmax(0, 0.54fr);
  column-gap: clamp(24px, 4vw, 62px);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(76px, 10vw, 132px);
}

.section-heading h2,
.project-intro h2,
.contact-copy h2 {
  margin-top: 10px;
  font-family: var(--display);
  font-size: clamp(2.45rem, 5vw, 4.5rem);
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.section-body {
  max-width: 640px;
}

.section-body p,
.project-summary p {
  color: var(--muted);
  font-size: clamp(0.98rem, 1.5vw, 1.08rem);
}

.section-body .lead,
.project-summary .lead {
  color: var(--text);
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.7vw, 2.15rem);
  letter-spacing: -0.025em;
  line-height: 1.3;
}

.about-copy p + p,
.project-summary p + p {
  margin-top: 24px;
}

.about-layout {
  max-width: 720px;
}

.project-section {
  border-bottom: 1px solid var(--line);
  background: var(--bg-raised);
  transition: background-color 240ms ease;
}

.project-intro {
  border-bottom: 0;
}

.project-summary .text-link {
  margin-top: 30px;
}

.project-visual {
  position: relative;
  min-height: clamp(500px, 64vw, 810px);
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 25% 100%,
    var(--bg);
}

.project-wordmark {
  position: absolute;
  top: -0.14em;
  left: 50%;
  color: var(--text);
  font-family: var(--body);
  font-size: clamp(7rem, 22vw, 20rem);
  font-weight: 800;
  letter-spacing: -0.09em;
  line-height: 1;
  opacity: 0.035;
  transform: translateX(-50%);
  user-select: none;
  white-space: nowrap;
}

.screen-composition {
  position: absolute;
  inset: clamp(48px, 7vw, 92px) clamp(18px, 4vw, 64px) 0;
}

.phone {
  position: absolute;
  overflow: hidden;
  border: clamp(4px, 0.65vw, 8px) solid var(--text);
  border-radius: clamp(22px, 4vw, 48px);
  background: var(--text);
  box-shadow: var(--shadow);
  transition: border-color 240ms ease, transform 300ms ease;
}

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

.phone [data-shot-theme="dark"],
html[data-theme="dark"] .phone [data-shot-theme="light"] {
  display: none;
}

html[data-theme="dark"] .phone [data-shot-theme="dark"] {
  display: block;
}

.phone--habits {
  z-index: 3;
  bottom: -12%;
  left: 50%;
  width: clamp(230px, 29vw, 385px);
  aspect-ratio: 1179 / 2556;
  transform: translateX(-50%);
}

.phone--stats,
.phone--profile {
  z-index: 2;
  bottom: -7%;
  width: clamp(190px, 24vw, 320px);
  aspect-ratio: 1179 / 2556;
}

.phone--stats {
  left: 11%;
  transform: rotate(-6deg);
}

.phone--profile {
  right: 11%;
  transform: rotate(6deg);
}

.screen-composition:hover .phone--stats {
  transform: translateX(-10px) rotate(-7deg);
}

.screen-composition:hover .phone--profile {
  transform: translateX(10px) rotate(7deg);
}

.project-details {
  padding-block: clamp(48px, 7vw, 82px);
}

.project-details dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.project-details div {
  border-top: 1px solid var(--line-strong);
  padding-top: 14px;
}

.project-details dt,
.credential-date {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-details dd {
  margin-top: 10px;
  font-size: 0.86rem;
  line-height: 1.5;
}

.credential {
  border-top: 1px solid var(--line-strong);
  padding-top: 18px;
}

.credential h3 {
  max-width: 540px;
  margin-top: 20px;
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.7vw, 2.1rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.credential h3 + p {
  margin-top: 10px;
  color: var(--muted);
}

.capabilities {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
  margin-top: 60px;
  border-top: 1px solid var(--line);
}

.capabilities p {
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.contact-section {
  min-height: 72vh;
  align-items: start;
  border-bottom: 0;
}

.contact-copy {
  grid-column: 2 / 4;
}

.contact-copy h2 {
  max-width: 820px;
  font-size: clamp(3.2rem, 8vw, 7.8rem);
  line-height: 0.91;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: clamp(42px, 7vw, 72px);
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: clamp(0.75rem, 1.5vw, 0.92rem);
  transition: border-color 160ms ease, color 160ms ease;
}

.contact-email:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.social-links {
  display: flex;
  grid-column: 2 / 4;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 70px;
  font-family: var(--mono);
  font-size: 0.72rem;
}

.site-footer {
  display: flex;
  min-height: 110px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.64rem;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 860px) {
  body {
    background: var(--bg);
  }

  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .primary-nav {
    display: none;
  }

  .hero,
  .section,
  .project-intro,
  .contact-section {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .hero-main,
  .section-heading,
  .section-body,
  .contact-copy,
  .social-links {
    grid-column: 2;
  }

  .section-heading {
    margin-bottom: 48px;
  }

  .section-body {
    max-width: none;
  }

  .project-details dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px 24px;
  }

  .project-visual {
    min-height: clamp(480px, 90vw, 690px);
  }

  .phone--stats {
    left: 3%;
  }

  .phone--profile {
    right: 3%;
  }

  .contact-section {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .content-column,
  .header-inner,
  .content-wide {
    width: min(calc(100% - 28px), var(--content));
  }

  .header-inner {
    min-height: 64px;
  }

  .hero {
    min-height: calc(100svh - 64px);
    grid-template-columns: 28px minmax(0, 1fr);
    padding-top: 72px;
  }

  .hero h1 {
    font-size: clamp(4.5rem, 24vw, 7rem);
  }

  .hero-note {
    display: none;
  }

  .section,
  .project-intro,
  .contact-section {
    grid-template-columns: 28px minmax(0, 1fr);
    column-gap: 16px;
  }

  .section-heading {
    margin-bottom: 36px;
  }

  .project-visual {
    min-height: 500px;
  }

  .screen-composition {
    inset-inline: 0;
  }

  .phone--habits {
    width: 54vw;
  }

  .phone--stats,
  .phone--profile {
    width: 44vw;
  }

  .phone--stats {
    left: -11%;
  }

  .phone--profile {
    right: -11%;
  }

  .project-details dl,
  .capabilities {
    grid-template-columns: 1fr;
  }

  .capabilities p:last-child {
    border-bottom: 0;
  }

  .contact-copy h2 {
    font-size: clamp(3.2rem, 15vw, 5.4rem);
  }

  .contact-email {
    align-items: flex-start;
    overflow-wrap: anywhere;
  }

  .site-footer {
    min-height: 130px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
  }
}

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

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