/* ==========================================================================
   Fonts
   ========================================================================== */

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/instrument-sans-latin.woff2") format("woff2");
  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;
}

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/instrument-sans-latin-ext.woff2") format("woff2");
  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: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/instrument-serif-latin.woff2") format("woff2");
  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;
}

@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/instrument-serif-latin-ext.woff2") format("woff2");
  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: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/instrument-serif-italic-latin.woff2") format("woff2");
  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;
}

@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/instrument-serif-italic-latin-ext.woff2") format("woff2");
  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;
}

/* ==========================================================================
   Base
   ========================================================================== */

:root {
  --bg: #f3f0e8;
  --surface: #fbfaf6;
  --surface-muted: #ece8de;
  --ink: #171715;
  --muted: #68655c;
  --line: rgba(23, 23, 21, 0.12);
  --line-strong: rgba(23, 23, 21, 0.22);
  --accent: #2b4fdc;
  --accent-deep: #1c3bb8;
  --accent-soft: #e3e8fb;
  --accent-light: #9db0ff;
  --font-sans: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-mono: "SFMono-Regular", "Cascadia Code", "Liberation Mono", Menlo, Consolas, monospace;
  --container: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --ease: cubic-bezier(0.22, 0.7, 0.25, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6.5rem;
}

body {
  min-width: 20rem;
  margin: 0;
  overflow-x: hidden;
  background-color: var(--bg);
  background-image: radial-gradient(ellipse at 84% 2%, rgba(43, 79, 220, 0.065), transparent 38rem);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
}

h1,
h2,
h3,
p,
dl,
dd {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

button {
  color: inherit;
  font: inherit;
}

svg {
  display: block;
}

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

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

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

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1000;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.85rem;
  transform: translateY(-150%);
  transition: transform 180ms ease;
}

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

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  background: rgba(243, 240, 232, 0.82);
  transition: border-color 220ms ease, background-color 220ms ease;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(243, 240, 232, 0.94);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: 5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand__mark {
  width: 1.8rem;
  height: 1.8rem;
  flex: none;
  color: var(--ink);
  transition: transform 300ms var(--ease);
}

.brand span {
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand:hover .brand__mark {
  transform: rotate(-12deg);
}

.site-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2.1rem;
}

.nav-link {
  position: relative;
  padding-block: 0.5rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 180ms ease;
}

.nav-link::after {
  position: absolute;
  right: 0;
  bottom: 0.15rem;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms var(--ease);
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--ink);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.62rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.header__cta span {
  transition: transform 180ms ease;
}

.header__cta:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-1px);
}

.header__cta:hover span {
  transform: translate(2px, -2px);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  padding: 0.18rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(251, 250, 246, 0.45);
}

.lang-switch__item {
  display: inline-flex;
  min-width: 2rem;
  min-height: 1.65rem;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.4rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1;
  transition: background-color 180ms ease, color 180ms ease;
}

a.lang-switch__item:hover {
  color: var(--ink);
}

.lang-switch__item[aria-current="page"] {
  background: var(--ink);
  color: var(--bg);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0;
  border: 0;
  background: none;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.nav-toggle__icon {
  display: flex;
  width: 1.1rem;
  height: 0.7rem;
  flex-direction: column;
  justify-content: space-between;
}

.nav-toggle__icon span {
  display: block;
  width: 100%;
  height: 1px;
  background: currentColor;
  transition: transform 220ms var(--ease);
}

.site-header.nav-open .nav-toggle__icon span:first-child {
  transform: translateY(0.3rem) rotate(45deg);
}

.site-header.nav-open .nav-toggle__icon span:last-child {
  transform: translateY(-0.3rem) rotate(-45deg);
}

/* ==========================================================================
   Buttons and links
   ========================================================================== */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 2.95rem;
  padding: 0.78rem 1.3rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease, transform 200ms var(--ease);
}

.button span {
  transition: transform 200ms var(--ease);
}

.button--primary {
  background: var(--ink);
  color: var(--bg);
}

.button--primary:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

.button--primary:hover span {
  transform: translateX(3px);
}

.button--ghost {
  border-color: var(--line-strong);
  background: rgba(251, 250, 246, 0.35);
}

.button--ghost:hover {
  border-color: var(--ink);
  background: var(--surface);
  transform: translateY(-2px);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid currentColor;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.4;
  transition: color 180ms ease, gap 180ms ease;
}

.text-link span {
  transition: transform 180ms ease;
}

.text-link:hover {
  gap: 0.6rem;
  color: var(--accent);
}

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

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  padding-top: clamp(3rem, 6.5vw, 6.25rem);
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.88fr);
  gap: clamp(3rem, 6vw, 6.5rem);
  align-items: center;
  padding-bottom: clamp(4rem, 7vw, 6.5rem);
}

.hero__copy {
  position: relative;
  z-index: 1;
  max-width: 42rem;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 2rem;
  height: 1px;
  background: var(--ink);
  content: "";
}

.hero h1 {
  max-width: 8ch;
  margin-top: 1.1rem;
  font-family: var(--font-serif);
  font-size: clamp(4.4rem, 8.7vw, 8rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.88;
}

.hero h1 em {
  color: var(--accent);
  font-style: italic;
}

.hero__tagline {
  max-width: 31ch;
  margin-top: clamp(1.7rem, 3vw, 2.4rem);
  color: #414039;
  font-size: clamp(1.22rem, 1.75vw, 1.55rem);
  letter-spacing: -0.025em;
  line-height: 1.42;
}

.hero__tagline em {
  font-family: var(--font-serif);
  font-size: 1.13em;
  font-style: italic;
  letter-spacing: -0.01em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: clamp(2rem, 3.5vw, 2.6rem);
}

.hero__visual {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 31rem;
  justify-self: end;
  padding: 1.4rem 0 1.2rem 1.2rem;
}

.hero__visual::before {
  position: absolute;
  z-index: -1;
  inset: 2.6rem -0.4rem -0.2rem 3.2rem;
  border-radius: 1.35rem;
  background: var(--accent-soft);
  content: "";
  transform: rotate(4deg);
}

.code-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 1.1rem;
  background: var(--surface);
  box-shadow: 0 2rem 4.5rem -2.8rem rgba(23, 23, 21, 0.45);
  transform: rotate(-1deg);
  transition: transform 350ms var(--ease), box-shadow 350ms var(--ease);
}

.hero__visual:hover .code-card {
  box-shadow: 0 2.4rem 5rem -2.6rem rgba(23, 23, 21, 0.5);
  transform: rotate(0) translateY(-0.3rem);
}

.code-card__bar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 3.15rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(236, 232, 222, 0.4);
}

.code-card__dots {
  display: flex;
  gap: 0.3rem;
}

.code-card__dots i {
  display: block;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--line-strong);
}

.code-card__dots i:first-child {
  background: #d48770;
}

.code-card__dots i:nth-child(2) {
  background: #c9a85d;
}

.code-card__dots i:last-child {
  background: #739a77;
}

.code-card__file {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.code-card__code {
  margin: 0;
  overflow-x: auto;
  padding: 1.55rem 1.5rem 1.65rem;
  color: #5f5c54;
  font-family: var(--font-mono);
  font-size: clamp(0.7rem, 0.95vw, 0.82rem);
  line-height: 1.85;
  tab-size: 4;
}

.code-card__code code {
  font-family: inherit;
}

.syntax-keyword {
  color: var(--accent);
  font-weight: 600;
}

.syntax-type {
  color: #8c4273;
}

.syntax-function {
  color: #a34b2e;
}

.syntax-string {
  color: #31694e;
}

.code-card__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.9rem 1.2rem 1rem;
  border-top: 1px solid var(--line);
}

.code-card__footer span {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.64rem;
  letter-spacing: 0.02em;
}

.hero__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 2rem;
  align-items: center;
  padding-block: 1.35rem 1.55rem;
  border-top: 1px solid var(--line);
}

.hero__meta > div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.hero__meta span {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero__meta strong {
  font-size: 0.83rem;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.hero__scroll {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
  transition: color 180ms ease, gap 180ms ease;
}

.hero__scroll:hover {
  gap: 0.6rem;
  color: var(--ink);
}

/* ==========================================================================
   Shared section styles
   ========================================================================== */

.section {
  padding-block: clamp(5rem, 9vw, 8.5rem);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.section-label span {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.section-heading__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 1.35rem;
}

.section h2 {
  font-family: var(--font-serif);
  font-size: clamp(2.9rem, 5.2vw, 4.9rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.96;
}

.section h2 em {
  color: var(--accent);
  font-style: italic;
}

/* ==========================================================================
   Work
   ========================================================================== */

.work {
  padding-top: clamp(4.5rem, 8vw, 7.5rem);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.project {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  background: var(--surface);
  transition: border-color 250ms ease, box-shadow 250ms var(--ease), transform 250ms var(--ease);
}

.project:hover,
.project:focus-within {
  border-color: var(--line-strong);
  box-shadow: 0 2rem 3.8rem -3rem rgba(23, 23, 21, 0.42);
  transform: translateY(-0.25rem);
}

.project--featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
}

.project__cover {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--surface-muted);
}

.project--featured .project__cover {
  min-height: 25rem;
  aspect-ratio: auto;
}

.cover {
  position: absolute;
  inset: 0;
  overflow: hidden;
  padding: clamp(1.4rem, 2.5vw, 2rem);
  transition: transform 500ms var(--ease);
}

.project:hover .cover {
  transform: scale(1.018);
}

.project__shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms var(--ease);
}

.project:hover .project__shot {
  transform: scale(1.018);
}

.cover__label,
.cover__caption {
  position: absolute;
  z-index: 2;
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  line-height: 1.4;
  text-transform: uppercase;
}

.cover__label {
  top: clamp(1.4rem, 2.5vw, 2rem);
  left: clamp(1.4rem, 2.5vw, 2rem);
}

.cover__caption {
  right: clamp(1.4rem, 2.5vw, 2rem);
  bottom: clamp(1.3rem, 2.3vw, 1.8rem);
  left: clamp(1.4rem, 2.5vw, 2rem);
}

.cover--7w {
  display: grid;
  place-items: center;
  background: #19233b;
  color: #f5f1e8;
}

.cover--7w::before,
.cover--7w::after {
  position: absolute;
  border: 1px solid rgba(245, 241, 232, 0.17);
  border-radius: 50%;
  content: "";
}

.cover--7w::before {
  top: -24%;
  right: -8%;
  width: 55%;
  aspect-ratio: 1;
}

.cover--7w::after {
  bottom: -48%;
  left: -8%;
  width: 52%;
  aspect-ratio: 1;
}

.cover--7w .cover__label {
  color: rgba(245, 241, 232, 0.58);
}

.cover--7w .cover__caption {
  right: auto;
  color: rgba(245, 241, 232, 0.6);
}

.cover__big {
  position: relative;
  z-index: 1;
  font-family: var(--font-serif);
  font-size: clamp(7rem, 14vw, 12rem);
  letter-spacing: -0.085em;
  line-height: 0.7;
  transform: translateX(-0.02em);
}

.cover__bottom {
  position: absolute;
  z-index: 2;
  right: clamp(1.4rem, 2.5vw, 2rem);
  bottom: clamp(1.3rem, 2.3vw, 1.8rem);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.cover__dots {
  display: flex;
  gap: 0.3rem;
}

.cover__dots i {
  display: block;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
}

.cover__dots i:nth-child(1) {
  background: #e3be5f;
}

.cover__dots i:nth-child(2) {
  background: #5d8c70;
}

.cover__dots i:nth-child(3) {
  background: #6983dc;
}

.cover__dots i:nth-child(4) {
  background: #c16a54;
}

.cover__dots i:nth-child(5) {
  background: #d8a94d;
}

.cover__dots i:nth-child(6) {
  background: #92ad96;
}

.cover__dots i:nth-child(7) {
  background: #9398c9;
}

.cover--books {
  display: grid;
  place-items: center;
  background: #e9e0d0;
  color: #2a2923;
}

.cover--books::before {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(42, 41, 35, 0.06) 1px, transparent 1px);
  background-size: 3.5rem 100%;
  content: "";
}

.cover--books .cover__label {
  color: rgba(42, 41, 35, 0.56);
}

.cover--books .cover__caption {
  color: rgba(42, 41, 35, 0.56);
}

.book-stack {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  gap: 0.42rem;
  transform: rotate(-4deg);
}

.book-stack span {
  position: relative;
  display: block;
  width: clamp(1.9rem, 3.3vw, 2.65rem);
  height: var(--book-height);
  border-radius: 3px 6px 6px 3px;
  background: var(--book-color);
  box-shadow: inset -5px 0 rgba(0, 0, 0, 0.1), 0 0.8rem 1.2rem -0.55rem rgba(30, 30, 20, 0.35);
}

.book-stack span::after {
  position: absolute;
  top: 1.15rem;
  right: 0.5rem;
  left: 0.5rem;
  height: 1px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 0.4rem 0 rgba(255, 255, 255, 0.3);
  content: "";
}

.book-stack span:nth-child(1) {
  --book-height: 6rem;
  --book-color: #3155c9;
}

.book-stack span:nth-child(2) {
  --book-height: 8.25rem;
  --book-color: #c26d4e;
}

.book-stack span:nth-child(3) {
  --book-height: 5.2rem;
  --book-color: #507565;
}

.book-stack span:nth-child(4) {
  --book-height: 7.2rem;
  --book-color: #d2b25d;
}

.book-stack span:nth-child(4)::before {
  position: absolute;
  top: 0;
  right: 0.45rem;
  width: 0.4rem;
  height: 1.25rem;
  background: #f6f2e8;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%);
  content: "";
}

.cover--cube {
  display: grid;
  place-items: center;
  background: #dce5de;
  color: #1d2b22;
}

.cover--cube::before {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(29, 43, 34, 0.19) 0.7px, transparent 0.7px);
  background-size: 1rem 1rem;
  content: "";
  opacity: 0.6;
}

.cover--cube .cover__label {
  color: rgba(29, 43, 34, 0.56);
}

.cover--cube .cover__caption {
  color: rgba(29, 43, 34, 0.56);
}

.cube {
  position: relative;
  z-index: 1;
  display: grid;
  width: clamp(7.4rem, 17vw, 9.4rem);
  aspect-ratio: 1;
  padding: 0.42rem;
  border-radius: 0.9rem;
  background: rgba(29, 43, 34, 0.14);
  box-shadow: 1rem 1rem 0 rgba(29, 43, 34, 0.07);
  gap: 0.25rem;
  grid-template-columns: repeat(3, 1fr);
  transform: perspective(500px) rotateX(10deg) rotateZ(-8deg);
  transition: transform 500ms var(--ease);
}

.project:hover .cube {
  transform: perspective(500px) rotateX(6deg) rotateZ(-5deg) translateY(-0.3rem);
}

.cube i {
  display: block;
  border-radius: 0.3rem;
  background: #f7f5ed;
  box-shadow: inset 0 -3px rgba(0, 0, 0, 0.08);
}

.cube i:nth-child(1) {
  background: #3155c9;
}

.cube i:nth-child(3) {
  background: #d8ae48;
}

.cube i:nth-child(4) {
  background: #4f7f62;
}

.cube i:nth-child(6) {
  background: #c97954;
}

.cube i:nth-child(8) {
  background: #3155c9;
}

.project__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.9rem;
  padding: clamp(1.4rem, 2.6vw, 2rem);
}

.project--featured .project__body {
  justify-content: center;
  padding: clamp(1.8rem, 3.5vw, 3rem);
}

.project__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project__meta span:first-child {
  color: var(--accent);
}

.project h3 {
  font-size: clamp(1.55rem, 2.4vw, 2.15rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.project h3 a {
  transition: color 180ms ease;
}

.project:hover h3 a {
  color: var(--accent);
}

.project p {
  max-width: 55ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.62;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tags li {
  padding: 0.27rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.4;
}

.project__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: auto;
  padding-top: 0.35rem;
}

.project__links a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 0.1rem;
  font-size: 0.78rem;
  font-weight: 600;
  transition: border-color 180ms ease, color 180ms ease;
}

.project__links a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ==========================================================================
   About
   ========================================================================== */

.about {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.about__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(3rem, 8vw, 8rem);
}

.about__intro {
  position: sticky;
  top: 8rem;
  align-self: start;
}

.about__intro h2 {
  margin-top: 1.45rem;
}

.about__content {
  max-width: 41rem;
}

.about__lead {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 2.6vw, 2.35rem);
  letter-spacing: -0.025em;
  line-height: 1.22;
}

.about__content > p:not(.about__lead) {
  margin-top: 1.15rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.72;
}

.skills {
  margin-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
}

.skill-row {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 1.5rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--line);
}

.skill-row dt {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.skill-row dd {
  font-size: 0.95rem;
  line-height: 1.55;
}

.about__link {
  margin-top: 2.15rem;
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(5rem, 9vw, 8.5rem);
  background: var(--ink);
  color: var(--bg);
}

.contact::before {
  position: absolute;
  z-index: -1;
  top: -35%;
  left: -10%;
  width: 50rem;
  height: 50rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(43, 79, 220, 0.3), transparent 65%);
  content: "";
  pointer-events: none;
}

.contact::after {
  position: absolute;
  z-index: -1;
  right: -8rem;
  bottom: -22rem;
  width: 34rem;
  height: 34rem;
  border: 1px solid rgba(243, 240, 232, 0.1);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.contact > .container {
  position: relative;
  z-index: 1;
}

.contact .section-label {
  color: rgba(243, 240, 232, 0.52);
}

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

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(3rem, 7vw, 7rem);
  align-items: end;
  margin-top: 2.5rem;
}

.contact h2 {
  margin-top: 1.25rem;
  color: var(--bg);
  font-family: var(--font-serif);
  font-size: clamp(3.3rem, 6.4vw, 6rem);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 0.92;
}

.contact h2 em {
  color: var(--accent-light);
  font-style: italic;
}

.contact__details {
  padding-bottom: 0.2rem;
}

.contact__details > p {
  max-width: 41ch;
  color: rgba(243, 240, 232, 0.62);
  font-size: 1rem;
  line-height: 1.7;
}

.contact__email {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 100%;
  margin-top: 1.9rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid rgba(243, 240, 232, 0.3);
  color: var(--bg);
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 2.7vw, 2.35rem);
  letter-spacing: -0.025em;
  line-height: 1.2;
  overflow-wrap: break-word;
  transition: border-color 180ms ease, color 180ms ease, gap 180ms ease;
}

.contact__email span {
  flex: none;
  font-family: var(--font-sans);
  font-size: 0.75em;
  transition: transform 180ms ease;
}

.contact__email:hover {
  gap: 1rem;
  border-color: var(--accent-light);
  color: var(--accent-light);
}

.contact__email:hover span {
  transform: translate(2px, -2px);
}

.contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 2.4rem;
}

.contact__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.68rem 0.95rem;
  border: 1px solid rgba(243, 240, 232, 0.2);
  border-radius: 999px;
  color: rgba(243, 240, 232, 0.86);
  font-size: 0.8rem;
  font-weight: 500;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.contact__link svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: currentColor;
}

.contact__link:hover {
  border-color: var(--bg);
  background: var(--bg);
  color: var(--ink);
  transform: translateY(-2px);
}

.contact :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--accent-light);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  padding-block: 1.5rem;
  background: var(--ink);
  color: rgba(243, 240, 232, 0.48);
  font-size: 0.75rem;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(243, 240, 232, 0.11);
}

.footer__inner a {
  color: rgba(243, 240, 232, 0.72);
  transition: color 180ms ease;
}

.footer__inner a:hover {
  color: var(--bg);
}

/* ==========================================================================
   Reveal animation
   ========================================================================== */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(1.2rem);
  transition: opacity 750ms var(--ease) var(--delay, 0ms), transform 750ms var(--ease) var(--delay, 0ms);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1080px) {
  .hero__inner {
    gap: clamp(2.5rem, 4.5vw, 4rem);
  }

  .hero h1 {
    font-size: clamp(4rem, 8.4vw, 6.7rem);
  }

  .hero__visual {
    max-width: 28rem;
  }

  .project--featured .project__cover {
    min-height: 22rem;
  }
}

@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__copy {
    max-width: 43rem;
  }

  .hero h1 {
    font-size: clamp(4.6rem, 12vw, 7.5rem);
  }

  .hero__visual {
    width: min(100%, 34rem);
    max-width: none;
    justify-self: start;
    margin-top: 0.5rem;
  }

  .hero__meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero__scroll {
    display: none;
  }

  .project--featured {
    display: flex;
  }

  .project--featured .project__cover {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .about__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.75rem;
  }

  .about__intro {
    position: static;
  }

  .about__content {
    max-width: 46rem;
  }

  .contact__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 3rem;
  }

  .contact__details {
    max-width: 35rem;
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 5.5rem;
  }

  .header__inner {
    height: 4.5rem;
    gap: 1rem;
  }

  .header__cta {
    display: none;
  }

  .brand {
    margin-right: auto;
  }

  .lang-switch {
    order: 2;
  }

  .site-nav {
    order: 3;
    margin-left: 0;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .js .nav-list {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.4rem var(--gutter) 1rem;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    box-shadow: 0 1.5rem 2rem -1.5rem rgba(23, 23, 21, 0.25);
    opacity: 0;
    transform: translateY(-0.6rem);
    transition: opacity 200ms ease, transform 200ms var(--ease), visibility 200ms;
    visibility: hidden;
  }

  .js .site-header.nav-open .nav-list {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
  }

  .js .nav-list li {
    border-bottom: 1px solid var(--line);
  }

  .js .nav-list li:last-child {
    border-bottom: 0;
  }

  .js .nav-link {
    display: block;
    padding-block: 0.95rem;
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: -0.02em;
  }

  .js .nav-link::after {
    display: none;
  }

  .nav-list li {
    border-bottom: 1px solid var(--line);
  }

  .hero {
    padding-top: 3.25rem;
  }

  .hero__inner {
    padding-bottom: 4rem;
  }

  .hero h1 {
    font-size: clamp(4.2rem, 16vw, 6.7rem);
  }

  .hero__visual {
    max-width: calc(100% - 0.6rem);
  }

  .hero__meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.3rem;
  }

  .section-heading__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.4rem;
  }

  .work-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .project h3 {
    font-size: 1.7rem;
  }

  .about__inner {
    gap: 2.25rem;
  }

}

@media (max-width: 560px) {
  .header__inner {
    gap: 0.6rem;
  }

  .brand__mark {
    width: 1.6rem;
    height: 1.6rem;
  }

  .brand span {
    max-width: 7.5rem;
  }

  .lang-switch {
    padding: 0.14rem;
  }

  .lang-switch__item {
    min-width: 1.75rem;
    min-height: 1.5rem;
    padding: 0.18rem 0.32rem;
    font-size: 0.62rem;
  }

  .hero h1 {
    font-size: clamp(3.6rem, 17vw, 5.2rem);
  }

  .hero__tagline {
    font-size: 1.2rem;
  }

  .hero__actions {
    gap: 0.55rem;
  }

  .button {
    min-height: 2.8rem;
    padding: 0.7rem 1.1rem;
    font-size: 0.84rem;
  }

  .hero__visual {
    padding: 0.2rem 0 0.8rem;
    max-width: 100%;
  }

  .hero__visual::before {
    inset: 1rem -0.25rem -0.3rem 1rem;
  }

  .code-card {
    transform: none;
  }

  .code-card__code {
    padding: 1.25rem 1.1rem 1.4rem;
    font-size: 0.68rem;
    line-height: 1.8;
  }

  .hero__meta {
    gap: 1rem;
    padding-block: 1.15rem 1.3rem;
  }

  .hero__meta strong {
    font-size: 0.78rem;
  }

  .section {
    padding-block: 4.5rem;
  }

  .section h2 {
    font-size: clamp(2.7rem, 13vw, 3.6rem);
  }

  .project--featured .project__cover,
  .project__cover {
    aspect-ratio: 4 / 3;
  }

  .cover__big {
    font-size: clamp(6rem, 28vw, 8rem);
  }

  .cover__bottom {
    gap: 0.6rem;
  }

  .cover__caption {
    font-size: 0.56rem;
  }

  .about__lead {
    font-size: 1.65rem;
  }

  .skill-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.3rem;
    padding-block: 0.9rem;
  }

  .contact h2 {
    font-size: clamp(3rem, 14vw, 4.2rem);
  }

  .contact__email {
    font-size: 1.45rem;
  }

  .contact__links {
    gap: 0.5rem;
  }

  .footer__inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.7rem;
  }
}

@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;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* Keep navigation usable if JavaScript is unavailable. */
@media (max-width: 760px) {
  html.no-js .nav-toggle {
    display: none;
  }

  html.no-js .header__inner {
    height: auto;
    flex-wrap: wrap;
    padding-block: 0.9rem;
  }

  html.no-js .site-nav {
    width: 100%;
    order: 3;
    margin-left: 0;
  }

  html.no-js .nav-list {
    gap: 1.4rem;
  }
}
