/* ============================================================
   Jason Sanders — portfolio
   Plain CSS, no build step.
   Cool light-gray studio backdrop, monospaced details, and mint
   accents. Projects ride a horizontal snap reel with details on
   the left, a large screenshot on the right, side arrows, and a
   thumbnail strip along the bottom.
   ============================================================ */

:root {
  /* Studio backdrop (from reference image): cool gray, lit center */
  --bg:        #dfe3e4;
  --bg-bright: #eceeee;
  --bg-edge:   #c9ced0;

  /* Dark instrument surfaces (buttons, image letterboxing) */
  --panel:   #161b19;
  --panel-2: #1e2422;

  /* Scan accent (mint indicator green) */
  --accent:     #8fe6bb;
  --accent-dim: rgba(143, 230, 187, 0.35);
  --accent-ink: #2f7d55;   /* readable mint on the light backdrop */

  /* Ink on the light backdrop */
  --fg:    #23292a;
  --muted: #5f696b;
  --faint: #8b9496;

  --shadow: rgba(23, 28, 27, 0.35);

  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --text-xs: 0.6875rem;   /* 11px — HUD micro labels */
  --text-sm: 0.8125rem;   /* 13px — HUD rows, meta   */
  --text-base: 1rem;

  --maxw: 1440px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --reel-gap: clamp(1.5rem, 4vw, 3rem);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Soft studio light: bright center falling off to cooler edges */
  background:
    radial-gradient(120% 90% at 50% 38%, var(--bg-bright) 0%, var(--bg) 55%, var(--bg-edge) 100%)
    fixed var(--bg);
  display: flex;
  flex-direction: column;
}

a { color: inherit; }

::selection {
  background: var(--panel);
  color: var(--accent);
}

/* ---------- Top bar: identity + nav ---------- */
.frame-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 4vw, 3rem) 0;
}

.ident-top__name {
  margin: 0;
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Blinking terminal caret after the name */
.ident-top__name::after {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.9em;
  margin-left: 0.2em;
  vertical-align: -0.08em;
  background: var(--fg);
  animation: caret 1.1s steps(1) infinite;
}

@keyframes caret { 50% { opacity: 0; } }

.ident-top__role {
  margin: 0.3rem 0 0;
  font-family: var(--mono);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.frame-nav {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2rem);
}

.frame-nav__link {
  font-family: var(--mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
  transition: color 180ms ease, border-color 180ms ease;
}

.frame-nav__link:hover,
.frame-nav__link:focus-visible {
  color: var(--fg);
  border-color: var(--fg);
  outline: none;
}

.frame-nav__link.is-current {
  color: var(--fg);
  border-color: var(--fg);
}

/* ---------- Stage: fills the window; thumbs line the bottom ---------- */
.stage {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(1rem, 2.5vw, 2rem) 0 0;
  min-height: 0;
}

/* ---------- Survey: centered between top bar and thumbs ---------- */
.survey {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}

.survey__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 clamp(3.5rem, 7vw, 6rem);
  margin-bottom: clamp(0.75rem, 2vw, 1.25rem);
}

.survey__label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  font-family: var(--mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

.hud-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4fae7f; /* darker mint reads on the light bg */
  box-shadow: 0 0 0 3px rgba(79, 174, 127, 0.22);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(79, 174, 127, 0.08); } }

.survey__counter {
  margin: 0;
  font-family: var(--mono);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.survey__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--faint);
  border-radius: 0;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.survey__btn svg { width: 18px; height: 18px; }

.survey__btn:hover,
.survey__btn:focus-visible {
  background: var(--panel);
  border-color: var(--panel);
  color: var(--accent);
  outline: none;
}

.survey__btn:disabled {
  opacity: 0.3;
  cursor: default;
  background: transparent;
  border-color: var(--faint);
  color: var(--fg);
}

/* ---------- The reel: one slide at a time, arrows in the gutters ---------- */
.reel-wrap {
  display: grid;
  grid-template-columns: clamp(3.5rem, 7vw, 6rem) minmax(0, 1fr) clamp(3.5rem, 7vw, 6rem);
  align-items: center;
}

.survey__btn--prev { justify-self: center; }
.survey__btn--next { justify-self: center; }

.reel {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;         /* Firefox */
  -ms-overflow-style: none;
  overscroll-behavior-x: contain;
}

.reel::-webkit-scrollbar { display: none; }

.reel:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: -2px;
}

.reel__track {
  display: flex;
  gap: var(--reel-gap);
  list-style: none;
  margin: 0;
  padding: 0;
}

.slide {
  flex: 0 0 auto;
  width: 100%;   /* one project fills the view; no peeking neighbor */
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: grid;
  grid-template-columns: clamp(250px, 26vw, 340px) minmax(0, 1fr);
  gap: clamp(1.5rem, 3.5vw, 3rem);
  align-items: center;
}

/* ---------- Left: project details, straight on the backdrop ---------- */
.slide__panel {
  font-family: var(--mono);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-width: 0;
}

.panel__name {
  margin: 0;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--fg);
}

.panel__role {
  margin: 0;
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

/* Plain-language project description */
.panel__desc {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--muted);
  max-width: 38ch;
}

.panel__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.4rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(35, 41, 42, 0.18);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 0;
}

.panel__foot-pos {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel__link {
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--accent-ink);
  letter-spacing: 0.18em;
  font-weight: 600;
  transition: color 160ms ease;
}

.panel__link:hover,
.panel__link:focus-visible {
  color: var(--fg);
  outline: none;
}

.panel__link::after {
  content: "\2197";
  margin-left: 0.35em;
}

/* ---------- Right: the capture (screenshot) ---------- */
.slide__capture {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  max-height: min(62svh, 640px);  /* keep the whole view inside the window */
  width: 100%;
  text-decoration: none;
  color: inherit;
  background: var(--panel-2);
  overflow: hidden;
  box-shadow: 0 32px 64px -28px var(--shadow);
}

.slide__capture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 600ms var(--ease);
}

.slide__capture:hover img,
.slide__capture:focus-visible img { transform: scale(1.015); }

.slide__capture:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 4px;
}

/* ---------- Thumbnail strip: lines the bottom of the window ---------- */
.thumbs {
  flex: 0 0 auto;
  display: flex;
  justify-content: safe center;
  gap: clamp(0.5rem, 1.2vw, 0.8rem);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin-top: auto;
  padding: clamp(0.75rem, 1.8vw, 1.25rem) clamp(1.25rem, 4vw, 3rem) clamp(0.9rem, 2vw, 1.5rem);
}

.thumbs::-webkit-scrollbar { display: none; }

.thumb {
  flex: 0 0 auto;
  width: clamp(72px, 7.4vw, 104px);
  padding: 0;
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  font: inherit;
  color: var(--muted);
  text-align: left;
  opacity: 0.55;
  filter: saturate(0.4);
  transition: opacity 220ms ease, filter 220ms ease, color 220ms ease;
}

.thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  background: var(--panel-2);
  outline: 1px solid transparent;
  box-shadow: 0 10px 22px -9px rgba(23, 28, 27, 0.48);
  transition: outline-color 220ms ease, box-shadow 220ms ease, transform 220ms var(--ease);
}

.thumb__label {
  display: block;
  margin-top: 0.4rem;
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thumb:hover,
.thumb:focus-visible {
  opacity: 1;
  filter: none;
  color: var(--fg);
  outline: none;
}

.thumb.is-active {
  opacity: 1;
  filter: none;
  color: var(--fg);
}

.thumb:hover img,
.thumb:focus-visible img,
.thumb.is-active img {
  box-shadow: 0 14px 28px -9px rgba(23, 28, 27, 0.58);
  transform: translateY(-2px);
}

.thumb.is-active img { outline-color: var(--fg); }

.thumb:focus-visible img { outline: 2px solid var(--fg); }

/* ---------- Bottom frame / footer ---------- */
.frame-bottom {
  flex-shrink: 0;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 4vw, 3rem) clamp(2rem, 4vw, 3rem);
}

.frame-bottom__avail {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--muted);
}

.frame-bottom__email {
  display: inline-block;
  margin: 0.5rem 0 1.25rem;
  font-family: var(--mono);
  font-weight: 600;
  font-size: clamp(1.05rem, 2.6vw, 1.5rem);
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--fg);
  border-bottom: 1px solid transparent;
  transition: border-color 180ms ease;
}

.frame-bottom__email:hover,
.frame-bottom__email:focus-visible {
  border-color: var(--fg);
  outline: none;
}

.frame-bottom__legal {
  margin: 0;
  font-family: var(--mono);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ============================================================
   Résumé page
   ============================================================ */
.resume {
  flex: 1 0 auto;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 3rem) clamp(3rem, 6vw, 5rem);
}

.resume__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.resume__name {
  margin: 0;
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(1.6rem, 4.2vw, 2.6rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.resume__role {
  margin: 0.6rem 0 0;
  font-family: var(--mono);
  font-size: var(--text-sm);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Download control styled like an instrument button */
.resume__download {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.2rem;
  font-family: var(--mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--accent);
  background: var(--panel);
  box-shadow: 0 18px 36px -20px var(--shadow);
  transition: color 180ms ease, transform 180ms var(--ease);
}

.resume__download svg { width: 16px; height: 16px; }

.resume__download:hover,
.resume__download:focus-visible {
  color: #fff;
  transform: translateY(-2px);
  outline: none;
}

.resume__download:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

.resume__section {
  padding: clamp(1.5rem, 3.5vw, 2.25rem) 0;
  border-top: 1px solid rgba(35, 41, 42, 0.16);
  display: grid;
  grid-template-columns: clamp(140px, 20vw, 200px) minmax(0, 1fr);
  gap: 1rem clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.resume__section-label {
  margin: 0;
  font-family: var(--mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
}

.resume__summary {
  margin: 0;
  font-size: var(--text-base);
  line-height: 1.65;
  max-width: 62ch;
}

.resume__contact-list,
.resume__tags,
.resume__duties,
.resume__edu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.resume__contact-list {
  display: grid;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: var(--text-sm);
}

.resume__contact-list a {
  text-decoration: none;
  border-bottom: 1px solid rgba(35, 41, 42, 0.3);
  transition: border-color 160ms ease;
}

.resume__contact-list a:hover,
.resume__contact-list a:focus-visible {
  border-color: var(--fg);
  outline: none;
}

.resume__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.resume__tags li {
  font-family: var(--mono);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(35, 41, 42, 0.28);
}

.resume__job-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}

.resume__job-title {
  margin: 0;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.resume__job-period {
  font-family: var(--mono);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.resume__job-org {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: var(--text-base);
}

.resume__job-org a {
  text-decoration: none;
  border-bottom: 1px solid rgba(35, 41, 42, 0.3);
  transition: border-color 160ms ease, color 160ms ease;
}

.resume__job-org a:hover,
.resume__job-org a:focus-visible {
  color: var(--fg);
  border-color: var(--fg);
  outline: none;
}

.resume__duties {
  margin-top: 1.1rem;
  display: grid;
  gap: 0.6rem;
  max-width: 62ch;
}

.resume__duties li {
  position: relative;
  padding-left: 1.2rem;
  line-height: 1.6;
  color: var(--fg);
  opacity: 0.85;
}

.resume__duties li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.66em;
  width: 5px;
  height: 5px;
  background: #4fae7f;
}

.resume__edu-list { display: grid; gap: 1.1rem; }

.resume__edu-degree {
  margin: 0;
  font-weight: 700;
  font-size: var(--text-base);
}

.resume__edu-school {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .frame-top {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .stage {
    padding-top: 1.5rem;
  }

  .survey {
    justify-content: flex-start;
  }

  /* Swipe + thumbnails take over; hide the desktop gutter arrows */
  .reel-wrap {
    grid-template-columns: minmax(0, 1fr);
    padding-right: 1.25rem;
    padding-left: 1.25rem;
  }
  .survey__btn--prev,
  .survey__btn--next { display: none; }

  .slide {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-content: start;
  }

  /* Lead with the work itself, then explain it underneath. */
  .slide__capture { order: 1; }

  .slide__panel {
    order: 2;
    gap: 0.7rem;
  }

  .panel__desc {
    max-width: 58ch;
  }

  .slide__capture { max-height: none; }

  .survey__head { padding: 0 1.25rem; }

  /* Keep direct project navigation reachable while the page scrolls. */
  .thumbs {
    position: sticky;
    bottom: 0;
    z-index: 10;
    justify-content: flex-start;
    width: 100%;
    padding: 0.75rem 1.25rem calc(0.75rem + env(safe-area-inset-bottom));
    background: rgba(223, 227, 228, 0.92);
    border-top: 1px solid rgba(35, 41, 42, 0.12);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }

  .thumb {
    width: 84px;
  }

  .resume__section { grid-template-columns: 1fr; gap: 0.9rem; }
}

@media (max-width: 560px) {
  .frame-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem 1rem 0;
  }

  .ident-top__name {
    font-size: 1.1rem;
  }

  .frame-nav {
    width: 100%;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .frame-nav__link {
    font-size: 0.625rem;
  }

  .stage {
    padding-top: 1.75rem;
  }

  .survey__head {
    padding: 0 1rem;
    margin-bottom: 1rem;
  }

  .reel-wrap {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .slide {
    gap: 1rem;
  }

  .slide__panel {
    gap: 0.55rem;
  }

  .panel__name {
    font-size: clamp(1.45rem, 8vw, 2rem);
    letter-spacing: 0.05em;
  }

  .panel__role {
    line-height: 1.55;
  }

  .panel__desc {
    font-size: 0.9375rem;
    line-height: 1.55;
  }

  .panel__foot {
    margin-top: 0.2rem;
  }

  .slide__capture {
    box-shadow: 0 20px 40px -24px var(--shadow);
  }

  .thumb {
    width: 76px;
  }

  .thumbs {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .thumb__label {
    font-size: 0.5625rem;
  }

  .resume {
    padding: 2.25rem 1rem 3rem;
  }

  .resume__head {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 2rem;
  }

  .resume__name {
    font-size: clamp(1.65rem, 9vw, 2.25rem);
    letter-spacing: 0.08em;
  }

  .resume__download {
    justify-content: center;
    width: 100%;
  }

  .resume__section {
    padding: 1.5rem 0;
  }

  .resume__job-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .resume__job-period {
    order: -1;
  }

  .resume__tags {
    gap: 0.4rem;
  }

  .frame-bottom {
    padding: 2rem 1rem 2.5rem;
  }
}

/* ---------- Motivated load-in ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    animation: reveal 0.7s var(--ease) forwards;
    animation-delay: var(--delay, 0ms);
  }
  @keyframes reveal {
    to { opacity: 1; transform: translateY(0); }
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .reel { scroll-behavior: auto !important; }
  .ident-top__name::after { animation: none; }
}
