/* ============================================================
   Ajis — Mobile Developer portfolio  (v3 — full-bleed + swipe)
   Direction: "Runtime" — a page that behaves like live software.
   Type: Bricolage Grotesque (display) · Instrument Sans (body)
         · JetBrains Mono (utility — Kotlin is JetBrains' language)
   Motion: GSAP + ScrollTrigger + Lenis + SplitType (CDN)
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --bg:        #EEF1F7;  /* cool blue-grey ground */
  --surface:   #FFFFFF;
  --surface-2: #E3E8F2;
  --ink:       #131722;
  --muted:     #5B6478;
  --accent:    #2B4BF2;  /* cobalt */
  --accent-ink:#FFFFFF;
  --signal:    #E8590C;  /* sparing: "live / in progress" only */
  --line:      #C9D0DF;

  /* Contact finale is dark in BOTH themes — fixed colors, chosen not inherited */
  --final-fg:     #F2F4FA;
  --final-muted:  #9AA3BC;
  --final-accent: #7C90FF;

  --font-display: "Bricolage Grotesque", "Arial Black", "Segoe UI", sans-serif;
  --font-body:    "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", "Cascadia Code", Consolas, monospace;

  --radius: 14px;
  --radius-sm: 8px;
  --wrap: 1100px;
  --pad: clamp(1.1rem, 4vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #12151F;
    --surface:   #1A1F2E;
    --surface-2: #232A3D;
    --ink:       #E9ECF5;
    --muted:     #97A0B5;
    --accent:    #7C90FF;
    --accent-ink:#0E1220;
    --signal:    #FF8A50;
    --line:      #303950;
  }
}
:root[data-theme="light"] {
  --bg:        #EEF1F7;
  --surface:   #FFFFFF;
  --surface-2: #E3E8F2;
  --ink:       #131722;
  --muted:     #5B6478;
  --accent:    #2B4BF2;
  --accent-ink:#FFFFFF;
  --signal:    #E8590C;
  --line:      #C9D0DF;
}
:root[data-theme="dark"] {
  --bg:        #12151F;
  --surface:   #1A1F2E;
  --surface-2: #232A3D;
  --ink:       #E9ECF5;
  --muted:     #97A0B5;
  --accent:    #7C90FF;
  --accent-ink:#0E1220;
  --signal:    #FF8A50;
  --line:      #303950;
}

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

/* No CSS smooth scroll: Lenis drives scrolling when motion is allowed. */

body {
  margin: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
  font-kerning: normal;
  font-feature-settings: "kern", "liga", "calt";
  overflow-x: clip;
}

/* Digits that sit in columns line up */
.about__facts dd, .timeline__when, .phone__statusbar, .phone__clock {
  font-variant-numeric: tabular-nums;
}

/* The scroll-tweened backdrop. GSAP tweens its background-color per section. */
#bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: var(--bg);
  transition: background-color 0.3s ease; /* covers theme toggle; GSAP overrides inline */
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.08;
  text-wrap: balance;
  margin: 0;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); }

img { max-width: 100%; }

.mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Animation scaffolding ---------- */
html.anim .anim-hide { visibility: hidden; }

.char, .word { display: inline-block; will-change: transform; }
.hero__row, .contact__row { display: block; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem var(--pad);
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}

.topbar__brand {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.topbar__brand-dim { color: var(--muted); font-weight: 400; }
.topbar__dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

.topbar__nav {
  display: none;
  gap: 1.4rem;
  margin-inline: auto;
}
.topbar__nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s;
}
.topbar__nav a:hover { color: var(--ink); }

.topbar__actions {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.topbar__nav + .topbar__actions { margin-left: 0; }

.toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  font-size: 0.78rem;
  transition: color 0.15s, border-color 0.15s;
}
.toggle:hover { color: var(--ink); border-color: var(--muted); }

#theme-toggle { padding: 0.35rem 0.6rem; line-height: 0; }
.toggle__icon {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}

/* ---------- Layout ---------- */
.section {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(3.5rem, 9vw, 6.5rem) var(--pad) 0;
}

/* Full-bleed variant: the section spans edge to edge; contained bits use .shell */
.section--bleed {
  max-width: none;
  padding-inline: 0;
}
.shell {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section__head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.6rem;
  margin-bottom: clamp(1.6rem, 4vw, 2.6rem);
}
.section__title {
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.section__kicker { color: var(--muted); margin: 0; }

/* ---------- Hero — balanced two-column ---------- */
.hero {
  min-height: calc(100svh - 54px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1.6rem, 4vh, 3rem);
  padding: clamp(2rem, 5vh, 3.5rem) var(--pad);
}

/* intro + phone sit side by side, vertically centered as one composition */
.hero__main {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}
.hero__intro {
  display: flex;
  flex-direction: column;
  gap: clamp(1.1rem, 2.5vh, 1.8rem);
}

.eyebrow { color: var(--muted); margin: 0; }
.eyebrow__utc { color: var(--signal); font-weight: 600; }

.hero__title {
  font-size: clamp(2.5rem, 6.4vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.98;
}
.hero__row { display: block; overflow: clip; padding-bottom: 0.06em; } /* char-reveal mask */
.hero__row--accent { color: var(--accent); } /* second line carries the accent: one deliberate pop */

.hero__lede {
  max-width: 42ch;
  font-size: clamp(1.1rem, 0.98rem + 0.7vw, 1.45rem);
  line-height: 1.45;
  color: color-mix(in srgb, var(--ink) 76%, var(--muted));
  text-wrap: pretty;
  margin: 0;
}
.hero__lede strong { color: var(--accent); font-weight: 600; }

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 0.4rem;
}

.hero__scroll {
  color: var(--muted);
  margin: 0;
  text-align: center;
}
.hero__scroll-arrow {
  display: inline-block;
  animation: nudge 1.8s ease-in-out infinite;
}
@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: box-shadow 0.15s, border-color 0.15s;
  will-change: transform;
}
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn--primary:hover { box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn--ghost {
  border: 1.5px solid var(--line);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--ink); }

/* ---------- Phone (hero demo) ---------- */
.hero__device {
  justify-self: center;
  text-align: center;
}

.phone {
  /* Bigger on the right, but never taller than the viewport allows */
  width: min(390px, 88vw, calc((100svh - 150px) * 9 / 17.5));
  aspect-ratio: 9 / 17.5;
  margin-inline: auto;
  background: var(--surface);
  border: 3px solid var(--ink);
  border-radius: 32px;
  box-shadow: 0 18px 50px -18px color-mix(in srgb, var(--ink) 35%, transparent);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-align: left;
}

.phone__statusbar {
  display: flex;
  justify-content: space-between;
  padding: 0.7rem 1.1rem 0.4rem;
  color: var(--muted);
  font-size: 0.72rem;
}
.phone__statusbar-right { display: inline-flex; align-items: center; gap: 0.35rem; }
.phone__net {
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-bottom: 8px solid var(--muted);
}

.phone__screen {
  flex: 1;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
}
.phone__page { animation: page-in 0.25s ease; }
@keyframes page-in {
  from { opacity: 0; transform: translateX(10px); }
  to   { opacity: 1; transform: none; }
}

.phone__label { color: var(--muted); margin-bottom: 0.8rem; }
.phone__big {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 0.6rem;
}
.phone__small { font-size: 0.85rem; color: var(--muted); }
.phone__status {
  margin-top: auto;
  padding-top: 1rem;
  font-size: 0.8rem;
  color: var(--signal);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.phone__list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  font-size: 0.9rem;
}
.phone__list li {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.8rem;
}
.phone__list .mono { color: var(--accent); margin-right: 0.5rem; }
.phone__list--links a { font-weight: 600; text-decoration: none; }
.phone__list--links a::after { content: " ↗"; color: var(--muted); }

.phone__tabbar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.phone__tab {
  background: none;
  border: none;
  padding: 0.75rem 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  cursor: pointer;
  border-top: 2px solid transparent;
  margin-top: -1px;
}
.phone__tab.is-active {
  color: var(--accent);
  border-top-color: var(--accent);
  font-weight: 600;
}

.hero__device-hint {
  color: var(--muted);
  margin-top: 0.9rem;
}

.pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--signal);
  display: inline-block;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

/* ---------- Marquee — full-bleed, velocity-reactive ---------- */
.marquee {
  margin-top: clamp(2rem, 6vh, 4rem);
  border-block: 1px solid var(--line);
  padding-block: 0.9rem;
  overflow: hidden;
}
.marquee__track {
  display: flex;
  width: max-content;
  will-change: transform;
}
.marquee__inner {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.1rem, 2.4vw, 1.8rem);
  letter-spacing: 0.01em;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- About ---------- */
.about {
  display: grid;
  gap: 2.2rem;
}

.about__portrait { justify-self: center; }
.about__photo {
  width: min(260px, 70vw);
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 var(--accent);
  display: block;
}
.about__portrait-note {
  color: var(--muted);
  text-align: center;
  margin-top: 1.1rem;
}

.about__body p { max-width: 62ch; }
.about__body strong { color: var(--accent); font-weight: 600; }
/* First paragraph reads as an editorial lead */
.about__body p:first-child {
  font-size: clamp(1.2rem, 1.05rem + 0.7vw, 1.5rem);
  line-height: 1.42;
  color: var(--ink);
  text-wrap: pretty;
  margin-bottom: 1.1em;
}

.about__facts {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  align-self: start;
}
.about__facts > div {
  background: var(--surface);
  padding: 0.9rem 1.1rem;
}
.about__facts dt { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }
.about__facts dd { margin: 0.25rem 0 0; font-weight: 600; font-size: 0.95rem; }

/* ---------- Skills — full-bleed rows ---------- */
.skillrows { border-bottom: 1px solid var(--line); }
.skillrow {
  border-top: 1px solid var(--line);
  padding: clamp(1.4rem, 3.5vw, 2.4rem) var(--pad);
  display: grid;
  gap: 1.1rem;
  transition: background-color 0.25s ease;
}
.skillrow:hover { background: color-mix(in srgb, var(--surface) 55%, transparent); }

.skillrow__name {
  font-size: clamp(1.35rem, 3.2vw, 2.1rem);
  font-weight: 700;
  transition: transform 0.25s ease;
}
.skillrow:hover .skillrow__name { transform: translateX(10px); }

.chips {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-content: center;
}
.chip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  font-size: 0.9rem;
  font-weight: 500;
}
.chip--core {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  font-weight: 600;
}

/* ---------- Projects — swipe track ---------- */
.projects-viewport { overflow: hidden; }

/* Default (mobile / reduced motion): vertical stack, contained */
.projects-track {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.project {
  display: grid;
  gap: 1.8rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 4vw, 2.4rem);
}
.project-panel + .project-panel { margin-top: 1.6rem; }

.project__meta { color: var(--muted); margin-bottom: 0.7rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.project__title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  margin-bottom: 0.8rem;
}
.project__problem { color: var(--muted); max-width: 58ch; }

.project__points {
  margin: 1rem 0 1.2rem;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.97rem;
}
.project__points strong { font-weight: 600; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-size: 0.72rem;
  color: var(--muted);
}
.tag--live { color: var(--signal); border-color: color-mix(in srgb, var(--signal) 45%, transparent); }
.tag--link { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); text-decoration: none; font-weight: 600; }
.tag--link:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* Mini phone mocks (honest placeholders, drawn in CSS) */
.project__device { text-align: center; }
.mini-phone {
  width: min(210px, 60vw);
  aspect-ratio: 9 / 16;
  margin-inline: auto;
  background: var(--surface-2);
  border: 2.5px solid var(--ink);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  will-change: transform;
}

.mini-phone__bar {
  height: 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.mini-phone__mock {
  flex: 1;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.mock-row {
  height: 12px;
  border-radius: 4px;
  background: var(--line);
}
.mock-row--header { height: 18px; width: 65%; background: var(--muted); }
.mock-row--short { width: 45%; }
.mock-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
}
.mock-grid span {
  aspect-ratio: 1;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.mock-grid span:first-child { background: var(--accent); border-color: var(--accent); }
.mock-total, .mock-score {
  margin-top: auto;
  background: var(--ink);
  color: var(--bg);
  border-radius: 6px;
  padding: 0.45rem 0.6rem;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
}
.mock-card {
  height: 64px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.mock-option {
  height: 22px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.mock-option--picked { border: 2px solid var(--accent); }

.project__mock-note {
  color: var(--muted);
  margin-top: 2rem; /* clearance for the ±26px phone parallax */
  font-size: 0.7rem;
}

/* "More on GitHub" panel */
.project-panel--more {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1rem;
  padding: clamp(2.5rem, 8vw, 5rem) var(--pad);
}
.project-panel__more-kicker { color: var(--muted); margin: 0; }
.project-panel__more-link {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5.5vw, 3.6rem);
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
  border-bottom: 4px solid var(--accent);
  padding-bottom: 0.1em;
  transition: color 0.2s;
}
.project-panel__more-link:hover { color: var(--accent); }
.project-panel__more-note { color: var(--muted); max-width: 34ch; margin: 0; }

/* Pagination dots — app-style page indicator (horizontal mode only) */
.projects-dots {
  display: none;
  justify-content: center;
  gap: 0.55rem;
  padding-top: 1.6rem;
}
.projects-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--line);
  transition: background-color 0.25s, transform 0.25s;
}
.projects-dot.is-active {
  background: var(--accent);
  transform: scale(1.3);
}

/* Horizontal swipe mode — applied by JS on wide screens with motion */
.is-horizontal .projects-track {
  display: flex;
  align-items: stretch;
  gap: 3vw;
  max-width: none;
  width: max-content;
  padding-inline: 6vw;
  will-change: transform;
}
.is-horizontal .project-panel {
  flex-shrink: 0;
  width: min(1040px, 76vw);
  margin: 0 !important;
  min-height: min(62vh, 620px);
  align-content: center;
}
.is-horizontal .projects-dots { display: flex; }

/* ---------- Timeline ---------- */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.timeline__item {
  display: grid;
  gap: 0.3rem;
  padding: 1.2rem 0 1.2rem 1.4rem;
  border-left: 2px solid var(--line);
  position: relative;
}
.timeline__item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 1.7rem;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}
.timeline__when { color: var(--muted); margin: 0; }
.timeline__what {
  font-size: 1.1rem;
  font-weight: 600;
  font-family: var(--font-body);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}
.timeline__detail { color: var(--muted); font-size: 0.95rem; margin: 0.3rem 0 0; max-width: 60ch; }

.certs { margin-top: 2rem; }
.certs__summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
  padding: 0.5rem 0;
}
.certs__list {
  margin: 0.8rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.95rem;
}

/* ---------- Contact — full-bleed dark finale ---------- */
.section--contact {
  margin-top: clamp(3.5rem, 9vw, 6.5rem);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  color: var(--final-fg);
}
.contact-final {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.4rem;
  padding: clamp(4rem, 10vh, 7rem) var(--pad) 3rem;
}
.contact-final__kicker { color: var(--final-muted); margin: 0; }

.contact__title {
  font-size: clamp(2.1rem, 7vw, 5.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  overflow: clip; /* masks the row slide-in so lines don't glide over content */
}
.contact__row { overflow: clip; padding-bottom: 0.07em; }

.contact__mega {
  font-family: var(--font-mono);
  font-size: clamp(0.95rem, 2.6vw, 1.5rem);
  font-weight: 600;
  color: #131722;
  background: var(--final-fg);
  text-decoration: none;
  border-radius: 999px;
  padding: clamp(0.9rem, 2vw, 1.3rem) clamp(1.6rem, 4vw, 2.8rem);
  margin-top: 0.8rem;
  will-change: transform;
  transition: box-shadow 0.2s;
}
.contact__mega:hover { box-shadow: 0 10px 40px -8px rgba(242, 244, 250, 0.45); }
.contact__mega:focus-visible { outline-color: var(--final-accent); }

.contact__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 0.6rem;
}
.btn--contact {
  border: 1.5px solid rgba(242, 244, 250, 0.35);
  color: var(--final-fg);
}
.btn--contact:hover { border-color: var(--final-fg); }
.btn--contact:focus-visible { outline-color: var(--final-accent); }

/* ---------- Footer (lives on the dark finale) ---------- */
.footer {
  border-top: 1px solid rgba(242, 244, 250, 0.14);
  padding: 1.4rem var(--pad);
  text-align: center;
  color: var(--final-muted);
}
.footer p { margin: 0; }

/* ---------- Larger screens ---------- */
@media (min-width: 720px) {
  .topbar__nav { display: flex; }

  .hero__main {
    grid-template-columns: 1fr 0.95fr;
    align-items: center;
  }
  .hero__device { justify-self: end; }

  .about {
    grid-template-columns: auto 1fr;
    column-gap: 3rem;
  }
  .about__portrait { grid-row: 1 / 3; align-self: start; }
  .about__facts { grid-column: 2; grid-template-columns: 1fr 1fr; }

  .skillrow {
    grid-template-columns: minmax(280px, 380px) 1fr;
    align-items: center;
    gap: 2rem;
  }

  .project {
    grid-template-columns: 260px 1fr;
    align-items: center;
  }

  .timeline__item {
    grid-template-columns: 160px 1fr;
    gap: 1.5rem;
  }
  .timeline__item::before { top: 1.6rem; }
}

/* ---------- Sign Master: launch button + live preview ---------- */
.sm-launch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  width: 100%;
}
.mini-phone--live {
  position: relative;
  background: var(--ink);
  transition: transform 0.25s ease;
}
.mini-phone--live img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}
.sm-launch:hover .mini-phone--live { transform: translateY(-4px); }
.sm-launch__play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 54px; height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 92%, transparent);
  color: #fff;
  font-size: 1.1rem;
  padding-left: 3px;
  box-shadow: 0 8px 24px -6px rgba(0,0,0,0.5);
  transition: transform 0.25s ease;
}
.sm-launch:hover .sm-launch__play { transform: scale(1.08); }
.sm-launch__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
  font-weight: 600;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.15rem;
}

/* ---------- Sign Master: modal prototype ---------- */
.sm-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: clamp(0.8rem, 3vw, 2rem);
}
.sm-modal[hidden] { display: none; }
.sm-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 18, 0.72);
  backdrop-filter: blur(6px);
  animation: sm-fade 0.25s ease;
}
.sm-modal__card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  max-height: 92vh;
  animation: sm-pop 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes sm-fade { from { opacity: 0; } }
@keyframes sm-pop { from { opacity: 0; transform: translateY(16px) scale(0.98); } }

.sm-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #f2f4fa;
}
.sm-modal__title { margin: 0; font-size: 0.8rem; }
.sm-modal__title span { color: #9aa3bc; }
.sm-modal__close {
  background: rgba(255,255,255,0.1);
  border: 0;
  color: #f2f4fa;
  width: 34px; height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.15s;
}
.sm-modal__close:hover { background: rgba(255,255,255,0.22); }

.sm-stage { display: grid; place-items: center; min-height: 0; }
.sm-phone {
  position: relative;
  height: min(74vh, 640px);
  aspect-ratio: 412 / 713;
  border: 3px solid #0c0f18;
  border-radius: 30px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,0.7);
}
.sm-screen {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
}
.sm-hotspots { position: absolute; inset: 0; }
.sm-hotspot {
  position: absolute;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.sm-hotspot:hover,
.sm-hotspot:focus-visible {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  box-shadow: inset 0 0 0 2px var(--accent);
  outline: none;
}
.sm-hotspots.reveal .sm-hotspot { animation: sm-tap 0.9s ease; }
@keyframes sm-tap {
  30% { background: color-mix(in srgb, var(--accent) 12%, transparent); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 55%, transparent); }
  100% { background: transparent; box-shadow: inset 0 0 0 2px transparent; }
}

.sm-toolbar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}
.sm-ctl {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  color: #f2f4fa;
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s, opacity 0.15s;
}
.sm-ctl:hover { background: rgba(255,255,255,0.2); }
.sm-ctl:disabled { opacity: 0.4; cursor: default; }
.sm-toolbar__hint { color: #9aa3bc; font-size: 0.72rem; width: 100%; text-align: center; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .anim-hide { visibility: visible !important; }
  .marquee__track { transform: none !important; }
}
