@font-face {
  font-family: "Exo 2";
  src: url("./fonts/exo-2-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Exo 2";
  src: url("./fonts/exo-2-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  font-family: "Exo 2", system-ui, sans-serif;
  color: var(--text);
  background: #141716;
  --canvas: #141716;
  --panel: #1b201e;
  --panel-raised: #202723;
  --line: #343e38;
  --line-strong: #495950;
  --text: #f0f2ed;
  --muted: #b3bcb6;
  --accent: #c4dccb;
  --gutter: clamp(1.125rem, 5vw, 4rem);
  --ease: cubic-bezier(0.2, 0.65, 0.3, 1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(ellipse 45rem 31rem at 87% 14rem, #1c2420, transparent);
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

a {
  color: inherit;
}

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

.skip-link {
  position: fixed;
  z-index: 5;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  color: var(--canvas);
  background: var(--accent);
}

.skip-link:not(:focus) {
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  padding: 0;
}

.shell {
  width: min(100% - 2 * var(--gutter), 70rem);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 2;
  top: 0;
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
}

.header-layout {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 4.5rem;
  column-gap: 1.25rem;
}

.site-name {
  width: clamp(5.5rem, 10vw, 7.125rem);
  min-height: 2.75rem;
  align-content: center;
}

.site-name img {
  width: 128%;
}

.navigation {
  display: flex;
  justify-content: center;
  gap: clamp(0.55rem, 2.25vw, 1.8rem);
  color: var(--muted);
}

.navigation a,
.download,
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: 0.875rem;
  font-weight: 550;
  text-decoration: none;
}

.navigation a:is(:hover, :focus-visible),
.text-link:is(:hover, :focus-visible) {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.download {
  justify-self: end;
  gap: 0.55rem;
  padding-inline: 0.825rem;
  border: 1px solid var(--line-strong);
  color: var(--accent);
  white-space: nowrap;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.download:is(:hover, :focus-visible) {
  border-color: var(--accent);
  background-color: var(--panel-raised);
}

.arrow {
  display: inline-block;
  font-family: system-ui, sans-serif;
  transition: transform 200ms var(--ease);
}

.download:is(:hover, :focus-visible) .arrow {
  transform: translateY(0.12rem);
}

.text-link:is(:hover, :focus-visible) .arrow {
  transform: translate(0.1rem, -0.1rem);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 8vw, 7rem);
  padding-block: clamp(3rem, 8vw, 6.25rem) clamp(3.35rem, 7vw, 5.5rem);
}

.label {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin-block: 0.65rem 1.35rem;
  font-size: clamp(3rem, 7.6vw, 6.25rem);
  font-weight: 465;
  line-height: 0.94;
  letter-spacing: -0.051em;
}

h1 span {
  display: block;
}

.hero-role {
  font-size: clamp(1.1rem, 2vw, 1.42rem);
  font-weight: 550;
  line-height: 1.3;
  text-wrap: balance;
}

.hero-summary {
  max-width: 35rem;
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.5vw, 1.0625rem);
  line-height: 1.65;
  text-wrap: pretty;
}

.portrait {
  justify-self: end;
  width: min(100%, 23rem);
  aspect-ratio: 1.16;
  overflow: hidden;
  padding: 0.45rem;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 0.45rem 0.45rem;
  background-position: center;
}

.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% 50%;
  filter: saturate(0.72) brightness(0.92);
}

.cv-section {
  display: grid;
  grid-template-columns: minmax(9.75rem, 1fr) minmax(0, 3.3fr);
  align-items: start;
  gap: clamp(1.25rem, 4vw, 3.25rem);
  padding-block: clamp(2rem, 4.4vw, 3.5rem);
  border-top: 1px solid var(--line);
  scroll-margin-top: 5rem;
}

.section-title h2 {
  font-size: clamp(1.5rem, 3.15vw, 2.375rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.032em;
}

.section-title p {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.cv-section:target .section-title h2 {
  color: var(--accent);
}

.entries {
  border: 1px solid var(--line);
  background: var(--panel);
}

.entry + .entry,
.education-entry + .education-entry {
  border-top: 1px solid var(--line);
}

.entry summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 1.5rem;
  align-items: center;
  gap: 0.45rem 1.15rem;
  min-height: 4.25rem;
  padding: 0.95rem clamp(0.875rem, 2.7vw, 1.6rem);
  list-style: none;
  cursor: pointer;
  transition: background-color 160ms ease;
}

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

.entry summary:is(:hover, :focus-visible) {
  background-color: var(--panel-raised);
}

.entry summary:focus-visible {
  outline-offset: -3px;
}

.entry-title {
  color: var(--text);
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  font-weight: 600;
  line-height: 1.25;
}

.entry-heading,
.entry-role {
  display: block;
}

.entry-role {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.35;
}

.period {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.toggle {
  position: relative;
  justify-self: center;
  width: 0.82rem;
  height: 0.82rem;
  color: var(--accent);
}

.toggle::before,
.toggle::after {
  position: absolute;
  inset: 50% 0 auto;
  height: 1px;
  background: currentColor;
  content: "";
}

.toggle::after {
  transform: rotate(90deg);
  transition: transform 200ms var(--ease);
}

.entry[open] .toggle::after {
  transform: rotate(0deg);
}

.entry-body {
  padding: 0 1.6rem 1.15rem;
  padding-inline: clamp(0.875rem, 2.7vw, 1.6rem);
}

.entry-body p,
.education-copy,
.project p,
.skill p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  text-wrap: pretty;
}

.entry-body p {
  max-width: 40rem;
}

.project {
  border: 1px solid var(--line-strong);
  background: var(--panel);
}

.project-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1rem, 3vw, 2.25rem);
  padding: clamp(1.25rem, 3.5vw, 2.5rem);
  background: radial-gradient(ellipse at 80% 44%, #26312b, transparent 72%);
}

.project-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  margin-bottom: 0.35rem;
}

.wordmark {
  display: block;
  overflow: hidden;
}

.wordmark img {
  display: block;
  height: auto;
  filter: invert(1);
  mix-blend-mode: screen;
}

.torus-mark {
  width: clamp(6.6rem, 13vw, 9rem);
}

.torus-mark img {
  width: 124%;
}

.project-mark {
  position: relative;
  width: clamp(3.5rem, 6vw, 4.7rem);
  aspect-ratio: 2.35;
  overflow: hidden;
}

.project-mark img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 435%;
  height: auto;
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
}

.powered-mark {
  width: 8.2rem;
}

.powered-mark img {
  width: 111%;
  filter: invert(1) brightness(0.75);
}

.project .project-lead {
  margin-block: 1.15rem 0.45rem;
  color: var(--text);
  font-size: clamp(1.25rem, 2.45vw, 1.75rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.023em;
  text-wrap: balance;
}

.text-link {
  gap: 0.45em;
  color: var(--accent);
}

.project-intro .text-link {
  margin-top: 0.4rem;
}

.project-visual {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
}

.project-visual img {
  display: block;
  width: min(100%, 14.5rem);
  height: auto;
}

.project-visual figcaption {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

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

.project-details summary {
  grid-template-columns: minmax(0, 1fr) 1.5rem;
  min-height: 3.5rem;
}

.project-details .entry-title {
  font-size: 0.96rem;
}

.testing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem 1.35rem;
  align-items: start;
}

.studio-mark {
  width: 9rem;
  margin-bottom: 0.65rem;
}

.studio-mark img {
  width: 115%;
}

.studio-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line-strong);
}

.education-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.3rem 1rem;
  padding: 1rem clamp(0.875rem, 2.7vw, 1.6rem);
}

.education-copy {
  grid-column: 1 / -1;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: var(--panel);
}

.skill {
  padding: 1.15rem clamp(0.875rem, 2.7vw, 1.6rem);
}

.skill:nth-child(even) {
  border-left: 1px solid var(--line);
}

.skill:nth-child(n + 3) {
  border-top: 1px solid var(--line);
}

.skill h3 {
  margin-bottom: 0.25rem;
  font-size: 1rem;
  font-weight: 600;
}

.contact address {
  color: var(--muted);
  font-size: 0.9rem;
  font-style: normal;
}

@media (max-width: 57rem) {
  .hero {
    gap: clamp(1.5rem, 5vw, 3rem);
  }

  .cv-section {
    grid-template-columns: minmax(8rem, 1fr) minmax(0, 3fr);
    gap: clamp(1rem, 3vw, 1.75rem);
  }
}

@media (max-width: 45rem) {
  .site-header {
    position: static;
  }

  .header-layout {
    grid-template-columns: 1fr 1fr;
    padding-top: 0.65rem;
  }

  .navigation {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0 0.5rem;
    margin-top: 0.25rem;
  }

  .navigation a {
    min-height: 2.75rem;
    font-size: 0.8rem;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(7rem, 0.6fr);
    align-items: start;
    gap: 1.25rem;
  }

  h1 {
    font-size: clamp(2.4rem, 7.7vw, 4rem);
  }

  .portrait {
    align-self: center;
  }

  .cv-section {
    grid-template-columns: 1fr;
    scroll-margin-top: 1rem;
  }
}

@media (max-width: 34rem) {
  .navigation {
    column-gap: 0.25rem;
  }

  .navigation a {
    font-size: 0.75rem;
  }

  .hero {
    grid-template-areas:
      "name photo"
      "description description";
    grid-template-columns: minmax(0, 1fr) clamp(4.6rem, 23vw, 7rem);
    align-items: center;
    gap: 1.05rem 0.75rem;
  }

  .hero-intro {
    display: contents;
  }

  .identity {
    grid-area: name;
  }

  .hero-description {
    grid-area: description;
  }

  h1 {
    margin-bottom: 0;
    font-size: clamp(2rem, 7.6vw, 2.75rem);
  }

  .portrait {
    grid-area: photo;
    width: 100%;
    aspect-ratio: 1;
    padding: 0.25rem;
  }

  .project-overview {
    grid-template-columns: 1fr;
  }

  .project-visual {
    padding-top: 0.25rem;
  }

  .project-visual img {
    width: min(81%, 12rem);
  }

  .entry summary {
    grid-template-columns: minmax(0, 1fr) 1.35rem;
  }

  .entry summary .period {
    grid-row: 2;
  }

  .entry summary .toggle {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .project-details summary .toggle {
    grid-row: 1;
  }

  .testing,
  .education-entry,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .skill:nth-child(even) {
    border-left: 0;
  }

  .skill + .skill {
    border-top: 1px solid var(--line);
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .hero-intro,
  .portrait {
    animation: arrive 460ms var(--ease) backwards;
  }

  .portrait {
    animation-delay: 70ms;
  }

  @supports (interpolate-size: allow-keywords) {
    .entry {
      interpolate-size: allow-keywords;
    }

    .entry::details-content {
      block-size: 0;
      overflow: clip;
      opacity: 0;
      transition: block-size 250ms var(--ease), opacity 170ms ease, content-visibility 250ms allow-discrete;
    }

    .entry[open]::details-content {
      block-size: auto;
      opacity: 1;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .download,
  .arrow,
  .entry summary,
  .toggle::after {
    transition: none;
  }

  .download:is(:hover, :focus-visible) .arrow,
  .text-link:is(:hover, :focus-visible) .arrow {
    transform: none;
  }
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(0.45rem);
  }
}
