/* Mehmet Mutlu portfolio
   Bordeaux (or black) page, one gold-yellow accent, condensed display type.
   Sections: fonts, tokens, base, nav, buttons, hero, works, rows, about,
   project, parts + carousel, videos, articles, next, contact, overlays,
   motion, small screens. */

/* -------------------------------------------------------------- fonts -- */
@font-face { font-family: "Roboto Condensed"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/roboto-condensed-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Roboto Condensed"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/roboto-condensed-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ------------------------------------------------------------- tokens -- */
:root {
  --bg: #000;
  --panel: #0d0d0d;
  --panel-2: #1b1b1b;
  --line: rgba(255, 255, 255, 0.16);
  --line-soft: rgba(255, 255, 255, 0.09);
  --text: #fff;
  --text-soft: rgba(255, 255, 255, 0.86);
  --muted: rgba(255, 255, 255, 0.62);
  --yellow: #ffbb00;
  --nav-bg: rgba(0, 0, 0, 0.72);
  --overlay-bg: rgba(0, 0, 0, 0.84);
  --display: "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1320px;
  --gutter: clamp(20px, 4vw, 56px);
  --radius: 6px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* --------------------------------------------------------------- base -- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--yellow); color: #000; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: 16px; top: -60px; z-index: 200; background: var(--yellow); color: #000; padding: 10px 16px; border-radius: 999px; font: 600 15px var(--display); }
.skip:focus { top: 16px; }

.label { font: 500 clamp(16px, 1.3vw, 19px)/1.2 var(--display); color: var(--muted); letter-spacing: 0.01em; }
.lead { font: 400 clamp(22px, 2.3vw, 32px)/1.28 var(--display); color: var(--text); max-width: 30em; text-wrap: pretty; }
.lead--muted { color: var(--muted); }
.section-title { font: 600 clamp(40px, 5.2vw, 76px)/0.95 var(--display); color: var(--yellow); letter-spacing: -0.01em; }
.ulink { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.3s var(--ease), color 0.2s; padding-bottom: 2px; }
.ulink:hover { background-size: 100% 1px; color: var(--yellow); }

/* ---------------------------------------------------------------- nav -- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.is-scrolled { border-bottom-color: var(--line-soft); }
.nav__brand { font: 600 18px/1 var(--display); text-transform: uppercase; letter-spacing: 0.01em; transition: opacity 0.3s, color 0.2s; }
.nav__brand:hover { color: var(--yellow); }
.page-home .nav:not(.is-past-hero) .nav__brand { opacity: 0; pointer-events: none; }
.nav__links { display: flex; gap: 8px; }
.nav__progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--yellow); transform: scaleX(0); transform-origin: 0 50%; display: none; }
.page-project .nav__progress { display: block; }
.pill {
  display: inline-flex; align-items: center; height: 38px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 999px;
  font: 500 16px/1 var(--display); color: var(--text);
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s var(--ease);
}
.pill:hover { background: #fff; color: #000; border-color: #fff; }
.pill[aria-current="page"] { background: #fff; color: #000; border-color: #fff; }
.pill--accent { background: var(--yellow); color: #000; border-color: var(--yellow); }
.pill--accent:hover { background: #fff; border-color: #fff; }

/* ------------------------------------------------------------ buttons -- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 24px;
  border: 1px solid var(--line); border-radius: 999px; background: transparent; cursor: pointer;
  font: 500 18px/1 var(--display); color: var(--text);
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s var(--ease);
}
.btn svg { width: 18px; height: 18px; transition: transform 0.25s var(--ease); }
.btn:hover { background: #fff; color: #000; border-color: #fff; }
.btn:hover svg { transform: translateX(3px); }
.btn--accent { background: var(--yellow); color: #000; border-color: var(--yellow); }
.btn.is-done { background: #fff; color: #000; border-color: #fff; }
.round {
  display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; cursor: pointer;
  transition: background 0.2s, color 0.2s, opacity 0.2s, border-color 0.2s, transform 0.15s var(--ease);
}
.round svg { width: 20px; height: 20px; }
.round--sm { width: 40px; height: 40px; }
.round--sm svg { width: 17px; height: 17px; }
.round:hover:not(:disabled) { background: var(--yellow); color: #000; border-color: var(--yellow); }
.round:disabled { opacity: 0.28; cursor: default; }
.btn:active, .pill:active, .chip:active, .round:active:not(:disabled) { transform: scale(0.97); }
.round { position: relative; }
.round::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; }

/* --------------------------------------------------------------- hero -- */
.hero { padding: 84px 0 clamp(64px, 9vw, 128px); min-height: 100vh; min-height: 100svh; }
.mega {
  font: 600 15.2vw/0.82 var(--display); text-transform: uppercase; letter-spacing: -0.015em;
  white-space: nowrap; margin-left: -0.04em; padding-top: 0.06em;
}
.mega span { display: inline-block; }
/* All three columns share the photo's height: tops and bottoms line up. */
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 4.4fr) minmax(0, 4.6fr);
  gap: clamp(24px, 3.5vw, 56px); align-items: stretch; margin-top: clamp(28px, 4vw, 56px);
}
.hero__facts, .hero__intro { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.hero__photo { overflow: hidden; border-radius: var(--radius); }
.hero__photo img { width: 100%; height: auto; }
.hero__role { font: 500 clamp(20px, 1.8vw, 26px)/1.15 var(--display); color: var(--yellow); max-width: 12em; margin-top: -0.12em; }
.hero__place { font: 400 19px/1.4 var(--display); color: var(--muted); margin-top: 8px; }
.hero__exp { padding-top: 18px; border-top: 1px solid var(--line); }
.hero__exp ul { margin-top: 10px; }
.hero__exp li { font: 500 clamp(20px, 1.7vw, 24px)/1.35 var(--display); }
.hero__exp li:last-child { margin-bottom: -0.3em; }
.hero__intro .lead { margin-top: -0.18em; }

/* -------------------------------------------------------------- works -- */
.works { padding: clamp(40px, 6vw, 80px) 0 clamp(64px, 9vw, 120px); }
.page-works .works { padding-top: 132px; }
.works__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 40px; padding-bottom: clamp(28px, 4vw, 48px); }
.works__intro { flex-basis: 100%; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filters__label { font: 400 17px/1 var(--display); color: var(--muted); margin-right: 6px; }
.chip {
  height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer;
  font: 500 16px/1 var(--display); color: var(--text); transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s var(--ease);
}
.chip:hover { border-color: #fff; }
.chip[aria-pressed="true"] { background: #fff; color: #000; border-color: #fff; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 5vw, 72px) clamp(20px, 3vw, 40px); }
.card { display: block; }
.card[hidden] { display: none; }
.card:nth-child(even) { transition-delay: 0.08s; }
.card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.card__title { font: 500 clamp(24px, 2.2vw, 32px)/1.1 var(--display); transition: color 0.2s; }
.tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; flex-shrink: 0; max-width: 60%; }
.tag { background: #fff; color: #000; font: 600 13px/1 var(--display); padding: 5px 8px; border-radius: 2px; white-space: nowrap; }
.card__media { position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 3; background: var(--panel); transition: transform 0.2s var(--ease); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.card__cta {
  position: absolute; left: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px;
  background: var(--yellow); color: #000; border-radius: 999px; font: 600 16px/1 var(--display);
  opacity: 0; transform: translateY(8px); transition: opacity 0.25s, transform 0.25s var(--ease);
}
.card__cta svg { width: 16px; height: 16px; }
.card:hover .card__media img, .card:focus-visible .card__media img { transform: scale(1.035); }
.card:hover .card__cta, .card:focus-visible .card__cta { opacity: 1; transform: none; }
.card:hover .card__title { color: var(--yellow); }
.card:active .card__media { transform: scale(0.985); }
.card__hook { margin-top: 14px; font-size: 16.5px; line-height: 1.55; color: var(--muted); max-width: 48ch; text-wrap: pretty; }

/* --------------------------------------------------- rows (label + text) -- */
.row__grid {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr) minmax(0, 1fr); gap: 16px clamp(24px, 3.5vw, 56px);
  padding-block: clamp(32px, 4vw, 52px); border-top: 1px solid var(--line-soft);
}
.row__label { font: 500 clamp(22px, 2.05vw, 30px)/1.15 var(--display); color: var(--yellow); }
.row__body { font-size: 17px; color: var(--text-soft); max-width: 68ch; }
.row__body p + p { margin-top: 1em; }
.row__body--lead { font: 400 clamp(21px, 1.9vw, 27px)/1.4 var(--display); color: var(--text); max-width: 34em; }
.parts-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.row__body p + .parts-nav { margin-top: 24px; }
.parts-nav a { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 16px 0 12px; border: 1px solid var(--line); border-radius: 999px; font: 500 16px/1 var(--display); color: var(--text); transition: background 0.2s, color 0.2s, border-color 0.2s; }
.parts-nav span { color: var(--yellow); font-variant-numeric: tabular-nums; transition: color 0.2s; }
.parts-nav a:hover { background: #fff; color: #000; border-color: #fff; }
.parts-nav a:hover span { color: #000; }

/* -------------------------------------------------------------- about -- */
.btn--icon { width: 52px; padding: 0; justify-content: center; }
.btn--icon svg { width: 22px; height: 22px; }
.btn--icon:hover svg { transform: none; }
.about { padding-bottom: clamp(24px, 4vw, 56px); }
/* Three photos share one height and keep their own proportions, so nothing is cropped. */
.about__photos { grid-column: 2 / -1; display: flex; gap: clamp(10px, 1.4vw, 20px); margin-top: clamp(12px, 2vw, 28px); }
.about__photos figure { flex: var(--ar) 1 0; min-width: 0; overflow: hidden; border-radius: var(--radius); }
.about__photos img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.about__photos figure:hover img { transform: scale(1.03); }
.skills { display: flex; flex-wrap: wrap; gap: 4px 0; font: 600 clamp(26px, 3.4vw, 50px)/1.12 var(--display); text-transform: uppercase; grid-column: 2 / -1; }
.skills li:not(:last-child)::after { content: "/"; color: var(--yellow); margin: 0 0.32em; font-weight: 400; }
.xp { grid-column: 2 / 3; }
.xp__row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) auto; gap: 16px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--line-soft); font: 500 clamp(19px, 1.7vw, 24px)/1.2 var(--display); }
.xp__row:first-child { padding-top: 0; }
.xp__company { color: var(--muted); }
.xp__years { color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ------------------------------------------------------------ project -- */
/* Title, summary, facts and the cover image all fit in the first screen. */
.project__head { padding-top: 100px; }
.project__intro { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 3.5vw, 56px); align-items: center; }
.back { display: inline-flex; align-items: center; gap: 8px; font: 500 18px/1 var(--display); color: var(--muted); transition: color 0.2s; }
.back svg { width: 16px; height: 16px; transition: transform 0.25s var(--ease); }
.back:hover { color: var(--yellow); }
.back:hover svg { transform: translateX(-3px); }
.project__title { font: 600 clamp(44px, 6.1vw, 88px)/0.92 var(--display); text-transform: uppercase; letter-spacing: -0.012em; margin: 18px 0 0 -0.03em; }
.project__text .lead { font-size: clamp(20px, 1.9vw, 27px); margin-top: clamp(16px, 2vw, 26px); }
.meta { margin-top: clamp(20px, 2.4vw, 32px); border-top: 1px solid var(--line); }
.meta div { display: grid; grid-template-columns: 5.5em 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); font: 500 18px/1.3 var(--display); }
.meta dt { color: var(--yellow); }
.project__cover { justify-self: end; width: min(100%, calc((100svh - 150px) * 4 / 3)); }
.project__cover img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: clamp(32px, 4.5vw, 60px) 0 clamp(24px, 3vw, 40px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.highlights li { padding: 22px clamp(16px, 2vw, 28px); font: 500 clamp(19px, 1.8vw, 25px)/1.2 var(--display); text-wrap: balance; }
.highlights li + li { border-left: 1px solid var(--line); }
.highlights li:first-child { padding-left: 0; }

/* ------------------------------------ parts: one panel per piece of work -- */
.part { padding-bottom: clamp(16px, 2vw, 28px); scroll-margin-top: 88px; }
.part__panel { background: var(--panel); border: 1px solid var(--line-soft); border-radius: 16px; padding: clamp(22px, 3.4vw, 48px); }
.part__head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px clamp(24px, 3.5vw, 56px); align-items: start; }
.part__head--solo { grid-template-columns: minmax(0, 1fr); }
.part__count { font: 500 19px/1 var(--display); color: var(--yellow); font-variant-numeric: tabular-nums; margin-bottom: 12px; }
.part__count span { color: var(--muted); }
.part__title { font: 600 clamp(30px, 3.6vw, 52px)/1 var(--display); text-transform: uppercase; letter-spacing: -0.005em; text-wrap: balance; }
.part__text { font-size: 16.5px; line-height: 1.65; color: var(--text-soft); max-width: 62ch; }
.part__text p + p { margin-top: 1em; }

/* Carousel: the current image in the middle, the one before and after beside it. */
.carousel { margin-top: clamp(24px, 3vw, 40px); }
.carousel__stage { position: relative; display: flex; gap: 24px; overflow-x: auto; align-items: center; container-type: inline-size; }
.slide { flex: none; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 10px; }
.slide img { display: block; width: auto; height: auto; max-height: 420px; max-width: none; border-radius: 8px; background: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 18px 44px rgba(0, 0, 0, 0.55); }
.slide--phone, .slide--phone img { border-radius: 24px; }
.slide--phone img { box-shadow: 0 0 0 6px var(--panel-2), 0 0 0 7px rgba(255, 255, 255, 0.16), 0 18px 44px rgba(0, 0, 0, 0.55); }
.slide--doc, .slide--doc img { border-radius: 4px; }
.js .carousel__stage { display: block; overflow: hidden; height: var(--stage-h, 480px); margin-inline: calc(-1 * clamp(22px, 3.4vw, 48px)); touch-action: pan-y; }
.js .slide {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%) translateX(var(--x, 0px)) scale(var(--s, 0.72));
  opacity: 0; z-index: 0; pointer-events: none;
  transition: transform 0.6s var(--ease), opacity 0.45s var(--ease);
}
.js .slide img { max-height: none; }
.js .slide.is-current { --s: 1; opacity: 1; z-index: 3; pointer-events: auto; }
.js .slide.is-prev, .js .slide.is-next { opacity: 0.34; z-index: 2; pointer-events: auto; }
.js .slide.is-prev:hover, .js .slide.is-next:hover { opacity: 0.7; }
.js .slide.is-current:hover { --s: 1.015; }
.js .carousel.is-static .slide { transition: none; }
.carousel__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: clamp(18px, 2.2vw, 28px); min-height: 40px; }
.carousel__caption { font: 400 18px/1.3 var(--display); color: var(--text-soft); }
.carousel__count { color: var(--muted); margin-left: 12px; font-variant-numeric: tabular-nums; }
.carousel__nav { display: flex; gap: 8px; }

/* ------------------------------------------------------------- videos -- */
.videos { padding: 4px 0 clamp(32px, 4vw, 52px); }
.videos__note { font: 400 18px/1.4 var(--display); color: var(--muted); margin-bottom: 20px; }
.videos__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(28px, 3vw, 44px) clamp(14px, 1.8vw, 24px); }
.vid--landscape { grid-column: 1 / -1; }
.vid__btn { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--panel); cursor: pointer; overflow: hidden; border-radius: 14px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12); aspect-ratio: 9 / 16; transition: transform 0.2s var(--ease); }
.vid__btn:active { transform: scale(0.985); }
.vid--landscape .vid__btn { aspect-ratio: 16 / 9; }
.vid__btn img, .vid__btn video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vid__btn img { transition: transform 0.7s var(--ease); }
.vid__btn:hover img { transform: scale(1.04); }
.vid__btn video { opacity: 0; transition: opacity 0.3s; }
.vid__btn.is-previewing video { opacity: 1; }
.vid__play {
  position: absolute; left: 14px; bottom: 14px; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: var(--yellow); color: #000; transition: transform 0.25s var(--ease);
}
.vid__play svg { width: 22px; height: 22px; margin-left: 2px; }
.vid__btn:hover .vid__play { transform: scale(1.1); }
.vid figcaption { margin-top: 14px; display: grid; gap: 2px; }
.vid figcaption strong { font: 600 clamp(19px, 1.7vw, 24px)/1.2 var(--display); }
.vid figcaption span { font-size: 15.5px; line-height: 1.45; color: var(--muted); }

/* ----------------------------------------------------------- articles -- */
.articles { padding: clamp(24px, 3vw, 40px) 0 clamp(40px, 5vw, 64px); border-top: 1px solid var(--line-soft); }
.articles__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: clamp(20px, 3vw, 36px); }
.articles__count { font: 400 19px/1.4 var(--display); color: var(--muted); margin-top: 10px; }
.slider-nav { display: flex; align-items: center; gap: 10px; }
.slider-nav__page { font: 400 16px/1 var(--display); color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 6px; }
/* Exactly --per cards are visible; the arrows move one full set at a time. */
.slider { --per: 4; --gap: clamp(12px, 1.6vw, 20px); overflow: hidden; padding: 1px; margin: -1px; border-radius: 15px; }
.slider__track { display: flex; gap: var(--gap); transition: transform 0.7s var(--ease); will-change: transform; }
.article { position: relative; flex: 0 0 calc((100% - (var(--per) - 1) * var(--gap)) / var(--per)); aspect-ratio: 3 / 4; overflow: hidden; border-radius: 14px; background: var(--panel); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12); }
.article img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.article::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.55) 38%, rgba(0, 0, 0, 0) 68%); }
.article__title { position: absolute; z-index: 1; left: 20px; right: 20px; bottom: 20px; font: 600 clamp(19px, 1.7vw, 24px)/1.15 var(--display); text-wrap: balance; }
.article__src { position: absolute; z-index: 1; left: 14px; top: 14px; display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px 0 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.7); font: 500 14px/1 var(--display); transition: background 0.2s, color 0.2s; }
.article__src svg { width: 15px; height: 15px; }
.article:hover img { transform: scale(1.05); }
.article:hover .article__src { background: var(--yellow); color: #000; }

/* --------------------------------------------------------------- next -- */
.next { border-top: 1px solid var(--line); margin-top: clamp(24px, 4vw, 56px); }
.next__link { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 3.5vw, 56px); align-items: center; padding: clamp(36px, 5vw, 72px) 0; }
.next__text { display: grid; gap: 14px; }
.next__title { font: 600 clamp(38px, 5.2vw, 76px)/0.92 var(--display); text-transform: uppercase; letter-spacing: -0.01em; transition: color 0.2s; }
.next__hook { font-size: 17px; line-height: 1.55; color: var(--muted); max-width: 46ch; }
.next__media { overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 3; }
.next__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.next__link:hover .next__title { color: var(--yellow); }
.next__link:hover .next__media img { transform: scale(1.035); }

/* ------------------------------------------------------------ contact -- */
.contact { border-top: 1px solid var(--line); padding: clamp(56px, 8vw, 120px) 0 clamp(40px, 5vw, 72px); }
.contact__title { font: 600 clamp(44px, 8.2vw, 128px)/0.9 var(--display); text-transform: uppercase; letter-spacing: -0.015em; color: var(--yellow); margin-left: -0.03em; text-wrap: balance; }
.contact .actions { margin-top: clamp(28px, 4vw, 48px); }
.contact__email { margin-top: 18px; font: 400 20px/1.3 var(--display); color: var(--muted); }
.footer { border-top: 1px solid var(--line-soft); padding: 22px 0 28px; font: 400 17px/1.3 var(--display); color: var(--muted); }
.footer__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; }
.footer nav { display: flex; gap: 22px; }

.page-head { padding: 132px 0 40px; }
.page-head--center { min-height: 56vh; display: grid; align-items: center; }
.page-head .actions { margin-top: 28px; }

/* ----------------------------------------------------------- overlays -- */
.overlay {
  position: fixed; inset: 0; z-index: 100; display: grid; grid-template-rows: minmax(0, 1fr) auto auto; justify-items: center; align-items: center;
  background: var(--overlay-bg); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  padding: 60px clamp(12px, 5vw, 84px) 18px; opacity: 0; transition: opacity 0.25s;
}
.overlay.is-open { opacity: 1; }
.overlay__stage { max-width: 100%; max-height: 100%; min-height: 0; display: grid; place-items: center; transform: scale(0.96); transition: transform 0.35s var(--ease); }
.overlay.is-open .overlay__stage { transform: none; }
.overlay__stage--scroll { overflow-y: auto; align-items: start; height: 100%; border-radius: 6px; }
.overlay__stage img { border-radius: 6px; background: #fff; max-width: none; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.overlay__stage video { max-width: 100%; max-height: calc(100vh - 150px); border-radius: 12px; background: #000; }
.overlay__close { position: absolute; z-index: 2; top: 12px; right: clamp(12px, 3vw, 28px); background: rgba(0, 0, 0, 0.6); }
.overlay__prev, .overlay__next { position: absolute; top: calc(46% - 26px); width: 52px; height: 52px; background: rgba(0, 0, 0, 0.6); }
.overlay__prev::after, .overlay__next::after { inset: -26px; border-radius: 26px; }
.overlay__prev:active:not(:disabled), .overlay__next:active:not(:disabled) { transform: none; background: var(--yellow); color: #000; border-color: var(--yellow); }
.overlay__prev { left: clamp(8px, 2vw, 24px); }
.overlay__next { right: clamp(8px, 2vw, 24px); }
.overlay__caption { text-align: center; font: 400 17px/1.3 var(--display); color: var(--text-soft); padding: 14px 16px 0; min-height: 36px; }
.overlay__caption span { color: var(--muted); margin-left: 12px; font-variant-numeric: tabular-nums; }
/* Thumbnail strip: every image on the page in order, the current one slightly larger. */
.thumbs { display: flex; align-items: center; gap: 6px; height: 64px; max-width: 100%; margin-top: 8px; padding: 0 4px; overflow-x: auto; scrollbar-width: none; }
.thumbs::-webkit-scrollbar { display: none; }
.thumb { flex: none; height: 34px; padding: 0; border: 0; border-radius: 4px; overflow: hidden; background: #fff; cursor: pointer; opacity: 0.42; transition: height 0.25s var(--ease), opacity 0.2s, box-shadow 0.2s; }
.thumb img { height: 100%; width: auto; max-width: 64px; min-width: 20px; object-fit: cover; object-position: top; }
.thumb:hover { opacity: 0.85; }
.thumb.is-current { height: 50px; opacity: 1; box-shadow: 0 0 0 2px var(--yellow); }
.thumb--gap { margin-left: 14px; }
body.is-locked { overflow: hidden; }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 120; display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 20px;
  background: #fff; color: #000; border-radius: 999px; font: 500 17px/1 var(--display); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, 24px); opacity: 0; transition: transform 0.35s var(--ease), opacity 0.25s; pointer-events: none;
}
.toast::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #17a34a; }
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* ------------------------------------------------- theme: bordeaux -- */
/* Switch in content/site.json: "theme": "bordeaux" or "black". */
:root[data-theme="bordeaux"] {
  --bg: #320611;
  --panel: rgba(16, 1, 6, 0.42);
  --panel-2: #24050d;
  --line: rgba(255, 255, 255, 0.22);
  --line-soft: rgba(255, 255, 255, 0.13);
  --text-soft: rgba(255, 255, 255, 0.9);
  --muted: rgba(255, 255, 255, 0.7);
  --nav-bg: rgba(33, 4, 12, 0.78);
  --overlay-bg: rgba(26, 2, 8, 0.9);
}
/* Baked texture (see tools/make-texture.py): woven threads over soft light and dark patches, with a darker edge. */
[data-theme="bordeaux"] body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(130% 100% at 50% 35%, rgba(0, 0, 0, 0) 45%, rgba(16, 0, 5, 0.38) 100%),
    url("../img/texture/weave.webp") 0 0 / 400px 400px,
    url("../img/texture/clouds.jpg") 0 0 / 1600px 1200px;
}
[data-theme="bordeaux"] .card__media, [data-theme="bordeaux"] .vid__btn, [data-theme="bordeaux"] .article { background: #24050d; }
[data-theme="bordeaux"] .part__panel { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

/* ------------------------------------------------------------- motion -- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.28s; }
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .mega span { animation: rise 0.9s var(--ease) both; }
.js .hero__grid > * { animation: rise 0.9s var(--ease) both; }
.js .hero__grid > :nth-child(1) { animation-delay: 0.26s; }
.js .hero__grid > :nth-child(2) { animation-delay: 0.14s; }
.js .hero__grid > :nth-child(3) { animation-delay: 0.38s; }
.js .project__text > * { animation: rise 0.8s var(--ease) both; }
.js .project__text > :nth-child(2) { animation-delay: 0.06s; }
.js .project__text > :nth-child(3) { animation-delay: 0.14s; }
.js .project__text > :nth-child(4) { animation-delay: 0.22s; }
.js .project__cover { animation: rise 0.9s var(--ease) 0.1s both; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  @view-transition { navigation: none; }
}

/* ------------------------------------------------------ small screens -- */
@media (max-width: 1100px) { .slider { --per: 3; } }
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hero__facts { grid-column: 1 / -1; order: 3; flex-direction: row; padding-top: 20px; border-top: 1px solid var(--line); }
  .hero__facts > * { flex: 1; }
  .hero__exp { padding-top: 0; border-top: 0; }
  .hero__exp ul { margin-top: 6px; }
  .row__grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .skills, .xp, .about__photos { grid-column: auto; }
  .project__intro { grid-template-columns: minmax(0, 1fr); }
  .project__cover { justify-self: start; }
  .part__head { grid-template-columns: minmax(0, 1fr); }
  .videos__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav { padding-block: 10px; }
  .nav__brand { display: none; }
  .nav__links { width: 100%; justify-content: space-between; gap: 6px; }
  .pill { height: 36px; padding: 0 14px; font-size: 15px; }
  .hero { padding-top: 72px; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__intro .lead, .hero__role { margin-top: 0; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .card__cta { opacity: 1; transform: none; }
  .highlights { grid-template-columns: minmax(0, 1fr); }
  .highlights li { padding: 16px 0; }
  .highlights li + li { border-left: 0; border-top: 1px solid var(--line-soft); }
  .xp__row { grid-template-columns: 1fr auto; }
  .xp__company { grid-column: 1; grid-row: 2; font-size: 17px; }
  .xp__years { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
  .next__link { grid-template-columns: minmax(0, 1fr); }
  .next__media { order: -1; }
  .project__head { padding-top: 84px; }
  /* Phone: title, summary, then the image, then the facts. */
  .project__text { display: contents; }
  .project__text .meta { order: 3; margin-top: 0; }
  .project__cover { order: 2; }
  .project__intro { gap: 0; }
  .project__text .lead { margin-bottom: 22px; }
  .project__cover { margin-bottom: 22px; }
  .page-works .works { padding-top: 104px; }
  .part__panel { border-radius: 12px; }
  /* Articles: swipe by hand on phones. */
  .articles__head { align-items: flex-start; }
  .slider-nav { display: none; }
  .slider { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); border-radius: 0; }
  .slider::-webkit-scrollbar { display: none; }
  .slider__track { transform: none !important; }
  .article { flex-basis: 72vw; scroll-snap-align: start; }
  .overlay { padding-inline: 10px; }
  .overlay__prev, .overlay__next { display: none; }
  .toast { bottom: 18px; }
}
