:root {
  color-scheme: light;
  --paper: #eef0ef;
  --ink: #20292e;
  --muted: #687277;
  --line: #c9cfce;
  --accent: #7c9192;
  --accent-soft: #d8dfdd;
  --deep: #303b40;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 5px;
}

.site-header {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 5vw, 88px);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -.09em;
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: clamp(18px, 3vw, 48px);
}

.site-header nav a,
.site-footer a {
  font-size: .875rem;
  text-decoration: none;
  transition: opacity .18s ease;
}

.site-header nav a:hover,
.site-footer a:hover {
  color: var(--accent);
}

.hero {
  display: grid;
  grid-template-columns: 52% 48%;
  min-height: calc(100svh - 72px);
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(36px, 8vh, 100px);
  padding: clamp(40px, 7vw, 110px);
}

.hero h1 {
  margin: 0;
  font-size: clamp(4rem, 8.2vw, 9rem);
  font-weight: 700;
  letter-spacing: -.09em;
  line-height: .92;
  animation: enter .6s ease-out both;
}

.hero h1 span {
  display: block;
}

.hero-role {
  margin: 32px 0 0;
  font-size: clamp(1.1rem, 1.7vw, 1.5rem);
  line-height: 1.4;
  letter-spacing: -.025em;
  animation: enter .6s .12s ease-out both;
}

.text-link {
  display: inline-flex;
  gap: 28px;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--accent);
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  transition: gap .18s ease;
}

.text-link:hover {
  gap: 38px;
}

.hero-image {
  min-width: 0;
  overflow: hidden;
  background: var(--accent-soft);
}

.hero-image img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: calc(100svh - 72px);
  object-fit: cover;
  object-position: right 42%;
  filter: grayscale(1) contrast(.96);
}

.section {
  padding: clamp(80px, 10vw, 160px) clamp(24px, 7vw, 110px);
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(44px, 6vw, 88px);
}

.section h2 {
  margin: 0;
  font-size: clamp(3rem, 6.5vw, 7rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.075em;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}

.project-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(32px, 6vw, 96px);
  padding: 44px 0;
  border-top: 1px solid var(--accent);
}

.project-row:last-child {
  border-bottom: 1px solid var(--accent);
}

.projects-hint {
  display: none;
}

.project-preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(240px, 30vw, 430px);
  overflow: hidden;
  background: var(--accent-soft);
}

.project-preview::before {
  position: absolute;
  inset: 11%;
  border: 1px solid currentColor;
  content: "";
  opacity: .4;
}

.project-preview span {
  font-size: clamp(8rem, 19vw, 19rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.12em;
  transition: transform .3s ease;
}

.project-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.project-preview-link {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.project-preview-link:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: -8px;
}

.project-row:hover .project-preview span {
  transform: scale(1.06);
}

.project-row:hover .project-preview img {
  transform: scale(1.04);
}

.project-row:nth-child(even) .project-preview {
  background: var(--deep);
  color: var(--paper);
}

.project-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.project-number {
  font-size: .8rem;
  color: var(--muted);
}

.project-row h3 {
  width: 100%;
  margin: 22px 0 14px;
  font-size: clamp(2rem, 4vw, 4.5rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.065em;
}

.project-row p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.project-prompt {
  margin-top: 46px;
  padding-top: 10px;
  border-top: 1px solid var(--accent);
  font-size: .85rem;
  overflow-wrap: anywhere;
}

.project-prompt a:hover {
  color: var(--accent);
}

.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.about .section-heading {
  margin: 0;
}

.about-content {
  max-width: 750px;
}

.about-statement {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 5.5rem);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -.07em;
}

.about-description {
  max-width: 580px;
  margin: 44px 0 0;
  font-size: 1.1rem;
  line-height: 1.65;
}

.about-fields {
  display: flex;
  gap: 32px;
  margin-top: 70px;
  padding-top: 18px;
  border-top: 1px solid var(--accent);
  font-size: .9rem;
}

.about-fields span::before {
  content: "↗";
  margin-right: 10px;
}

/* ---------- Contact ---------- */

.contact {
  min-height: 580px;
  background: var(--deep);
  color: var(--paper);
}

.contact .section-heading {
  margin-bottom: clamp(44px, 6vw, 88px);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.contact-statement {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4.5rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.065em;
}

.contact-description {
  max-width: 460px;
  margin: 32px 0 0;
  color: #aeb8ba;
  font-size: 1.05rem;
  line-height: 1.6;
}

.contact-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--accent);
}

.contact-list li {
  border-bottom: 1px solid var(--accent);
}

.contact-list a,
.contact-row-static {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: baseline;
  gap: 16px;
  padding: 24px 0;
  text-decoration: none;
  transition: padding .18s ease, color .18s ease;
}

.contact-list a:hover {
  padding-left: 12px;
  color: var(--accent);
}

.contact-label {
  font-size: .8rem;
  color: #aeb8ba;
}

.contact-value {
  font-size: clamp(1rem, 1.6vw, 1.4rem);
  letter-spacing: -.03em;
  overflow-wrap: anywhere;
}

.contact-arrow {
  transition: transform .18s ease;
}

.contact-list a:hover .contact-arrow {
  transform: translate(4px, -4px);
}

.contact-email {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  width: 100%;
  margin-top: clamp(60px, 9vw, 140px);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--paper);
  font-size: clamp(2.4rem, 7.3vw, 8rem);
  line-height: 1;
  letter-spacing: -.075em;
  text-decoration: none;
  transition: color .18s ease, border-color .18s ease;
}

.contact-email:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- Footer ---------- */

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(24px, 7vw, 110px);
  border-top: 1px solid var(--accent);
  background: var(--deep);
  color: var(--paper);
  font-size: .875rem;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Skills marquee ---------- */

.skills-marquee {
  width: 100%;
  overflow: hidden;
  padding: 30px 0;
  position: relative;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.skills-track {
  display: flex;
  width: max-content;
  animation: skills-scroll 25s linear infinite;
}

.skill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 40px;
  color: var(--deep);
  font-size: 20px;
  font-weight: 500;
  white-space: nowrap;
}

.skill i {
  font-size: 30px;
}

@keyframes skills-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

/* ---------- Mobile ---------- */

@media (max-width: 760px) {
  .site-header {
    min-height: 64px;
    height: auto;
    gap: 12px 20px;
    padding: 14px 20px;
  }

  .site-header nav {
    flex: 1 1 210px;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px 14px;
  }

  .site-header nav a {
    font-size: .78rem;
  }

  .hero {
    display: grid;
    grid-template-columns: 52% 48%;
    min-height: calc(100svh - 64px);
  }

  .hero-content {
    min-height: 0;
    gap: 24px;
    padding: 24px 14px;
  }

  .hero h1 {
    font-size: clamp(2.4rem, 12vw, 5rem);
  }

  .hero-role {
    margin-top: 16px;
    font-size: clamp(.75rem, 3vw, 1.05rem);
  }

  .hero-image {
    height: auto;
    min-height: 0;
  }

  .hero-image img {
    max-height: calc(100svh - 64px);
    object-position: right 39%;
  }

  .section {
    padding: 80px 24px;
  }

  .section-heading {
    display: block;
  }

  .section-heading p {
    margin-top: 18px;
  }

  .projects .section-heading {
    margin-bottom: 36px;
  }

  .project-list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 82vw);
    gap: 18px;
    margin-right: -24px;
    padding-right: 24px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .project-list::-webkit-scrollbar {
    display: none;
  }

  .project-list:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: -2px;
  }

  .project-row,
  .project-row:last-child {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    gap: 22px;
    padding: 16px 0 8px;
    border-bottom: 0;
    scroll-snap-align: start;
  }

  .project-preview {
    min-height: 0;
    height: clamp(220px, 64vw, 360px);
  }

  .project-preview span {
    font-size: clamp(9rem, 38vw, 13rem);
  }

  .project-info {
    justify-content: flex-start;
  }

  .project-row h3 {
    margin: 14px 0 10px;
    font-size: clamp(2rem, 8vw, 3.5rem);
  }

  .project-prompt {
    margin-top: 24px;
  }

  .projects-hint {
    display: flex;
    justify-content: space-between;
    max-width: 82vw;
    margin: 24px 0 0;
    font-size: .85rem;
    color: var(--muted);
  }

  .about {
    display: block;
  }

  .about .section-heading {
    margin-bottom: 40px;
  }

  .about-description {
    margin-top: 28px;
  }

  .about-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-top: 46px;
    padding-top: 0;
  }

  .about-fields span {
    padding: 18px 0;
  }

  .about-fields span+span {
    padding-left: 20px;
    border-left: 1px solid var(--ink);
  }

  .contact {
    min-height: 0;
  }

  .contact .section-heading {
    margin-bottom: 40px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-list a,
  .contact-row-static {
    grid-template-columns: 70px 1fr auto;
    padding: 20px 0;
  }

  .contact-email {
    margin-top: 56px;
    font-size: clamp(2.4rem, 13vw, 4rem);
  }

  .site-footer {
    flex-wrap: wrap;
    padding: 28px 24px;
  }
}

@media (max-width: 390px) {
  .site-header nav {
    gap: 10px;
  }

  .site-header nav a {
    font-size: .72rem;
  }

  .hero h1 {
    font-size: 3.7rem;
  }

  .project-list {
    grid-auto-columns: minmax(0, 78vw);
  }

  .projects-hint {
    max-width: 78vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}