/* ─────────────────────────────────────────────────────────────────────
   Soto Varsos — site stylesheet

   Native scrolling throughout. The pinned sections use position: sticky
   rather than a scroll-hijacking transform, so the page still responds to
   the scrollbar, keyboard, find-in-page and touch the way a page should.
   ───────────────────────────────────────────────────────────────────── */

:root {
  --bg: #efe9de;
  --ink: #24231f;
  --ink-60: rgba(36, 35, 31, 0.6);
  --ink-14: rgba(36, 35, 31, 0.14);
  --pad: clamp(20px, 4vw, 56px);
  --measure: min(88%, 1100px);
}

@font-face { font-family: Nunito; font-weight: 400; font-display: swap;
  src: url(/assets/font/nunito-400.woff2) format("woff2"); }
@font-face { font-family: Nunito; font-weight: 600; font-display: swap;
  src: url(/assets/font/nunito-600.woff2) format("woff2"); }
@font-face { font-family: Nunito; font-weight: 700; font-display: swap;
  src: url(/assets/font/nunito-700.woff2) format("woff2"); }
@font-face { font-family: Nunito; font-weight: 800; font-display: swap;
  src: url(/assets/font/nunito-800.woff2) format("woff2"); }

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Nunito, system-ui, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ───────────────────────────────────────────────────────────── header */

.site-header {
  position: fixed;
  z-index: 20;
  top: 0; left: 0;
  padding: 22px var(--pad);
  /* Difference blending keeps the wordmark legible over both the beige page
     and the dark hero image without needing to know which is behind it. */
  mix-blend-mode: difference;
  pointer-events: none;
}
.site-header__brand {
  font-size: clamp(19px, 2vw, 26px);
  font-weight: 800;
  text-decoration: none;
  color: #efe9de;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: auto;
}
/* Revealed once the hero name has scrolled out of view (see site.js). */
.is-brand-visible .site-header__brand { opacity: 1; }

/* ───────────────────────────────────────────────────────────────  hero */

.hero {
  position: relative;
  height: 100svh;
  min-height: 520px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero__frame {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  width: 84%;
  aspect-ratio: 2.39 / 1;      /* anamorphic */
  overflow: hidden;
}
/* Twice the frame height so the parallax can travel a full quarter-viewport
   in either direction without ever exposing an edge. */
.hero__img {
  position: absolute;
  left: 0; top: -50%;
  width: 100%; height: 200%;
  object-fit: cover;
  will-change: transform;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom,
    rgba(20, 19, 17, 0.10) 0%,
    rgba(20, 19, 17, 0.46) 45%,
    rgba(20, 19, 17, 0.10) 100%);
}

.hero__name {
  position: relative;
  z-index: 2;
  margin-top: -6%;
  width: 76%;
  text-align: center;
  font-size: clamp(32px, 6.9vw, 118px);
  line-height: 0.92;
  color: #f4efe6;
  pointer-events: none;
}

.hero__caption {
  position: absolute;
  bottom: 12%;
  z-index: 2;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.5;
  margin: 0;
  transition: opacity 0.4s ease;
  will-change: transform;
}
.hero__caption--left { left: 8%; text-align: left; }
.hero__caption--right { right: 8%; text-align: right; }
.is-brand-visible .hero__caption { opacity: 0; }

@media (max-width: 959px) {
  .hero__frame { width: 92%; }
  .hero__caption { display: none; }
}

/* ────────────────────────────────────────────────────────────── intro */

.intro { padding: clamp(80px, 12vw, 160px) 0; }
.intro__wrap { width: min(88%, 900px); margin: 0 auto; }
.intro__heading {
  font-size: clamp(28px, 4.2vw, 62px);
  margin-bottom: 28px;
}
.intro__text {
  margin: 0;
  font-size: clamp(17px, 1.6vw, 22px);
  line-height: 1.5;
}

/* ────────────────────────────────────────────────────────────── work

   A tall track with a sticky viewport-height stage inside it. Scrolling the
   track advances an index; the stage crossfades between covers and slides the
   title list. No scroll hijacking — the track's own height is the timeline. */

.work { position: relative; }

.work__stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  background: var(--ink);
}

/* The covers form a vertical filmstrip: each sits one stage-height below the
   last and the whole strip slides, so they scroll past rather than fade. */
.work__item {
  position: absolute;
  inset: 0;
  display: block;
  will-change: transform;
}
.work__item img { width: 100%; height: 100%; object-fit: cover; }

/* The titles sit on top of whatever cover happens to be showing, so they can't
   rely on it being dark. This scrim keeps them legible over any image. */
.work__stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: rgba(20, 19, 17, 0.32);
}

/* Every title occupies a fixed slot so the list can be translated by a plain
   multiple of --work-step. Scale is a transform, so it never disturbs layout —
   the active title can grow past its slot without pushing anything. */
.work__titles {
  --work-step: 72px;
  position: absolute;
  z-index: 2;
  left: 0; right: 0;
  top: 50%;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
  color: var(--bg);
  will-change: transform;
}
.work__title {
  text-shadow: 0 1px 18px rgba(20, 19, 17, 0.55);
  height: var(--work-step);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(14px, 1.5vw, 19px);
  font-weight: 700;
  white-space: nowrap;
  will-change: transform, opacity;
}
.work__hint {
  position: absolute;
  z-index: 2;
  left: 0; right: 0;
  bottom: 34px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--bg);
  opacity: 0.5;
}

/* ──────────────────────────────────────────────────────────── resume */

.resume { padding: clamp(80px, 12vw, 140px) 0; border-bottom: 1px solid var(--ink-14); }
.resume__heading,
.hobbies__heading,
.contact__heading {
  font-size: clamp(28px, 4.2vw, 62px);
  width: var(--measure);
  margin: 0 auto 44px;
}
.resume__content {
  width: var(--measure);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 68px;
}
.resume__groupTitle {
  font-size: clamp(20px, 2.2vw, 30px);
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid currentColor;
}
.resume__list { list-style: none; margin: 0; padding: 0; }
.resume__entry {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--ink-14);
}
.resume__entry:last-child { border-bottom: 0; }
.resume__period { color: var(--ink-60); white-space: nowrap; padding-top: 3px; font-weight: 600; }
.resume__role { font-size: 19px; font-weight: 700; margin-bottom: 2px; }
.resume__org { color: var(--ink-60); margin-bottom: 8px; font-weight: 600; }
.resume__desc { margin: 0; max-width: 62ch; }

.resume__skills {
  list-style: none; margin: 0; padding: 0;
  columns: 2; column-gap: 48px; max-width: 620px;
}
.resume__skill {
  padding: 7px 0;
  border-bottom: 1px solid var(--ink-14);
  break-inside: avoid;
  font-weight: 600;
}

.resume__download {
  display: block;
  width: max-content;
  margin: 68px auto 0;
  padding: 15px 32px;
  border: 1px solid currentColor;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.25s, color 0.25s;
}
.resume__download:hover { background: var(--ink); color: var(--bg); }

/* ───────────────────────────────────────────────────────── hobbies

   Ordinary scrolling rows — no pinning, no JavaScript. Each image fills the
   left half at full screen height with its text centred in the right half. */

.hobbies { padding: clamp(72px, 10vw, 140px) 0 clamp(60px, 9vw, 120px); }

.hobbies__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.hobbies__figure {
  position: relative;
  margin: 0;
  height: 100svh;
  overflow: hidden;
}
.hobbies__figure img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hobbies__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(24px, 5vw, 72px);
}
.hobbies__index {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ink-60);
  margin-bottom: 14px;
}
.hobbies__title {
  font-size: clamp(28px, 4.4vw, 62px);
  margin-bottom: 16px;
}
.hobbies__text {
  margin: 0;
  max-width: 38ch;
  color: var(--ink-60);
}

@media (max-width: 767px) {
  .hobbies__row { grid-template-columns: 1fr; }
  .hobbies__figure { height: 60svh; }
  .hobbies__body { padding: clamp(36px, 9vw, 64px) 24px; }
}

/* ─────────────────────────────────────────────────────────── contact */

.contact { padding: clamp(90px, 14vw, 150px) 0 clamp(80px, 12vw, 130px); }
.contact__content { width: var(--measure); margin: 0 auto; }
.contact__mail {
  display: inline-block;
  font-size: clamp(24px, 4.6vw, 66px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-decoration: none;
  word-break: break-word;
}
.contact__mail:hover { text-decoration: underline; }
.contact__note { margin-top: 20px; color: var(--ink-60); }

@media (max-width: 767px) {
  .resume__entry { grid-template-columns: 1fr; gap: 6px; }
  .resume__skills { columns: 1; }
}

/* ────────────────────────────────────────────────────── project pages */

.article-page .site-header {
  position: static;
  mix-blend-mode: normal;
  border-bottom: 1px solid var(--ink-14);
}
.article-page .site-header__brand { opacity: 1; color: var(--ink); }

.article { width: min(88%, 780px); margin: 0 auto; padding: clamp(48px, 8vw, 104px) 0 40px; }
.article__meta { margin: 0 0 14px; font-weight: 600; font-size: 14px; color: var(--ink-60); }
.article__title { margin: 0 0 28px; font-size: clamp(32px, 6vw, 66px); line-height: 1.02; letter-spacing: -0.03em; }
.article__lead { margin: 0 0 44px; font-size: clamp(18px, 2.1vw, 24px); line-height: 1.45; font-weight: 600; }
.article__heading { margin: 56px 0 14px; font-size: clamp(22px, 2.6vw, 30px); }
.article__body { margin: 0 0 20px; }

.article__figure { margin: 40px 0; }
.article__figure img { width: 100%; }
.article__figure figcaption { margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--ink-60); }
/* Wide figures break past the text measure without going full-bleed. */
.article__figure--wide { width: min(96vw, 1180px); margin-left: 50%; transform: translateX(-50%); }

.article-nav {
  width: min(88%, 780px);
  margin: 0 auto;
  padding: 48px 0 96px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--ink-14);
}
.article-nav__btn {
  padding: 14px 26px;
  border: 1px solid currentColor;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
.article-nav__btn:hover { background: var(--ink); color: var(--bg); }

@media (max-width: 600px) {
  .article-nav { flex-direction: column; }
  .article-nav__btn { text-align: center; }
  .article__figure--wide { width: 100%; margin-left: 0; transform: none; }
}
