/* ─── FONTS ─────────────────────────────────────── */
@font-face {
  font-family: 'RSM';
  src: url('assets/fonts/PPRightSerifMono-Fine.otf') format('opentype');
  font-weight: 300;
}
@font-face {
  font-family: 'RSM';
  src: url('assets/fonts/PPRightSerifMono-Regular.otf') format('opentype');
  font-weight: 400;
}
@font-face {
  font-family: 'RSM';
  src: url('assets/fonts/PPRightSerifMono-Dark.otf') format('opentype');
  font-weight: 700;
}

/* ─── TOKENS ────────────────────────────────────── */
:root {
  --accent: #fefe78;
  --accent-r: 254;
  --accent-g: 254;
  --accent-b: 120;
  --color-warm: #fe9878;     /* warm coral/orange */
  --color-cool: #78c8fe;     /* cool sky blue */
  --color-mint: #78feb4;     /* fresh mint green */
  --color-rose: #fe78a8;     /* soft rose pink */
  --color-lilac: #b878fe;    /* muted lilac */
  --bg: #111111;
  --bg-card: #0a0a0a;
  --border: var(--accent);
  --border-subtle: var(--accent);
  --text: rgba(255, 255, 255, 0.8);
  --text-dim: rgba(255, 255, 255, 0.48);
  --gap: clamp(20px, 4vw, 60px);
  --radius: clamp(28px, 5vw, 60px);  /* large rounded corner — used only top-left */
}

/* ─── RESET ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'RSM', 'Courier New', monospace;
  font-weight: 400;
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ─── SCROLLBAR ─────────────────────────────────── */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.25); border-radius: 2px; transition: background 0.2s; }
::-webkit-scrollbar-thumb:hover { background: rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.65); }

/* ─── UTILITIES ─────────────────────────────────── */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 100px);
}

.section-label {
  font-size: clamp(13px, 1.2vw, 17px);
  letter-spacing: 0.25em;
  color: var(--text-dim);
  text-transform: lowercase;
}

.section-rule {
  border: none;
  border-top: 1px solid var(--accent);
  margin: 0;
}

/* ─── REVEAL ANIMATION ──────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ─── CHECKERBOARD ──────────────────────────────── */
.checker {
  width: clamp(48px, 5vw, 72px);
  height: clamp(48px, 5vw, 72px);
  background-image:
    linear-gradient(45deg, var(--accent) 25%, transparent 25%),
    linear-gradient(-45deg, var(--accent) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--accent) 75%),
    linear-gradient(-45deg, transparent 75%, var(--accent) 75%);
  background-size: 8px 8px;
  background-position: 0 0, 0 4px, 4px -4px, -4px 0;
  opacity: 0.7;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════ */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: clamp(16px, 2.5vw, 28px) var(--gap) clamp(12px, 1.8vw, 20px);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  background: var(--bg);
  border-bottom: 1px solid var(--accent);
  pointer-events: none;
  box-shadow: 0 12px 40px rgba(0,0,0,0.7), 0 4px 16px rgba(0,0,0,0.5);
}
header > * { pointer-events: auto; }

.logo {
  display: flex;
  align-items: flex-end;
}

.logo img {
  height: clamp(30px, 3.5vw, 48px);
  width: auto;
}

nav {
  display: flex;
  gap: clamp(20px, 3vw, 40px);
  align-items: flex-end;
}

nav a {
  font-size: clamp(16px, 1.4vw, 20px);
  color: var(--text-dim);
  letter-spacing: 0.08em;
  transition: color 0.2s;
  line-height: 1;
  transform: translateY(2px);
}
nav a:hover { color: var(--accent); }

.nav-icon {
  width: 13px;
  height: 13px;
  display: inline-block;
  vertical-align: -1px;
  margin-right: 5px;
  opacity: 0.45;
  transition: opacity 0.2s;
}
nav a:hover .nav-icon { opacity: 1; }

nav .nav-cta {
  background: var(--accent);
  color: var(--bg);
  padding: 0 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 4px 4px 0 #000, inset 0 1px 0 rgba(255,255,255,0.35);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s ease;
  height: clamp(30px, 3.5vw, 48px);
  display: inline-flex;
  align-items: center;
  transform: translateY(0);
}
nav .nav-cta:hover {
  color: var(--bg);
  background: var(--color-mint);
  transform: translate(-2px, -3px);
  box-shadow: 6px 7px 0 #000, inset 0 1px 0 rgba(255,255,255,0.35);
}
nav .nav-cta:active {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 #000, inset 0 1px 0 rgba(0,0,0,0.15);
  transition-duration: 0.04s;
}

.status-dot {
  width: 7px;
  height: 7px;
  background: var(--color-mint);
  border-radius: 50%;
  display: inline-block;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ══════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════ */
/* All main sections cover the sticky logo animation */
#hero, #work, #services, #how-i-work, #tools, #about-me, #about, #contact {
  position: relative;
  z-index: 1;
  background: transparent;
}

#hero {
  padding: var(--gap);
  padding-top: 0;
}

/* Shadow sits behind the hero frame */
.hero-frame-wrap {
  position: relative;
  /* Extra margin to make room for the shadow peeking out */
  margin-top: clamp(8px, 1.5vw, 16px);
  margin-left: clamp(8px, 1.5vw, 16px);
}

.hero-frame-wrap::before {
  content: '';
  position: absolute;
  top: calc(-1 * clamp(8px, 1.5vw, 16px));
  left: calc(-1 * clamp(8px, 1.5vw, 16px));
  width: 100%;
  height: 100%;
  background: rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.4);
  border-radius: calc(var(--radius) + clamp(8px, 1.5vw, 16px)) 0 0 0;
  pointer-events: none;
}

.hero-frame {
  border: 1px solid var(--accent);
  border-radius: var(--radius) 0 0 0;
  padding: clamp(32px, 5vw, 80px);
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 5vw, 72px);
  position: relative;
  background: var(--bg);
}

/* ── Traffic lights ──────────────────────────── */
.traffic-lights {
  position: absolute;
  top: -8px;
  right: -16px;
  display: flex;
  gap: 6px;
  z-index: 10;
  pointer-events: auto;
}

.traffic-light {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  position: relative;
  cursor: default;
  transition: transform 0.12s ease;
  flex-shrink: 0;
}
.traffic-light::after {
  content: '';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  line-height: 13px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.12s ease;
  color: rgba(0,0,0,0.55);
  font-style: normal;
}
.traffic-light:hover { transform: scale(1.25); }
.traffic-light:hover::after { content: '☺'; opacity: 1; }

.tl-red    { background: var(--accent); box-shadow: 0 0 0 1px rgba(0,0,0,0.15) inset; opacity: 0.35; }
.tl-yellow { background: var(--accent); box-shadow: 0 0 0 1px rgba(0,0,0,0.15) inset; opacity: 0.35; }
.tl-green  { background: var(--accent); box-shadow: 0 0 0 1px rgba(0,0,0,0.15) inset; opacity: 0.35; }

/* ── Palette box ─────────────────────────────── */
.palette-box {
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid rgba(254,254,120,0.25);
  padding: 10px 12px;
  transform: rotate(1deg);
  width: fit-content;
}

.palette-label {
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--text-dim);
  text-transform: lowercase;
}

.palette-swatches {
  display: flex;
  gap: 4px;
}

.swatch {
  display: block;
  width: 22px;
  height: 36px;
  background: var(--c);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  cursor: default;
}
.swatch:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 0 rgba(0,0,0,0.5);
}

/* ── Hero dither image ───────────────────────── */
.hero-dither-wrap {
  position: relative;
  width: calc(100% + clamp(64px, 10vw, 160px));
  margin-left: calc(-1 * clamp(32px, 5vw, 80px));
  margin-right: calc(-1 * clamp(32px, 5vw, 80px));
  aspect-ratio: 5/2;
  overflow: hidden;
}

/* canvas rule removed — dithering disabled */

.hero-dither-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Logo stage — used inside .logo-stage-sticky */
.logo-stage {
  position: relative;
  width: 100%;
  max-width: 900px;
  aspect-ratio: 1614 / 700;
}

.logo-stage .frame {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: none;
}
.logo-stage .frame.active { display: block; }
.logo-stage .frame img { width: 100%; height: 100%; }

.hero-headline {
  font-size: clamp(56px, 7vw, 120px);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--accent);
  max-width: 60%;
}

.hero-sub {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: clamp(32px, 4vw, 56px);
}

.hero-description {
  max-width: 640px;
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.55);
  text-shadow: 0 2px 16px rgba(0,0,0,0.8);
}

.hero-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(16px, 1.4vw, 20px);
  color: var(--text-dim);
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

/* ─── SECTION HEADING ICONS ─────────────────────── */
.section-heading-icon {
  width: clamp(20px, 2.2vw, 32px);
  height: clamp(20px, 2.2vw, 32px);
  display: inline-block;
  vertical-align: middle;
  margin-right: clamp(8px, 0.8vw, 14px);
  opacity: 0.6;
}

/* ══════════════════════════════════════════════════
   LOGO STICKY ANIMATION
══════════════════════════════════════════════════ */
.logo-sticky-wrap {
  position: relative;
  height: 70vh; /* space for animation before hero card covers it */
  z-index: 0;
}

.logo-stage-sticky {
  position: sticky;
  top: clamp(72px, 9vw, 96px); /* just below fixed header */
  padding: clamp(24px, 3vw, 48px) var(--gap) 0;
  max-width: 1400px;
  margin: 0 auto;
  pointer-events: none;
}

/* ══════════════════════════════════════════════════
   WORK / PORTFOLIO
══════════════════════════════════════════════════ */
#work {
  padding: clamp(100px, 16vw, 240px) 0;
}

.work-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: clamp(32px, 5vw, 64px);
}

.work-heading {
  font-size: clamp(32px, 5vw, 72px);
  font-weight: 300;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(12px, 2vw, 24px);
}

.project-card {
  position: relative;
  border: 1px solid var(--border-subtle);
  border-radius: 0;
  overflow: visible;
  cursor: pointer;
  transition: border-color 0.3s;
  background: var(--bg-card);
}

.project-card:hover {
  border-color: var(--border);
}

/* Featured card spans full width */
.project-card.featured {
  grid-column: 1 / -1;
  aspect-ratio: 21/9;
}
.project-card:not(.featured) {
  aspect-ratio: 4/3;
}

/* Grid corner rule: only curve the outside corners of the whole grid */
.projects-grid .project-card:first-child {
  border-top-left-radius: var(--radius);
}

/* Micrographic vertical text on cards */
.micro-text {
  position: absolute;
  writing-mode: vertical-rl;
  font-size: 9px;
  letter-spacing: 0.3em;
  color: rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.2);
  z-index: 3;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}
/* Top-right: aligned to top-right edge */
.micro-text.top-right {
  top: clamp(8px, 1vw, 14px);
  right: clamp(8px, 1vw, 14px);
}
/* Bottom-left: aligned to bottom-left edge */
.micro-text.bottom-left {
  bottom: clamp(8px, 1vw, 14px);
  left: clamp(8px, 1vw, 14px);
}

.project-card .dither-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.project-card .dither-wrap canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  display: block;
}

.project-card .dither-wrap .reveal-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.project-info {
  position: absolute;
  bottom: 30px;
  right: 30px;
  padding: clamp(10px, 1.2vw, 16px) clamp(14px, 1.6vw, 22px);
  background: rgba(10, 10, 10, 0.92);
  border: 1px solid var(--accent);
  z-index: 2;
  text-align: right;
}

.project-name {
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 400;
  color: var(--accent);
  margin-bottom: 2px;
}

.project-type {
  font-size: clamp(15px, 1.3vw, 19px);
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.06em;
}

/* ══════════════════════════════════════════════════
   SERVICES
══════════════════════════════════════════════════ */
#services {
  padding-bottom: clamp(100px, 16vw, 240px);
}

.services-header {
  position: relative;
  margin-top: clamp(32px, 5vw, 64px);
  margin-bottom: clamp(32px, 4vw, 56px);
}

.services-heading {
  font-size: clamp(32px, 5vw, 72px);
  font-weight: 300;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(12px, 2vw, 24px);
  margin-top: clamp(32px, 5vw, 64px);
}

.service-card {
  border: 1px solid var(--border-subtle);
  border-radius: 0;
  padding: clamp(24px, 3.5vw, 48px);
  transition: border-color 0.3s;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2vw, 28px);
}
.service-card:hover {
  border-color: var(--border);
}

/* Grid corner rule */
.services-grid .service-card:first-child {
  border-top-left-radius: var(--radius);
}

.service-icon {
  color: var(--accent);
  opacity: 0.9;
}

.service-card-design .list-icon { color: var(--color-rose) !important; opacity: 0.8; }
.service-card-dev .list-icon    { color: var(--color-cool) !important; opacity: 0.8; }

.service-title {
  font-size: clamp(36px, 4.5vw, 68px);
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.service-desc {
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.5);
}

.service-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.service-list li {
  font-size: clamp(18px, 1.6vw, 22px);
  color: var(--text-dim);
  padding-left: 24px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}
.service-list li .list-icon {
  position: absolute;
  left: 0;
  color: var(--accent);
  opacity: 0.5;
  width: 14px;
  height: 14px;
}

/* ══════════════════════════════════════════════════
   HOW I WORK
══════════════════════════════════════════════════ */
#how-i-work {
  padding-bottom: clamp(100px, 16vw, 240px);
}

.principles-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: clamp(32px, 5vw, 64px);
}

.principles-heading {
  font-size: clamp(32px, 5vw, 72px);
  font-weight: 300;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(12px, 2vw, 24px);
}

.principle-card {
  border: 1px solid var(--border-subtle);
  border-radius: 0;
  padding: clamp(24px, 3.5vw, 48px);
  transition: border-color 0.3s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.principle-card:hover {
  border-color: var(--border);
}

/* Grid corner rule */
.principles-grid .principle-card:first-child {
  border-top-left-radius: var(--radius);
}

.principle-icon {
  color: var(--accent);
  opacity: 0.9;
}

.principle-number {
  font-size: clamp(13px, 1.2vw, 17px);
  color: var(--accent);
  opacity: 0.7;
  letter-spacing: 0.15em;
}

.principle-title {
  font-size: clamp(24px, 2.6vw, 38px);
  font-weight: 400;
  color: #fff;
  letter-spacing: -0.01em;
}

.principle-desc {
  font-size: clamp(17px, 1.5vw, 22px);
  line-height: 1.7;
  color: var(--text-dim);
}

/* ══════════════════════════════════════════════════
   ABOUT ME (PERSONAL)
══════════════════════════════════════════════════ */
#about-me {
  padding-bottom: clamp(100px, 16vw, 240px);
}

.about-me-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(32px, 5vw, 80px);
  margin-top: clamp(32px, 5vw, 64px);
}

.about-me-photo-wrap {
  position: relative;
  margin-top: clamp(8px, 1.5vw, 16px);
  margin-left: clamp(8px, 1.5vw, 16px);
}

.about-me-photo-wrap::before {
  content: '';
  position: absolute;
  top: calc(-1 * clamp(8px, 1.5vw, 16px));
  left: calc(-1 * clamp(8px, 1.5vw, 16px));
  width: 100%;
  height: 100%;
  background: rgba(120, 200, 254, 0.25); /* cool blue shadow */
  border-radius: calc(var(--radius) + clamp(8px, 1.5vw, 16px)) 0 0 0;
  pointer-events: none;
}

.about-me-photo {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: var(--radius) 0 0 0;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-me-photo .photo-placeholder {
  color: var(--text-dim);
  font-size: clamp(14px, 1.2vw, 18px);
  letter-spacing: 0.1em;
}

.about-me-text {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vw, 40px);
  justify-content: center;
}

.about-me-heading {
  font-size: clamp(48px, 7.5vw, 112px);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1.0;
  color: var(--accent);
}

.about-me-bio p {
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 16px;
}

.about-me-details {
  display: flex;
  gap: clamp(24px, 4vw, 60px);
  flex-wrap: wrap;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-label {
  font-size: clamp(12px, 1.1vw, 15px);
  color: var(--text-dim);
  letter-spacing: 0.15em;
}

.detail-value {
  font-size: clamp(18px, 1.6vw, 22px);
  color: var(--accent);
}

/* ══════════════════════════════════════════════════
   ABOUT (PHILOSOPHY)
══════════════════════════════════════════════════ */
#about {
  padding-bottom: clamp(100px, 16vw, 240px);
}

/* Shadow sits behind the about frame */
.about-frame-wrap {
  position: relative;
  margin-top: clamp(8px, 1.5vw, 16px);
  margin-left: clamp(8px, 1.5vw, 16px);
}

.about-frame-wrap::before {
  content: '';
  position: absolute;
  top: calc(-1 * clamp(8px, 1.5vw, 16px));
  left: calc(-1 * clamp(8px, 1.5vw, 16px));
  width: 100%;
  height: 100%;
  background: rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.35);
  border-radius: calc(var(--radius) + clamp(8px, 1.5vw, 16px)) 0 0 0;
  pointer-events: none;
}

.about-frame {
  border: 1px solid var(--accent);
  border-radius: var(--radius) 0 0 0;
  padding: clamp(28px, 5vw, 72px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  position: relative;
  background: #111111;
}

.about-heading {
  font-size: clamp(36px, 5.5vw, 80px);
  font-weight: 300;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.about-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
}

.about-body p {
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.6);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tag {
  border: 1px solid var(--accent);
  border-radius: 0;
  padding: 4px 12px;
  font-size: clamp(15px, 1.3vw, 19px);
  color: var(--accent);
  transition: border-color 0.2s, color 0.2s;
}
.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ══════════════════════════════════════════════════
   CONTACT / FOOTER
══════════════════════════════════════════════════ */
#contact {
  padding-bottom: clamp(80px, 10vw, 160px);
}

/* ── Header ──────────────────────────────────── */
.contact-header {
  position: relative;
  margin-top: clamp(32px, 5vw, 64px);
  margin-bottom: clamp(48px, 6vw, 96px);
}

.contact-heading {
  font-size: clamp(52px, 9vw, 144px);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--accent);
}

/* ── Letter box ─────────────────────────────── */
.letter-wrap {
  transform: rotate(-1.2deg);
  transform-origin: top left;
  border: 1px solid var(--accent);
  border-top: 4px solid var(--accent);
  padding: clamp(32px, 4vw, 64px);
  max-width: 960px;
  position: relative;
  background: var(--bg-card);
  box-shadow: 6px 6px 0 rgba(254,254,120,0.12);
}

/* stamp in top-right corner */
.letter-wrap::before {
  content: '✉';
  position: absolute;
  top: clamp(14px, 1.5vw, 22px);
  right: clamp(14px, 1.5vw, 22px);
  font-size: clamp(18px, 2vw, 28px);
  color: rgba(254,254,120,0.2);
  pointer-events: none;
}

/* ── Form layout ─────────────────────────────── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 4vw, 56px);
  max-width: 900px;
}

.form-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 64px);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Sentence inputs ─────────────────────────── */
.form-sentence {
  font-size: clamp(22px, 2.8vw, 38px);
  font-weight: 300;
  color: var(--text);
  line-height: 1.6;
  letter-spacing: -0.01em;
}

.form-inline {
  background: none;
  border: none;
  border-bottom: 2px solid var(--accent);
  color: var(--accent);
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  padding: 2px 6px 4px;
  outline: none;
  min-width: 180px;
  transition: border-color 0.2s;
}
.form-inline--wide { min-width: clamp(240px, 30vw, 440px); }
.form-inline::placeholder { color: rgba(254, 254, 120, 0.25); }
.form-inline:focus { border-bottom-color: var(--color-mint); }

/* ── Labels ──────────────────────────────────── */
.form-label {
  font-size: clamp(13px, 1.2vw, 16px);
  letter-spacing: 0.2em;
  color: var(--text-dim);
  text-transform: lowercase;
}

/* ── Pills (checkbox + radio) ────────────────── */
.form-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--accent);
  padding: 8px 16px;
  cursor: pointer;
  font-size: clamp(14px, 1.3vw, 18px);
  color: var(--text-dim);
  letter-spacing: 0.06em;
  box-shadow: 3px 3px 0 #000;
  transition: background 0.12s, color 0.12s, border-color 0.12s, transform 0.06s, box-shadow 0.06s;
  user-select: none;
}
.pill input { display: none; }
.form-pills .pill:hover { background: rgba(254,254,120,0.08); color: var(--accent); transform: translate(-1px,-2px); box-shadow: 4px 5px 0 #000; }
.form-pills .pill:active { transform: translate(3px,3px); box-shadow: 0 0 0 #000; transition-duration: 0.04s; }
.pill:has(input:checked) {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* colour-coded services pills */
.pill:has(input[value="product-design"]:checked) { background: var(--color-rose); border-color: var(--color-rose); }
.pill:has(input[value="brand"]:checked)          { background: var(--color-lilac); border-color: var(--color-lilac); }
.pill:has(input[value="development"]:checked)    { background: var(--color-cool); border-color: var(--color-cool); }
.pill:has(input[value="strategy"]:checked)       { background: var(--color-warm); border-color: var(--color-warm); }

/* ── Submit ──────────────────────────────────── */
.form-actions {
  flex-direction: row;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.form-submit {
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: clamp(10px, 1.2vw, 16px) clamp(24px, 2.5vw, 40px);
  font-family: inherit;
  font-size: clamp(16px, 1.4vw, 20px);
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 5px 5px 0 #000, inset 0 1px 0 rgba(255,255,255,0.35);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s ease;
}
.form-submit:hover {
  background: var(--color-mint);
  transform: translate(-3px, -4px);
  box-shadow: 8px 9px 0 #000, inset 0 1px 0 rgba(255,255,255,0.35);
}
.form-submit:active {
  transform: translate(5px, 5px);
  box-shadow: 0 0 0 #000, inset 0 1px 0 rgba(0,0,0,0.15);
  transition-duration: 0.04s;
}

.form-note {
  font-size: clamp(14px, 1.2vw, 17px);
  color: var(--text-dim);
}
.form-note a { color: var(--text-dim); border-bottom: 1px solid; transition: color 0.2s; }
.form-note a:hover { color: var(--accent); }

/* ── Bottom links ────────────────────────────── */
.contact-links {
  display: flex;
  gap: clamp(20px, 3vw, 40px);
  margin-top: clamp(48px, 6vw, 96px);
  padding-top: clamp(24px, 3vw, 40px);
  border-top: 1px solid rgba(254,254,120,0.15);
  flex-wrap: wrap;
}

.contact-links a {
  font-size: clamp(17px, 1.5vw, 22px);
  color: var(--text-dim);
  letter-spacing: 0.08em;
  transition: color 0.2s;
}
.contact-links a:hover { color: var(--accent); }

footer {
  padding: 0 var(--gap) 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  position: relative;
  z-index: 2;
  background-color: #000;
  background-image:
    linear-gradient(45deg, rgba(254,254,120,0.14) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(254,254,120,0.14) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(254,254,120,0.14) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(254,254,120,0.14) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-attachment: fixed;
}

.footer-bar {
  background: #000;
  border: 1px solid var(--accent);
  border-bottom: none;
  padding: clamp(16px, 2vw, 28px) clamp(20px, 3vw, 36px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(20px, 3vw, 40px);
  max-width: 800px;
  width: 100%;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-tagline {
  font-size: clamp(13px, 1.2vw, 16px);
  color: var(--accent);
  letter-spacing: 0.06em;
}

.footer-copy {
  font-size: clamp(11px, 1vw, 13px);
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.35);
}

.footer-links {
  display: flex;
  gap: clamp(14px, 2vw, 24px);
  flex-shrink: 0;
}

.footer-links a {
  font-size: clamp(11px, 1vw, 13px);
  letter-spacing: 0.15em;
  color: rgba(254,254,120,0.35);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--accent); }

.footer-quote-box {
  background: #000;
  border: 1px solid var(--accent);
  padding: clamp(24px, 3vw, 44px) clamp(28px, 4vw, 52px);
  max-width: 800px;
  width: 100%;
  margin-bottom: auto;
  align-self: flex-start;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.footer-quote-text {
  font-size: clamp(16px, 1.8vw, 24px);
  font-weight: 300;
  color: var(--accent);
  letter-spacing: 0.02em;
  line-height: 1.6;
  transition: opacity 0.4s ease;
  text-align: left;
}

.footer-quote-source {
  font-size: clamp(11px, 1vw, 13px);
  letter-spacing: 0.15em;
  color: rgba(254,254,120,0.3);
  text-align: right;
  margin-top: 16px;
  transition: opacity 0.4s ease;
}


/* ══════════════════════════════════════════════════
   SECTION COLOUR THEMING
══════════════════════════════════════════════════ */

/* Work → cool blue */
#work .work-heading              { color: var(--color-cool); }
#work .project-name              { color: var(--color-cool); }
#work .project-info              { border-color: var(--color-cool); }
#work .project-card              { border-color: rgba(120,200,254,0.3); }
#work .project-card:hover        { border-color: var(--color-cool); }

/* Services → rose */
#services .section-rule          { border-top-color: var(--color-rose); }
#services .services-heading      { color: var(--color-rose); }
#services .service-card          { border-color: rgba(254,120,168,0.3); }
#services .service-card:hover    { border-color: var(--color-rose); }

/* How I work → warm coral */
#how-i-work .section-rule        { border-top-color: var(--color-warm); }
#how-i-work .principles-heading  { color: var(--color-warm); }
#how-i-work .principle-card      { border-color: rgba(254,152,120,0.3); }
#how-i-work .principle-card:hover { border-color: var(--color-warm); }

/* Tools → mint */
#tools .section-rule             { border-top-color: var(--color-mint); }

/* About me → mint */
#about-me .section-rule          { border-top-color: var(--color-mint); }

/* About/philosophy → lilac */
#about .about-heading            { color: var(--color-lilac); }
#about .about-frame              { border-color: var(--color-lilac); }
#about .about-frame-wrap::before { background: rgba(184,120,254,0.18); }

/* Contact → cool (rule), heading already gradient */
#contact .section-rule           { border-top-color: var(--color-cool); }

/* ─── RESPONSIVE ────────────────────────────────── */
@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .project-card.featured {
    aspect-ratio: 16/10;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  .principles-grid {
    grid-template-columns: 1fr;
  }
  .about-frame {
    grid-template-columns: 1fr;
  }
  .contact-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .contact-links {
    align-items: flex-start;
  }
  nav {
    gap: 16px;
  }
  .about-me-content {
    grid-template-columns: 1fr;
  }
  .about-me-photo {
    max-width: 280px;
  }
}
