/* ============================================================
   GLASS | glass.css
   Shared by every page and loaded after the theme stylesheets:
   - colours that change with the light / dark switch
   - Apple liquid-glass buttons (both themes)
   - the theme switch in the nav bar
   - softer shadows under the website laptops
   ============================================================ */

/* ── Theme colours ── */
:root {
  --ink: #1D1D1F;
  --tag-1: #1D1D1F; --tag-2: #6E6E73; --tag-3: #AEAEB2; --tag-dot: #C7C7CC;
  --tone-1: #4D4D55; --tone-2: #8A8A93; --tone-3: #2E2E33; --tone-4: #2E2E33;

  --g-font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --g-text: #1D1D1F;
  --g-fill: rgba(255, 255, 255, 0.55);
  --g-fill-hover: rgba(255, 255, 255, 0.75);
  --g-tint: linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.15) 55%, rgba(255, 255, 255, 0.35) 100%);
  --g-border: rgba(0, 0, 0, 0.09);
  --g-edge: rgba(255, 255, 255, 0.95);
  --g-under: rgba(0, 0, 0, 0.05);
  --g-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 6px 18px rgba(0, 0, 0, 0.08);
  --g-shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.06), 0 12px 28px rgba(0, 0, 0, 0.12);
  --g-sheen: rgba(255, 255, 255, 0.85);

  --g-prim: rgba(77, 77, 85, 0.86);
  --g-prim-hover: rgba(46, 46, 51, 0.92);
  --g-prim-text: #FFFFFF;
  --g-prim-edge: rgba(255, 255, 255, 0.38);
  --g-prim-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 8px 22px rgba(77, 77, 85, 0.28);
  --g-prim-sheen: rgba(255, 255, 255, 0.35);

  --laptop-shadow: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.16));
  --laptop-base-shadow: 0 6px 10px rgba(0, 0, 0, 0.14);
}
html.theme-dark {
  --ink: #F5F5F5;
  --tag-1: #E6E6E8; --tag-2: #A8A8AD; --tag-3: #76767C; --tag-dot: #4A4A50;
  --tone-1: #FF3B30; --tone-2: #E12A45; --tone-3: #BF2233; --tone-4: #9A1F2E;

  --g-text: #F5F5F7;
  --g-fill: rgba(255, 255, 255, 0.07);
  --g-fill-hover: rgba(255, 255, 255, 0.12);
  --g-tint: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.02) 55%, rgba(255, 255, 255, 0.05) 100%);
  --g-border: rgba(255, 255, 255, 0.14);
  --g-edge: rgba(255, 255, 255, 0.28);
  --g-under: rgba(0, 0, 0, 0.3);
  --g-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 22px rgba(0, 0, 0, 0.45);
  --g-shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.45), 0 14px 32px rgba(0, 0, 0, 0.55);
  --g-sheen: rgba(255, 255, 255, 0.22);

  --g-prim: rgba(255, 26, 32, 0.97);          /* electric red */
  --g-prim-hover: rgba(255, 58, 58, 1);
  --g-prim-edge: rgba(255, 255, 255, 0.42);
  --g-prim-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 60, 60, 0.55), 0 6px 22px rgba(255, 26, 32, 0.55), 0 0 36px rgba(255, 26, 32, 0.35);
  --g-prim-sheen: rgba(255, 255, 255, 0.34);

  --laptop-shadow: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.38));
  --laptop-base-shadow: 0 6px 12px rgba(0, 0, 0, 0.35);
}

/* ── Liquid-glass buttons ──
   Clear glass for secondary actions, tinted glass for primary ones.
   The light spot follows the pointer (--gx / --gy set by theme.js),
   buttons lift a touch on hover and squish when pressed. */
.btn--primary, .hero__cta .btn--primary, .btn--outline, .hero__cta .btn--outline,
.site-card__btn, #tools .site-card__btn, .contact__links--below .contact__cv,
.inspo-game__btn, .cv__btn, .sv__btn, .screensaver__back,
.proj-hero__link, .proj-nav__btn, .nw-refresh,
.sa-btn, .vl-btn, .cfs__view {
  --gx: 50%; --gy: -30%;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px !important;
  border-radius: 999px !important;
  font-family: var(--g-font) !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  letter-spacing: -0.01em !important;
  text-transform: none !important;
  text-shadow: none !important;
  text-decoration: none;
  color: var(--g-text) !important;
  background:
    radial-gradient(140px circle at var(--gx) var(--gy), var(--g-sheen), transparent 65%),
    var(--g-tint),
    var(--g-fill) !important;
  border: 1px solid var(--g-border) !important;
  box-shadow: inset 0 1px 0 var(--g-edge), inset 0 -1px 0 var(--g-under), var(--g-shadow) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  animation: none !important;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease, background-color 0.3s ease, color 0.2s ease !important;
}

/* Primary: tinted glass */
.btn--primary, .hero__cta .btn--primary, .site-card__btn, #tools .site-card__btn,
.contact__links--below .contact__cv, .sa-btn:not(.sa-btn--ghost), .vl-btn:not(.vl-btn--ghost):not(.vl-btn--danger),
.inspo-game__btn, .sv__btn:not(.sv__btn--icon) {
  color: var(--g-prim-text) !important;
  background:
    radial-gradient(140px circle at var(--gx) var(--gy), var(--g-prim-sheen), transparent 65%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 55%),
    var(--g-prim) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: inset 0 1px 0 var(--g-prim-edge), inset 0 -1px 0 rgba(0, 0, 0, 0.15), var(--g-prim-shadow) !important;
}

/* Delete in the video library stays red in both themes */
.vl-btn--danger { color: #FF3B30 !important; }

/* On the dark carbon folders, the file viewer and the idle screen
   the glass is always the dark kind */
.cfs__view, html.theme-dark .cv__btn, html.theme-dark .screensaver__back {
  color: #F5F5F7 !important;
  background:
    radial-gradient(140px circle at var(--gx) var(--gy), rgba(255, 255, 255, 0.22), transparent 65%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.02) 55%, rgba(255, 255, 255, 0.05) 100%),
    rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 -1px 0 rgba(0, 0, 0, 0.3), 0 6px 18px rgba(0, 0, 0, 0.4) !important;
}
.cfs__view::before { display: none !important; }

/* Hover: lift and brighten */
@media (hover: hover) {
  .btn--outline:hover, .sv__btn--icon:hover, .proj-hero__link:hover, .proj-nav__btn:hover,
  .nw-refresh:hover, .sa-btn--ghost:hover, .vl-btn--ghost:hover, .vl-btn--danger:hover {
    --gy: 0%;
    background-color: var(--g-fill-hover) !important;
    box-shadow: inset 0 1px 0 var(--g-edge), inset 0 -1px 0 var(--g-under), var(--g-shadow-hover) !important;
    transform: translateY(-1px) scale(1.03);
  }
  .btn--primary:hover, .site-card:hover .site-card__btn, .site-card__btn:hover,
  .contact__links--below .contact__cv:hover, .sa-btn:not(.sa-btn--ghost):hover,
  .vl-btn:not(.vl-btn--ghost):not(.vl-btn--danger):hover,
  .inspo-game__btn:hover, .sv__btn:not(.sv__btn--icon):hover {
    --gy: 0%;
    background-color: var(--g-prim-hover) !important;
    transform: translateY(-1px) scale(1.03);
  }
  .cfs__view:hover, html.theme-dark .cv__btn:hover, html.theme-dark .screensaver__back:hover {
    --gy: 0%;
    background-color: rgba(255, 255, 255, 0.13) !important;
    transform: translateY(-1px) scale(1.03);
  }
}

/* Press: a quick squish */
.btn--primary:active, .btn--outline:active, .site-card__btn:active, .contact__cv:active,
.inspo-game__btn:active, .cv__btn:active, .sv__btn:active, .screensaver__back:active,
.proj-hero__link:active, .proj-nav__btn:active, .nw-refresh:active,
.sa-btn:active, .vl-btn:active, .cfs__view:active {
  transform: scale(0.95) !important;
  transition-duration: 0.12s !important;
}

/* Icon-only buttons stay round */
.cv__btn--icon, .sv__btn--icon { width: 44px; padding: 0 !important; }

/* Mid-size buttons inside dense tools and the viewer */
.cv__btn, .sv__btn, .nw-refresh, .sa-btn, .vl-btn, .proj-nav__btn { font-size: 14px !important; min-height: 40px; padding: 0 18px !important; }
.cv__btn--icon, .sv__btn--icon { width: 40px; padding: 0 !important; }

/* The big CV button keeps its size */
.contact__links--below .contact__cv { min-height: 56px; padding: 0 44px !important; font-size: 16px !important; }

/* Phones: no hover state to get stuck */
@media (max-width: 760px) {
  .btn--primary, .btn--outline { font-size: 15px !important; }
}

/* ── Segmented filter (Work section) as a glass track ── */
.portfolio__filter {
  background: var(--g-tint), var(--g-fill) !important;
  border: 1px solid var(--g-border) !important;
  box-shadow: inset 0 1px 0 var(--g-edge), var(--g-shadow) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
}
.filter-btn {
  font-family: var(--g-font) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  letter-spacing: -0.01em !important;
  text-transform: none !important;
  min-height: 36px;
  transition: background 0.3s ease, color 0.2s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease !important;
}
.filter-btn:active { transform: scale(0.94); }
.filter-btn.is-active {
  color: var(--g-prim-text) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 55%), var(--g-prim) !important;
  box-shadow: inset 0 1px 0 var(--g-prim-edge), var(--g-prim-shadow) !important;
}

/* File tabs in the coursework viewer */
.cv__file {
  font-family: var(--g-font) !important;
  text-transform: none !important;
  letter-spacing: -0.01em !important;
  border-radius: 999px !important;
  transition: background 0.3s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
.cv__file:active { transform: scale(0.95); }

/* Sales Analysis follows the site switch, so its own toggle is hidden */
.sa-theme { display: none !important; }

/* ── Theme switch (nav bar) ── */
.theme-switch {
  position: absolute;
  top: 50%;
  right: clamp(20px, 5vw, 80px);
  transform: translateY(-50%);
  width: 54px; height: 30px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--g-border);
  background: var(--g-tint), var(--g-fill);
  box-shadow: inset 0 1px 0 var(--g-edge), inset 0 -1px 0 var(--g-under), 0 2px 8px rgba(0, 0, 0, 0.08);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.theme-switch__knob {
  position: absolute;
  top: 2px; left: 2px;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #1D1D1F;
  background: linear-gradient(180deg, #FFFFFF 0%, #F1F1F3 100%);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08), 0 3px 8px rgba(0, 0, 0, 0.16), inset 0 1px 0 #fff;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), width 0.25s ease, background 0.3s ease, color 0.3s ease;
}
.theme-switch:active .theme-switch__knob { width: 30px; }
.theme-switch__knob svg { width: 14px; height: 14px; grid-area: 1 / 1; transition: opacity 0.3s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
.theme-switch__moon { opacity: 0; transform: rotate(-60deg) scale(0.6); }
html.theme-dark .theme-switch__knob {
  transform: translateX(24px);
  color: #FF453A;
  background: linear-gradient(180deg, #3A3A3C 0%, #2C2C2E 100%);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.3), 0 3px 8px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
html.theme-dark .theme-switch:active .theme-switch__knob { transform: translateX(18px); }
html.theme-dark .theme-switch__sun { opacity: 0; transform: rotate(60deg) scale(0.6); }
html.theme-dark .theme-switch__moon { opacity: 1; transform: none; }
.theme-switch:focus-visible { outline: 2px solid var(--g-prim); outline-offset: 3px; }
@media (max-width: 768px) {
  .theme-switch { right: auto; left: 20px; }
}

/* Smooth colour change while switching (only during the switch) */
html.theme-anim, html.theme-anim body, html.theme-anim section, html.theme-anim .nav {
  transition: background-color 0.4s ease, color 0.4s ease !important;
}

/* ── Website laptops: much softer shadow ── */
#websites .site-card .device--laptop { filter: var(--laptop-shadow) !important; }
#websites .site-card .device--laptop::after { box-shadow: var(--laptop-base-shadow) !important; }
#websites .site-card .device__screen { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 6px 14px rgba(0, 0, 0, 0.12) !important; }

@media (prefers-reduced-motion: reduce) {
  .theme-switch__knob, .theme-switch__knob svg { transition: none; }
}

/* ── About me cards: much softer shadow behind the stack ── */
.about-card { box-shadow: var(--card-shadow) !important; }
.about-card.is-dragging { box-shadow: var(--card-shadow-drag) !important; }
:root { --card-shadow: 0 6px 16px rgba(0, 0, 0, 0.07); --card-shadow-drag: 0 12px 28px rgba(0, 0, 0, 0.12); }
html.theme-dark { --card-shadow: 0 8px 20px rgba(0, 0, 0, 0.35); --card-shadow-drag: 0 14px 32px rgba(0, 0, 0, 0.45); }

/* ── Website laptops: room between each one, and a calm grow on hover
   instead of the wiggle and bounce ── */
@media (min-width: 1000px) {
  .websites__track { column-gap: clamp(56px, 5vw, 96px) !important; row-gap: clamp(36px, 3vw, 56px) !important; }
}
#websites .site-card__img-wrap { padding-left: 7% !important; padding-right: 7% !important; }
#websites .site-card:hover .site-card__img,
#websites .site-card:hover .site-card__btn,
#websites .site-card__btn { animation: none !important; }
#websites .site-card .device--laptop {
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1) !important;
}
#websites .site-card:hover .device--laptop,
#websites .site-card:focus-visible .device--laptop { transform: scale(1.05) !important; }
#websites .site-card:hover .site-card__btn { transform: none !important; }
@media (prefers-reduced-motion: reduce) {
  #websites .site-card:hover .device--laptop { transform: none !important; }
}

/* ── Free Tools: Apple-style containers ──
   One soft rounded panel per tool, artwork on top, clear type below,
   a single quiet shadow and a gentle lift on hover. No glow, no wiggle. */
#tools .websites__grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: clamp(16px, 2vw, 28px); }
#tools .site-card {
  display: flex; flex-direction: column;
  border-radius: 28px !important;
  overflow: hidden;
  background: var(--tc-bg) !important;
  border: 1px solid var(--tc-border) !important;
  box-shadow: var(--tc-shadow) !important;
  transform: none;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease !important;
}
#tools .site-card:hover, #tools .site-card:focus-visible {
  transform: translateY(-4px) scale(1.015) !important;
  border-color: var(--tc-border) !important;
  box-shadow: var(--tc-shadow-hover) !important;
}
#tools .site-card:focus-visible { outline: 2px solid var(--g-prim) !important; outline-offset: 4px; }
#tools .site-card__img-wrap {
  aspect-ratio: 16 / 10;
  margin: 10px 10px 0;
  width: auto;
  border-radius: 20px;
  background: var(--tc-art) !important;
}
#tools .site-card__img-wrap::after { content: none; }
#tools .site-card__img { animation: none !important; transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) !important; }
#tools .site-card:hover .site-card__img { transform: scale(1.04) !important; }
#tools .site-card__body {
  flex: 1;
  border-top: 0 !important;
  background: transparent !important;
  display: flex; flex-direction: column; align-items: flex-start; gap: 18px;
  padding: 22px 26px 26px !important;
}
#tools .site-card__meta { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
#tools .site-card__name {
  font-family: var(--g-font) !important;
  font-size: 22px !important; font-weight: 600 !important;
  letter-spacing: -0.02em !important; text-transform: none !important;
  color: var(--g-text) !important; line-height: 1.2;
}
#tools .site-card__url {
  font-family: var(--g-font) !important;
  font-size: 15px !important; letter-spacing: -0.005em !important; text-transform: none !important;
  color: var(--tc-sub) !important; line-height: 1.4; white-space: normal !important;
}
#tools .site-card__btn { animation: none !important; margin-top: auto; }
#tools .site-card:hover .site-card__btn { transform: none !important; }

:root {
  --tc-bg: #FFFFFF;
  --tc-art: #F5F5F7;
  --tc-border: rgba(0, 0, 0, 0.06);
  --tc-sub: #6E6E73;
  --tc-shadow: 0 1px 1px rgba(0, 0, 0, 0.04), 0 2px 7px rgba(0, 0, 0, 0.05);
  --tc-shadow-hover: 0 1px 2px rgba(0, 0, 0, 0.05), 0 5px 13px rgba(0, 0, 0, 0.08);
}
html.theme-dark {
  --tc-bg: #1C1C1E;
  --tc-art: #000000;
  --tc-border: rgba(255, 255, 255, 0.08);
  --tc-sub: #8E8E93;
  --tc-shadow: 0 1px 1px rgba(0, 0, 0, 0.4), 0 3px 8px rgba(0, 0, 0, 0.3);
  --tc-shadow-hover: 0 1px 2px rgba(0, 0, 0, 0.45), 0 6px 14px rgba(0, 0, 0, 0.4);
}
@media (prefers-reduced-motion: reduce) {
  #tools .site-card:hover, #tools .site-card:hover .site-card__img { transform: none !important; }
}
#tools .site-card__meta, #tools .site-card__name, #tools .site-card__url { text-align: left !important; align-items: flex-start !important; }

/* ── University coursework: two folders per scroll step on desktop ── */
@media (min-width: 1000px) {
  .cfs--pairs .cfs__stage { width: min(1720px, 94vw); aspect-ratio: auto; height: calc(100vh - var(--nav-h) - 2 * clamp(8px, 1.6vw, 20px) - 8px); max-height: 880px; }
  .cfs--pairs .cfs__card--l { right: calc(50% + clamp(12px, 1.4vw, 24px)); }
  .cfs--pairs .cfs__card--r { left: calc(50% + clamp(12px, 1.4vw, 24px)); }
  .cfs--pairs .cfs__card--solo { left: 25%; right: 25%; margin: 0 clamp(6px, 0.7vw, 12px); }
  .cfs--pairs .cfs__card--l, .cfs--pairs .cfs__card--r, .cfs--pairs .cfs__card--solo { --tab-h: clamp(26px, 4.5%, 44px); }
  .cfs--pairs .cfs__folder::before { width: 34%; }
  .cfs--pairs .cfs__title { font-size: clamp(28px, 2.6vw, 44px); }
  .cfs--pairs .cfs__desc { font-size: clamp(12px, 0.95vw, 14px); max-width: 30rem; }
  .cfs--pairs .cfs__glass, .cfs--pairs .cfs__card.is-active .cfs__glass { top: 50%; }
  .cfs--pairs .cfs__card-img { height: 54%; }
  .cfs--pairs .cfs__pct { font-size: clamp(22px, 2vw, 32px); }
}

/* ── University coursework folders: light grey in the light theme
   (the dark theme keeps the carbon folders) ── */
html:not(.theme-dark) .cfs__folder::before { background: linear-gradient(180deg, #E3E3E8, #D9D9DF); }
html:not(.theme-dark) .cfs__folder::after {
  background: linear-gradient(180deg, #DCDCE1 0%, #CFCFD5 100%);
  box-shadow: 0 4px 11px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
html:not(.theme-dark) .cfs__card-img { box-shadow: 0 3px 8px rgba(0, 0, 0, 0.14); }
html:not(.theme-dark) .cfs__glass,
html:not(.theme-dark) .cfs__card.is-active .cfs__glass {
  background: linear-gradient(180deg, #F2F2F5 0%, #E9E9ED 55%, #E2E2E7 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 -3px 9px rgba(0, 0, 0, 0.08);
}
html:not(.theme-dark) .cfs__glass::before { display: none; }
html:not(.theme-dark) .cfs__title { color: #1D1D1F; }
html:not(.theme-dark) .cfs__desc { color: #6E6E73; opacity: 1; }
html:not(.theme-dark) .cfs__pct {
  color: #1D1D1F;
  border-color: rgba(0, 0, 0, 0.08);
  background: linear-gradient(180deg, #FFFFFF, #F5F5F7);
  box-shadow: inset 0 1px 0 #fff, 0 4px 12px rgba(0, 0, 0, 0.08);
}
html:not(.theme-dark) .cfs__pct::after { color: #8A8A93; }
html:not(.theme-dark) .cfs__view {
  color: #1D1D1F !important;
  background:
    radial-gradient(140px circle at var(--gx) var(--gy), rgba(255, 255, 255, 0.9), transparent 65%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.4) 100%),
    rgba(255, 255, 255, 0.5) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: inset 0 1px 0 #fff, 0 4px 14px rgba(0, 0, 0, 0.08) !important;
}
html:not(.theme-dark) .cfs__view:hover { background-color: rgba(255, 255, 255, 0.8) !important; }
html:not(.theme-dark) .cfs__view-count { background: rgba(0, 0, 0, 0.08); color: #1D1D1F; }

/* Contact: less space above View CV */
.contact__links--below { margin-top: 0 !important; }
.contact__heading { margin-bottom: clamp(28px, 3vw, 40px) !important; }
.contact__links--below .contact__cv { margin-bottom: 22px !important; }

/* ── Idle-screen snake, light theme: white board, light grey grid ── */
html:not(.theme-dark) .screensaver { background: #FFFFFF; }
html:not(.theme-dark) .screensaver__play { color: rgba(29, 29, 31, 0.55); }
html:not(.theme-dark) .screensaver__score:not(:empty)::before { color: rgba(0, 0, 0, 0.25); }
html:not(.theme-dark) .screensaver__score:not(:empty) { color: #1E9E5A; }
html:not(.theme-dark) .screensaver__title { text-shadow: none; animation: none; }
html:not(.theme-dark) .screensaver__sub { text-shadow: none; }
html:not(.theme-dark) .screensaver__back:focus-visible { outline-color: #1D1D1F; }

/* Folders in the dark theme: half the shadow blur too */
html.theme-dark .cfs__folder::after { box-shadow: 0 9px 25px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05); }
html.theme-dark .cfs__card-img { box-shadow: 0 5px 13px rgba(0, 0, 0, 0.55); }
html.theme-dark .cfs__glass, html.theme-dark .cfs__card.is-active .cfs__glass { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 -5px 15px rgba(0, 0, 0, 0.45); }

/* Intro matrix rain, light theme: white with light grey characters */
html:not(.theme-dark) .matrix-intro { background: #FFFFFF; }

/* Web Development intro line: a slow, smooth vertical float, forever */
/* The float uses the separate `translate` property so it stacks on top
   of any transform a heading already animates (reveals, glitches). */
@keyframes float-y {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -8px; }
}
.websites__float { animation: float-y 4.8s cubic-bezier(0.45, 0, 0.55, 1) infinite; }

/* Same float on every main heading */
.hero__name {
  animation: fadeUp 0.9s var(--ease-out) 0.5s forwards, ambient-glitch 9s 3s infinite,
             float-y 4.8s cubic-bezier(0.45, 0, 0.55, 1) 1.4s infinite;
}
.section__title.reveal.in-view {
  animation: fade-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) both,
             float-y 4.8s cubic-bezier(0.45, 0, 0.55, 1) 0.7s infinite;
}
.cal-hero__title, .nw-title, .proj-hero__title, .vl-title { animation: float-y 4.8s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
.sa-title { animation: fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.08s both, float-y 4.8s cubic-bezier(0.45, 0, 0.55, 1) 0.9s infinite; }
.sb-hero__title { animation: sb-red-glow 2.6s ease-in-out infinite, float-y 4.8s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
@media (prefers-reduced-motion: reduce) {
  .websites__float, .cal-hero__title, .nw-title, .proj-hero__title, .vl-title { animation: none !important; }
  .hero__name { animation: fadeUp 0.9s var(--ease-out) 0.5s forwards; }
  .section__title.reveal.in-view { animation: none; }
  .sa-title { animation: fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.08s both; }
  .sb-hero__title { animation: sb-red-glow 2.6s ease-in-out infinite; }
}

/* Hero name in the same font as the section headings (Get in Touch) */
.hero__name { gap: calc(min(128px, (100vw - 40px) / 6.4) * 0.26) !important; }
.hero__name-line, .hero__name-line::before, .hero__name-line::after {
  font-family: var(--font-serif) !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
  text-transform: none !important;
}
.hero__name-line { font-size: min(128px, calc((100vw - 40px) / 6.4)) !important; line-height: 1.02 !important; }

/* ── Infinite project gallery under Get in Touch ── */
.gallery {
  position: relative;
  margin-top: clamp(56px, 7vw, 96px);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}
.gallery__track {
  display: flex;
  width: max-content;
  animation: gallery-slide 70s linear infinite;
  will-change: transform;
}
.gallery:hover .gallery__track { animation-play-state: paused; }
.gallery__set { display: flex; gap: clamp(14px, 1.6vw, 24px); padding-right: clamp(14px, 1.6vw, 24px); }
@keyframes gallery-slide { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }
.gallery__item {
  position: relative;
  flex: 0 0 auto;
  width: clamp(220px, 24vw, 340px);
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  overflow: hidden;
  background: var(--tc-art);
  border: 1px solid var(--tc-border);
  box-shadow: var(--tc-shadow);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.gallery__cap {
  position: absolute; left: 12px; bottom: 12px;
  padding: 7px 13px;
  border-radius: 999px;
  font: 500 13px/1 var(--g-font);
  letter-spacing: -0.01em;
  color: #F5F5F7;
  background: rgba(20, 20, 22, 0.45);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.gallery__item:hover { transform: translateY(-4px) scale(1.03); box-shadow: var(--tc-shadow-hover); }
.gallery__item:hover img { transform: scale(1.05); }
.gallery__item:hover .gallery__cap, .gallery__item:focus-visible .gallery__cap { opacity: 1; transform: none; }
.gallery__item:focus-visible { outline: 2px solid var(--g-prim); outline-offset: 3px; }
@media (hover: none) { .gallery__cap { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .gallery { overflow-x: auto; }
  .gallery__track { animation: none; }
  .gallery__set[aria-hidden="true"] { display: none; }
}

/* About-card game: a plain "Play" glass button */
.inspo-game__btn-main { font: 600 16px/1 var(--g-font) !important; letter-spacing: -0.01em !important; text-transform: none !important; display: inline-flex; align-items: center; gap: 8px; }
.inspo-game__btn--start { padding: 0 28px !important; min-height: 48px; }

/* ── Coursework files in the light theme: white, to match the folders ── */
@media (min-width: 600px) and (hover: hover) {
  html:not(.theme-dark) .cfs__doc {
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #FFFFFF;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.08);
  }
  html:not(.theme-dark) .cfs__doc img { background: #F5F5F7; }
  html:not(.theme-dark) .cfs__doc em { color: #6E6E73; }
  html:not(.theme-dark) .cfs__card:hover .cfs__doc:hover,
  html:not(.theme-dark) .cfs__card .cfs__doc:focus-visible {
    border-color: rgba(0, 0, 0, 0.16);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 8px 18px rgba(0, 0, 0, 0.12);
  }
}

/* The file viewer in the light theme */
html:not(.theme-dark) .cv__backdrop { background: rgba(245, 245, 247, 0.7); }
html:not(.theme-dark) .cv__panel {
  background: #FFFFFF;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  color: #1D1D1F;
}
html:not(.theme-dark) .cv__tab { background: #FFFFFF; box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.04); }
html:not(.theme-dark) .cv__eyebrow { color: #8A8A93; }
html:not(.theme-dark) .cv__title { color: #1D1D1F; }
html:not(.theme-dark) .cv__file { border-color: rgba(0, 0, 0, 0.1); color: #6E6E73; }
html:not(.theme-dark) .cv__file:hover { background: rgba(0, 0, 0, 0.04); }
html:not(.theme-dark) .cv__file[aria-selected="true"] { background: #1D1D1F; border-color: #1D1D1F; color: #FFFFFF; }
html:not(.theme-dark) .cv__body { background: #F5F5F7; box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06); }
html:not(.theme-dark) .cv__page { background: #FFFFFF; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.08); }
html:not(.theme-dark) .cv__page:not(.is-ready)::after { background: linear-gradient(100deg, transparent 30%, rgba(0, 0, 0, 0.04) 50%, transparent 70%) 0 0 / 200% 100%; }
html:not(.theme-dark) .cv__status { color: #6E6E73; }
html:not(.theme-dark) .cv__status.is-busy::before { border-color: rgba(0, 0, 0, 0.1); border-top-color: #1D1D1F; }
html:not(.theme-dark) .cv__foot { color: #8A8A93; }
html:not(.theme-dark) .cv__btn:focus-visible, html:not(.theme-dark) .cv__file:focus-visible, html:not(.theme-dark) .cv__body:focus-visible { outline-color: #1D1D1F; }

/* Hero: faint matrix field down both sides (light theme only) */
.hero__matrix { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
html.theme-dark .hero__matrix { display: none; }

/* Contact: icons for email and phone */
.contact__icon {
  flex: 0 0 auto;
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  color: var(--g-text);
  background: var(--g-tint), var(--g-fill);
  border: 1px solid var(--g-border);
  box-shadow: inset 0 1px 0 var(--g-edge), 0 1px 3px rgba(0, 0, 0, 0.06);
}
.contact__icon svg { width: 17px; height: 17px; }
html.theme-dark .contact__icon { color: #FF453A; }
@media (max-width: 560px) {
  .contact__links--below .contact__link { justify-content: flex-start !important; }
  .contact__links--below .contact__link-value { flex: 1; text-align: right; }
}

/* Hidden gem: the little roaming snake, living in one section at a time */
.roam-host { position: relative; }
.roam-snake { position: absolute; left: 0; width: 100%; z-index: 3; pointer-events: none; }
.roam-snake__tag {
  position: absolute; left: 0; top: 0; z-index: 4;
  padding: 12px 16px;          /* a big, easy hit area around the text */
  min-width: 44px; min-height: 40px;
  border: 0; background: none;
  font: 700 13px/1 var(--g-font);
  letter-spacing: 0.02em;
  color: #AEAEB2;
  white-space: nowrap;
  cursor: pointer;
  will-change: transform;
  animation: roam-tag-flash 1.6s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
}
.roam-snake__tag:hover { color: #6E6E73; animation-play-state: paused; opacity: 1; }
.roam-snake__tag:focus-visible { outline: 2px solid var(--g-prim); outline-offset: 2px; border-radius: 6px; }
html.theme-dark .roam-snake__tag { color: #8E8E93; }
html.theme-dark .roam-snake__tag:hover { color: #F5F5F7; }
@keyframes roam-tag-flash { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* The snake game opened from "Click me": no idle messages, just play */
.screensaver.is-game .screensaver__title, .screensaver.is-game .screensaver__sub { display: none; }

/* ── Nav links as an icon switch (same glass as the day / night toggle) ── */
#nav .nav__links--icons {
  position: relative;
  align-items: center;
  gap: 2px !important;
  margin: 0 !important;
  padding: 3px !important;
  border-radius: 999px;
  border: 1px solid var(--g-border);
  background: var(--g-tint), var(--g-fill);
  box-shadow: inset 0 1px 0 var(--g-edge), inset 0 -1px 0 var(--g-under), 0 2px 8px rgba(0, 0, 0, 0.08);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
}
#nav .nav__links--icons li:not(.nav__knob) { position: relative; z-index: 1; display: flex; line-height: 0; }
#nav .nav__links--icons a {
  display: grid; place-items: center;
  width: 38px; height: 30px;
  border-radius: 999px;
  color: var(--tag-2);
  font-size: 0; letter-spacing: 0;
  transition: color 0.25s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#nav .nav__links--icons a::after { display: none !important; }
#nav .nav__links--icons a svg { width: 17px; height: 17px; }
#nav .nav__links--icons a:hover { color: var(--g-text); }
#nav .nav__links--icons a:active { transform: scale(0.9); }
#nav .nav__links--icons a.is-active { color: var(--g-text); }
html.theme-dark #nav .nav__links--icons a.is-active { color: #FF453A; }
#nav .nav__links--icons a:focus-visible { outline: 2px solid var(--g-prim); outline-offset: 2px; }
/* the knob that slides to the active section */
#nav .nav__knob {
  position: absolute; z-index: 0;
  top: 0; left: 0;
  width: 38px; height: 30px;
  border-radius: 999px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F1F1F3 100%);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08), 0 3px 8px rgba(0, 0, 0, 0.14), inset 0 1px 0 #fff;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  pointer-events: none;
}
html.theme-dark #nav .nav__knob {
  background: linear-gradient(180deg, #3A3A3C 0%, #2C2C2E 100%);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.3), 0 3px 8px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
/* tooltip with the section name */
#nav .nav__links--icons a[data-tip]::before {
  content: attr(data-tip);
  position: absolute; top: calc(100% + 10px); left: 50%;
  transform: translate(-50%, -4px);
  padding: 6px 10px;
  border-radius: 8px;
  font: 500 12px/1 var(--g-font);
  letter-spacing: -0.01em;
  text-transform: none;
  white-space: nowrap;
  color: var(--g-text);
  background: var(--g-tint), var(--g-fill-hover);
  border: 1px solid var(--g-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.25s ease;
}
#nav .nav__links--icons a:hover::before, #nav .nav__links--icons a:focus-visible::before { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { #nav .nav__knob { transition: none; } }

/* Contact: icons only (no Email / Phone words), View CV between them */
.contact__links--below .contact__link-label { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (min-width: 561px) {
  .contact__links--below {
    display: flex !important;
    flex-direction: row !important;
    width: 100%;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 20px clamp(28px, 4vw, 56px);
  }
  .contact__links--below .contact__cv { margin: 0 !important; order: 2; }
  .contact__links--below .contact__link:nth-of-type(1) { order: 1; }
  .contact__links--below .contact__link:nth-of-type(2) { order: 3; }
}
@media (max-width: 560px) {
  .contact__links--below { display: flex !important; flex-direction: column; align-items: center; gap: 18px; }
  .contact__links--below .contact__link { justify-content: center !important; gap: 12px; }
  .contact__links--below .contact__link-value { flex: 0 0 auto !important; text-align: left; }
  .contact__links--below .contact__cv { margin: 0 !important; order: 2; }
  .contact__links--below .contact__link:nth-of-type(1) { order: 1; }
  .contact__links--below .contact__link:nth-of-type(2) { order: 3; }
}

/* Website laptops: looping screen recordings over the screenshots */
#websites .site-card .device__screen .device__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  opacity: 0; transition: opacity 0.4s ease;
  pointer-events: none;
}
#websites .site-card .device__screen .device__video.is-playing { opacity: 1; }

/* Laptop screens match the recordings exactly (960 x 494), so nothing is cropped */
/* Laptop screen at MacBook proportions: a browser bar on top, then the
   recording at its true 960 x 494 shape, so nothing is squashed or cropped */
#websites .site-card .device__screen {
  aspect-ratio: 16 / 10 !important; box-sizing: content-box !important; width: calc(100% - 16px);
  display: flex; flex-direction: column;
  background: #ECECEF;
}
html.theme-dark #websites .site-card .device__screen { background: #2C2C2E; }
#websites .site-card .device__bar {
  flex: 1 1 auto; min-height: 0;
  display: flex; align-items: center; gap: 4%;
  padding: 0 3%;
}
#websites .site-card .device__bar i { flex: 0 0 auto; width: 2.2%; aspect-ratio: 1; border-radius: 50%; background: #FF5F57; margin-right: -2.4%; }
#websites .site-card .device__bar i:nth-child(2) { background: #FEBC2E; }
#websites .site-card .device__bar i:nth-child(3) { background: #28C840; margin-right: 0; }
#websites .site-card .device__bar span {
  flex: 1; margin: 0 8%;
  height: 52%; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #6E6E73;
  font: 500 clamp(6px, 0.62vw, 10px)/1 var(--g-font);
  white-space: nowrap; overflow: hidden;
}
html.theme-dark #websites .site-card .device__bar span { background: rgba(255, 255, 255, 0.1); color: #AEAEB2; }
#websites .site-card .device__media { position: relative; flex: 0 0 auto; width: 100%; aspect-ratio: 960 / 494; overflow: hidden; background: #000; }
#websites .site-card .device__media .site-card__img { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; object-fit: cover; object-position: top center; }
#websites .site-card .device__screen .device__video { object-fit: contain !important; object-position: center !important; background: #000; }
#websites .site-card__img-wrap { aspect-ratio: auto !important; }

/* Website laptops: names and addresses in the heading font (as the H1) */
#websites .site-card__name {
  font-family: var(--font-serif) !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
  text-transform: none !important;
  font-size: clamp(20px, 1.7vw, 26px) !important;
  line-height: 1.2 !important;
}
#websites .site-card__url {
  font-family: var(--font-serif) !important;
  font-weight: 400 !important;
  letter-spacing: -0.005em !important;
  text-transform: none !important;
  font-size: 14px !important;
  color: var(--text-2) !important;
}

/* Tools + Contact: a second nav island on the left */
#nav .nav__links--side {
  position: absolute;
  top: 50%;
  left: clamp(20px, 5vw, 80px);
  transform: translateY(-50%);
}
@media (max-width: 768px) { #nav .nav__links--side { display: none !important; } }

/* University coursework: folder titles and the viewer label in the heading style */
.cfs__title { text-transform: none !important; letter-spacing: -0.02em !important; font-family: var(--font-serif) !important; font-weight: 600 !important; }
.cv__eyebrow { font-family: var(--font-serif) !important; font-weight: 500 !important; font-size: 12px !important; letter-spacing: -0.005em !important; text-transform: none !important; }

/* Gallery: every image at its own original shape, all the same height */
.gallery__item { width: auto !important; aspect-ratio: auto !important; height: clamp(190px, 21vw, 300px); }
.gallery__item img { width: auto !important; height: 100% !important; object-fit: contain !important; }
.gallery__set { align-items: center; }

/* Over "Click me": a soft glass pill so it reads as a button */
.roam-snake__tag:hover { background: var(--g-tint), var(--g-fill); border-radius: 999px; box-shadow: inset 0 1px 0 var(--g-edge), 0 2px 8px rgba(0, 0, 0, 0.08); }
/* the recording sits above the screenshot (which keeps z-index 1 from the base styles) */
#websites .site-card .device__media .device__video { z-index: 2; }
.roam-snake__tag.is-off { opacity: 0 !important; pointer-events: none; animation: none; }

/* No browser bar: the screen is exactly the recording's shape (960 x 494) */
#websites .site-card .device__screen { aspect-ratio: 960 / 494 !important; background: #000 !important; }
#websites .site-card .device__bar { display: none !important; }

/* ── Snake game: competitive-style scoreboard and event feed ── */
.sg-board, .sg-feed { position: absolute; z-index: 3; pointer-events: none; font-family: var(--g-font); font-variant-numeric: tabular-nums; }
.sg-board {
  top: 18px; left: 18px;
  width: min(440px, calc(100vw - 36px));
  border-radius: 6px; overflow: hidden;
  background: rgba(17, 20, 26, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #DADDE3;
}
.sg-board__head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 9px 14px 8px;
  background: linear-gradient(90deg, rgba(255, 69, 58, 0.35), rgba(255, 69, 58, 0) 70%);
  border-bottom: 2px solid #FF453A;
}
.sg-board__title { font: 400 22px/1 var(--font-display, 'Bebas Neue', Impact, sans-serif); letter-spacing: 0.08em; color: #fff; }
.sg-board__mode { font-size: 10px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); }
.sg-board__cols, .sg-board__row {
  display: grid; grid-template-columns: 1.6fr repeat(5, 1fr);
  align-items: center; gap: 4px;
  padding: 6px 14px;
}
.sg-board__cols { font-size: 9px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.03); }
.sg-board__cols span, .sg-board__row span { text-align: center; }
.sg-board__cols span:first-child, .sg-board__row span:first-child { text-align: left; }
.sg-board__cols svg { width: 14px; height: 14px; vertical-align: middle; }
.sg-board__row { padding: 9px 14px; font-size: 15px; font-weight: 600; color: #fff; background: rgba(255, 255, 255, 0.05); border-left: 3px solid #8A8A93; }
.sg-board.is-you .sg-board__row { border-left-color: #FF453A; background: linear-gradient(90deg, rgba(255, 69, 58, 0.18), rgba(255, 255, 255, 0.04)); }
.sg-board__player { display: flex; align-items: center; gap: 8px; }
.sg-board__player svg { width: 22px; height: 22px; fill: #FF4D5E; }
.sg-s { color: #ffc93c; }
.sg-board__fx { display: flex; gap: 6px; padding: 0 14px; }
.sg-board__fx:not(:empty) { padding: 7px 14px 9px; }
.sg-fx { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px 3px 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); font-size: 11px; font-weight: 700; }
.sg-fx svg { width: 15px; height: 15px; }
.sg-fx i { font-style: normal; color: rgba(255, 255, 255, 0.8); }

.sg-feed { top: 18px; right: 18px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.sg-feed__row {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 10px 5px 8px;
  border-radius: 3px;
  background: rgba(17, 20, 26, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #fff; font-size: 13px; font-weight: 600;
  animation: sg-feed-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.sg-feed__row.is-bad { border-color: rgba(255, 69, 58, 0.7); box-shadow: inset 0 0 0 1px rgba(255, 69, 58, 0.35); }
.sg-feed__row.is-old { opacity: 0; transform: translateX(12px); }
.sg-feed__ico svg { width: 18px; height: 18px; display: block; fill: #FF4D5E; }
.sg-feed__arrow { width: 0; height: 0; border-left: 6px solid rgba(255, 255, 255, 0.55); border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
@keyframes sg-feed-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) {
  .sg-board { top: 12px; left: 12px; width: calc(100vw - 24px); }
  .sg-board__head { padding: 7px 12px 6px; }
  .sg-board__row { font-size: 13px; padding: 7px 12px; }
  .sg-feed { top: auto; bottom: 16px; right: 12px; }
}
@media (prefers-reduced-motion: reduce) { .sg-feed__row { animation: none; } }
.sg-board__cols svg { width: 16px; height: 16px; }

/* Snake game: the scoreboard replaces the old "Use the arrow keys · Score" line */
.screensaver__play { display: none !important; }

/* ── Phones: the same icon islands as desktop (no hamburger) ──
   Tools + Contact on the left, Home / Work / Sites in the middle and the
   day/night switch on the right. */
@media (max-width: 768px) {
  #nav ul.nav__links.nav__links--icons { display: flex !important; }
  #nav .nav__menu, #menuBtn { display: none !important; }
  #nav .nav__links--side { left: 12px; }
  #nav .theme-switch { left: auto; right: 12px; }
  #nav .nav__links--icons a, #nav .nav__knob { width: 34px; height: 30px; }
  /* no hover tooltips on touch screens */
  #nav .nav__links--icons a[data-tip]::before { display: none; }
}
@media (max-width: 340px) {
  #nav .nav__links--icons a, #nav .nav__knob { width: 30px; }
  #nav .theme-switch { width: 48px; }
  html.theme-dark #nav .theme-switch__knob { transform: translateX(18px); }
}
/* the roaming snake is clickable anywhere along its body */
html.snake-hover, html.snake-hover * { cursor: pointer !important; }

/* Pop game: the countdown follows the theme (it was white, so invisible in light mode) */
.inspo-game__time b { color: var(--text) !important; }

/* Smoother scrolling: decorative loops pause only while scrolling */
html.is-scrolling .cfs__card::before,
html.is-scrolling .cfs__glass::before,
html.is-scrolling .cfs__dl::before,
html.is-scrolling .websites__float,
html.is-scrolling .section__title.reveal.in-view,
html.is-scrolling .hero__name,
html.is-scrolling .roam-snake__tag { animation-play-state: paused !important; }
/* the coursework folders each get their own layer so moving them is cheap */
.cfs__card { contain: layout style; }
.cfs__card-img { backface-visibility: hidden; }

/* ── Dark mode: no grey panels — everything sits on black, with thin
   outlines so cards and controls still read ── */
html.theme-dark {
  --bg-2: #000000; --bg-3: #000000; --bg-4: #000000;
  --tc-bg: #000000; --tc-art: #000000;
  --tc-border: rgba(255, 255, 255, 0.14);
  --g-fill: rgba(0, 0, 0, 0.55);
  --g-fill-hover: rgba(255, 255, 255, 0.06);
  --g-tint: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 60%);
  --g-border: rgba(255, 255, 255, 0.16);
  --g-edge: rgba(255, 255, 255, 0.14);
}
html.theme-dark body, html.theme-dark section, html.theme-dark .section,
html.theme-dark #portfolio, html.theme-dark #contact { background-color: #000 !important; }
html.theme-dark .about-card { background: #000 !important; border-color: rgba(255, 255, 255, 0.16) !important; }
html.theme-dark .nav.is-scrolled, html.theme-dark #nav.is-scrolled { background: rgba(0, 0, 0, 0.78) !important; }
/* the switch and nav knobs */
html.theme-dark .theme-switch__knob, html.theme-dark #nav .nav__knob {
  background: #0E0E0F !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 2px 6px rgba(0, 0, 0, 0.6) !important;
}
/* coursework folders, file previews and the file viewer */
html.theme-dark .cfs__folder::before { background: #0A0A0A !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
html.theme-dark .cfs__folder::after { background: #000 !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 9px 25px rgba(0, 0, 0, 0.6) !important; }
html.theme-dark .cfs__glass, html.theme-dark .cfs__card.is-active .cfs__glass {
  background: linear-gradient(180deg, #0B0B0B 0%, #000 100%) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 -5px 15px rgba(0, 0, 0, 0.6) !important;
}
html.theme-dark .cfs__pct { background: #000 !important; border-color: rgba(255, 255, 255, 0.16) !important; }
html.theme-dark .cfs__doc { background: #000 !important; border-color: rgba(255, 255, 255, 0.16) !important; }
html.theme-dark .cv__panel, html.theme-dark .cv__tab { background: #000 !important; border-color: rgba(255, 255, 255, 0.14) !important; }
html.theme-dark .cv__body { background: #050505 !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08) !important; }
html.theme-dark .cv__page { background: #0A0A0A !important; }
/* gallery tiles, contact icons and the glass buttons that aren't red */
html.theme-dark .gallery__item { background: #000 !important; }
html.theme-dark .contact__icon { background: #000 !important; border-color: rgba(255, 255, 255, 0.16) !important; }

/* News briefs: jump links to each section (pages with many sections) */
.nw-jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 auto 28px; max-width: 1100px; }
.nw-jump a {
  padding: 8px 14px; border-radius: 999px;
  font: 500 13px/1 var(--g-font); letter-spacing: -0.01em; text-decoration: none;
  color: var(--g-text);
  background: var(--g-tint), var(--g-fill);
  border: 1px solid var(--g-border);
  box-shadow: inset 0 1px 0 var(--g-edge);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease;
}
.nw-jump a:hover { transform: translateY(-1px); background-color: var(--g-fill-hover); }
.nw-jump a:active { transform: scale(0.95); }
.nw-section[id] { scroll-margin-top: 90px; }
