/* ==========================================================================
   site.css — Caleb van der Werff portfolio
   Theme: emerald / pixel, derived from the EliteBook wallpaper (waylandx2.png:
   emerald forest + teal lake + train with an orange stripe). Dominant sampled
   colours: #001818 #003030 #186048 #184830 #004848 — the variables below are
   tuned from those. Accent orange = the train stripe, used very sparingly.
   ========================================================================== */

:root {
  --bg-0: #030d0b;        /* page base — near-black teal            */
  --bg-1: #06181490;      /* translucent panel                      */
  --bg-2: #0a2620;        /* raised panel                           */
  --line: #1d4a3c;        /* hairline borders                       */
  --line-soft: #12332a;
  --emerald: #35b98a;     /* primary                                */
  --emerald-deep: #186048;
  --teal: #3fbfb0;        /* secondary                              */
  --foam: #dcf2e8;        /* primary text                           */
  --mist: #8fb8a8;        /* muted text                             */
  --stripe: #e8873a;      /* train-stripe orange — rare accent      */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-pixel: "Silkscreen", "Press Start 2P", ui-monospace, "SF Mono", Menlo, monospace;
  --rail-w: 56px;
}

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

html { height: 100%; }

body {
  height: 100%;
  background: var(--bg-0);
  color: var(--foam);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow: hidden; /* the snap container scrolls, not the body */
}

::selection { background: var(--emerald-deep); color: var(--foam); }

/* --------------------------------------------------------------
   Wallpaper bleed — the EliteBook's actual desktop background
   (waylandx2.png, the same one visible in the noVNC screen) bleeds
   through the whole site under a dark emerald veil, so the public
   site, the portal and the remote desktop all share one backdrop.
   -------------------------------------------------------------- */
.bg-bleed {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: url("../assets/bg-wall.jpg");
  background-size: cover;
  background-position: center;
}
.bg-bleed::after {
  /* dark veil so text stays readable; lighter at the top so the
     forest + train actually read through */
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3, 13, 11, .72) 0%, rgba(3, 13, 11, .88) 45%, rgba(3, 13, 11, .95) 100%);
}
/* subtle scanline / dither texture over everything */
.bg-scan {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    0deg, rgba(255, 255, 255, .015) 0 1px, transparent 1px 3px);
}

/* --------------------------------------------------------------
   Snap-scroll container (love-ed: scroll snap; only that + rail)
   -------------------------------------------------------------- */
.snap {
  height: 100svh;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.snap::-webkit-scrollbar { display: none; }

.panel {
  min-height: 100svh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 96px clamp(20px, 6vw, 96px) 48px;
  position: relative;
}
.panel-inner { width: min(1040px, 100%); }

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

/* --------------------------------------------------------------
   Section transition — while a panel is not the snap target its
   content rests low and dim; snapping to it lets it settle up into
   place (transform/opacity only, compositor-friendly). Applied only
   when JS tags the body, so no-JS/reduced-motion stay static.
   -------------------------------------------------------------- */
.sections-anim .panel .panel-inner {
  opacity: .22;
  transform: translateY(44px) scale(.985);
  transition: opacity .6s ease, transform .65s cubic-bezier(.22, 1, .36, 1);
}
.sections-anim .panel.active .panel-inner {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------
   Left progress rail (love-ed: section indicator)
   -------------------------------------------------------------- */
.rail {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  z-index: 40;
}
.rail::before {
  content: "";
  position: absolute;
  top: 15%;
  bottom: 15%;
  width: 1px;
  background: var(--line-soft);
}
.rail a {
  position: relative;
  width: 12px;
  height: 12px;
}
.rail a::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  /* pixel square, not a round dot */
  border-radius: 2px;
  transition: background .25s, transform .25s, border-color .25s, box-shadow .25s;
}
.rail a:hover::before { border-color: var(--emerald); }
.rail a.on::before {
  background: var(--emerald);
  border-color: var(--emerald);
  transform: rotate(45deg) scale(1.15);
  box-shadow: 0 0 12px rgba(53, 185, 138, .55);
}
.rail a .tip {
  position: absolute;
  left: 22px;
  top: 50%;
  translate: 0 -50%;
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mist);
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  padding: 3px 8px;
  white-space: nowrap;
  opacity: 0;
  translate: -6px -50%;
  transition: opacity .2s, translate .2s;
  pointer-events: none;
}
.rail a:hover .tip, .rail a.on .tip { opacity: 1; translate: 0 -50%; }
@media (max-width: 760px) { .rail { display: none; } }

/* --------------------------------------------------------------
   Nav (tricks-menu-slider: menu-bar animations)
   -------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(20px, 5vw, 56px);
  transition: background .35s, border-color .35s, backdrop-filter .35s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(4, 16, 13, .8);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line-soft);
}
.nav-logo {
  font-family: var(--font-pixel);
  font-size: 15px;
  color: var(--foam);
  text-decoration: none;
  letter-spacing: .06em;
}
.nav-logo b { color: var(--emerald); font-weight: inherit; }
/* --------------------------------------------------------------
   Access — the nav's only job. A single button that blooms into the
   login panel on hover; on success the panel floods the screen and
   hands over to the portal (see #portal-veil).
   -------------------------------------------------------------- */
.access { position: relative; }
.access-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(340px, calc(100vw - 40px));
  background: var(--bg-2);
  border: 1px solid var(--line);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
  padding: 22px 22px 18px;
  /* closed: clipped to nothing, from the top-right corner it grows out of */
  clip-path: inset(0 0 100% 100%);
  opacity: 0;
  visibility: hidden; /* keeps the closed form out of the tab order */
  pointer-events: none;
  transition: clip-path .5s cubic-bezier(.22, 1, .36, 1), opacity .3s, visibility 0s .5s;
}
.access.open .access-panel {
  clip-path: inset(0 0 0 0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: clip-path .5s cubic-bezier(.22, 1, .36, 1), opacity .3s, visibility 0s;
}
.access-panel h2 { font-size: 17px; }
.access-panel .sub { color: var(--mist); font-size: 12.5px; margin: 4px 0 16px; }
/* fields stagger-rise as the panel opens (same language as the reveals) */
.access-panel .field, .access-panel .login-actions, .access-panel h2, .access-panel .sub {
  opacity: 0;
  translate: 0 10px;
  transition: opacity .35s, translate .35s;
}
.access.open .access-panel .field, .access.open .access-panel .login-actions,
.access.open .access-panel h2, .access.open .access-panel .sub {
  opacity: 1;
  translate: 0 0;
}
.access.open .access-panel h2 { transition-delay: .08s; }
.access.open .access-panel .sub { transition-delay: .12s; }
.access.open .access-panel .field:nth-of-type(1) { transition-delay: .16s; }
.access.open .access-panel .field:nth-of-type(2) { transition-delay: .22s; }
.access.open .access-panel .field:nth-of-type(3) { transition-delay: .28s; }
.access.open .access-panel .login-actions { transition-delay: .34s; }
/* already signed in: the fields give way to a single enter button */
.access.authed .access-panel .field,
.access.authed .access-panel .sub,
.access.authed .access-panel .login-msg { display: none; }
.access-enter { display: none; width: 100%; text-align: center; }
.access.authed .access-enter { display: block; }
.access.authed .access-panel .login-actions #login-submit { display: none; }
@media (prefers-reduced-motion: reduce) {
  .access-panel, .access-panel .field, .access-panel .login-actions,
  .access-panel h2, .access-panel .sub { transition: none; }
}

/* full-screen handover: an emerald wash floods out of the panel's
   corner, then the browser navigates to /portal/ (which fades in
   from the same dark — one continuous move) */
#portal-veil {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  background: radial-gradient(circle at 92% 6%, var(--emerald-deep), var(--bg-0) 60%);
  clip-path: circle(0 at 92% 6%);
  transition: clip-path .8s cubic-bezier(.65, 0, .35, 1);
}
#portal-veil.zoom { clip-path: circle(142% at 92% 6%); pointer-events: auto; }
@media (prefers-reduced-motion: reduce) {
  #portal-veil { transition: none; }
}

.btn {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--foam);
  background: transparent;
  border: 1px solid var(--line);
  padding: 10px 18px;
  cursor: pointer;
  transition: border-color .25s, background .25s, box-shadow .25s, color .25s;
}
.btn:hover {
  border-color: var(--emerald);
  box-shadow: 0 0 0 1px var(--emerald), 0 0 18px rgba(53, 185, 138, .25);
}
.btn-solid { background: var(--emerald-deep); border-color: var(--emerald-deep); }
.btn-solid:hover { background: var(--emerald); color: #04231a; }

/* --------------------------------------------------------------
   Custom cursor (tricks-menu-slider) — dot + lagging ring
   -------------------------------------------------------------- */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  pointer-events: none;
  translate: -50% -50%;
}
.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--emerald);
  border-radius: 1px; /* pixel-ish square dot */
}
.cursor-ring {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(53, 185, 138, .6);
  border-radius: 3px;
  transition: opacity .2s, scale .2s;
}
/* over interactive elements the ring disappears entirely (fades and
   shrinks away) — only the dot stays to mark the pointer */
.cursor-ring.hot {
  opacity: 0;
  scale: .4;
}
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }

/* --------------------------------------------------------------
   Type + section headings (with small emerald gem marker)
   -------------------------------------------------------------- */
.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-pixel);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: 18px;
}
/* the "emerald" — a small spinning gem, the seamless take on
   mysterious-emerald's divider (full-bleed version rejected as bolted-on) */
.gem {
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, var(--teal), var(--emerald) 55%, var(--emerald-deep));
  animation: gemspin 6s linear infinite;
  box-shadow: 0 0 10px rgba(63, 191, 176, .5);
}
@keyframes gemspin {
  0% { transform: rotate(45deg) scale(1); }
  50% { transform: rotate(225deg) scale(.82); }
  100% { transform: rotate(405deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) { .gem { animation: none; transform: rotate(45deg); } }

h1, h2 { font-weight: 650; letter-spacing: -.01em; line-height: 1.12; }
h1 { font-size: clamp(38px, 6vw, 72px); }
h2 { font-size: clamp(26px, 3.6vw, 40px); margin-bottom: 14px; }
.lead { color: var(--mist); font-size: clamp(15px, 1.6vw, 18px); max-width: 56ch; }

/* --------------------------------------------------------------
   Hero
   -------------------------------------------------------------- */
.hero-panel .panel-inner {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}
@media (max-width: 860px) {
  .hero-panel .panel-inner { grid-template-columns: 1fr; }
  .hero-cube-wrap { order: -1; height: 180px; }
}
.hero-title .accent { color: var(--emerald); }
.hero-sub { margin: 18px 0 30px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-loc {
  margin-top: 34px;
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--mist);
  letter-spacing: .12em;
}

/* --------------------------------------------------------------
   Rubik's cube (maxanderson.dev element, emerald recolour)
   -------------------------------------------------------------- */
/* A real 3×3×3: 27 cubies, each with 6 faces; JS (adapted, with permission,
   from maxanderson.dev's self-solving cube) owns every transform and shades
   the emerald stickers per-frame against a fixed light. */
.hero-cube-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 320px;
  perspective: 900px;
}
.cube-spin {
  transform-style: preserve-3d;
  transform: rotateX(-24deg) rotateY(-18deg);
}
.cube {
  position: relative;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
}
.cube .cubie {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
}
.cube .cubie .face {
  position: absolute;
  left: -26px;
  top: -26px;
  width: 52px;
  height: 52px;
  background: #041511;
  border: 3px solid #041511;
  border-radius: 4px;
  backface-visibility: hidden;
}
@media (max-width: 860px) {
  .hero-cube-wrap { height: 200px; perspective: 700px; }
  /* JS owns .cube-spin's transform, so the responsive shrink lives on .cube */
  .cube { transform: scale3d(.62, .62, .62); }
}

/* --------------------------------------------------------------
   About / stats
   -------------------------------------------------------------- */
.stat-row { display: flex; gap: clamp(18px, 4vw, 56px); margin-top: 34px; flex-wrap: wrap; }
.stat b {
  display: block;
  font-family: var(--font-pixel);
  font-size: clamp(22px, 3vw, 34px);
  color: var(--emerald);
}
.stat span { color: var(--mist); font-size: 13px; letter-spacing: .04em; }
.trait-row { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--mist);
  border: 1px solid var(--line-soft);
  background: var(--bg-1);
  padding: 6px 10px;
}

/* --------------------------------------------------------------
   Experience timeline
   -------------------------------------------------------------- */
.xp-list { margin-top: 8px; display: grid; gap: 0; }
.xp {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
}
.xp:last-child { border-bottom: 0; }
.xp time {
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--emerald);
  letter-spacing: .06em;
  padding-top: 4px;
}
.xp h3 { font-size: 16px; font-weight: 600; }
.xp p { color: var(--mist); font-size: 14px; margin-top: 4px; }
@media (max-width: 640px) { .xp { grid-template-columns: 1fr; gap: 4px; } }

/* --------------------------------------------------------------
   Projects — 3D slider (tricks-menu-slider)
   -------------------------------------------------------------- */
.slider-stage {
  position: relative;
  height: 340px;
  margin-top: 26px;
  perspective: 1100px;
}
.slider-ring {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform .85s cubic-bezier(.45, 0, .2, 1);
}
@media (prefers-reduced-motion: reduce) {
  .slider-ring { transition: none; }
}
.slide {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(340px, 62vw); /* JS keeps this in sync with the ring radius */
  margin-left: calc(min(340px, 62vw) / -2);
  margin-top: -160px;
  height: 320px;
  padding: 22px 24px 20px;
  background: linear-gradient(160deg, rgba(10, 38, 32, .97), rgba(5, 21, 17, .97));
  border: 1px solid var(--line);
  backface-visibility: hidden;
  transition: opacity .6s, border-color .6s, box-shadow .6s;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  overflow: hidden; /* nothing ever leaks past the card edge */
}
/* thin emerald→teal signature line across the top of every card */
.slide::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--emerald), var(--teal) 60%, transparent);
  opacity: .35;
  transition: opacity .6s;
}
.slide.is-front {
  border-color: var(--emerald-deep);
  cursor: default;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .5), 0 0 0 1px rgba(53, 185, 138, .18), 0 0 34px rgba(53, 185, 138, .12);
}
.slide.is-front::before { opacity: 1; }
.slide.is-near { opacity: .55; }
.slide.is-far { opacity: .12; }
.slide .s-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.slide .s-icon {
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--bg-0);
  border: 1px solid var(--line-soft);
}
.slide.is-front .s-icon { border-color: var(--emerald-deep); }
.slide h3 {
  font-size: 18px;
  line-height: 1.25;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.slide p {
  color: var(--mist);
  font-size: 13.5px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.slide .s-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;   /* tags pin to the card floor whatever the copy length */
  padding-top: 14px;
}
.slide .s-tags span {
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--teal);
  border: 1px solid var(--line-soft);
  background: rgba(3, 13, 11, .5);
  padding: 3px 7px;
  transition: border-color .3s, color .3s;
}
.slide.is-front .s-tags span { border-color: var(--emerald-deep); }
.slide .s-year {
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--emerald);
  letter-spacing: .08em;
}
.slider-ctl { display: flex; align-items: center; gap: 16px; margin-top: 20px; justify-content: center; }
.slider-ctl .btn { padding: 8px 16px; }
.slider-dots { display: flex; gap: 8px; }
.slider-dots i {
  width: 8px;
  height: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
  transition: background .25s, transform .25s;
}
.slider-dots i.on { background: var(--emerald); transform: rotate(45deg); }

/* --------------------------------------------------------------
   Skills — numbered index + detail panel (same interaction language
   as the expanded menu: pixel labels, emerald line, mask-rise text)
   -------------------------------------------------------------- */
.skill-dex {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(20px, 4vw, 48px);
  align-items: stretch;
}
.skill-list { display: flex; flex-direction: column; align-items: flex-start; }
.sk {
  display: flex;
  align-items: center;
  background: none;
  border: 0;
  padding: 7px 0;
  cursor: pointer;
  color: var(--mist);
  font-family: var(--font-pixel);
  font-size: clamp(16px, 2vw, 22px);
  letter-spacing: .02em;
  text-align: left;
  transition: color .25s;
}
/* entries march in one by one as the section settles (fine-pointer JS
   pages only — .sections-anim gates it exactly like the panel settle) */
.sections-anim .skill-dex .sk {
  opacity: 0;
  translate: -20px 0;
  transition: opacity .5s ease, translate .5s cubic-bezier(.22, 1, .36, 1), color .25s;
}
.sections-anim .skill-dex.shown .sk { opacity: 1; translate: 0 0; }
.sections-anim .skill-dex.shown .sk:nth-child(1) { transition-delay: .05s; }
.sections-anim .skill-dex.shown .sk:nth-child(2) { transition-delay: .13s; }
.sections-anim .skill-dex.shown .sk:nth-child(3) { transition-delay: .21s; }
.sections-anim .skill-dex.shown .sk:nth-child(4) { transition-delay: .29s; }
.sections-anim .skill-dex.shown .sk:nth-child(5) { transition-delay: .37s; }
.sections-anim .skill-dex.shown .sk:nth-child(6) { transition-delay: .45s; }
.sk .sk-line {
  display: block;
  width: 0;
  height: .18em;
  margin-right: 0;
  background: var(--emerald);
  box-shadow: 0 0 10px rgba(53, 185, 138, .0);
  transition: width .35s cubic-bezier(.65, 0, .35, 1), margin-right .35s cubic-bezier(.65, 0, .35, 1), box-shadow .35s;
}
.sk .sk-num {
  font-size: .5em;
  margin-left: .7em;
  margin-top: -.9em;
  letter-spacing: .1em;
  color: var(--mist);
  opacity: .7;
  transition: color .25s, transform .3s cubic-bezier(.22, 1, .36, 1);
}
.sk:hover, .sk.on { color: var(--foam); }
.sk.on { color: var(--emerald); text-shadow: 0 0 22px rgba(53, 185, 138, .35); }
.sk:hover .sk-line, .sk.on .sk-line { width: .9em; margin-right: .35em; }
.sk.on .sk-line { box-shadow: 0 0 12px rgba(53, 185, 138, .55); }
.sk.on .sk-num { color: var(--emerald); opacity: 1; transform: translateY(-2px) scale(1.15); }
.sk .sk-desc { display: none; } /* inline copy is for narrow/touch layout */

.skill-view {
  position: relative;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(10, 38, 32, .96), rgba(5, 21, 17, .96));
  padding: 26px 28px;
  min-height: 100%;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
/* pixel corner brackets — the view panel reads as a targeting frame */
.skill-view::before, .skill-view::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
  transition: border-color .3s;
}
.skill-view::before { top: 6px; left: 6px; border-top: 2px solid var(--emerald-deep); border-left: 2px solid var(--emerald-deep); }
.skill-view::after { bottom: 6px; right: 6px; border-bottom: 2px solid var(--emerald-deep); border-right: 2px solid var(--emerald-deep); }
.skill-view.flash::before, .skill-view.flash::after { border-color: var(--emerald); }
.skill-view.flash { animation: skflash .55s ease-out; }
@keyframes skflash {
  0% { border-color: var(--emerald); box-shadow: 0 0 0 1px rgba(53, 185, 138, .35), 0 0 28px rgba(53, 185, 138, .18); }
  100% { border-color: var(--line); box-shadow: 0 0 0 0 rgba(53, 185, 138, 0); }
}
.sk-watermark {
  position: absolute;
  top: -6px;
  right: 10px;
  font-family: var(--font-pixel);
  font-size: clamp(64px, 8vw, 110px);
  line-height: 1;
  color: var(--emerald);
  opacity: .12;
  pointer-events: none;
}
.sk-watermark.tick { animation: wmtick .45s cubic-bezier(.22, 1, .36, 1); }
@keyframes wmtick {
  from { transform: translateY(26px); opacity: 0; }
  to { transform: translateY(0); opacity: .12; }
}
.sk-view-mask { overflow: hidden; }
.sk-view-text {
  color: var(--foam);
  font-size: clamp(15px, 1.7vw, 18px);
  max-width: 34ch;
  transform: translateY(0);
}
.sk-view-text.rise { animation: skrise .5s cubic-bezier(.22, 1, .36, 1); }
@keyframes skrise {
  from { transform: translateY(110%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .sk-view-text.rise, .sk-watermark.tick, .skill-view.flash { animation: none; }
  .sections-anim .skill-dex .sk { opacity: 1; translate: 0 0; transition: color .25s; }
}

/* narrow / touch: the panel hides, each entry unfolds in place */
@media (hover: none), (max-width: 760px) {
  .skill-dex { grid-template-columns: 1fr; }
  .skill-view { display: none; }
  .sk { flex-wrap: wrap; }
  .sk .sk-desc {
    display: block;
    flex-basis: 100%;
    font-family: var(--font-body);
    font-size: 13.5px;
    color: var(--mist);
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s ease, margin .4s ease;
  }
  .sk.on .sk-desc { max-height: 90px; margin: 4px 0 6px; }
}

/* --------------------------------------------------------------
   Contact
   -------------------------------------------------------------- */
.contact-panel .panel-inner { text-align: center; }
.contact-panel .kicker { justify-content: center; }
.contact-panel .lead { margin: 0 auto; }
.contact-ctas { margin-top: 30px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.contact-phone { margin-top: 22px; font-family: var(--font-pixel); font-size: 12px; color: var(--mist); letter-spacing: .1em; }
.foot {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--mist);
  font-size: 12px;
  opacity: .75;
}

/* --------------------------------------------------------------
   Login form fields (mechanism carried over from the old portal;
   the form lives inside the nav's access panel)
   -------------------------------------------------------------- */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  background: var(--bg-0);
  border: 1px solid var(--line-soft);
  color: var(--foam);
  font: inherit;
  font-size: 15px;
  padding: 10px 12px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus { border-color: var(--emerald); box-shadow: 0 0 0 1px var(--emerald); }
.login-msg { min-height: 20px; font-size: 13px; color: var(--stripe); margin-bottom: 10px; }
.login-actions { display: flex; gap: 10px; }
.login-actions .btn { flex: 1; text-align: center; }
#login-form.is-shaking { animation: shake .4s; }
@keyframes shake {
  20% { translate: -8px 0; } 40% { translate: 7px 0; }
  60% { translate: -5px 0; } 80% { translate: 3px 0; }
}

/* reveal-on-scroll */
[data-reveal] { opacity: 0; translate: 0 22px; transition: opacity .7s, translate .7s; }
[data-reveal].shown { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; translate: 0 0; transition: none; }
}

/* --------------------------------------------------------------
   Scroll train — the little two-car train from the wallpaper rides
   a track across the bottom of the viewport, its position tied to
   scroll progress (top of site = off-screen left, end = right).
   The one place the orange stripe accent gets to move.
   -------------------------------------------------------------- */
.train-track {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 12px;
  height: 22px;
  z-index: 30;
  pointer-events: none;
}
.train-track::after {
  /* dashed rail under the train */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--line) 0 10px, transparent 10px 16px);
  opacity: .5;
}
.train {
  position: absolute;
  bottom: 1px;
  left: 0;
  width: 96px;
  will-change: transform;
}
.train svg { display: block; width: 100%; height: auto; }
@media (hover: none), (pointer: coarse), (max-width: 760px), (prefers-reduced-motion: reduce) {
  .train-track { display: none; }
}
