/* =========================================================
   Robert Braun – Design Portfolio
   One stylesheet for the whole site.
   Sections: tokens · base · background · header · layout ·
             buttons/chips · cards · home · about · development ·
             project list · project page · footer · motion
   ========================================================= */

/* ---------- tokens ---------- */
:root {
  --bg: #111112;
  --surface: #1a1a1c;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f3f3f1;
  --muted: #a0a0a8;
  --faint: #70707a;

  --accent-1: #ff3b1d;
  --accent-2: #ff8a1f;
  --accent-3: #ff4f9a;
  --accent-rgb: 255, 138, 31;   /* rgb of --accent-2, used for glows/borders */
  --gradient: linear-gradient(100deg, var(--accent-1), var(--accent-2));

  --radius: 18px;
  --grid-size: 56px;
  --max: 1280px;
  --gutter: clamp(18px, 4vw, 32px);

  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Cascadia Code', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  /* film grain (SVG noise, no image file needed) */
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/><feComponentTransfer><feFuncR type='linear' slope='1.7' intercept='-0.55'/><feFuncG type='linear' slope='1.7' intercept='-0.55'/><feFuncB type='linear' slope='1.7' intercept='-0.55'/></feComponentTransfer></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-mono); line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
p { margin: 0 0 1.1em; }
ul { margin: 0; padding: 0; }

::selection { background: var(--accent-2); color: #111; }

:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }

/* ---------- background: grid + glow + grain ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(60vw 46vh at 88% -6%, rgba(255, 92, 30, 0.22), transparent 70%),
    radial-gradient(52vw 42vh at -6% 108%, rgba(255, 79, 154, 0.11), transparent 70%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / var(--grid-size) var(--grid-size),
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / var(--grid-size) var(--grid-size);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  background-image: var(--grain);
  background-size: 200px 200px;
  opacity: 0.16;
  mix-blend-mode: screen;
}

/* ---------- section colour themes ----------
   Add class "theme-pink" / "theme-blue" to any section to recolour its
   eyebrow, gradient text, buttons and card highlights. */
.theme-pink {
  --accent-1: #ff2d6a;
  --accent-2: #ff6b9a;
  --accent-rgb: 255, 90, 135;
  --gradient: linear-gradient(100deg, #ff2d6a, #ff6b9a);
}

.theme-blue {
  --accent-1: #2f6bff;
  --accent-2: #3cc6ff;
  --accent-rgb: 60, 198, 255;
  --gradient: linear-gradient(100deg, #2f6bff, #3cc6ff);
}

.theme-pink, .theme-blue { position: relative; }

.theme-pink::before,
.theme-blue::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  width: min(80vw, 900px);
  height: 100%;
  top: 0;
}

.theme-pink::before { right: -10%; background: radial-gradient(closest-side, rgba(255, 45, 100, 0.22), transparent); }
.theme-blue::before { left: -10%;  background: radial-gradient(closest-side, rgba(47, 107, 255, 0.32), transparent); }

/* home page: pink top-right glow instead of the default orange */
body.home::before {
  background:
    radial-gradient(60vw 46vh at 88% -6%, rgba(255, 45, 100, 0.20), transparent 70%),
    radial-gradient(52vw 42vh at -6% 108%, rgba(47, 107, 255, 0.10), transparent 70%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / var(--grid-size) var(--grid-size),
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / var(--grid-size) var(--grid-size);
}

/* ---------- colour tones (cards) ----------
   Variables only, so they can go on any element, e.g. class="card area tone-red".
   MDC red · TR purple · CA orange · US green · BE blue · NEXT white */
.tone-red    { --accent-1: #e5262f; --accent-2: #ff5c5c; --accent-rgb: 255, 92, 92;   --gradient: linear-gradient(100deg, #e5262f, #ff5c5c); }
.tone-purple { --accent-1: #7a3cff; --accent-2: #b07cff; --accent-rgb: 176, 124, 255; --gradient: linear-gradient(100deg, #7a3cff, #b07cff); }
.tone-orange { --accent-1: #ff6a1a; --accent-2: #ffa030; --accent-rgb: 255, 160, 48;  --gradient: linear-gradient(100deg, #ff6a1a, #ffa030); }
.tone-green  { --accent-1: #17a355; --accent-2: #4ade80; --accent-rgb: 74, 222, 128;  --gradient: linear-gradient(100deg, #17a355, #4ade80); }
.tone-blue   { --accent-1: #2f6bff; --accent-2: #3cc6ff; --accent-rgb: 60, 198, 255;  --gradient: linear-gradient(100deg, #2f6bff, #3cc6ff); }
.tone-white  { --accent-1: #ffffff; --accent-2: #d6d6dc; --accent-rgb: 235, 235, 240; --gradient: linear-gradient(100deg, #ffffff, #c4c4cc); }
.tone-white .area-code { color: #111; }

/* whole-page blue theme (development page): recolours eyebrow, titles, buttons, nav pill and glow */
body.page-blue {
  --accent-1: #2f6bff;
  --accent-2: #3cc6ff;
  --accent-rgb: 60, 198, 255;
  --gradient: linear-gradient(100deg, #2f6bff, #3cc6ff);
}

body.page-blue::before {
  background:
    radial-gradient(60vw 46vh at 88% -6%, rgba(47, 107, 255, 0.26), transparent 70%),
    radial-gradient(52vw 42vh at -6% 108%, rgba(60, 198, 255, 0.10), transparent 70%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / var(--grid-size) var(--grid-size),
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / var(--grid-size) var(--grid-size);
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(17, 17, 18, 0.62);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
}

.brand img { height: 34px; width: auto; transition: transform 0.3s; }
.brand:hover img { transform: scale(1.06); }

.site-nav { display: flex; flex-wrap: wrap; gap: 4px; }

.site-nav a {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.25s, background 0.25s, border-color 0.25s;
}

.site-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }

.site-nav a.active {
  color: var(--text);
  border-color: rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.14);
}

/* ---------- layout ---------- */
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 780px; }

main { display: block; }

.section { padding: clamp(40px, 7vw, 80px) 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 18px;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--gradient);
}

.grad-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-hero { padding: clamp(56px, 9vw, 110px) 0 clamp(24px, 4vw, 48px); }

.page-hero h1 {
  font-size: clamp(2.4rem, 7vw, 5rem);
  font-weight: 700;
  margin-bottom: 18px;
}

.lead {
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  color: var(--muted);
  max-width: 62ch;
}

.section-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 24px;
  scroll-margin-top: 90px;
}

/* ---------- buttons / chips ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  transition: transform 0.25s, border-color 0.25s, background 0.25s, box-shadow 0.25s;
}

.btn:hover { transform: translateY(-2px); border-color: rgba(var(--accent-rgb), 0.6); background: rgba(var(--accent-rgb), 0.08); }

.btn-primary {
  border-color: transparent;
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 8px 28px -10px rgba(var(--accent-rgb), 0.7);
}

.btn-primary:hover { border-color: transparent; background: var(--gradient); box-shadow: 0 12px 34px -10px rgba(var(--accent-rgb), 0.9); }

/* hero button: translucent glass; hover adds a soft pink-to-orange gradient */
.theme-pink .btn-primary {
  background: rgba(255, 60, 100, 0.10);
  border: 1px solid rgba(255, 90, 120, 0.45);
  box-shadow: none;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: transform 0.25s, background 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.theme-pink .btn-primary:hover {
  background: linear-gradient(100deg, rgba(255, 45, 106, 0.26), rgba(255, 138, 31, 0.30));
  border-color: rgba(255, 138, 31, 0.65);
  box-shadow:
    0 14px 38px -8px rgba(255, 130, 40, 0.85),
    0 6px 16px -6px rgba(255, 150, 50, 0.6);
}

.btn-lg {
  padding: 20px 38px;
  border-radius: var(--radius);   /* same rounding as the About me cards */
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  gap: 14px;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.chip,
.tags li {
  list-style: none;
  display: inline-block;
  padding: 5px 12px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #c9c9cf;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; }

/* ---------- cards ---------- */
.card {
  position: relative;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  transition: transform 0.3s, border-color 0.3s, background 0.3s;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.55), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

a.card { display: block; text-decoration: none; color: inherit; }
a.card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
a.card:hover::before, .card.glow::before { opacity: 1; }

.card h2, .card h3 { font-size: 1.35rem; margin-bottom: 10px; }
.card p:last-child { margin-bottom: 0; }
.card .muted, .muted { color: var(--muted); }

.arrow { display: inline-block; transition: transform 0.25s; }
a:hover > .arrow, a.card:hover .arrow, .btn:hover .arrow { transform: translateX(6px); }

/* ---------- home ---------- */
.hero { padding: clamp(20px, 3vw, 40px) 0 clamp(36px, 6vw, 72px); }

.hero-grid {
  display: grid;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 0.85fr 1.15fr; }
}

.hero h1 {
  font-size: clamp(2.5rem, 7.2vw, 5.2rem);
  font-weight: 700;
  margin-bottom: 22px;
}

/* Borderless: the video's dark backdrop is blended away so only the
   renders float over the page grid. No transform/opacity on this
   wrapper, otherwise the blend would be isolated from the page. */
.hero-video {
  position: relative;
  display: block;
  /* The reel is very tall (1054x2694). This frame is wide and short, so the
     video is scaled up to fill the width and cropped top/bottom. Change the
     aspect-ratio to show more (taller) or less (shorter) of the reel. */
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1 / 1.8;
  justify-self: center;
  text-decoration: none;
}

.hero-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: lighten;
  filter: contrast(1.35) brightness(0.85);   /* crush the video's gray backdrop to black */
  /* feather every edge so no rectangle is left behind */
  -webkit-mask-image:
    linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent),
    linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent),
    linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
  mask-composite: intersect;
  transition: transform 0.4s;
}

.hero-video:hover video { transform: scale(1.04); }

.feature-grid { display: grid; gap: 18px; }

@media (min-width: 760px) {
  .feature-grid.two { grid-template-columns: repeat(2, 1fr); }
  .feature-grid.three { grid-template-columns: repeat(3, 1fr); }
}

.icon-card img { width: 44px; height: 44px; margin-bottom: 18px; object-fit: contain; }

.stack-lg > * + * { margin-top: clamp(20px, 3vw, 34px); }

/* ---------- about ---------- */
.profile {
  display: grid;
  gap: clamp(28px, 5vw, 60px);
  align-items: center;
}

@media (min-width: 820px) {
  .profile { grid-template-columns: 0.8fr 1.2fr; }
}

.portrait {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: 50%;
  padding: 6px;
  background: conic-gradient(from 210deg, var(--accent-1), var(--accent-2), var(--accent-3), var(--accent-1));
  box-shadow: 0 30px 80px -30px rgba(255, 92, 30, 0.6);
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 6px solid var(--bg);
}

.prose p { color: #d4d4d8; font-size: 1.04rem; }
.prose p:first-of-type { color: var(--text); }

.prose-block { padding: clamp(24px, 4vw, 44px) 0; border-top: 1px solid var(--line); }

/* ---------- development ---------- */
.area { display: grid; gap: 22px 48px; }

.card.area {
  border-color: rgba(var(--accent-rgb), 0.22);
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(var(--accent-rgb), 0.10), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
}

.card.area::before { opacity: 1; }

@media (min-width: 860px) {
  .area { grid-template-columns: 0.8fr 1.2fr; }
}

.area-code {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #fff;
  border-radius: 6px;
  background: var(--gradient);
}

.area h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }

.area h3 {
  margin: 0 0 8px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.area ul { padding-left: 0; list-style: none; margin-bottom: 22px; }
.area ul:last-child { margin-bottom: 0; }

.area li {
  position: relative;
  padding: 0 0 12px 22px;
  color: #cfcfd5;
  font-size: 0.97rem;
}

.area li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 2px;
  background: var(--gradient);
}

.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: clamp(32px, 5vw, 56px);
}

/* ---------- project list ---------- */
.rows {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: clamp(120px, 17vw, 190px);
  padding: 0 clamp(20px, 5vw, 60px);
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: background 0.35s;
}

.row:first-child { border-top: 0; }
.row:nth-child(even) { background: rgba(0, 0, 0, 0.2); }

a.row:hover { background: linear-gradient(90deg, rgba(255, 92, 30, 0.12), transparent 65%); }

.row .row-logo { max-width: 42%; max-height: 52%; object-fit: contain; transition: transform 0.35s; }
.row .row-render { max-width: 30%; max-height: 78%; object-fit: contain; transition: transform 0.35s; }

/* per-project sizing on the list (logo = left, render = right) */
.row-chappie .row-logo { max-width: 26%; max-height: 32%; }                 /* smaller logo */
.row-chappie .row-render { max-width: 34%; max-height: 96%; }               /* bigger render */
.row-melodoodle .row-render,
.row-luc .row-render,
.row-ravr .row-render,
.row-alertup .row-render { max-width: 34%; max-height: 90%; }               /* slightly bigger renders */

a.row:hover .row-logo { transform: translateX(12px); }
a.row:hover .row-render { transform: scale(1.06) rotate(-1deg); }

.row-name {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(1.2rem, 3.2vw, 2rem);
}

.row.soon { opacity: 0.5; }

/* ---------- project page ---------- */
.back-link {
  display: inline-block;
  margin-top: clamp(28px, 5vw, 48px);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.25s;
}

.back-link:hover { color: var(--text); }

.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: clamp(170px, 28vw, 300px);
  margin: 22px 0 40px;
  padding: 0 clamp(20px, 6vw, 70px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  /* solid, opaque panel: no grid and nothing showing through from the page */
  background:
    radial-gradient(70% 120% at 100% 0%, rgba(255, 92, 30, 0.16), transparent 65%),
    #1a1a1c;
}

.banner .row-logo { max-width: 46%; max-height: 54%; object-fit: contain; }
.banner .row-render { max-width: 30%; max-height: 86%; object-fit: contain; }

.project-title { font-size: clamp(2.2rem, 6vw, 3.8rem); font-weight: 700; margin: 6px 0 16px; }

.project-summary {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  font-weight: 600;
  color: var(--text);
  line-height: 1.55;
}

.project-body p { color: #cfcfd5; }

.pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 56px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.pager a {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.25s;
}

.pager a:hover { color: var(--text); }

/* ---------- project page: story sections + skills ---------- */
.project-section {
  margin-top: clamp(28px, 5vw, 44px);
  padding-top: clamp(22px, 4vw, 32px);
  border-top: 1px solid var(--line);
}

.project-section h2 {
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  margin-bottom: 14px;
}

.project-section p { color: #cfcfd5; }

.bullets { list-style: none; margin: 0 0 1.1em; padding: 0; }

.bullets li {
  position: relative;
  padding: 0 0 10px 22px;
  color: #cfcfd5;
}

.bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 8px;
  height: 2px;
  background: var(--gradient);
}

.skills { margin-top: clamp(44px, 7vw, 80px); }

/* two panels: Learnt | Applied, each a plain list */
.skills-panels {
  display: grid;
  gap: 18px;
  align-items: start;
}

@media (min-width: 860px) {
  .skills-panels { grid-template-columns: 1fr 1fr; }
}

.skills-panel {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #19191b;                       /* solid panel */
  overflow: hidden;
}

.skills-panel.learnt { border-color: rgba(var(--accent-rgb), 0.45); }

.skills-panel header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.skills-panel.learnt header { background: linear-gradient(100deg, rgba(var(--accent-rgb), 0.16), rgba(255, 255, 255, 0.02)); }

.panel-blurb { flex: 1; color: var(--muted); font-size: 0.88rem; }

.panel-count {
  min-width: 28px;
  padding: 2px 8px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.skill-list { list-style: none; margin: 0; padding: 0; }

.skill-list li {
  position: relative;
  padding: 14px 22px 14px 44px;
  border-top: 1px solid var(--line);
  transition: background 0.25s;
}

.skill-list li:first-child { border-top: 0; }
.skill-list li:hover { background: rgba(255, 255, 255, 0.03); }

.skill-list li::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 1.35em;
  width: 10px;
  height: 2px;
  background: var(--gradient);
}

.skills-panel.applied .skill-list li::before { background: rgba(255, 255, 255, 0.35); }

.skill-list strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.35;
}

.skill-list span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.kind {
  display: inline-block;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 999px;
}

.kind.learnt { color: #fff; background: var(--gradient); }
.kind.applied { color: var(--text); border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.04); }

/* ---------- project gallery + lightbox ---------- */
.gallery { margin-top: clamp(40px, 7vw, 80px); }

.gallery .section-title .count {
  margin-left: 8px;
  padding: 3px 10px;
  font-size: 0.8rem;
  vertical-align: middle;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

/* masonry: pictures keep their own proportions */
.gallery-grid { columns: 5 170px; column-gap: 12px; }   /* smaller pictures: ~5 per row on desktop, 2 on phones */

.gallery-grid .shot {
  display: block;
  margin: 0 0 12px;
  break-inside: avoid;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.gallery-grid .shot img { width: 100%; height: auto; display: block; }

.gallery-grid .shot:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--accent-rgb), 0.55);
  box-shadow: 0 14px 34px -16px rgba(var(--accent-rgb), 0.6);
}

/* pictures inside a development card.
   Without JavaScript: justified rows. With JavaScript (class .carousel): ONE frame
   that cycles through the pictures and enlarges on click. */
.area-pics {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.area-pics::after { content: ""; flex-grow: 1000000; }

.area-pics .shot {
  display: block;
  flex: var(--ar) 1 calc(var(--ar) * 190px);
  min-width: 0;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.area-pics .shot img { width: 100%; height: auto; display: block; }

/* ---- the one-frame slideshow ---- */
.area-pics.carousel {
  position: relative;
  display: block;
  grid-column: auto;
  aspect-ratio: 4 / 3;
  max-width: 520px;
  margin-top: 24px;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 14px;
  overflow: hidden;
  background: #111113;
  box-shadow: 0 18px 40px -26px rgba(var(--accent-rgb), 0.7);
}

.area-pics.carousel::after { content: none; }

.area-pics.carousel .shot {
  position: absolute;
  inset: 0;
  flex: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.area-pics.carousel .shot.active { opacity: 1; pointer-events: auto; cursor: zoom-in; }

.area-pics.carousel .shot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cr-btn {
  position: absolute;
  top: 50%;
  width: 38px;
  height: 38px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--text);
  background: rgba(17, 17, 18, 0.65);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.25s, background 0.25s;
}

.cr-prev { left: 10px; }
.cr-next { right: 10px; }
.area-pics.carousel:hover .cr-btn,
.area-pics.carousel:focus-within .cr-btn { opacity: 1; }
.cr-btn:hover { background: rgba(var(--accent-rgb), 0.4); }

.cr-hint {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  color: var(--text);
  background: rgba(17, 17, 18, 0.55);
  border: 1px solid var(--line);
  border-radius: 8px;
  pointer-events: none;
  opacity: 0.8;
}

.cr-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 7px;
  pointer-events: none;
}

.cr-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.25s, transform 0.25s;
}

.cr-dots button.on { background: rgb(var(--accent-rgb)); transform: scale(1.35); }

dialog.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(10, 10, 11, 0.94);
  color: var(--text);
}

dialog.lightbox[open] { display: flex; align-items: center; justify-content: center; }
dialog.lightbox::backdrop { background: rgba(0, 0, 0, 0.7); }

dialog.lightbox img {
  max-width: min(92vw, 1500px);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox button {
  position: absolute;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  font-size: 2rem;
  line-height: 1;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.25s;
}

.lightbox button:hover { background: rgba(var(--accent-rgb), 0.35); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }

.lb-count {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---------- footer ---------- */
.site-footer {
  margin-top: clamp(48px, 8vw, 96px);
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
}

.site-footer .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px var(--gutter);
  display: flex;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--faint);
}

.site-footer a { color: var(--muted); text-decoration: none; transition: color 0.25s; }
.site-footer a:hover { color: var(--accent-2); }

/* ---------- motion ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

.hero > .container > *,
.page-hero > .container > *,
.hero-grid > * { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }

.hero-grid > *:nth-child(2) { animation-delay: 0.12s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
