/* ==========================================================================
   DevDecatron — styles
   --------------------------------------------------------------------------
    1. Colours and basics         7. What I make
    2. Background effects         8. Projects
    3. Top bar                    9. Contact
    4. Hero                      10. Footer
    5. Shared pieces             11. Video pop-up
    6. Videos                    12. Animations, small screens, reduced motion

   Tip: the whole colour scheme lives in the first block below. To change the
   green, edit --accent-rgb and --accent-2-rgb (three numbers each: red, green, blue).
   ========================================================================== */

/* 1. Colours and basics ---------------------------------------------------- */
:root {
  --bg: #050505;
  --text: #ececec;
  --muted: #a2a2a2;
  --faint: #7b7b7b;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.17);
  --card: rgba(10, 10, 10, 0.82);
  --accent-rgb: 52, 217, 123;       /* main green */
  --accent-2-rgb: 158, 242, 168;    /* light green, used for the end of gradients */
  --accent: rgb(var(--accent-rgb));
  --accent-2: rgb(var(--accent-2-rgb));
  --on-accent: #03130a;             /* text on top of the green */
  --red: #ff3b3b;
  --radius: 18px;
  --max: 1160px;
  --gutter: clamp(18px, 4vw, 32px);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}

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

html {
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  scrollbar-gutter: stable;
  scrollbar-color: #2a2a2a transparent;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open, body.menu-open { overflow: hidden; }

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: rgba(var(--accent-rgb), 0.3); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s var(--ease);
}
.icon-fill { fill: currentColor; stroke: currentColor; stroke-width: 1; }

.skip-link {
  position: absolute; left: 12px; top: -64px; z-index: 200;
  padding: 10px 16px; border-radius: 10px;
  background: #fff; color: #000; font-weight: 700;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

.container { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.container.narrow { width: min(100% - 2 * var(--gutter), 820px); }

/* 2. Background effects ---------------------------------------------------- */
#rain {
  position: fixed; inset: 0; z-index: -5;
  width: 100%; height: 100%;
  pointer-events: none;
  opacity: 0.5;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.55) 50%, rgba(0, 0, 0, 0.14) 100%);
          mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.55) 50%, rgba(0, 0, 0, 0.14) 100%);
}

.bg-glow { position: fixed; inset: 0; z-index: -4; overflow: hidden; pointer-events: none; }
.bg-glow span { position: absolute; border-radius: 50%; will-change: transform; }
.bg-glow .g1 {
  width: 58vmax; height: 58vmax; left: -22vmax; top: -28vmax;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.12), transparent 62%);
  animation: drift-a 24s ease-in-out infinite alternate;
}
.bg-glow .g2 {
  width: 52vmax; height: 52vmax; right: -24vmax; top: 4vh;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.06), transparent 62%);
  animation: drift-b 30s ease-in-out infinite alternate;
}
.bg-glow .g3 {
  width: 50vmax; height: 50vmax; left: 18vw; bottom: -32vmax;
  background: radial-gradient(circle, rgba(var(--accent-2-rgb), 0.05), transparent 62%);
  animation: drift-a 34s ease-in-out infinite alternate-reverse;
}

.bg-grid {
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 75% 55% at 50% 0%, #000 10%, transparent 72%);
          mask-image: radial-gradient(ellipse 75% 55% at 50% 0%, #000 10%, transparent 72%);
}

/* Darkens the corners of the screen so everything feels deeper. */
.vignette {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(ellipse 85% 75% at 50% 38%, transparent 30%, rgba(0, 0, 0, 0.62) 100%);
}

.cursor-glow {
  position: fixed; left: 0; top: 0; z-index: -1;
  width: 540px; height: 540px; margin: -270px 0 0 -270px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.09), rgba(var(--accent-rgb), 0.03) 45%, transparent 70%);
  transition: opacity 0.6s;
  will-change: transform;
}
.cursor-glow.on { opacity: 1; }

.progress { position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 3px; pointer-events: none; }
.progress span {
  display: block; height: 100%;
  transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.7);
}

/* 3. Top bar --------------------------------------------------------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}
.nav.scrolled, .nav.open {
  background: rgba(5, 5, 5, 0.78);
  border-color: var(--line);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
          backdrop-filter: blur(16px) saturate(140%);
}
.nav-inner {
  width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto;
  padding: 12px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
}
.brand img { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-strong); }

.nav-menu { display: flex; align-items: center; gap: 4px; }
.nav-menu > a:not(.btn) {
  position: relative;
  padding: 8px 14px; border-radius: 999px;
  font-size: 0.76rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.nav-menu > a:not(.btn):hover, .nav-menu > a:not(.btn).active { color: #fff; background: rgba(255, 255, 255, 0.07); }
.nav-menu > .btn { margin-left: 10px; }

.nav-toggle {
  display: none; place-items: center;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.04);
}
.nav-toggle .icon-close, .nav.open .nav-toggle .icon-open { display: none; }
.nav.open .nav-toggle .icon-close { display: block; }

/* 4. Hero ------------------------------------------------------------------ */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center;
  padding: 120px var(--gutter) 96px;
  text-align: center;
}
.hero-inner { max-width: 820px; display: flex; flex-direction: column; align-items: center; }
.hero-inner > * { animation: rise 0.9s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms + 100ms); }
.hero-inner > :nth-child(1) { --i: 0; }
.hero-inner > :nth-child(2) { --i: 1; }
.hero-inner > :nth-child(3) { --i: 2; }
.hero-inner > :nth-child(4) { --i: 3; }
.hero-inner > :nth-child(5) { --i: 4; }
.hero-inner > :nth-child(6) { --i: 5; }
/* The logo only fades in. It never moves. */
.hero-inner > .logo-wrap { animation-name: fade-in; }

.logo-wrap { position: relative; width: 132px; height: 132px; margin-bottom: 26px; }
.logo-wrap::before {
  content: ""; position: absolute; inset: -36px; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.2), rgba(var(--accent-rgb), 0.06) 50%, transparent 70%);
}
.logo-wrap img {
  position: relative; z-index: 1; width: 100%; height: 100%;
  border-radius: 50%; background: #000;
  border: 2px solid rgba(255, 255, 255, 0.14);
}
.logo-ring {
  position: absolute; inset: -9px; z-index: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), #1c8a4d, var(--accent));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
  animation: spin 16s linear infinite;
  filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), 0.45));
}

.pill {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 22px; padding: 7px 16px;
  border-radius: 999px; border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  font: 500 0.76rem var(--mono); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.7); animation: ping 2s infinite; }

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.5rem, 12vw, 6.9rem);
  font-weight: 800; line-height: 1; letter-spacing: -0.045em;
  text-align: center; white-space: nowrap;
}
.t-dev { color: #fff; }
.t-deca {
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 90%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
/* The title is hidden for a moment while the "decode" effect gets ready.
   If the script ever fails, the CSS shows it anyway after a short wait. */
.js .hero h1 { opacity: 0; animation: show-anyway 0.01s 2.8s forwards; }
.js .hero h1.ready { opacity: 1; animation: none; }

.typed-line { margin-bottom: 18px; min-height: 1.7em; font-size: clamp(1.05rem, 2.6vw, 1.4rem); font-weight: 500; color: var(--text); }
.typed { color: var(--accent); font-weight: 600; }
.caret {
  display: inline-block; width: 2px; height: 1.1em; margin-left: 3px;
  vertical-align: -0.18em; background: var(--accent);
  animation: blink 1s steps(1) infinite;
}
.lead { max-width: 56ch; margin-bottom: 34px; font-size: clamp(1rem, 2vw, 1.15rem); color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

.scroll-hint {
  position: absolute; left: 50%; bottom: 28px; margin-left: -13px;
  width: 26px; height: 42px; border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.26);
  animation: rise 1s 1.4s var(--ease) both;
}
.scroll-hint span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  border-radius: 4px; background: var(--accent);
  animation: wheel 1.8s ease-in-out infinite;
}

/* 5. Shared pieces --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; border: 1px solid transparent;
  font-size: 0.95rem; font-weight: 700; letter-spacing: 0.01em; white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.3s, background 0.3s, border-color 0.3s, color 0.3s;
}
.btn .icon { width: 1.2em; height: 1.2em; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(0.97); }
.btn-small { padding: 9px 18px; font-size: 0.8rem; }

.btn-primary {
  color: var(--on-accent);
  background:
    linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.5) 50%, transparent 65%) no-repeat 160% 0 / 250% 100%,
    linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 34px -12px rgba(var(--accent-rgb), 0.55);
  transition: transform 0.25s var(--ease), box-shadow 0.3s, background-position 0.9s var(--ease);
}
.btn-primary:hover { background-position: -60% 0, 0 0; box-shadow: 0 16px 44px -12px rgba(var(--accent-rgb), 0.75); }

.btn-ghost { color: #fff; background: rgba(255, 255, 255, 0.05); border-color: var(--line-strong); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.4); }

.btn-red { color: #fff; background: linear-gradient(135deg, #ff4d4d, #e11d2e); box-shadow: 0 8px 26px -10px rgba(255, 59, 59, 0.7); }
.btn-red:hover { box-shadow: 0 12px 34px -10px rgba(255, 59, 59, 0.9); }

.icon-btn {
  display: inline-grid; place-items: center; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.04); color: #fff;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.2s, opacity 0.25s;
}
.icon-btn:hover:not(:disabled) { background: #fff; color: #000; border-color: #fff; }
.icon-btn:active:not(:disabled) { transform: scale(0.93); }
.icon-btn:disabled { opacity: 0.32; cursor: default; }

.text-link { display: inline-flex; align-items: center; gap: 8px; font-size: 0.92rem; font-weight: 600; color: var(--accent); }
.text-link:hover .icon { transform: translate(2px, -2px); }

.section { padding-block: clamp(64px, 9vw, 112px); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 22px; margin-bottom: 36px; }
.eyebrow-label { margin-bottom: 12px; font: 500 0.76rem var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.section-title { margin-bottom: 0; font-size: clamp(1.9rem, 4.2vw, 2.8rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.035em; }
.section-sub { max-width: 54ch; margin: 14px 0 0; color: var(--muted); }

/* A soft card with a glow that follows the mouse. The script sets --mx / --my. */
.card {
  position: relative;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
  transition: transform 0.35s var(--ease), border-color 0.3s, background 0.3s, box-shadow 0.4s;
}
.card:hover, .card:focus-visible { --lift: -5px; border-color: var(--line-strong); box-shadow: 0 26px 60px -28px rgba(0, 0, 0, 1); }
.spot::before, .spot::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  opacity: 0; transition: opacity 0.35s;
}
.spot::before { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb), 0.08), transparent 62%); }
.spot::after {
  inset: -1px; padding: 1px;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb), 0.8), rgba(var(--accent-2-rgb), 0.3) 45%, transparent 72%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.spot:hover::before, .spot:hover::after, .spot:focus-visible::before, .spot:focus-visible::after { opacity: 1; }
.spot > * { position: relative; z-index: 1; }

/* 6. Videos ---------------------------------------------------------------- */
.carousel-buttons { display: flex; gap: 10px; }
[data-carousel].no-overflow .carousel-buttons { display: none; }

.carousel-track {
  display: flex; gap: 20px;
  overflow-x: auto; overflow-y: hidden;
  padding: 16px 6px 30px; margin: -16px -6px -30px;
  scroll-snap-type: x mandatory; scroll-padding-inline: 6px; scroll-behavior: smooth;
  scrollbar-width: none; overscroll-behavior-x: contain;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-l, 0px), #000 calc(100% - var(--fade-r, 0px)), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-l, 0px), #000 calc(100% - var(--fade-r, 0px)), transparent 100%);
}
.carousel-track::-webkit-scrollbar { display: none; }
[data-carousel]:not(.at-start) .carousel-track { --fade-l: 56px; }
[data-carousel]:not(.at-end) .carousel-track { --fade-r: 56px; }
.carousel-track.dragging { scroll-snap-type: none; scroll-behavior: auto; cursor: grabbing; user-select: none; }
.carousel-track.dragging a { pointer-events: none; }
.carousel-track:focus-visible { outline-offset: 6px; }

.video-card {
  flex: 0 0 min(84vw, 380px); scroll-snap-align: start;
  display: flex; flex-direction: column; overflow: hidden;
  -webkit-user-drag: none;
}
.thumb { position: relative; z-index: 1; aspect-ratio: 16 / 9; overflow: hidden; background: #0c0c0c; }
.thumb img {
  width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none;
  filter: brightness(0.76) saturate(0.95);
  transition: transform 0.8s var(--ease), filter 0.5s;
}
.thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent 55%); pointer-events: none; }
.video-card:hover .thumb img { transform: scale(1.07); filter: brightness(1) saturate(1.05); }

.play {
  position: absolute; left: 50%; top: 50%; z-index: 2;
  width: 62px; height: 62px; margin: -31px 0 0 -31px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.55); border: 1px solid rgba(255, 255, 255, 0.4);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: transform 0.4s var(--ease), background 0.3s, border-color 0.3s;
}
.play .icon { width: 24px; height: 24px; margin-left: 3px; color: #fff; }
.video-card:hover .play { transform: scale(1.12); background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; box-shadow: 0 0 40px rgba(var(--accent-rgb), 0.55); }
.video-card:hover .play .icon { color: var(--on-accent); }

.badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  padding: 5px 10px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent);
  font: 700 0.68rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase;
}
/* The date line is shown above the title, but comes after it in the page so screen readers read the title first. */
.video-body { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; padding: 18px 20px 22px; }
.video-meta { order: -1; margin: 0 0 8px; font: 400 0.78rem var(--mono); letter-spacing: 0.02em; color: var(--faint); }
.video-title {
  margin: 0; min-height: 2.8em;
  font-size: 1.02rem; font-weight: 650; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.see-all {
  flex: 0 0 min(70vw, 260px); scroll-snap-align: start;
  display: grid; place-items: center; align-content: center; gap: 14px; padding: 28px; text-align: center;
  background: linear-gradient(160deg, rgba(var(--accent-rgb), 0.08), rgba(var(--accent-rgb), 0.02)), var(--card);
}
.see-all .icon { width: 34px; height: 34px; color: var(--red); }
.see-all strong { display: block; font-size: 1.05rem; line-height: 1.3; }
.see-all span.small { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--accent); font-weight: 600; }
.see-all:hover .small .icon { transform: translateX(4px); }
.see-all .small .icon { width: 16px; height: 16px; color: var(--accent); }

.empty-note { padding: 28px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); }

/* 7. What I make ----------------------------------------------------------- */
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.about-card { padding: 32px 30px 30px; }
.about-icon {
  display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 22px; border-radius: 16px;
  color: var(--on-accent); background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 30px -14px rgba(var(--accent-rgb), 0.7);
}
.about-icon .icon { width: 26px; height: 26px; }
.about-card h3 { margin-bottom: 10px; font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; }
.about-card p { margin-bottom: 0; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.chips li { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line-strong); font: 500 0.72rem var(--mono); color: var(--muted); }

/* 8. Projects -------------------------------------------------------------- */
.repo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 20px; }
.repo-card { display: flex; flex-direction: column; padding: 26px 26px 22px; }
.repo-card[hidden] { display: none; }
.repo-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.repo-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); }
.repo-icon .icon { width: 20px; height: 20px; }
.stat { display: inline-flex; align-items: center; gap: 6px; font: 500 0.8rem var(--mono); color: var(--muted); }
.stat .icon { width: 15px; height: 15px; color: #f5c542; fill: #f5c542; }
.repo-name { margin-bottom: 8px; font: 700 1.05rem var(--mono); letter-spacing: -0.01em; word-break: break-word; }
.repo-desc {
  flex: 1; margin-bottom: 22px; font-size: 0.92rem; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.repo-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.82rem; }
.lang { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); color: var(--muted); }
.lang i { width: 10px; height: 10px; border-radius: 50%; }
.repo-go { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: #fff; }
.repo-card:hover .repo-go .icon { transform: translateX(4px); }
.more-wrap { display: flex; justify-content: center; margin-top: 36px; }
.more-wrap[hidden], #repo-more[hidden] { display: none; }

/* 9. Contact --------------------------------------------------------------- */
.contact-card {
  padding: clamp(38px, 7vw, 72px) clamp(24px, 5vw, 64px);
  text-align: center; overflow: hidden; border-radius: 28px; border-color: var(--line-strong);
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(var(--accent-rgb), 0.13), transparent 58%),
    radial-gradient(90% 90% at 100% 100%, rgba(var(--accent-rgb), 0.05), transparent 58%),
    rgba(9, 9, 9, 0.88);
}
.contact-card .section-sub { margin-inline: auto; }
.contact-card:hover { --lift: 0px; }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 34px; }
.contact-note { margin: 22px 0 0; font-size: 0.85rem; color: var(--faint); }

/* 10. Footer --------------------------------------------------------------- */
.footer {
  position: relative; overflow: hidden;
  margin-top: 24px;
  border-top: 1px solid var(--line);
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), #020202 50%);
}
/* a thin glowing line along the top edge */
.footer::before {
  content: ""; position: absolute; top: -1px; left: 12%; right: 12%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.9), transparent);
  box-shadow: 0 0 26px 1px rgba(var(--accent-rgb), 0.5);
}

.footer-cta {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 22px 32px;
  margin-top: 64px; padding: 28px clamp(22px, 4vw, 40px);
  border-radius: 22px;
  background: radial-gradient(90% 180% at 0% 0%, rgba(var(--accent-rgb), 0.11), transparent 60%), rgba(9, 9, 9, 0.85);
}
.footer-cta:hover { --lift: 0px; }
.footer-cta-title { margin: 0 0 4px; font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; }
.footer-cta-text { margin: 0; color: var(--muted); }

.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr; gap: 48px 56px; padding-block: 64px 52px; }
.footer-brand .brand img { width: 44px; height: 44px; }
.footer-about { max-width: 36ch; margin: 18px 0 24px; font-size: 0.95rem; color: var(--muted); }
.socials { display: flex; gap: 10px; }

.footer-heading { margin: 0 0 20px; font: 500 0.74rem var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
.footer-col ul { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.footer-col a { display: inline-flex; align-items: baseline; gap: 10px; font-weight: 500; color: var(--text); transition: color 0.2s, transform 0.25s var(--ease); }
.footer-col a small { font: 400 0.76rem var(--mono); color: var(--faint); transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); transform: translateX(4px); }
.footer-col a:hover small { color: var(--muted); }

.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px;
  padding-block: 22px; border-top: 1px solid var(--line);
  font: 400 0.78rem var(--mono); color: var(--faint);
}
.footer-bottom p { margin: 0; }
.to-top {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 6px 6px 6px 16px; border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--muted); transition: color 0.2s, border-color 0.2s;
}
.to-top .arrow {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s, color 0.2s, transform 0.25s var(--ease);
}
.to-top .arrow .icon { width: 15px; height: 15px; }
.to-top:hover { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.to-top:hover .arrow { background: var(--accent); color: var(--on-accent); transform: translateY(-2px); }

/* A huge, faded copy of the name along the very bottom. Decoration only. */
.footer-mark {
  margin: 6px 0 -0.1em;
  font-size: 14.6vw; font-weight: 800; line-height: 0.84; letter-spacing: -0.055em;
  text-align: center; white-space: nowrap; user-select: none; pointer-events: none;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.11), rgba(var(--accent-rgb), 0.05) 62%, transparent 94%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* 11. Video pop-up --------------------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; opacity: 0; transition: opacity 0.25s ease; }
.modal[hidden] { display: none; }
.modal.open { opacity: 1; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.88); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.modal-dialog {
  position: relative; overflow: hidden;
  width: min(100%, 980px, calc((100vh - 130px) * 1.7778));
  width: min(100%, 980px, calc((100dvh - 130px) * 1.7778));
  border-radius: 20px; background: #0a0a0a; border: 1px solid var(--line-strong);
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 1), 0 0 90px -34px rgba(var(--accent-rgb), 0.4);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.35s var(--ease);
}
.modal.open .modal-dialog { transform: none; }
.modal-player { aspect-ratio: 16 / 9; background: #000; }
.modal-player iframe { display: block; width: 100%; height: 100%; border: 0; }
.modal-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px 14px 20px; }
.modal-title { margin: 0; font-size: 0.98rem; font-weight: 650; line-height: 1.35; }
.modal-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* 12. Animations ----------------------------------------------------------- */
/* Things that fade in as you scroll (the script adds .in). */
.js .reveal { opacity: 0; }
.js .reveal.in { animation: reveal 0.85s var(--ease) both; animation-delay: var(--d, 0ms); }

@keyframes reveal { from { opacity: 0; translate: 0 28px; } to { opacity: 1; translate: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes show-anyway { to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.7); } 70%, 100% { box-shadow: 0 0 0 10px rgba(var(--accent-rgb), 0); } }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@keyframes drift-a { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(9vmax, 6vmax, 0) scale(1.15); } }
@keyframes drift-b { from { transform: translate3d(0, 0, 0) scale(1.1); } to { transform: translate3d(-10vmax, 5vmax, 0) scale(0.95); } }
@keyframes marquee { to { transform: translateX(-50%); } }

/* The strip of topics under the hero */
.marquee {
  overflow: hidden; border-block: 1px solid var(--line); background: rgba(255, 255, 255, 0.02);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; align-items: center; gap: 44px; padding: 18px 22px; flex-shrink: 0; }
.marquee-group span { display: inline-flex; align-items: center; gap: 44px; white-space: nowrap; font: 500 0.82rem var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.marquee-group span::after { content: "/"; color: var(--accent); opacity: 0.8; }

/* Small screens and reduced motion ------------------------------------------ */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; padding-block: 52px 44px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-grid; }
  .nav-menu {
    position: absolute; top: 100%; left: 0; right: 0;
    display: grid; gap: 4px; padding: 10px var(--gutter) 24px;
    background: #050505; border-bottom: 1px solid var(--line);
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity 0.25s, transform 0.25s var(--ease), visibility 0.25s;
  }
  .nav.open .nav-menu { opacity: 1; visibility: visible; transform: none; }
  .nav-menu > a:not(.btn) { padding: 14px 12px; border-radius: 12px; font-size: 0.88rem; }
  .nav-menu > .btn { margin: 10px 0 0; justify-self: start; }

  .about-grid { grid-template-columns: 1fr; }
}

/* Tablets: the "What I make" cards sit side by side with their icon on the left. */
@media (min-width: 561px) and (max-width: 860px) {
  .about-card { display: grid; grid-template-columns: auto 1fr; column-gap: 24px; align-items: start; }
  .about-icon { grid-row: 1 / span 3; margin-bottom: 0; }
  .about-card .chips { margin-top: 16px; }
}

@media (max-width: 560px) {
  .hero { padding-top: 104px; }
  .logo-wrap { width: 112px; height: 112px; }
  .hero-actions { width: 100%; }
  .hero-actions .btn, .contact-actions .btn, .footer-cta .btn { width: 100%; }
  .section-head { align-items: flex-start; }
  .footer-cta { margin-top: 48px; }
  .footer-grid { gap: 36px 24px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .modal { padding: 12px; }
  .modal-bar { flex-direction: column; align-items: stretch; padding: 14px 16px 16px; }
  .modal-actions { justify-content: space-between; }
}

@media (hover: none) {
  .cursor-glow { display: none; }
  .card:hover { --lift: 0px; }
}

@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;
  }
  .marquee-track { animation: none; }
  .js .reveal, .js .hero h1 { opacity: 1; }
  .cursor-glow { display: none; }
}
