:root {
  --bg: #ebe6e0;
  --bg-soft: #e1d9cf;
  --fg: #3b2718;
  --muted: #6b5646;
  --line: rgba(59, 39, 24, 0.22);
  --accent: #bf4516;
  --accent-fill: #ee6a38;
  --on-accent: #2a1509;
  --stage-makvia: #f0d2df;
  --stage-modesty: #4e3524;
  --stage-vivid: #d8cfc2;
  --stage-fg: #3b2718;
  --portrait-bg: #e9e5e1;
  --font-display: "Oswald", "Arial Narrow", Impact, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #231711;
    --bg-soft: #2e201a;
    --fg: #efe6dc;
    --muted: #b9a797;
    --line: rgba(239, 230, 220, 0.2);
    --accent: #f27d4d;
    --stage-makvia: #4a2b3b;
    --stage-vivid: #3b3128;
    --stage-fg: #efe6dc;
    color-scheme: dark;
  }
}

:root {
  color-scheme: light
}

body {
  margin: 0
}

img {
  max-width: 100%
}

[hidden] {
  display: none !important
}

:root[data-theme="dark"] {
  --bg: #231711;
  --bg-soft: #2e201a;
  --fg: #efe6dc;
  --muted: #b9a797;
  --line: rgba(239, 230, 220, 0.2);
  --accent: #f27d4d;
  --stage-makvia: #4a2b3b;
  --stage-vivid: #3b3128;
  --stage-fg: #efe6dc;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0;
}

a {
  color: inherit;
}

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

.wrap {
  max-width: 1120px;
  margin: 0 auto;
}

/* top bar */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 14px;
}

.bar nav {
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
}

.bar a {
  text-decoration: none;
  color: var(--muted);
}

.bar a:hover {
  color: var(--fg);
}

.mark {
  color: var(--fg) !important;
  font-weight: 500;
}

.toggle {
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  background: none;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
}

.toggle:hover {
  color: var(--fg);
  border-color: var(--fg);
}

/* hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 40px;
  align-items: end;
  padding-block: 40px 72px;
}

.eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 14px;
  color: var(--accent);
  margin: 0 0 16px;
}

h1 {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  font-size: clamp(54px, 10.5vw, 132px);
  line-height: 0.92;
  letter-spacing: -0.005em;
  margin: 0 0 28px;
  text-wrap: balance;
}

h1 span {
  display: block;
}

.lede {
  font-size: clamp(18px, 2.2vw, 21px);
  max-width: 34em;
  margin: 0 0 32px;
  color: var(--muted);
}

.cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 4px;
  text-decoration: none;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 15px;
  border: 1px solid var(--fg);
}

.btn.solid {
  background: var(--accent-fill);
  border-color: var(--accent-fill);
  color: var(--on-accent);
}

.btn.solid:hover {
  filter: brightness(1.06);
}

.btn.ghost:hover {
  background: var(--fg);
  color: var(--bg);
}

.portrait {
  background: var(--portrait-bg);
  border-radius: 6px;
  aspect-ratio: 4 / 5;
  max-width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.portrait img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

/* section frame */
section {
  padding-block: 64px;
  border-top: 1px solid var(--line);
}

.label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

h2 {
  font-family: var(--font-display);
  font-weight: 500;
  text-transform: uppercase;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1;
  margin: 0;
  letter-spacing: 0.01em;
}

.label p {
  margin: 0;
  color: var(--muted);
  max-width: 30em;
}

/* case studies */
.case {
  margin-bottom: 72px;
}

.case:last-child {
  margin-bottom: 0;
}

.case-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 24px 48px;
  margin-bottom: 20px;
  align-items: start;
}

h3 {
  font-family: var(--font-display);
  font-weight: 500;
  text-transform: uppercase;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.05;
  margin: 0 0 12px;
  letter-spacing: 0.02em;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 12px;
  color: var(--muted);
}

.case-head p {
  margin: 0;
  color: var(--muted);
  max-width: 38em;
}

.stage {
  border-radius: 8px;
  padding: clamp(24px, 4vw, 56px) clamp(16px, 3vw, 48px);
  color: var(--stage-fg);
}

.stage.makvia {
  background: var(--stage-makvia);
}

.stage.modesty {
  background: var(--stage-modesty);
  color: #efe6dc;
}

.stage.vivid {
  background: var(--stage-vivid);
}

.devices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 3vw, 40px);
  align-items: end;
}

.devices figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.devices img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 300px;
}

.devices.stagger figure:nth-child(2) {
  transform: translateY(-4%);
}

.devices.stagger figure:nth-child(3) {
  transform: translateY(-8%);
}

figcaption {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 13px;
  text-align: center;
  opacity: 0.78;
}

.laptops {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 40px);
  align-items: start;
}

.laptops figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.laptops img {
  display: block;
  width: 100%;
  height: auto;
}

/* skills and tools */
.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
}

.two h3 {
  font-size: 22px;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 18px;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

.list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.list li:first-child {
  border-top: 1px solid var(--line);
}

.list small {
  color: var(--muted);
  font-size: 14px;
  text-align: right;
}

.list b {
  font-weight: 500;
}

/* about + contact */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 24px 48px;
}

.about p {
  margin: 0;
  font-size: clamp(19px, 2.4vw, 24px);
  line-height: 1.55;
  max-width: 34em;
}

.contact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-soft);
  border-radius: 6px;
  padding: 28px;
  min-width: 0;
}

.card h3 {
  font-size: 22px;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 16px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  min-width: 0;
}

.row:first-of-type {
  border-top: 0;
}

.row span {
  overflow-wrap: anywhere;
  user-select: all;
}

.copy {
  flex: none;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
  background: none;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 11px;
  cursor: pointer;
}

.copy:hover {
  color: var(--fg);
  border-color: var(--fg);
}

.who {
  margin: 0 0 6px;
  font-weight: 500;
}

footer {
  padding-block: 32px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 820px) {

  .hero,
  .case-head,
  .about {
    grid-template-columns: minmax(0, 1fr);
  }

  .portrait {
    max-width: 360px;
    aspect-ratio: 1 / 1;
  }

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

  .two {
    gap: 40px;
  }

  .hero {
    padding-block: 24px 48px;
  }

  section {
    padding-block: 48px;
  }
}

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

  .devices {
    gap: 8px;
  }

  .devices figcaption {
    font-size: 11px;
    letter-spacing: 0.06em;
  }

  .devices.stagger figure:nth-child(n) {
    transform: none;
  }
}

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