:root {
  --paper: #f4f1ea;
  --ink: #171816;
  --muted: #696a64;
  --line: #cbc8bf;
  --accent: #d55332;
  --max-width: 1180px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --sans: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --mono: "DM Mono", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 0;
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.55rem 0.8rem;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-150%);
}

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

.site-header,
main,
footer {
  width: min(100% - (2 * var(--gutter)), var(--max-width));
  margin-inline: auto;
}

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

.wordmark {
  display: grid;
  width: 2.65rem;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease;
}

.wordmark:hover,
.wordmark:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

nav {
  display: flex;
  gap: clamp(1.1rem, 3vw, 2.5rem);
}

nav a {
  position: relative;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

nav a::after {
  position: absolute;
  right: 0;
  bottom: -0.3rem;
  left: 0;
  height: 1px;
  background: var(--accent);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

nav a:hover::after,
nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

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

.hero {
  display: flex;
  min-height: clamp(17rem, 38vh, 22rem);
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(3rem, 5vh, 4rem) 0 clamp(2.5rem, 4vh, 3.5rem);
}

.eyebrow,
.section-label span,
.project-meta,
.interest-list span,
footer {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
}

h1 {
  max-width: 100%;
  margin: 1rem 0 1.2rem;
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1;
}

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

.hero-profile {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.hero-profile p {
  margin: 0;
}

.hero-profile a {
  width: fit-content;
  color: inherit;
  font-family: var(--mono);
  font-size: 0.74rem;
  text-decoration-color: var(--line);
  text-underline-offset: 0.25rem;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

.hero-profile a:hover,
.hero-profile a:focus-visible {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.hero-footer {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-bottom: 1px solid currentColor;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  transition: border-color 180ms ease, color 180ms ease;
}

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

.section {
  padding: clamp(5rem, 11vw, 9rem) 0;
  border-top: 1px solid var(--line);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(9rem, 1fr) minmax(0, 2fr);
  gap: clamp(2rem, 8vw, 8rem);
}

.section-label {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

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

.section-label h2 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-copy {
  max-width: 47rem;
}

.about-copy > p {
  max-width: 42rem;
  color: var(--muted);
}

.about-copy .lead {
  margin: 0 0 2rem;
  color: var(--ink);
  font-size: clamp(1.75rem, 3.2vw, 2.8rem);
  letter-spacing: -0.045em;
  line-height: 1.25;
}

strong {
  color: var(--ink);
  font-weight: 600;
}

.interest-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-top: clamp(3rem, 7vw, 5rem);
  border-top: 1px solid var(--line);
}

.interest-list div {
  padding: 1.3rem 1rem 0 0;
}

.interest-list div + div {
  padding-left: 1.5rem;
  border-left: 1px solid var(--line);
}

.interest-list span {
  color: var(--muted);
}

.interest-list p {
  margin: 0.35rem 0 0;
  font-size: 1.05rem;
  line-height: 1.4;
}

.education {
  margin-top: 4rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--line);
}

.education-heading {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.education h3 {
  margin: 1.25rem 0 0.1rem;
  font-size: clamp(1.55rem, 2.8vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.25;
}

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

.work-heading {
  margin-bottom: clamp(3rem, 7vw, 5.5rem);
}

.project {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(15rem, 0.65fr);
  gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(2.5rem, 5vw, 4.5rem) 0;
  border-top: 1px solid var(--line);
}

.project:last-child {
  padding-bottom: 0;
}

.project-meta {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1.25rem;
  color: var(--muted);
}

.project-body {
  min-width: 0;
  max-width: 47rem;
  padding-top: 2.15rem;
}

.project-image {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #e9e6df;
}

.project-image::after {
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  content: "";
  pointer-events: none;
  transition: border-color 180ms ease;
}

.project-image img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  transition: transform 350ms ease;
}

.project-image:hover::after,
.project-image:focus-visible::after {
  border-color: var(--accent);
}

.project-image:hover img,
.project-image:focus-visible img {
  transform: scale(1.012);
}

.project-image--dashboard {
  aspect-ratio: 16 / 9;
}

.project-image--dashboard img {
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.project h3 {
  margin: -0.15em 0 0.4rem;
  font-size: clamp(2rem, 3.6vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.05;
}

.project-subtitle {
  max-width: 35rem;
  margin: 0 0 1.6rem;
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 500;
  line-height: 1.5;
}

.project-body > p:not(.project-subtitle) {
  max-width: 41rem;
  color: var(--muted);
}

.project-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.8rem;
}

.contact {
  display: flex;
  min-height: 28rem;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3rem;
  padding: clamp(5rem, 11vw, 9rem) 0;
  border-top: 1px solid var(--line);
}

.contact h2 {
  margin: 0.7rem 0 0;
  font-size: clamp(2rem, 4.8vw, 4.4rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.12;
}

.email-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: clamp(0.74rem, 1.2vw, 0.9rem);
  text-decoration: none;
  transition: border-color 180ms ease, color 180ms ease;
}

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

footer {
  display: flex;
  justify-content: space-between;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

footer p {
  margin: 0;
}

@media (max-width: 860px) {
  .site-header {
    min-height: 5rem;
  }

  .hero {
    min-height: 17rem;
    padding-block: 2.75rem 2.25rem;
  }

  h1 {
    font-size: clamp(1.9rem, 7vw, 2.35rem);
  }

  .hero-footer,
  .contact {
    align-items: flex-start;
    flex-direction: column;
  }

  .two-column,
  .project {
    grid-template-columns: 1fr;
  }

  .two-column,
  .project {
    gap: 2rem;
  }

  .project-meta {
    gap: 1.25rem;
  }

  .project-body {
    padding-top: 0;
  }

  .contact {
    min-height: 24rem;
    justify-content: space-between;
  }

  footer {
    gap: 1rem;
  }
}

@media (max-width: 460px) {
  nav {
    gap: 1rem;
  }

  nav a {
    font-size: 0.68rem;
  }

  .interest-list {
    grid-template-columns: 1fr;
  }

  .interest-list div + div {
    margin-top: 1rem;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .project-meta,
  footer {
    flex-direction: column;
  }

  .email-link {
    word-break: break-all;
  }
}

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

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