/* ============================================
   PHOTO PORTFOLIO — LIQUID Glass DESIGN
   Inspired by Apple Design Language
   ============================================ */

/* ── Font: Inter, self-hosted ──
   Google Fonts' own @font-face rules (Inter v20, variable font), unchanged except that the
   files are served from ./fonts instead of fonts.gstatic.com. The browser only downloads
   the subsets the page actually uses (latin, and latin-ext for ă/ș/ț). */
/* cyrillic-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/inter-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/inter-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/inter-greek-ext.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/inter-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/inter-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/inter-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/inter-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/inter-greek-ext.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/inter-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/inter-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/inter-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/inter-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/inter-greek-ext.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/inter-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/inter-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/inter-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/inter-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/inter-greek-ext.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/inter-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/inter-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── CSS Reset ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── Theme Variables ── */
:root {
  /* Light Mode (Default) */
  --bg-primary: #F5F5F7;
  --bg-secondary: #FFFFFF;
  --bg-gradient: linear-gradient(180deg, #FAFAFA 0%, #F2F2F7 50%, #E8E8ED 100%);

  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-bg-strong: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-border-subtle: rgba(0, 0, 0, 0.06);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
  --glass-shadow-hover: 0 12px 44px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.06);
  --glass-inset: inset 0 1px 0 rgba(255, 255, 255, 0.7);

  --text-primary: #1D1D1F;
  --text-secondary: #6E6E73;
  --text-tertiary: #AEAEB2;

  --accent: #0064D2;
  --accent-light: #409CFF;
  --accent-hover: #0056CC;
  --accent-glow: rgba(0, 122, 255, 0.12);

  --surface-hover: rgba(0, 0, 0, 0.03);
  --divider: rgba(0, 0, 0, 0.08);
  --overlay: rgba(245, 245, 247, 0.85);

  --coverflow-reflection-opacity: 0.3;
  --coverflow-bg-fade: var(--bg-primary);
  --coverflow-bg-fade-transparent: rgba(245, 245, 247, 0);

  --input-bg: rgba(0, 0, 0, 0.03);
  --input-border: rgba(0, 0, 0, 0.1);
  --input-focus-border: var(--accent);

  /* Elevated surface (for layered views like album-view) */
  --bg-elevated: #FFFFFF;

  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-pill: 100px;

  /* Transitions */
  --ease-spring: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-smooth: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-fast: 200ms ease;
  --transition-normal: 350ms var(--ease-out);
  --transition-slow: 500ms var(--ease-smooth);
  --transition-spring: 600ms var(--ease-spring);

  /* Typography */
  --font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Cover Flow */
  --cf-perspective: 1000px;
  --cf-rotation: 55deg;
  --cf-translate-z: -200px;
  --cf-side-gap: 90px;
  --cf-cover-size: min(560px, 52vh);
}

/* ── Dark Mode ── */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #000000;
    --bg-secondary: #0A0A0A;
    --bg-gradient: linear-gradient(180deg, #000000 0%, #0C0C0E 50%, #111113 100%);

    --glass-bg: rgba(38, 38, 42, 0.5);
    --glass-bg-strong: rgba(44, 44, 48, 0.72);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-border-subtle: rgba(255, 255, 255, 0.06);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.2);
    --glass-shadow-hover: 0 12px 44px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.3);
    --glass-inset: inset 0 1px 0 rgba(255, 255, 255, 0.06);

    --text-primary: #F5F5F7;
    --text-secondary: #A1A1A6;
    --text-tertiary: #636366;

    --accent: #0A84FF;
    --accent-light: #64B5FF;
    --accent-hover: #409CFF;
    --accent-glow: rgba(10, 132, 255, 0.18);

    --surface-hover: rgba(255, 255, 255, 0.05);
    --divider: rgba(255, 255, 255, 0.08);
    --overlay: rgba(0, 0, 0, 0.85);

    --coverflow-reflection-opacity: 0.2;
    --coverflow-bg-fade: #000000;
  --coverflow-bg-fade-transparent: rgba(0, 0, 0, 0);

    --input-bg: rgba(255, 255, 255, 0.06);
    --input-border: rgba(255, 255, 255, 0.12);
    --input-focus-border: var(--accent);

    /* iOS elevated surface for dark mode (dark-mode.md › Mobile) */
    --bg-elevated: #1C1C1E;
  }
}

/* ── Manual Dark Override (via toggle) ── */
[data-theme="dark"] {
  --bg-primary: #000000;
  --bg-secondary: #0A0A0A;
  --bg-gradient: linear-gradient(180deg, #000000 0%, #0C0C0E 50%, #111113 100%);

  --glass-bg: rgba(38, 38, 42, 0.5);
  --glass-bg-strong: rgba(44, 44, 48, 0.72);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-border-subtle: rgba(255, 255, 255, 0.06);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.2);
  --glass-shadow-hover: 0 12px 44px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.3);
  --glass-inset: inset 0 1px 0 rgba(255, 255, 255, 0.06);

  --text-primary: #F5F5F7;
  --text-secondary: #A1A1A6;
  --text-tertiary: #636366;

  --accent: #0A84FF;
  --accent-light: #64B5FF;
  --accent-hover: #409CFF;
  --accent-glow: rgba(10, 132, 255, 0.18);

  --surface-hover: rgba(255, 255, 255, 0.05);
  --divider: rgba(255, 255, 255, 0.08);
  --overlay: rgba(0, 0, 0, 0.85);

  --coverflow-reflection-opacity: 0.2;
  --coverflow-bg-fade: #000000;
  --coverflow-bg-fade-transparent: rgba(0, 0, 0, 0);

  --input-bg: rgba(255, 255, 255, 0.06);
  --input-border: rgba(255, 255, 255, 0.12);
  --input-focus-border: var(--accent);

  --bg-elevated: #1C1C1E;
}

/* ── Manual Light Override (forces light even on dark system) ── */
[data-theme="light"] {
  --bg-primary: #F5F5F7;
  --bg-secondary: #FFFFFF;
  --bg-gradient: linear-gradient(180deg, #FAFAFA 0%, #F2F2F7 50%, #E8E8ED 100%);

  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-bg-strong: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-border-subtle: rgba(0, 0, 0, 0.06);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
  --glass-shadow-hover: 0 12px 44px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.06);
  --glass-inset: inset 0 1px 0 rgba(255, 255, 255, 0.7);

  --text-primary: #1D1D1F;
  --text-secondary: #6E6E73;
  --text-tertiary: #AEAEB2;

  --accent: #0064D2;
  --accent-light: #409CFF;
  --accent-hover: #0056CC;
  --accent-glow: rgba(0, 122, 255, 0.12);

  --surface-hover: rgba(0, 0, 0, 0.03);
  --divider: rgba(0, 0, 0, 0.08);
  --overlay: rgba(245, 245, 247, 0.85);

  --coverflow-reflection-opacity: 0.3;
  --coverflow-bg-fade: var(--bg-primary);
  --coverflow-bg-fade-transparent: rgba(245, 245, 247, 0);

  --input-bg: rgba(0, 0, 0, 0.03);
  --input-border: rgba(0, 0, 0, 0.1);
  --input-focus-border: var(--accent);

  --bg-elevated: #FFFFFF;
}

/* ── Theme Transition ── */
html.theme-transitioning body,
html.theme-transitioning .glass,
html.theme-transitioning .glass-strong,
html.theme-transitioning .coverflow__item,
html.theme-transitioning .coverflow__title {
  transition: background-color 300ms ease, color 300ms ease, border-color 300ms ease !important;
}

/* ── Base Styles ── */
/* <picture> is only a format wrapper: let its <img> behave as the direct child */
picture {
  display: contents;
}

/* No focus ring on touch or mouse (the kiosk look stays), but a visible ring when someone
   navigates with the keyboard — browsers only match :focus-visible in that case.
   `html :focus-visible` outranks the `outline: none` set on individual elements. */
*:focus {
  outline: none;
}

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

/* ...hidden again as soon as the mouse actually moves (an accidental Tab shouldn't leave
   the ring on screen); the next key press brings it back. See script.js. */
html.no-ring :focus-visible {
  outline: none;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  line-height: 1.5;
  position: relative;
}

/* ── Ambient Glow Background ── */
.ambient-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  width: 100%;
  height: 100%;
  opacity: 1.0 !important; /* MAX OPACITY for light mode */
  transition: opacity 800ms ease;
  /* The glow is painted by JS (paintGlow): the same radial gradient + blur(120px) + saturate(2)
     as before, computed once into a small canvas instead of a live full-screen CSS filter.
     Still no mix-blend-mode (Safari 3D collapse, see handoff). */
  transform: translateZ(0); /* Hardware acceleration to prevent Safari bugs */
}

@media (prefers-color-scheme: dark) {
  .ambient-glow {
    opacity: 0.45 !important;
  }
}

[data-theme="dark"] .ambient-glow {
  opacity: 0.45 !important;
}

/* ── Glass Utility ── */
.glass {
  background: var(--glass-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-shadow), inset 0 0 20px rgba(255,255,255,0.06), inset 0 1px 0 rgba(255,255,255,0.4);
}

.glass-strong {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(60px) saturate(200%);
  -webkit-backdrop-filter: blur(60px) saturate(200%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-shadow), var(--glass-inset);
}

@supports not (backdrop-filter: blur(1px)) {
  .glass, .glass-strong {
    background: var(--glass-bg-strong);
  backdrop-filter: blur(50px) saturate(180%);
  -webkit-backdrop-filter: blur(50px) saturate(180%);
  }
}

/* ============================================
   MAIN & PANELS
   ============================================ */
.main {
  position: relative;
  height: 100vh;
  height: 100dvh;
}

/* ============================================
   THEME TOGGLE
   ============================================ */
.theme-toggle {
  position: fixed;
  top: calc(20px + env(safe-area-inset-top));
  right: calc(24px + env(safe-area-inset-right));
  z-index: 100;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  cursor: pointer;
  transition: transform 180ms cubic-bezier(0.34, 1.56, 0.64, 1), background var(--transition-fast), opacity var(--transition-fast);
}

.theme-toggle:hover {
  transform: scale(1.1);
  background: var(--surface-hover);
}

.theme-toggle:active {
  transform: scale(0.92);
  transition: transform 100ms ease-out;
}

.theme-toggle__icon {
  font-size: 1.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 500ms var(--ease-spring);
}

.theme-toggle__icon.spin {
  transform: rotate(360deg);
}

/* ============================================
   COVER FLOW
   ============================================ */
.coverflow {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 0;
  overflow: clip;
  user-select: none;
  -webkit-user-select: none;
}

/* Side fade vignette — eased gradient for smooth falloff */
.coverflow::before,






.coverflow__stage {
  position: relative;
  outline: none;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  perspective: var(--cf-perspective);
  transform-style: preserve-3d;
  /* All covers share one grid cell, centered; JS positions them with transforms. */
  display: grid;
  place-items: center;
  /* SAFARI 3D COLLAPSE GUARD — do not remove. This element must stay a scroll container
     (as in rev. 23): without it iOS WebKit draws the covers tiny and flat in the top-left
     corner and loses the centre one (rev. 24–29). It never actually scrolls: JS keeps
     scrollLeft at 0 and moves the covers with transforms. */
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}


.coverflow__stage::-webkit-scrollbar {
  display: none;
}

/* ── Individual Cover Flow Item ── */
.coverflow__item {
  position: relative;
  outline: none;
  grid-area: 1 / 1;
  width: var(--cf-cover-size);
  
  
  /* `transform` is driven by JS every frame and is never transitioned; the entrance uses
     the separate `translate`/`scale` properties. Mixing the two in one transform
     transition left Safari drawing a stale, flattened side cover until the carousel moved. */
  transition: translate 0.1s ease-out, scale 0.1s ease-out, opacity 0.1s ease-out;
  cursor: pointer;
  z-index: 10;
  -webkit-tap-highlight-color: transparent;
}

/* Entrance animation */
.coverflow__item.entering {
  opacity: 0 !important;
  translate: 0 60px;
  scale: 0.8;
}

.coverflow__item:hover .coverflow__cover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 6px 16px rgba(0, 0, 0, 0.12);
}

.coverflow__item.center {
  z-index: 50;
  will-change: transform;
}

.coverflow__cover {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: scale(var(--dock-scale, 1));
  transition: transform 150ms ease-out, box-shadow var(--transition-normal);
}

.coverflow__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  background: transparent;
  vertical-align: bottom;
}

.album-view__photo img {
  background: var(--glass-bg);
  background-image: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.06) 50%, var(--coverflow-bg-fade-transparent) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
}

/* The shimmer is only a loading placeholder, hidden behind the photo once it arrives:
   stop it then instead of animating it forever (it kept the phone repainting) */
.album-view__photo img.loaded {
  animation: none;
}

/* Pre-blurred copy of the whole cover — soft edges and corners included, on a transparent
   margin of 4% per side (hence 108% and the -4% offsets). JS cross-fades it with the sharp
   cover as the cover moves away from the centre. */
.coverflow__blur {
  position: absolute;
  top: 0;
  left: 0;
  width: 108%;
  height: auto;
  margin: -4% 0 0 -4%;
  opacity: 0;
  pointer-events: none;
}

/* Cover overlay gradient (subtle) */
.coverflow__cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.15) 0%, transparent 40%);
  border-radius: inherit;
  pointer-events: none;
}

.coverflow__reflection {
  position: relative;
  width: 100%;
  height: clamp(50px, 12vw, 100px);
  margin-top: 16px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  pointer-events: none;
  transform: perspective(600px) rotateX(25deg);
  transform-origin: top center;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.45) 0%, transparent 75%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.45) 0%, transparent 75%);
}

.coverflow__reflection img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  transform: scaleY(-1);
  filter: blur(2px);
  opacity: var(--coverflow-reflection-opacity, 0.3);
}

/* ── Cover Flow Title (above covers) ── */
.coverflow__title {
  font-size: 3.125rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.04em;
  transition: opacity 300ms ease;
  z-index: 20;
  text-align: center;
  margin-bottom: 16px;
  margin-top: 6vh;
  flex: 0 0 auto;
}

/* ============================================
   ALBUM DETAIL VIEW
   ============================================ */
.album-view {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(50px) saturate(180%);
  -webkit-backdrop-filter: blur(50px) saturate(180%);
  padding: 0;
  overflow-y: auto;
  overflow-x: auto;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96) translateY(8px);
  filter: blur(4px);
  transition:
    opacity 400ms var(--ease-smooth),
    transform 400ms var(--ease-smooth),
    filter 400ms var(--ease-smooth);
  transform-origin: center 30%;
}

.album-view.active {
  opacity: 1;
  pointer-events: all;
  transform: scale(1) translateY(0);
  /* none, not blur(0): looks identical, but blur(0) still made the browser process the whole
     album (glass included) as a filtered layer on every scroll frame. The open/close
     animation from blur(4px) still runs, since none animates like blur(0). */
  filter: none;
}

/* Scroll edge effect — content fades where it meets the header glass
   (liquid-glass.md › Review checklist #6) */
.album-view__header {
  contain: layout paint style;
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: calc(16px + env(safe-area-inset-top)) calc(24px + env(safe-area-inset-right)) 16px calc(24px + env(safe-area-inset-left));
  background: var(--overlay);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-bottom: none;
}

/* Scroll edge gradient mask — replaces hard 1px border */
.album-view__header::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(to bottom, var(--bg-elevated), transparent);
  pointer-events: none;
}

/* Back button — Apple style: no glass-on-glass, just accent text
   (liquid-glass.md: don't stack glass on glass) */
.album-view__back {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border: none;
  background: transparent;
  border-radius: var(--radius-pill);
  color: var(--accent);
  font-family: var(--font-family);
  font-size: 1.0625rem;
  font-weight: 400;
  cursor: pointer;
  transition: opacity var(--transition-fast), transform 100ms ease-out;
}

.album-view__back:hover {
  color: var(--accent-hover);
}

.album-view__back:active {
  transform: scale(0.96);
}

.album-view__header-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.coverflow__subtitle {
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--text-secondary);
  text-align: center;
  margin-top: -8px;
  margin-bottom: 16px;
  z-index: 20;
  letter-spacing: 0.01em;
  opacity: 0.8;
  transition: opacity 300ms ease;
}

.album-view__content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px calc(24px + env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) calc(24px + env(safe-area-inset-left));
}

/* Masonry Grid */
.album-view__grid {
  columns: 3;
  column-gap: 14px;
}

.album-view__photo {
  break-inside: avoid;
  margin-bottom: 14px;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  animation: photoReveal 500ms var(--ease-smooth) forwards;
}

.album-view__photo img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 500ms var(--ease-spring);
}

/* Photo hover overlay */
.album-view__photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background var(--transition-fast);
  border-radius: inherit;
  pointer-events: none;
}

.album-view__photo:hover::after {
  background: rgba(0, 0, 0, 0.05);
}

@keyframes photoReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.album-view__photo.observed {
  opacity: 0;
  transform: translateY(24px);
  animation: none;
}

.album-view__photo.observed.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 500ms var(--ease-smooth), transform 500ms var(--ease-smooth);
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
  position: fixed;
  touch-action: none;
  inset: 0;
  z-index: 2000;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(50px) saturate(180%);
  -webkit-backdrop-filter: blur(50px) saturate(180%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 350ms var(--ease-smooth);
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox__image-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 85vh;
}

.lightbox__image {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  transform: scale(0.92);
  transition: transform 400ms var(--ease-smooth);
  user-select: none;
  -webkit-user-select: none;
}

.lightbox.active .lightbox__image {
  transform: scale(1);
}

/* Lightbox dismiss animation — image slides down with velocity */
.lightbox__image.dismissing {
  transition: transform 300ms var(--ease-smooth), opacity 300ms var(--ease-smooth);
  opacity: 0;
}

.lightbox__close {
  position: absolute;
  top: calc(20px + env(safe-area-inset-top));
  right: calc(24px + env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 1.125rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 10;

  color: var(--text-primary) !important;
  background: var(--surface-hover) !important;
  border: 1px solid var(--divider) !important;
}

.lightbox__close:active {
  transform: scale(0.92);
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 1.375rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 10;

  color: var(--text-primary) !important;
  background: var(--surface-hover) !important;
  border: 1px solid var(--divider) !important;
}

.lightbox__nav:active {
  transform: translateY(-50%) scale(0.92);
}

.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.lightbox__nav--prev {
  left: calc(24px + env(safe-area-inset-left));
}

.lightbox__nav--next {
  right: calc(24px + env(safe-area-inset-right));
}

.lightbox__counter {
  position: absolute;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font-family);
}

/* ── Lightbox Share Button ── */
.lightbox__share {
  position: absolute;
  top: calc(20px + env(safe-area-inset-top));
  left: calc(24px + env(safe-area-inset-left));
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 10;
}

.lightbox__share:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.lightbox__share:active {
  transform: scale(0.92);
}

/* Share toast notification */
.share-toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(40px);
  color: var(--text-primary);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font-family);
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease, transform 300ms ease;
  z-index: 3000;
}

.share-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Lightbox Zoom ── */
.lightbox__image.zoomed {
  cursor: grab;
  max-width: none;
  max-height: none;
  border-radius: 0;
}

.lightbox__image.zoomed:active {
  cursor: grabbing;
}

/* Hide nav controls when zoomed */
.lightbox.zoomed .lightbox__nav,
.lightbox.zoomed .lightbox__counter,
.lightbox.zoomed .lightbox__share {
  opacity: 0;
  pointer-events: none;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--text-tertiary);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* ============================================
   INSTAGRAM BUTTON
   ============================================ */
.ig-button {
  position: fixed;
  top: calc(20px + env(safe-area-inset-top));
  left: calc(24px + env(safe-area-inset-left));
  z-index: 100;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  text-decoration: none;
  transition: transform 180ms cubic-bezier(0.34, 1.56, 0.64, 1), background var(--transition-fast), opacity var(--transition-fast);
}

.ig-button:hover {
  transform: scale(1.1);
  background: var(--surface-hover);
}

.ig-button:active {
  transform: scale(0.92);
  transition: transform 100ms ease-out;
}

/* Hide IG button and theme toggle when album view is open */
.album-view.active ~ .ig-button,
.album-view.active ~ .theme-toggle,
body:has(.album-view.active) .ig-button,
body:has(.album-view.active) .theme-toggle,
body:has(.album-view.active) .about-link {
  opacity: 0;
  pointer-events: none;
}

/* ============================================
   NAME + "DESPRE" (#/despre)
   ============================================ */
/* The photographer's name, bottom centre, quiet like a caption; opens "Despre" */
.about-link {
  position: fixed;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 100;
  min-height: 44px;
  padding: 0 18px;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-family: var(--font-family);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

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

.about {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 350ms var(--ease-smooth);
}

/* The blur behind the card exists only while it is open (no idle graphics work) */
.about.active {
  opacity: 1;
  pointer-events: all;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.about__card {
  position: relative;
  width: min(400px, 100%);
  padding: 36px 28px 24px;
  border-radius: var(--radius-2xl);
  text-align: center;
  transform: translateY(12px) scale(0.98);
  transition: transform 400ms var(--ease-spring);
}

.about.active .about__card {
  transform: none;
}

.about__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--divider);
  background: var(--surface-hover);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.about__close:active {
  transform: scale(0.92);
}

.about__avatar {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--accent-light), var(--accent));
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.about__name {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text-primary);
}

.about__role {
  margin-top: 2px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.about__stats {
  margin-top: 14px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.about__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.about__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  background: var(--surface-hover);
  border: 1px solid var(--divider);
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 100ms ease-out, opacity var(--transition-fast);
}

.about__btn--primary {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
}

.about__btn:active {
  transform: scale(0.96);
}

.about__legal {
  margin-top: 24px;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-secondary);
  opacity: 0.8;
}

.noscript {
  position: fixed;
  inset: auto 16px 50%;
  text-align: center;
  color: var(--text-secondary);
}

.noscript a {
  color: var(--accent);
}

/* ============================================
   FOCUS & ACCESSIBILITY
   ============================================ */

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .coverflow__item.entering {
    opacity: 1 !important;
    translate: none;
    scale: none;
  }
  .album-view {
    filter: none !important;
  }
  .album-view__photo img {
    animation: none !important;
    background-image: none !important;
  }
}

/* ── Reduced Transparency ── */
@media (prefers-reduced-transparency: reduce) {
  .glass,
  .glass-strong {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--bg-primary);
    opacity: 1;
  }
  .album-view__header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--bg-primary);
  }
  .lightbox {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* ── Increased Contrast ── */
@media (prefers-contrast: more) {
  :root {
    --accent: #0040DD;
    --text-secondary: #444;
  }
  .album-view__back {
    font-weight: 600;
  }
  .glass,
  .glass-strong {
    border: 2px solid var(--text-primary);
  }
  .album-view__header {
    border-bottom: 2px solid var(--text-primary);
  }
}

/* ── Hover-only effects ── */
@media (hover: hover) and (pointer: fine) {
  .album-view__photo:hover img {
    transform: scale(1.04);
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  :root {
    --cf-side-gap: 70px;
  }

  .album-view__grid {
    columns: 2;
  }
}

@media (max-width: 768px) {
  :root {
    --cf-cover-size: min(70vw, 320px);
  }

  :root {
    --cf-side-gap: 55px;
    --cf-rotation: 50deg;
  }

  .coverflow__title {
    font-size: 1.875rem; /* Made bigger on phone */
    margin-top: 6vh;
  }

  .album-view__grid {
    columns: 2;
    column-gap: 12px;
  }

  .album-view__photo {
    margin-bottom: 12px;
  }

  .ig-button {
    top: calc(14px + env(safe-area-inset-top));
    left: calc(14px + env(safe-area-inset-left));
    width: 44px;
    height: 44px;
  }

  .theme-toggle {
    top: calc(14px + env(safe-area-inset-top));
    right: calc(14px + env(safe-area-inset-right));
    width: 44px;
    height: 44px;
  }

  .lightbox__nav--prev {
    left: calc(12px + env(safe-area-inset-left));
  }

  .lightbox__nav--next {
    right: calc(12px + env(safe-area-inset-right));
  }
}

@media (max-width: 480px) {
  :root {
    /* Negative gap: on a narrow portrait phone the neighbour covers tuck in behind
       the centre one and peek from the edges, like in landscape */
    --cf-side-gap: -60px;
    --cf-rotation: 48deg;
    --cf-translate-z: -150px;
  }

  .album-view__grid {
    columns: 1;
  }
}

/* ============================================
   GESTURE HINT
   ============================================ */
.gesture-hint {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: gestureHintAppear 600ms ease forwards;
  pointer-events: none;
}

.gesture-hint.hidden {
  animation: gestureHintDisappear 400ms ease forwards;
}

.gesture-hint__hand {
  font-size: 2rem;
  animation: gestureHintSwipe 2s ease-in-out infinite;
}

.gesture-hint__text {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border);
  white-space: nowrap;
}

@keyframes gestureHintAppear {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes gestureHintDisappear {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

@keyframes gestureHintSwipe {
  0%, 100% { transform: translateX(-30px); }
  50% { transform: translateX(30px); }
}

/* ============================================
   UTILITIES / ANIMATIONS
   ============================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}



@media (max-height: 500px) and (orientation: landscape) {
  .coverflow__title { font-size: 1.5rem; margin-bottom: 4px; }
  .coverflow__subtitle { display: none; }
  :root { --cf-cover-size: clamp(140px, 30vh, 260px); }
  .coverflow__reflection { display: none; }
}

/* ── Adaptive Performance ── */
.perf-low .glass, .perf-low .glass-strong {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: var(--bg-elevated) !important;
}
.perf-low .ambient-glow,
.perf-low .coverflow__reflection {
  display: none !important;
}




/* ── LIGHTBOX BUTTON OVERRIDES ── */
.lightbox__close, .lightbox__nav, .lightbox__share {
  color: var(--text-primary) !important;
  background: var(--surface-hover) !important;
  border: 1px solid var(--divider) !important;
}

