/* Design language after gotcha.jurre.me: Nunito, paper white, ink, hairlines, pills. */

:root {
  --bg: #fdfdfd;
  --ink: #1c1c1c;
  --secondary: #8c8c8c;
  --hairline: #ececec;
  --surface: #ffffff;
  --radius: 16px;
  --maxw: 1080px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Nunito", "Avenir Next", Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
}

a:hover {
  border-color: var(--ink);
}

::selection {
  background: var(--ink);
  color: var(--bg);
}

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

.skipLink {
  position: fixed;
  top: -100%;
  left: 16px;
  z-index: 99;
  padding: 10px 18px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  border-radius: 999px;
  border-bottom: none;
}

.skipLink:focus {
  top: 14px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 40px);
  background: rgba(253, 253, 253, 0.72);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
}

.wordmark {
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.headerNav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 26px);
  font-size: 14px;
  font-weight: 700;
  color: var(--secondary);
}

.headerNav a {
  border-bottom: none;
}

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

.navPill {
  color: var(--ink);
  padding: 8px 16px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  transition: border-color 0.15s ease, transform 0.12s ease;
}

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

/* Hero */
.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(64px, 9vh, 104px) clamp(20px, 5vw, 48px) 0;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: min(78vh, 760px);
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--secondary);
  padding: 7px 14px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  margin-bottom: 22px;
}

h1 {
  font-size: clamp(36px, 6.4vw, 64px);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.03;
  margin-bottom: 20px;
  text-wrap: balance;
}

.lede {
  font-size: clamp(17px, 2.3vw, 20px);
  color: var(--secondary);
  font-weight: 600;
  max-width: 42ch;
  text-wrap: pretty;
  margin: 0 0 30px;
}

.lede a {
  color: var(--ink);
  font-weight: 800;
  border-bottom: 1px solid var(--secondary);
}

.ctaRow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-block;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  padding: 13px 24px;
  border-radius: 999px;
  border-bottom: none;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btnGhost {
  display: inline-block;
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
  padding: 12px 22px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--surface);
  transition: border-color 0.15s ease, transform 0.12s ease;
}

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

.microcopy {
  font-size: 13.5px;
  margin-top: 16px;
  color: var(--secondary);
  font-weight: 600;
}

/* Hero photo */
.heroPhoto {
  justify-self: center;
  width: 100%;
  max-width: clamp(280px, 32vw, 380px);
  transform: rotate(1.6deg);
  transition: transform 0.3s var(--ease-out);
}

.heroPhoto:hover {
  transform: rotate(0deg);
}

.heroPhoto img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius) * 1.5);
  border: 1px solid var(--hairline);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.05);
}

/* Features (projects) */
.features {
  max-width: var(--maxw);
  margin: clamp(56px, 9vw, 120px) auto 0;
  padding: 0 clamp(20px, 5vw, 40px);
  display: flex;
  flex-direction: column;
  gap: clamp(56px, 9vw, 120px);
}

.feature {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
}

.feature.reverse .featureText {
  order: 2;
}

.featureNum {
  font-size: 14px;
  font-weight: 800;
  color: var(--secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.featureText h2 {
  font-size: clamp(26px, 3.6vw, 38px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 12px 0 14px;
  text-wrap: balance;
}

.featureText p {
  font-size: clamp(16px, 2vw, 18px);
  font-weight: 600;
  color: var(--secondary);
  max-width: 48ch;
  text-wrap: pretty;
}

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

.chips li {
  font-size: 13px;
  font-weight: 700;
  color: var(--secondary);
  padding: 6px 12px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--surface);
}

.featureLinks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.btnSmall {
  display: inline-block;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 999px;
  border-bottom: none;
  transition: transform 0.12s ease;
}

.btnSmall:hover {
  transform: translateY(-1px);
}

.btnSmallGhost {
  font-size: 14px;
  padding: 9px 16px;
}

.featureArt {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: clamp(220px, 26vw, 300px);
  aspect-ratio: 1;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: calc(var(--radius) * 2);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.05);
  color: var(--ink);
}

.featureArt img {
  display: block;
  width: 52%;
  height: auto;
  border-radius: 22%;
}

.featureArt svg {
  width: 42%;
  height: 42%;
}

/* DRFT iPhone mockup: raw screen layered under the transparent device frame.
   Percentages map the 1320x2868 screen into the 1470x3000 frame artwork. */
.iphoneMock {
  position: relative;
  width: 100%;
  max-width: clamp(240px, 26vw, 290px);
  aspect-ratio: 1470 / 3000;
  margin: 0 auto;
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.18))
    drop-shadow(0 6px 12px rgba(0, 0, 0, 0.1));
}

.iphoneMockScreen,
.iphoneMockFrame {
  position: absolute;
  display: block;
  pointer-events: none;
}

.iphoneMockScreen {
  top: 2.2%;
  left: 5.102%;
  width: 89.796%;
  height: 95.6%;
  object-fit: cover;
  object-position: top center;
  border-radius: 12.5% / 5.75%;
  background: #000;
}

.iphoneMockFrame {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

/* Experience */
.experience {
  max-width: 760px;
  margin: clamp(72px, 12vw, 150px) auto 0;
  padding: 0 clamp(20px, 5vw, 40px);
}

.sectionTitle {
  font-size: clamp(28px, 4.4vw, 44px);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: clamp(28px, 4vw, 44px);
  text-wrap: balance;
}

.xpList {
  list-style: none;
}

.xpRow {
  padding: 22px 0;
  border-top: 1px solid var(--hairline);
}

.xpRow:last-child {
  border-bottom: 1px solid var(--hairline);
}

.xpHead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
}

.xpRole {
  font-weight: 900;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.xpWhen {
  font-size: 13px;
  font-weight: 700;
  color: var(--secondary);
  white-space: nowrap;
}

.xpCompany {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--secondary);
  margin-top: 2px;
}

.xpRow p {
  font-size: 15px;
  font-weight: 600;
  color: var(--secondary);
  margin-top: 8px;
  max-width: 56ch;
  text-wrap: pretty;
}

/* About */
.about {
  max-width: var(--maxw);
  margin: clamp(72px, 12vw, 150px) auto 0;
  padding: 0 clamp(20px, 5vw, 40px);
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}

.aboutPhoto {
  max-width: clamp(240px, 28vw, 340px);
  width: 100%;
  margin: 0 auto;
  transform: rotate(-1.8deg);
  transition: transform 0.3s var(--ease-out);
}

.aboutPhoto:hover {
  transform: rotate(0deg);
}

.aboutPhoto img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius) * 1.5);
  border: 1px solid var(--hairline);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.05);
}

.aboutText .sectionTitle {
  margin-bottom: 0;
}

.aboutText .chips {
  margin-top: 20px;
}

.aboutText .chips li {
  font-size: 14px;
  padding: 8px 16px;
}

.aboutNote {
  font-size: 14px;
  font-weight: 600;
  color: var(--secondary);
  margin-top: 20px;
  max-width: 52ch;
  text-wrap: pretty;
}

.aboutNote + .aboutNote {
  margin-top: 10px;
}

.aboutNote a {
  font-weight: 700;
  border-bottom: 1px solid var(--secondary);
}

/* Closer */
.closer {
  max-width: 640px;
  margin: clamp(72px, 12vw, 150px) auto 0;
  padding: 0 clamp(20px, 5vw, 40px);
  text-align: center;
}

.closer h2 {
  font-size: clamp(30px, 5vw, 50px);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 16px;
  text-wrap: balance;
}

.ledeCenter {
  margin-left: auto;
  margin-right: auto;
}

.ctaRowCenter {
  justify-content: center;
}

/* Footer */
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: clamp(60px, 10vw, 110px) 20px 48px;
  color: var(--secondary);
  font-weight: 700;
  font-size: 14px;
}

.footer span:first-child {
  font-weight: 900;
  color: var(--ink);
}

.footerDot {
  opacity: 0.5;
}

.footer a {
  border-bottom: none;
}

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

/* Legal pages (after the reference design's legal layout) */
.wordmarkLink {
  border-bottom: none;
}

.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(48px, 8vw, 88px) clamp(20px, 5vw, 40px) 0;
}

.legal .eyebrow {
  margin-bottom: 18px;
}

.legal h1 {
  font-size: clamp(34px, 6vw, 54px);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.04;
  margin-bottom: 8px;
}

.legal .updated {
  color: var(--secondary);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 32px;
}

.legal h2 {
  font-size: clamp(21px, 3vw, 27px);
  font-weight: 900;
  letter-spacing: -0.025em;
  margin: 40px 0 12px;
}

.legal h3 {
  font-size: 17px;
  font-weight: 800;
  margin: 22px 0 6px;
}

.legal p,
.legal li {
  font-size: 16px;
  font-weight: 500;
  color: #3a3a3a;
  margin-bottom: 12px;
  text-wrap: pretty;
}

.legal ul,
.legal ol {
  padding-left: 22px;
  margin-bottom: 12px;
}

.legal li {
  margin-bottom: 8px;
}

.legal strong {
  font-weight: 800;
  color: var(--ink);
}

.legal a {
  font-weight: 700;
  border-bottom: 1px solid var(--secondary);
}

.legal a:hover {
  border-color: var(--ink);
}

.legal code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.88em;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 1px 6px;
}

.legalCard {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 14px 0 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.05);
}

.legalCard ul {
  margin-bottom: 0;
}

/* Per-app legal links on project cards */
.legalLinks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 16px;
  font-size: 13.5px;
  font-weight: 700;
}

.legalLinks a {
  color: var(--secondary);
  border-bottom: none;
}

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

/* Motion */
@keyframes reveal {
  0% {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.reveal {
  opacity: 0;
  animation: reveal 0.75s var(--ease-out) both;
}

.scrollReveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}

.scrollReveal.in {
  opacity: 1;
  transform: none;
}

/* No-JS fallback: never hide content when the observer can't run */
html.noJs .scrollReveal {
  opacity: 1;
  transform: none;
}

/* Responsive */
@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: clamp(32px, 7vw, 48px);
    padding-top: clamp(36px, 8vw, 56px);
    text-align: center;
  }

  .heroCopy .lede {
    margin-left: auto;
    margin-right: auto;
  }

  .ctaRow {
    justify-content: center;
  }

  .heroPhoto {
    max-width: clamp(240px, 62vw, 320px);
  }

  .about {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .aboutText {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .aboutText .chips {
    justify-content: center;
  }

  .aboutPhoto {
    order: -1;
    max-width: clamp(220px, 58vw, 300px);
  }
}

@media (max-width: 760px) {
  .feature {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 22px;
  }

  .feature.reverse .featureText {
    order: 0;
  }

  .featureText {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .chips,
  .featureLinks {
    justify-content: center;
  }

  .featureArt {
    max-width: clamp(180px, 52vw, 240px);
    order: -1;
  }

  .iphoneMock {
    max-width: clamp(210px, 56vw, 260px);
    order: -1;
  }

  .xpHead {
    flex-direction: column;
  }
}

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

  .reveal {
    animation: none;
    opacity: 1;
  }

  .scrollReveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .heroPhoto,
  .aboutPhoto,
  .btn,
  .btnGhost,
  .btnSmall,
  .navPill {
    transition: none;
  }
}
