/* ===========================================================
   Dylan Sullivan — portfolio
   Colours:  bg #FAFAFA | orange #E85D3D | black #1A1A1A
   =========================================================== */

@font-face {
  font-family: "ReenieBeanie";
  src: url("ReenieBeanie-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #FAFAFA;
  --orange: #E85D3D;
  --black: #1A1A1A;          /* doubles as the primary foreground/text token */
  --white: #ffffff;          /* kept literal — white text on orange must stay white */
  --muted: #555555;

  /* card surfaces — flipped in dark mode */
  --surface: #ffffff;
  --surface-border: rgba(0,0,0,.06);

  /* consistent vertical rhythm between sections */
  --section-y: clamp(64px, 8vw, 96px);

  --display: "Poppins", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --body: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --hand: "Caveat", "Comic Sans MS", cursive;

  color-scheme: light;
}

/* ---------- DARK THEME ----------
   Only the semantic tokens flip. --white/--orange stay literal so the orange
   panels and their white text are identical in both themes. --black is the
   foreground token, so flipping it re-colours all body/heading text at once. */
[data-theme="dark"] {
  --bg: #16120f;             /* warm near-black to sit with the orange brand */
  --black: #f1ece7;          /* foreground/text → light */
  --muted: #a79e96;
  --surface: #221c18;        /* cards: a few shades lighter than --bg */
  --surface-border: rgba(255,255,255,.09);

  color-scheme: dark;
}

/* in dark mode: white button with dark-background-coloured text */
[data-theme="dark"] .btn--solid {
  background: var(--white);
  color: var(--bg);
}

/* smooth cross-fade when toggling (View Transitions API) */
::view-transition-old(root),
::view-transition-new(root) { animation-duration: .35s; }

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

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  background: var(--bg);
  width: 100%;
  max-width: 100%;
  color: var(--black);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* keyboard focus: crisp ring for keyboard users, suppressed for mouse/touch.
   The outline follows each element's own border-radius in modern browsers. */
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}
:focus:not(:focus-visible) { outline: none; }
/* white reads better than orange on the orange contact panel */
.contact__inner :focus-visible { outline-color: var(--white); }

/* ---------- THEME TOGGLE (sliding pill, echoes the nav dock) ---------- */
.theme-toggle {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.theme-toggle__track {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 68px;
  height: 34px;
  padding: 0 9px;
  border-radius: 999px;
  background: #1a1a1a;                 /* constant dark pill, like the dock */
  box-shadow: 0 10px 24px rgba(0,0,0,.30);
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s ease;
}
.theme-toggle:hover .theme-toggle__track {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(0,0,0,.36);
}
.theme-toggle__ic {
  position: relative;
  z-index: 1;                          /* sit above the knob */
  width: 16px;
  height: 16px;
  color: rgba(255,255,255,.45);
  transition: color .3s ease;
}
.theme-toggle__knob {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 3px 8px rgba(0,0,0,.4);
  transition: transform .4s cubic-bezier(.34, 1.56, .64, 1);
}
/* light: orange knob rests on the sun; dark: it springs across to the moon */
.theme-toggle__ic--sun { color: #fff; }
[data-theme="dark"] .theme-toggle__ic--sun { color: rgba(255,255,255,.45); }
[data-theme="dark"] .theme-toggle__ic--moon { color: #fff; }
[data-theme="dark"] .theme-toggle__knob { transform: translateX(34px); }

/* ---------- FIXED SECTION DOCK ---------- */
.dock {
  position: fixed;
  top: 50%;
  left: 24px;
  transform: translateY(-50%) translateX(-16px);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .45s ease, transform .45s ease;
}
.dock--visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}
.dock__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: 999px;
  background: #1a1a1a;                 /* same dark pill language as the toggle */
  box-shadow: 0 14px 34px rgba(0,0,0,.30);
}
.dock__hit {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: rgba(255,255,255,.55);
  transition: color .25s ease, background .3s ease,
              transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s ease;
}
.dock__icon { width: 22px; height: 22px; display: block; }

/* hover / keyboard focus: brighten + a little pop */
.dock__hit:hover,
.dock__hit:focus-visible {
  color: #fff;
  transform: scale(1.12);
}

/* active section: brand-orange disc + white icon (.is-active set by the
   scroll-spy in script.js) */
.dock__hit.is-active {
  background: var(--orange);
  color: #fff;
}

/* hover label that slides out beside the icon */
.dock__label {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(-6px);
  padding: 5px 12px;
  border-radius: 999px;
  background: #1a1a1a;
  color: #fff;
  font-family: var(--display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .3px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 8px 18px rgba(0,0,0,.25);
  transition: opacity .2s ease, transform .2s ease;
}
.dock__hit:hover .dock__label,
.dock__hit:focus-visible .dock__label {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 0 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes blobPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.03); }
}

.hero__blob {
  position: absolute;
  top: 0;
  right: 0;
  width: clamp(260px, 56vw, 820px);
  height: auto;
  max-width: 100%;
  z-index: 0;
  pointer-events: none;
  transform-origin: 100% 0;
  filter: drop-shadow(0 17px 3.1px rgba(26, 26, 26, 0.25));
  animation: blobPulse 4s ease-in-out infinite;
}

/* right rail (rotated nav + socials) */
.rail {
  position: absolute;
  top: 36px;
  right: 30px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.rail__nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--white);
  font-weight: 500;
  font-size: 15px;
}
.rail__nav a {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding: 6px 2px;
  transition: opacity .2s ease;
}
.rail__nav a:hover { opacity: .7; }
.rail__line { color: var(--white); font-size: 22px; line-height: 1; }
.rail__social { display: flex; flex-direction: column; gap: 10px; }
.social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--white);
  transition: transform .2s ease;
}
.social img { display: block; width: 18px; height: 18px; filter: brightness(0) invert(1); }
.social:hover { transform: translateY(-2px); }

/* name block */
.hero__name { position: relative; z-index: 2; }
.name-line {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(72px, 15vw, 200px);
  line-height: .92;
  letter-spacing: -2px;
  color: var(--black);
}
.role {
  font-family: var(--body);
  font-weight: 400;
  font-size: clamp(18px, 2.8vw, 34px);
  margin: 10px 0 6px;
  padding-left: 4px;
  color: var(--black);
}
.role__accent { color: var(--orange); font-weight: 500; }

/* availability badge */
@keyframes dotPulse {
  0%   { box-shadow: 0 0 0 0 rgba(232,93,61,.5); }
  70%  { box-shadow: 0 0 0 7px rgba(232,93,61,0); }
  100% { box-shadow: 0 0 0 0 rgba(232,93,61,0); }
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(232,93,61,.12);
  color: var(--orange);
  font-family: var(--display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .6px;
  text-transform: uppercase;
  padding: 7px 15px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero__badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  animation: dotPulse 1.8s ease-out infinite;
}

/* hero CTAs */
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  padding: 13px 28px;
  border-radius: 999px;
  transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}
.btn--solid {
  background: var(--black);
  color: var(--white);
}
.btn--cv {
  background: linear-gradient(160deg, #EF6E50 0%, var(--orange) 45%, #D94E2F 100%);
  color: var(--white);
}
@keyframes btnWobble {
  0%   { transform: scale(1, 1); }
  20%  { transform: scale(1.12, .88); }
  40%  { transform: scale(.9, 1.1); }
  60%  { transform: scale(1.06, .94); }
  80%  { transform: scale(.97, 1.03); }
  100% { transform: scale(1, 1); }
}
.btn--solid:hover,
.btn--cv:hover {
  animation: btnWobble .6s ease;
  box-shadow: none;
}
.btn--ghost {
  border: 2px solid var(--black);
  color: var(--black);
}
.btn--ghost:hover {
  background: var(--black);
  color: var(--white);
  transform: translateY(-3px);
}

/* scroll cue */
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(5px); }
}
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  z-index: 3;
  transition: color .2s ease;
}
.hero__scroll:hover { color: var(--black); }
.hero__scroll-arrow {
  font-size: 16px;
  animation: scrollBounce 1.6s ease-in-out infinite;
}

/* ---------- ABOUT ---------- */
.about {
  padding: var(--section-y) 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 34px;
}
.about__head { text-align: center; margin-bottom: 4px; }
.about__head .section-title { font-size: clamp(34px, 5vw, 52px); }

.about__panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px;
  max-width: 1040px;
  width: 100%;
}
.tile {
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}
/* bouncy, overshooting entrance for the about tiles */
.tile.reveal {
  transition-duration: .7s, .7s;
  transition-timing-function: ease, cubic-bezier(.34, 1.56, .64, 1);
}

.tile__body {
  flex: 1;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 20px;
  padding: 36px 30px 32px;
  box-shadow: 0 10px 26px rgba(0,0,0,.07);
  transition: transform .3s ease, box-shadow .3s ease;
}
.tile__body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 30px;
  width: 44px;
  height: 5px;
  background: var(--orange);
  border-radius: 0 0 5px 5px;
}
.tile__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 23px;
  color: var(--black);
  margin: 6px 0 14px;
}
.tile__text {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}
.tile__lead {
  color: var(--black);
  font-weight: 600;
}

/* ---- circular photo ---- */
.tile__ribbon {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  height: 160px;
  margin-top: 12px;
}
.tile__photo {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  overflow: hidden;
  background: #e4e4e4;
  transition: width .55s cubic-bezier(.22, 1, .36, 1),
              height .55s cubic-bezier(.22, 1, .36, 1),
              border-radius .55s cubic-bezier(.22, 1, .36, 1),
              transform .55s cubic-bezier(.22, 1, .36, 1);
}
.tile__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---- playful hover ---- */
.tile:hover .tile__body {
  transform: translateY(-6px);
  box-shadow: 0 18px 34px rgba(0,0,0,.12);
}
/* hovering the box OR its circle enlarges both */
.tile:hover .tile__photo {
  width: 100%;
  height: 160px;
  border-radius: 18px;
  transform: translateY(-6px);
}

/* ---------- SECTION TITLE ---------- */
.section-title {
  font-family: var(--display);
  font-weight: 700;
  text-align: center;
  color: var(--black);
}

/* ---------- MY STACK ---------- */
.stack { padding: var(--section-y) 64px; }
.stack .section-title { font-size: clamp(34px, 5vw, 52px); margin-bottom: 48px; }
.stack__cluster {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 28px;
  flex-wrap: wrap;
}
.stack__item {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.stack__chip {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 20px;
  box-shadow: 0 6px 16px rgba(0,0,0,.06);
  transition: transform .3s ease, box-shadow .3s ease;
}
.stack__icon {
  width: 52px;
  height: 52px;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  mix-blend-mode: multiply;
}
.stack__label {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color .3s ease;
}
.stack__item:hover .stack__chip {
  transform: translateY(-8px);
  box-shadow: 0 16px 30px rgba(0,0,0,.12);
}
.stack__item:hover .stack__label { color: var(--black); }
/* keep the tool logos on a light chip in dark mode — they use
   mix-blend-mode: multiply, which needs a light backdrop to stay legible */
[data-theme="dark"] .stack__chip {
  background: #f4efea;
  border-color: rgba(0,0,0,.08);
}

/* ---------- MARQUEE ---------- */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  padding: 26px 0;
  border-top: 1px solid rgba(0,0,0,.07);
  border-bottom: 1px solid rgba(0,0,0,.07);
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee__track {
  display: inline-flex;
  align-items: center;
  gap: 26px;
  animation: marquee 30s linear infinite;
  will-change: transform;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(20px, 3vw, 34px);
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--black);
}
.marquee__sep {
  color: var(--orange);
  font-size: clamp(14px, 1.8vw, 20px);
}

/* ---------- HOW I WORK (process) ---------- */
.process { max-width: 1040px; margin: 160px auto 0; }
.process__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 42px);
  text-align: center;
  color: var(--black);
  margin-bottom: 40px;
}
.process__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}
.process__step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 18px;
  padding: 26px 22px 24px;
  box-shadow: 0 8px 20px rgba(0,0,0,.06);
  transition: transform .3s ease, box-shadow .3s ease;
}
.process__step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 26px;
  width: 36px;
  height: 4px;
  background: var(--orange);
  border-radius: 0 0 4px 4px;
}
.process__num {
  font-family: var(--display);
  font-weight: 800;
  font-size: 30px;
  color: rgba(232,93,61,.35);
  letter-spacing: -1px;
}
.process__step-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  color: var(--black);
  margin: 6px 0 10px;
}
.process__step-text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}
.process__step:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 34px rgba(0,0,0,.12);
}

/* ---------- WORK ---------- */
.work { padding: var(--section-y) 64px; }

/* eyebrow + accented heading (shared aesthetic) */
.eyebrow {
  display: inline-block;
  background: rgba(232,93,61,.12);
  color: var(--orange);
  font-family: var(--display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.accent-script {
  font-family: "ReenieBeanie", cursive;
  color: var(--orange);
  font-weight: 400;
  font-size: 1.15em;
}
.work__head { text-align: center; margin-bottom: 52px; }
.work__head .section-title { font-size: clamp(34px, 6vw, 60px); }

.work__gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  max-width: 1040px;
  margin: 0 auto;
}
.work__card {
  margin: 0;
  background: var(--surface);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0,0,0,.10);
  transition: transform .35s ease, box-shadow .35s ease;
}
.work__link { display: block; color: inherit; }
.work__thumb {
  position: relative;
  height: 220px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.work__shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
/* darken photo thumbs slightly so the number stays legible */
.work__thumb:has(.work__shot)::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.10), rgba(0,0,0,.45));
}
.work__num {
  position: relative;
  z-index: 1;
  font-family: var(--display);
  font-weight: 800;
  font-size: 64px;
  color: rgba(255,255,255,.85);
  letter-spacing: -1px;
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
  transition: transform .35s ease;
}
.work__thumb--dark  { background: #1d1b3a; }
.work__thumb--mid   { background: var(--orange); }
.work__thumb--light { background: #c9b8f0; }
.work__thumb--light .work__num { color: rgba(58,46,99,.55); }

.work__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px 22px;
}
.work__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  color: var(--black);
}
.work__tag {
  flex: none;
  background: rgba(232,93,61,.12);
  color: var(--orange);
  font-weight: 600;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
}

/* hover: lift card, gently scale the number */
.work__card:hover {
  transform: translateY(-8px);
}
.work__card:hover .work__num { transform: scale(1.12); }
.work__card:hover .work__shot { transform: scale(1.06); }

/* ---------- SERVICES ---------- */
.services { padding: var(--section-y) 64px; }
.services .work__head { margin-bottom: 52px; }
.services__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  max-width: 1040px;
  margin: 0 auto;
}
.service {
  background: var(--surface);
  border-radius: 22px;
  padding: 30px 26px 32px;
  box-shadow: 0 12px 30px rgba(0,0,0,.08);
  transition: transform .35s ease, box-shadow .35s ease;
}
.service__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(232,93,61,.12);
  color: var(--orange);
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 18px;
}
.service__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  color: var(--black);
  margin-bottom: 10px;
}
.service__text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}
.service:hover {
  transform: translateY(-8px);
}
.service:hover .service__num {
  background: var(--orange);
  color: var(--white);
}
.service__num { transition: background .3s ease, color .3s ease; }

/* ---------- CONTACT ---------- */
.contact { padding: var(--section-y) 64px; display: flex; flex-direction: column; align-items: center; }
.contact__inner {
  background: linear-gradient(160deg, #EF6E50 0%, var(--orange) 45%, #D94E2F 100%);
  border-radius: 34px;
  padding: 64px 40px;
  max-width: 1040px;
  width: 100%;
  text-align: center;
  color: var(--white);
  box-shadow: 0 18px 50px rgba(0,0,0,.22), 0 6px 18px rgba(0,0,0,.14);
}
.contact__eyebrow {
  display: inline-block;
  background: rgba(255,255,255,.18);
  color: var(--white);
  font-family: var(--display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.contact__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.05;
  color: var(--white);
}
.contact__title .accent-script { color: var(--black); }
.contact__text {
  max-width: 480px;
  margin: 16px auto 26px;
  font-size: clamp(15px, 1.8vw, 18px);
  line-height: 1.6;
  color: rgba(255,255,255,.92);
}
.contact__email {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(20px, 3vw, 32px);
  color: var(--white);
  padding-bottom: 4px;
  border-bottom: 3px solid rgba(255,255,255,.45);
  transition: border-color .25s ease, transform .25s ease;
}
.contact__email:hover {
  border-color: var(--white);
  transform: translateY(-2px);
}
.contact__social {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 32px;
}

/* contact form */
.contact__form {
  max-width: 560px;
  margin: 30px auto 0;
  text-align: left;
}
.contact__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field {
  display: block;
  margin-bottom: 16px;
}
.field__label {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .3px;
  color: var(--white);
  margin-bottom: 7px;
}
.contact__form input,
.contact__form textarea {
  width: 100%;
  font-family: var(--body);
  font-size: 15px;
  color: var(--black);
  background: var(--surface);
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.contact__form textarea { resize: vertical; min-height: 110px; }
.contact__form input::placeholder,
.contact__form textarea::placeholder { color: #9a9a9a; }
.contact__form input:focus,
.contact__form textarea:focus {
  outline: none;
  border-color: var(--black);
  box-shadow: 0 0 0 4px rgba(26,26,26,.12);
}
.contact__form [aria-invalid="true"] { border-color: #7a1d0e; }
.field__error {
  display: block;
  min-height: 16px;
  margin-top: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: #3a0f06;
}
.contact__btn {
  display: inline-block;
  width: 100%;
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  color: var(--white);
  background: var(--black);
  border: none;
  border-radius: 12px;
  padding: 14px 22px;
  margin-top: 4px;
  cursor: pointer;
  transition: transform .2s ease, opacity .2s ease;
}
.contact__btn:hover { transform: translateY(-2px); }
.contact__btn:disabled { opacity: .6; cursor: default; transform: none; }
/* keep it a true black button in dark mode (--black flips to light otherwise) */
[data-theme="dark"] .contact__btn {
  background: #1a1a1a;
  color: #fff;
}
.contact__formmsg {
  margin-top: 14px;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
}
.contact__formmsg--ok { color: var(--white); }
.contact__formmsg--err { color: #3a0f06; }
.contact__or {
  margin-top: 26px;
  font-size: 14px;
  color: rgba(255,255,255,.92);
}
.contact__or .contact__email {
  font-family: var(--body);
  font-size: 14px;
  font-weight: 700;
  border-bottom-width: 2px;
}

/* ---------- SCROLL REVEAL ---------- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition-property: opacity, transform;
  transition-duration: .6s, .6s;
  transition-timing-function: ease, ease;
  transition-delay: 0s, 0s;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- FOOTER ---------- */
.footer {
  padding: clamp(48px, 6vw, 64px) 64px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .hero, .about, .stack, .work, .services, .contact, .footer { padding-left: 24px; padding-right: 24px; }
  .hero__name { margin-left: 0; }
  .about__panel { grid-template-columns: 1fr; }
  .work__gallery,
  .process__grid,
  .services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dock { left: 14px; }
  .rail { top: 18px; right: 16px; }
}

/* on small screens move the dock to the bottom as a horizontal pill */
@media (max-width: 768px) {
  .dock {
    top: auto;
    left: 50%;
    bottom: 16px;
    flex-direction: row;
    /* hidden state: centered + slid down */
    transform: translateX(-50%) translateY(26px);
  }
  .dock--visible {
    /* shown state: centered + in place */
    transform: translateX(-50%) translateY(0);
  }
  .dock__list { flex-direction: row; }
  /* the slide-out labels would overflow horizontally — hide on mobile */
  .dock__label { display: none; }
}

@media (max-width: 640px) {
  .work__gallery,
  .process__grid,
  .services__grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .hero, .about, .stack, .work, .services, .contact, .footer { padding-left: 18px; padding-right: 18px; }
  /* rotated rail crowds the hero on phones — drop it (socials live in the contact section) */
  .rail { display: none; }
  .name-line { letter-spacing: -1px; font-size: clamp(46px, 16vw, 96px); }
  .role { font-size: clamp(14px, 4.4vw, 24px); }
  .contact__fields { grid-template-columns: 1fr; }
  .contact__inner { padding: 44px 22px; }
  .process__step,
  .service { padding: 24px 20px; }
}

@media (max-width: 380px) {
  .name-line { letter-spacing: -1px; }
  .contact__email { font-size: 18px; word-break: break-all; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* quiet the entrance reveals (and never leave content hidden), but leave
     the marquee, hover effects and other animations running */
  .reveal {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------- PROJECT MODAL / LIGHTBOX ---------- */
body.modal-open { overflow: hidden; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .3s ease, visibility .3s ease;
}
.modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 12, .62);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.modal__box {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--surface);
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
  transform: translateY(12px) scale(.96);
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
}
.modal.is-open .modal__box { transform: translateY(0) scale(1); }
.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.modal__close:hover { background: rgba(0, 0, 0, .7); transform: scale(1.05); }

/* slideshow */
.slider { position: relative; overflow: hidden; background: #000; }
.slider__track { display: flex; transition: transform .45s ease; }
.slider__slide {
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 1100 / 687;
  object-fit: cover;
  display: block;
}
.slider__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .85);
  color: var(--black);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .2s ease, transform .2s ease;
}
.slider__nav:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.slider__nav--prev { left: 12px; }
.slider__nav--next { right: 12px; }
.slider__dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.slider__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .5);
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.slider__dot.is-active { background: #fff; transform: scale(1.25); }

/* info panel */
.modal__info { padding: 22px 26px 26px; }
.modal__title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 24px;
  color: var(--black);
  margin-bottom: 14px;
}
.modal__tagline {
  font-family: var(--body);
  font-weight: 400;
  font-size: 14px;
  color: rgba(26, 26, 26, .55);
}
.modal__sitelink {
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(var(--orange), var(--orange));
  background-size: 0% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size .25s ease, color .2s ease;
}
.modal__sitelink:hover { color: var(--orange); background-size: 100% 2px; }
.modal__meta { margin-bottom: 0; }
.modal__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid rgba(0, 0, 0, .08);
}
.modal__row dt {
  flex: none;
  width: 96px;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(26, 26, 26, .55);
}
.modal__row dd {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 15px;
  color: var(--black);
}
.modal__chip {
  background: rgba(232, 93, 61, .12);
  color: var(--orange);
  font-weight: 600;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
}
