/* ============================================================
   GLOBAL.CSS — Foundation styles for Siddhesh Bare Portfolio
   Light theme — Atlassian Jira–inspired
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ── Design Tokens — Atlassian Design System palette ─────── */
:root {
  /* Backgrounds (Jira N-scale) */
  --color-bg-primary: #F4F5F7;
  /* N30  — page background */
  --color-bg-secondary: #FFFFFF;
  /* N10  — sidebar, panels  */
  --color-bg-tertiary: #EBECF0;
  /* N40  — subtle surfaces  */
  --color-bg-card: #FFFFFF;
  /* N10  — card surfaces    */

  /* Borders */
  --color-border: #DFE1E6;
  /* N100 */
  --color-border-subtle: #EBECF0;
  /* N40  */

  /* Accents — Atlassian palette */
  --color-accent-blue: #0052CC;
  /* B400 — primary action  */
  --color-accent-green: #00875A;
  /* G300 — success         */
  --color-accent-orange: #FF5630;
  /* R300 — error / blocker */
  --color-accent-purple: #6554C0;
  /* P300 — purple          */
  --color-accent-yellow: #FFAB00;
  /* Y300 — warning         */

  /* Accent tints (chip backgrounds) */
  --color-tint-blue: #DEEBFF;
  /* B50  */
  --color-tint-green: #E3FCEF;
  /* G50  */
  --color-tint-orange: #FFEBE6;
  /* R50  */
  --color-tint-purple: #EAE6FF;
  /* P50  */
  --color-tint-yellow: #FFFAE6;
  /* Y50  */

  /* Text (Jira N-scale) */
  --color-text-primary: #172B4D;
  /* N900 */
  --color-text-secondary: #5E6C84;
  /* N400 */
  --color-text-muted: #97A0AF;
  /* N300 */

  /* Typography */
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* Layout */
  --sidebar-width: 248px;
  --topbar-height: 56px;
  --content-max: 960px;
  --content-padding: 40px;

  /* Radii */
  --radius-sm: 3px;
  --radius-md: 4px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-pill: 9999px;

  /* Shadows — Atlassian elevation scale */
  --shadow-sm: 0 1px 1px rgba(9, 30, 66, .25), 0 0 1px rgba(9, 30, 66, .31);
  --shadow-md: 0 3px 5px rgba(9, 30, 66, .2), 0 0 1px rgba(9, 30, 66, .31);
  --shadow-lg: 0 8px 16px rgba(9, 30, 66, .15), 0 0 1px rgba(9, 30, 66, .31);
  --shadow-glow-blue: 0 0 0 2px rgba(0, 82, 204, .25);
  --shadow-glow-purple: 0 0 0 2px rgba(101, 84, 192, .25);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 350ms ease;
  --transition-spring: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
}

body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text-primary);
}

/* ── Custom Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-pill);
}

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

* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}

/* ── Selection ────────────────────────────────────────────── */
::selection {
  background: var(--color-tint-blue);
  color: var(--color-accent-blue);
}

/* ── Layout Shell ─────────────────────────────────────────── */
.layout {
  display: flex;
  min-height: 100vh;
}

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
  padding: var(--content-padding);
}

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background-color: var(--color-bg-secondary);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform var(--transition-slow);

  /* Subtle dot-grid texture */
  background-image:
    radial-gradient(circle, rgba(0, 82, 204, .05) 1px, transparent 1px);
  background-size: 24px 24px;
  background-color: var(--color-bg-secondary);
}

/* Top-edge blue accent bar */
.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent-blue), var(--color-accent-purple));
  z-index: 1;
}

.sidebar-header {
  padding: var(--space-5) var(--space-5) var(--space-4);
  border-bottom: 1px solid var(--color-border-subtle);
  flex-shrink: 0;
  margin-top: 3px;
  /* account for top accent bar */
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.sidebar-logo-mark {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--color-accent-blue), var(--color-accent-purple));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.sidebar-logo-text {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.3;
}

.sidebar-logo-sub {
  font-size: 10px;
  font-weight: 400;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.sidebar-section {
  padding: var(--space-4) var(--space-3);
  flex: 1;
}

.sidebar-section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  padding: 0 var(--space-3) var(--space-2);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 7px var(--space-3);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  position: relative;
  white-space: nowrap;
}

.sidebar-nav-item:hover {
  background: var(--color-bg-tertiary);
  color: var(--color-text-primary);
}

.sidebar-nav-item.active {
  background: var(--color-tint-blue);
  color: var(--color-accent-blue);
  font-weight: 600;
}

.sidebar-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 2px;
  background: var(--color-accent-blue);
  border-radius: var(--radius-pill);
}

.sidebar-nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: .65;
}

.sidebar-nav-item.active .sidebar-nav-icon,
.sidebar-nav-item:hover .sidebar-nav-icon {
  opacity: 1;
}

.sidebar-footer {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--color-border-subtle);
  flex-shrink: 0;
}

/* ── Mobile Topbar ────────────────────────────────────────── */
.topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-height);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-4);
  z-index: 200;
}

.topbar-logo {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-primary);
}

/* ── Hamburger Button ─────────────────────────────────────── */
.hamburger {
  width: 36px;
  height: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
  background: none;
  border: none;
}

.hamburger:hover {
  background: var(--color-bg-tertiary);
}

.hamburger-line {
  width: 20px;
  height: 2px;
  background: var(--color-text-secondary);
  border-radius: var(--radius-pill);
  transition: transform var(--transition-base), opacity var(--transition-base), width var(--transition-base);
  transform-origin: center;
}

.hamburger.is-open .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.is-open .hamburger-line:nth-child(2) {
  opacity: 0;
  width: 0;
}

.hamburger.is-open .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Sidebar Overlay (mobile) ─────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(9, 30, 66, .54);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
}

.sidebar-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ── Frosted Glass Utility ────────────────────────────────── */
.glass {
  background: rgba(255, 255, 255, .8);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(9, 30, 66, .08);
}

.glass-strong {
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(9, 30, 66, .1);
}

/* ── Ticket ID ────────────────────────────────────────────── */
.ticket-id {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  user-select: none;
}

/* ── Label Chip ───────────────────────────────────────────── */
.label-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: .03em;
  border: 1px solid transparent;
}

.label-chip--blue {
  background: var(--color-tint-blue);
  color: var(--color-accent-blue);
  border-color: #B3D4FF;
}

.label-chip--red {
  background: var(--color-tint-red);
  color: var(--color-accent-red);
  border-color: #cd2927;
}

.label-chip--green {
  background: var(--color-tint-green);
  color: var(--color-accent-green);
  border-color: #ABF5D1;
}

.label-chip--orange {
  background: var(--color-tint-orange);
  color: var(--color-accent-orange);
  border-color: #FFBDAD;
}

.label-chip--purple {
  background: var(--color-tint-purple);
  color: var(--color-accent-purple);
  border-color: #C0B6F2;
}

.label-chip--yellow {
  background: var(--color-tint-yellow);
  color: var(--color-accent-yellow);
  border-color: #FFE380;
}

.label-chip--muted {
  background: var(--color-bg-tertiary);
  color: var(--color-text-secondary);
  border-color: var(--color-border);
}

/* ── Status Chip ──────────────────────────────────────────── */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.status-chip::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-chip--todo {
  background: var(--color-bg-tertiary);
  color: var(--color-text-secondary);
}

.status-chip--todo::before {
  background: var(--color-text-muted);
}

.status-chip--progress {
  background: var(--color-tint-blue);
  color: var(--color-accent-blue);
}

.status-chip--progress::before {
  background: var(--color-accent-blue);
  box-shadow: 0 0 0 2px rgba(0, 82, 204, .25);
}

.status-chip--review {
  background: var(--color-tint-purple);
  color: var(--color-accent-purple);
}

.status-chip--review::before {
  background: var(--color-accent-purple);
}

.status-chip--done {
  background: var(--color-tint-green);
  color: var(--color-accent-green);
}

.status-chip--done::before {
  background: var(--color-accent-green);
}

.status-chip--blocked {
  background: var(--color-tint-orange);
  color: var(--color-accent-orange);
}

.status-chip--blocked::before {
  background: var(--color-accent-orange);
}

/* ── Kanban Card ──────────────────────────────────────────── */
.kanban-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-base);
  will-change: transform;
  box-shadow: var(--shadow-sm);
}

.kanban-card:hover {
  border-color: #4C9AFF;
  box-shadow: var(--shadow-md), var(--shadow-glow-blue);
}

.kanban-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.kanban-card-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.4;
}

.kanban-card-body {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-4);
}

.kanban-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* ── Project Card ─────────────────────────────────────────── */
.project-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-base);
  will-change: transform;
  box-shadow: var(--shadow-sm);
}

.project-card:hover {
  border-color: #4C9AFF;
  box-shadow: var(--shadow-lg), var(--shadow-glow-blue);
}

.project-card-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--color-bg-tertiary);
}

.project-card-body {
  padding: var(--space-5);
}

/* ── Reveal Animation ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 550ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 550ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger>* {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 450ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 450ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-stagger.is-visible>*:nth-child(1) {
  opacity: 1;
  transform: none;
  transition-delay: 40ms;
}

.reveal-stagger.is-visible>*:nth-child(2) {
  opacity: 1;
  transform: none;
  transition-delay: 90ms;
}

.reveal-stagger.is-visible>*:nth-child(3) {
  opacity: 1;
  transform: none;
  transition-delay: 140ms;
}

.reveal-stagger.is-visible>*:nth-child(4) {
  opacity: 1;
  transform: none;
  transition-delay: 190ms;
}

.reveal-stagger.is-visible>*:nth-child(5) {
  opacity: 1;
  transform: none;
  transition-delay: 240ms;
}

.reveal-stagger.is-visible>*:nth-child(6) {
  opacity: 1;
  transform: none;
  transition-delay: 290ms;
}

.reveal-stagger.is-visible>*:nth-child(7) {
  opacity: 1;
  transform: none;
  transition-delay: 340ms;
}

.reveal-stagger.is-visible>*:nth-child(8) {
  opacity: 1;
  transform: none;
  transition-delay: 390ms;
}

.reveal-stagger.is-visible>*:nth-child(9) {
  opacity: 1;
  transform: none;
  transition-delay: 440ms;
}

.reveal-stagger.is-visible>*:nth-child(10) {
  opacity: 1;
  transform: none;
  transition-delay: 490ms;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 16px;
  background: var(--color-accent-blue);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    background var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
  white-space: nowrap;
  border: none;
  letter-spacing: .01em;
  box-shadow: 0 1px 2px rgba(9, 30, 66, .3);
}

.btn-primary:hover {
  background: #0065FF;
  box-shadow: 0 3px 6px rgba(0, 82, 204, .35);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  background: #0052CC;
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 7px 15px;
  background: #FFFFFF;
  color: var(--color-text-secondary);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
  white-space: nowrap;
  letter-spacing: .01em;
}

.btn-secondary:hover {
  background: var(--color-bg-tertiary);
  border-color: #B3BAC5;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* ── Section Heading Pattern ──────────────────────────────── */
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-accent-blue);
  text-transform: uppercase;
  letter-spacing: .14em;
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.section-label::before {
  content: '//';
  color: var(--color-text-muted);
  font-weight: 400;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.5vw, 36px);
  font-weight: 800;
  color: var(--color-text-primary);
  line-height: 1.15;
  letter-spacing: -.025em;
}

.section-subtitle {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.7;
  max-width: 560px;
}

/* ── Divider ──────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--space-6) 0;
}

/* ── Page Header ──────────────────────────────────────────── */
.page-header {
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-7);
}

.page-header-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

/* ── Counter / Stat Block ─────────────────────────────────── */
.stat-value {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--color-text-primary);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: var(--space-1);
}

/* ── View Transitions API ─────────────────────────────────── */
@keyframes vt-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes vt-fade-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes vt-slide-up-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

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

@keyframes vt-slide-down-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

::view-transition-old(root) {
  animation: vt-slide-down-out 200ms cubic-bezier(0.4, 0, 1, 1) both;
}

::view-transition-new(root) {
  animation: vt-slide-up-in 280ms cubic-bezier(0, 0, 0.2, 1) both;
}

@media (prefers-reduced-motion: reduce) {

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: vt-fade-in 150ms ease both;
  }

  .reveal,
  .reveal-stagger>* {
    transition-duration: 200ms;
  }
}

/* ── Custom Cursor elements ───────────────────────────────── */
#cursor-dot,
#cursor-ring {
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
  transition: opacity 300ms ease;
}

#cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--color-accent-blue);
}

#cursor-ring {
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--color-accent-blue);
  background: transparent;
  opacity: .6;
  transition:
    width 200ms ease,
    height 200ms ease,
    opacity 300ms ease;
}

/* ── Reveal delay utilities (used across all pages) ──────── */
.reveal-delay-1 {
  transition-delay: 80ms !important;
}

.reveal-delay-2 {
  transition-delay: 160ms !important;
}

.reveal-delay-3 {
  transition-delay: 240ms !important;
}

.reveal-delay-4 {
  transition-delay: 320ms !important;
}

.reveal-delay-5 {
  transition-delay: 400ms !important;
}

/* ── Mobile Breakpoints ───────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 300;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: block;
  }

  .topbar {
    display: flex;
  }

  .main-content {
    margin-left: 0;
    padding: calc(var(--topbar-height) + var(--space-5)) var(--space-4) var(--space-6);
  }
}

@media (max-width: 480px) {
  :root {
    --content-padding: 16px;
  }

  .section-title {
    font-size: clamp(20px, 6vw, 28px);
  }
}

/* ── Grid helpers ─────────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ── Focus ring ───────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--color-accent-blue);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ── Scroll-Down Arrow Indicator ─────────────────────────── */
@keyframes scroll-bounce {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(7px);
  }
}

.scroll-arrow {
  position: fixed;
  bottom: 28px;
  left: calc(var(--sidebar-width) + (100vw - var(--sidebar-width)) / 2);
  transform: translateX(-50%);
  z-index: 50;

  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  background: var(--color-bg-secondary);
  color: var(--color-text-secondary);
  cursor: pointer;
  box-shadow: var(--shadow-sm);

  opacity: 1;
  pointer-events: auto;
  transition:
    opacity 350ms ease,
    box-shadow var(--transition-base),
    border-color var(--transition-base),
    color var(--transition-base);
  animation: scroll-bounce 1.8s ease-in-out infinite;
}

.scroll-arrow:hover {
  border-color: var(--color-accent-blue);
  color: var(--color-accent-blue);
  box-shadow: var(--shadow-md);
}

.scroll-arrow.is-hidden {
  opacity: 0;
  pointer-events: none;
  animation-play-state: paused;
}

@media (max-width: 900px) {
  .scroll-arrow {
    display: none;
  }
}