/* =========================================================
   Yana — portfolio + CV
   Design tokens taken from BRAND-GUIDELINES.md
   ---------------------------------------------------------
   1.  Fonts (hosted locally)
   2.  Tokens
   3.  Reset & base
   4.  Helpers
   5.  Buttons, links, tags
   6.  Header
   7.  Hero + portrait slider
   8.  Path (horizontal timeline)
   9.  Work (cards + pop-up)
   10. Contact
   11. Footer
   12. CV page
   13. Responsive
   ========================================================= */

/* ---------- 1. Fonts ---------------------------------- */

@font-face {
  font-family: "Gloock";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/gloock-400.woff2") format("woff2");
}

@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/schibsted-grotesk-400.woff2") format("woff2");
}

@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/schibsted-grotesk-500.woff2") format("woff2");
}

@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/schibsted-grotesk-600.woff2") format("woff2");
}

/* ---------- 2. Tokens --------------------------------- */

:root {
  /* Colors */
  --peach: #FBEAE0;
  --chocolate: #3B2418;
  --soft-chocolate: #7A5A4C;
  --burgundy: #6D1A36;
  --deep-burgundy: #7A2140;
  --rose: #E7A6B8;
  --gray-blue: #B9CCDA;
  --on-gray-blue: #22364A;
  --peach-line: #E5C9B8;
  --tag-border: #C9A796;
  --image-bg: #F4D7C6;

  /* Fonts */
  --font-display: "Gloock", Georgia, "Times New Roman", serif;
  --font-body: "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  /* Spacing scale: 8 / 16 / 24 / 48 / 96 / 144 */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 48px;
  --space-5: 96px;
  --space-6: 144px;

  /* Grid */
  --max-width: 1600px;
  --gutter: 24px;
  --side-margin: 16px;

  /* Shape & motion */
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 24px;
  --header-height: 76px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (min-width: 600px) {
  :root { --side-margin: 22px; }
}

@media (min-width: 1024px) {
  :root { --side-margin: 26px; }
}

/* ---------- 3. Reset & base --------------------------- */

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

html {
  /* Page-to-section scrolling is animated in JS (see main.js); keep this "auto"
     so native smooth-scroll doesn't double up with the custom easing. */
  scroll-behavior: auto;
  scroll-padding-top: calc(var(--header-height) + var(--space-3));
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--peach);
  color: var(--chocolate);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  margin: 0 0 var(--space-2);
  color: var(--chocolate);
}

h1 { font-size: clamp(40px, 7vw, 64px); }
h2 { font-size: clamp(32px, 4.6vw, 56px); }
h3 { font-size: clamp(22px, 2.4vw, 28px); }

p { margin: 0 0 var(--space-2); }
p:last-child { margin-bottom: 0; }

ul { margin: 0; padding: 0; list-style: none; }

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

/* Focus: 2 px burgundy ring, 3 px offset */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--burgundy);
  outline-offset: 3px;
  border-radius: 4px;
}

/* On dark burgundy surfaces the ring flips to peach */
.contact :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--peach);
}

::selection { background: var(--rose); color: var(--chocolate); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 4. Helpers -------------------------------- */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--side-margin);
}

.section {
  padding-block: clamp(var(--space-5), 10vw, var(--space-6));
}

.section--tight { padding-block: var(--space-5); }

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

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -100px;
  z-index: 200;
  background: var(--burgundy);
  color: var(--peach);
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 500;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip-link:focus-visible { top: var(--space-2); outline-color: var(--chocolate); }

.section-label {
  display: block;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--burgundy);
  margin-bottom: var(--space-2);
}
.section-label--on-burgundy { color: var(--gray-blue); }

.section-intro {
  max-width: 56ch;
  color: var(--soft-chocolate);
  font-size: 18px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}
.section-head__text { flex: 1 1 420px; min-width: 0; }
.section-head h2 { margin-bottom: var(--space-2); }

/* Small illustration accent */
.accent-illus {
  width: clamp(56px, 7vw, 84px);
  height: auto;
  flex: none;
  margin-top: var(--space-2);
  opacity: 0.95;
}

/* Divider */
.rule { border: 0; border-top: 1px solid var(--peach-line); margin: 0; }

/* Scroll reveal: fade + rise, plays once via IntersectionObserver (main.js) */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Timeline roles: slide in from the left instead of rising */
.reveal-left {
  opacity: 0;
  transform: translateX(-32px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-left.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .project-card__image:hover { transform: none !important; }
}

/* ---------- 5. Buttons, links, tags ------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  padding: 16px 28px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
              border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn-primary {
  background: var(--burgundy);
  color: var(--peach);
  border-color: var(--burgundy);
}
.btn-primary:hover { background: var(--chocolate); border-color: var(--chocolate); }

.btn-secondary {
  background: transparent;
  color: var(--burgundy);
  border-color: var(--burgundy);
}
.btn-secondary:hover { background: var(--burgundy); color: var(--peach); }

.btn-on-burgundy {
  background: var(--gray-blue);
  color: var(--on-gray-blue);
  border-color: var(--gray-blue);
}
.btn-on-burgundy:hover { background: var(--peach); border-color: var(--peach); color: var(--chocolate); }

.btn--small { padding: 11px 20px; font-size: 15px; }
.btn--serif { font-family: var(--font-display); font-size: 18px; font-weight: 400; }

/* Gloock serif link with a thin burgundy underline, no box */
.link-serif {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--chocolate);
  text-decoration: underline;
  text-decoration-color: var(--burgundy);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.link-serif:hover { color: var(--burgundy); }

.text-link {
  color: var(--burgundy);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.text-link:hover {
  color: var(--chocolate);
  text-decoration-thickness: 2px;
}
.text-link--on-burgundy { color: var(--peach); }
.text-link--on-burgundy:hover { color: var(--gray-blue); }

.tag {
  display: inline-block;
  font-size: 13px;
  line-height: 1.3;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--tag-border);
  color: var(--chocolate);
  background: transparent;
  white-space: nowrap;
}
.tag--filled {
  background: var(--gray-blue);
  border-color: var(--gray-blue);
  color: var(--on-gray-blue);
  font-weight: 500;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

/* Placeholder marker */
.placeholder-flag {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--burgundy);
  border: 1px dashed var(--burgundy);
  border-radius: 999px;
  padding: 3px 10px;
}

/* ---------- 6. Header --------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--peach);
  box-shadow: none;
  transition: box-shadow 0.25s var(--ease);
}

/* Same peach as the page itself — no visible bar, just a very soft lift once scrolled */
.site-header.is-scrolled {
  box-shadow: 0 6px 18px rgba(59, 36, 24, 0.08);
}

.site-header > .container {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

/* Monogram instead of the full word mark — the name is already in the hero */
.site-logo {
  display: inline-flex;
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1;
  color: var(--chocolate);
  text-decoration: none;
}
.site-logo .dot { color: var(--burgundy); }
.site-logo:hover { color: var(--burgundy); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1.5px solid var(--burgundy);
  color: var(--burgundy);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.nav-links a {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--chocolate);
  text-decoration: none;
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover,
.nav-links a[aria-current="true"],
.nav-links a[aria-current="page"] {
  color: var(--burgundy);
  border-bottom-color: var(--burgundy);
}

/* The Contact pill is a real button, not an underlined text link */
.nav-links a.btn {
  color: var(--peach);
  border: 1.5px solid var(--burgundy);
  padding: 11px 22px;
}
.nav-links a.btn:hover { color: var(--peach); border-color: var(--chocolate); }

/* ---------- 7. Hero ----------------------------------- */

.hero {
  position: relative;
  padding-block: clamp(var(--space-3), 3vw, var(--space-4)) clamp(var(--space-3), 5vw, var(--space-4));
  overflow: hidden;
}

/* Brand pattern: right side only, repeating tile, soft at 50% opacity
   so the photo stays the focus. Faded on every edge (left, top, bottom)
   with a two-layer mask so it never shows a hard edge — and the top
   fade is pinned to the header height so it never shows under it.
   Decorative — never behind the text column. */
.hero__pattern {
  position: absolute;
  top: 0;
  right: 0;
  width: 46%;
  height: 100%;
  background-image: url("https://sites.9live.nl/site-assets/60/af5e856078262de15f29a2ef8cac9ffd.svg");
  background-repeat: repeat;
  background-position: top right;
  background-size: 270px 290px;
  opacity: 0.5;
  -webkit-mask-image:
    linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 45%, rgba(0,0,0,0) 95%),
    linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0) var(--header-height), rgba(0,0,0,1) calc(var(--header-height) + 48px), rgba(0,0,0,1) calc(100% - 64px), rgba(0,0,0,0) 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 45%, rgba(0,0,0,0) 95%),
    linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0) var(--header-height), rgba(0,0,0,1) calc(var(--header-height) + 48px), rgba(0,0,0,1) calc(100% - 64px), rgba(0,0,0,0) 100%);
  mask-composite: intersect;
  pointer-events: none;
  z-index: 0;
}

.hero > .container { position: relative; z-index: 1; }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
  gap: clamp(var(--space-3), 3vw, var(--space-4));
  /* Top-aligned, so the photo starts level with the "Portfolio and CV"
     label instead of floating above it. */
  align-items: start;
}

/* One measure for the whole left column: every block shares the same left
   edge and the same width, so the text reads as a single column. The name
   is the one exception — it is a single display line. */
.hero__text > * { max-width: 620px; }

.hero-name {
  max-width: none;
  font-size: clamp(44px, 8vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-2);
}
.hero-name .dot { color: var(--burgundy); }

.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.1vw, 36px);
  line-height: 1.3;
  margin: 0 0 16px;
}

/* Soft marker-pen highlight behind "clear" only — exactly the word's width,
   sitting behind the letters. Text keeps its normal colour. */
.mark-clear {
  background: linear-gradient(
    transparent 55%,
    rgba(185, 204, 218, 0.85) 55%,
    rgba(185, 204, 218, 0.85) 92%,
    transparent 92%
  );
  color: inherit;
  padding: 0 0.08em;
  margin: 0 -0.04em;
}

/* Same marker-pen highlight, applied to "easy to choose" in the intro copy */
.mark-easy {
  background: linear-gradient(
    transparent 50%,
    rgba(185, 204, 218, 0.85) 50%,
    rgba(185, 204, 218, 0.85) 86%,
    transparent 86%
  );
  color: inherit;
  padding: 0 0.08em;
  margin: 0 -0.04em;
}

/* Second display line under the main heading, a step smaller */
.hero-kicker {
  font-family: var(--font-display);
  font-size: clamp(18px, 1.9vw, 23px);
  line-height: 1.35;
  color: #5A3A2C;
  margin: 0 0 32px;
}

/* The four story paragraphs. Fixed 17 px with a 14 px gap between them,
   so each paragraph reads as its own block. */
.hero-intro {
  color: #5E4236;
  margin-bottom: var(--space-3);
}
.hero-intro p {
  font-size: 17px;
  line-height: 1.6;
  margin-bottom: 14px;
}
.hero-intro p:last-child { margin-bottom: 0; }

/* Inline emphasis — same size as the running copy, just medium weight. */
.hero-emphasis {
  font-weight: 500;
  color: var(--chocolate);
}
.hero-emphasis--burgundy {
  color: var(--burgundy);
}

/* Small availability line between the intro and the buttons */
.hero-note {
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 500;
  color: var(--chocolate);
  margin-bottom: var(--space-3);
}
.hero-note__dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-left: 4px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--burgundy);
  box-shadow: 0 0 0 4px var(--image-bg);
  flex: none;
}

/* Company names sit a touch darker and heavier than the running copy */
.company {
  font-weight: 500;
  color: var(--chocolate);
}

.hero-tags { margin-top: var(--space-3); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}

/* Keeps the photo column narrow so the photo sits right next to the text
   instead of floating in the middle of a wide column. */
@media (min-width: 1024px) {
  .hero__portrait { max-width: 500px; }
}

/* Portrait with offset peach frame */
.portrait {
  position: relative;
  max-width: 460px;
  margin-inline: auto;
  width: 100%;
}

.portrait__stage {
  position: relative;
  z-index: 1;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--image-bg);
  box-shadow: 0 24px 48px rgba(59, 36, 24, 0.18);
}

.portrait__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0;
  transition: opacity 1.4s ease-in-out;
}
.portrait__slide.is-active { opacity: 1; }

.portrait__dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: calc(var(--space-3) + 12px);
  position: relative;
  z-index: 2;
}

/* 28 px hit area, 10 px visual dot */
.portrait__dot {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.portrait__dot::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--burgundy);
  background: transparent;
  transition: background-color 0.4s var(--ease), transform 0.2s var(--ease);
}
.portrait__dot[aria-current="true"]::before { background: var(--burgundy); transform: scale(1.15); }
.portrait__dot:hover::before { background: var(--rose); }

/* ---------- 8. Path (horizontal timeline) ------------- */

.path { background: var(--peach); padding-top: clamp(var(--space-3), 5vw, var(--space-4)); padding-bottom: 0; }

.path #path-heading { font-size: 56px; }
.path .section-intro { font-size: 19px; }

.path .section-head {
  align-items: flex-end;
  justify-content: space-between;
}

.path-head__nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: none;
}

.path-counter {
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--soft-chocolate);
}

.path-arrows {
  display: flex;
  gap: 10px;
}

.path-arrow {
  width: 48px;
  height: 48px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1.5px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.path-arrow svg { width: 18px; height: 18px; }

.path-arrow--next {
  background: var(--burgundy);
  border-color: var(--burgundy);
  color: var(--peach);
}
.path-arrow--next:not(:disabled):hover { background: var(--chocolate); border-color: var(--chocolate); }
.path-arrow--next:disabled { opacity: 0.4; cursor: default; }

.path-arrow--prev {
  background: transparent;
  border-color: var(--tag-border);
  color: var(--tag-border);
}
.path-arrow--prev:not(:disabled) { border-color: var(--burgundy); color: var(--burgundy); }
.path-arrow--prev:not(:disabled):hover { background: var(--burgundy); border-color: var(--burgundy); color: var(--peach); }
.path-arrow--prev:disabled { cursor: default; }

.timeline {
  position: relative;
  margin-top: var(--space-3);
}

.timeline__track {
  position: relative;
  display: flex;
  gap: 20px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding: 4px 2px 12px;
  /* Hide native scrollbar: progress is shown with .path-progress instead */
  scrollbar-width: none;
}
.timeline__track::-webkit-scrollbar { display: none; }

.timeline__track:focus-visible {
  outline: 2px solid var(--burgundy);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.chapter-card {
  flex: 0 0 290px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  min-height: 440px;
  padding: 32px 28px;
  border-radius: 20px;
  background: var(--image-bg);
}

.chapter-card__year {
  font-family: var(--font-display);
  font-size: 48px;
  color: var(--burgundy);
  margin-bottom: 40px;
}

.chapter-card__role {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.15;
  color: var(--chocolate);
  margin: 0 0 6px;
}

.chapter-card__company {
  font-size: 16px;
  font-weight: 500;
}

.chapter-card__line {
  font-size: 16px;
  line-height: 1.55;
  color: #6B4C3F;
  margin: var(--space-1) 0 0;
}

.chapter-card__tags {
  margin: auto 0 0;
  padding-top: var(--space-2);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--burgundy);
}

.chapter-card--now {
  background: var(--burgundy);
  color: var(--peach);
}
.chapter-card--now .chapter-card__year { color: var(--rose); }
.chapter-card--now .chapter-card__role,
.chapter-card--now .chapter-card__company { color: var(--peach); }
.chapter-card--now .chapter-card__line { color: var(--peach); opacity: 0.88; }
.chapter-card--now .chapter-card__tags { color: var(--gray-blue); }

.path-progress {
  position: relative;
  margin-top: 32px;
  height: 3px;
  border-radius: 999px;
  background: var(--peach-line);
}

.path-progress__bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--burgundy);
}

@media (max-width: 767px) {
  .path #path-heading { font-size: 40px; }
  .path-head__nav { display: none; }
  .chapter-card { flex: 0 0 82vw; }
  #work { padding-top: 72px; }
}

/* ---------- 9. Work ----------------------------------- */

#work { padding-top: 120px; padding-bottom: 0; }

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 32px;
  row-gap: 64px;
}

.project-card {
  display: flex;
  flex-direction: column;
}

.project-card__image {
  display: block;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: var(--image-bg);
  border: 0;
  padding: 0;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  font: inherit;
  text-align: inherit;
  transition: transform 0.4s ease-out;
}
.project-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-card__image:hover { transform: scale(1.02); }
.project-card__image:focus-visible {
  outline: 2px solid var(--burgundy);
  outline-offset: 4px;
  border-radius: 20px;
}
/* Placeholder cards only: centred bracket text instead of a real image */
.project-card__image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
  text-align: center;
  font-size: 14px;
  color: var(--soft-chocolate);
}

/* Lock page scroll while a project pop-up is open */
html.modal-open { overflow: hidden; }

/* Project pop-up */
.project-modal {
  position: fixed;
  inset: 0;
  margin: auto;
  width: 100%;
  max-width: 1200px;
  max-height: 90vh;
  height: auto;
  padding: 40px;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--peach);
  color: var(--chocolate);
  box-shadow: 0 32px 64px rgba(59, 36, 24, 0.28);
  overflow: hidden;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease),
              overlay 0.3s var(--ease) allow-discrete, display 0.3s var(--ease) allow-discrete;
}
.project-modal::backdrop {
  background: rgba(59, 36, 24, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 1;
  transition: opacity 0.3s var(--ease), overlay 0.3s var(--ease) allow-discrete, display 0.3s var(--ease) allow-discrete;
}
@starting-style {
  .project-modal[open] { opacity: 0; transform: scale(0.98); }
  .project-modal[open]::backdrop { opacity: 0; }
}

.project-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1.5px solid var(--burgundy);
  background: var(--peach);
  color: var(--burgundy);
  cursor: pointer;
  z-index: 2;
}
.project-modal__close:hover { background: var(--burgundy); color: var(--peach); }
.project-modal__close svg { width: 18px; height: 18px; }

.project-modal__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 40px;
  align-items: center;
}

.project-modal__media {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--image-bg);
}
.project-modal__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-modal__media--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
  text-align: center;
  font-size: 14px;
  color: var(--soft-chocolate);
}

.project-modal__text {
  max-height: calc(90vh - 80px);
  overflow-y: auto;
  padding-right: var(--space-1);
  scrollbar-width: thin;
  scrollbar-color: var(--burgundy) var(--peach-line);
}
.project-modal__text::-webkit-scrollbar { width: 6px; }
.project-modal__text::-webkit-scrollbar-track { background: var(--peach-line); border-radius: 999px; }
.project-modal__text::-webkit-scrollbar-thumb { background: var(--burgundy); border-radius: 999px; }

.project-modal__text .tag { margin-bottom: var(--space-1); }
.project-modal__text h2 { font-size: 40px; margin: 0 0 4px; }

.project-modal__role {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 500;
  color: var(--burgundy);
  margin: 0 0 14px;
}

.project-modal__intro { font-size: 16px; line-height: 1.55; margin: 0 0 14px; }

.project-modal__section + .project-modal__section { margin-top: 14px; }
.project-modal__section h3 {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 4px;
}
.project-modal__section p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--chocolate); }

@media (max-width: 767px) {
  .work-grid { grid-template-columns: 1fr; row-gap: var(--space-4); }

  .project-modal {
    max-width: 100%;
    max-height: 90vh;
    padding: var(--space-3);
    overflow-y: auto;
  }
  .project-modal__grid {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
  .project-modal__text { max-height: none; overflow: visible; }
}

/* ---------- 10. Contact ------------------------------- */

.contact {
  background: var(--burgundy);
  color: var(--peach);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-4), 6vw, var(--space-5));
  text-align: center;
}
.contact h2 { color: var(--peach); }
.contact p { color: var(--peach); max-width: 48ch; margin-inline: auto; }

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2) var(--space-3);
  margin-top: var(--space-3);
}

/* ---------- 11. Footer -------------------------------- */

.site-footer {
  background: var(--burgundy);
  color: var(--peach);
  padding-block: var(--space-3);
}

.site-footer > .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-3);
  flex-wrap: wrap;
}

.footer-mark {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1;
  color: var(--peach);
  text-decoration: none;
}
.footer-mark .dot { color: var(--rose); }

.site-footer small { font-size: 14px; color: var(--peach); }

/* ---------- 12. CV page ------------------------------- */

.cv-page {
  padding-top: var(--space-3);
  padding-bottom: 64px;
}

.cv-viewer {
  --cv-height: calc(100vh - var(--header-height) - 24px - 140px);
  display: block;
  margin-inline: auto;
  width: min(1200px, calc(var(--cv-height) * 297 / 210));
  aspect-ratio: 297 / 210;
  box-shadow: 0 1px 2px rgba(59, 36, 24, .08), 0 30px 60px -20px rgba(59, 36, 24, .35);
}

.cv-viewer__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 16px;
}

.cv-page__download {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.cv-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border: 1.5px solid var(--burgundy);
  border-radius: 999px;
  background: transparent;
  color: var(--burgundy);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  transition: background 0.3s ease-out, color 0.3s ease-out;
}

.cv-download__arrow {
  font-family: var(--font-body);
}

.cv-download:hover {
  background: var(--burgundy);
  color: var(--peach);
}

.cv-download:focus-visible {
  outline: 2px solid var(--burgundy);
  outline-offset: 4px;
}

/* ---------- 13. Responsive ----------------------------- */

@media (max-width: 1023px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-4);
  }
  /* Portrait above the text on smaller screens */
  .hero__portrait { order: -1; }
  .hero__pattern { display: none; }
}

@media (max-width: 859px) {
  .nav-toggle { display: inline-flex; }

  .main-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2);
    background: var(--peach);
    border-bottom: 1px solid var(--peach-line);
    padding: var(--space-3) var(--side-margin) var(--space-4);
  }
  .main-nav.is-open { display: flex; }

  .site-header > .container { position: relative; }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }
  .nav-links a { font-size: 17px; }

  .main-nav .btn { align-self: flex-start; }

  .site-footer > .container { justify-content: center; text-align: center; }
}

@media (max-width: 599px) {
  body { font-size: 16px; }

  .contact { border-radius: var(--radius); }

  .section--tight { padding-block: 64px; }

  .btn { width: 100%; }
  .hero-actions .btn { width: auto; }
}

@media (max-width: 767px) {
  .cv-viewer {
    width: 100%;
    height: auto;
  }
}

/* Print: a clean CV on paper */
@media print {
  .site-header, .site-footer, .cv-page__download, .skip-link { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
}
