/* ============================================================
   ЛАБОРАТОРИЯ ВОЛНОВЫХ ПРОЦЕССОВ — MATERIAL DESIGN 3
   Primary: International Klein Blue #002fa7
   ============================================================ */

/* ── MD3 REFERENCE TOKENS ─────────────────────────────────── */
:root {
  /* Primary — IKB */
  --md-sys-color-primary:              #002fa7;
  --md-sys-color-on-primary:           #ffffff;
  --md-sys-color-primary-container:    #dde1ff;
  --md-sys-color-on-primary-container: #001258;

  /* Secondary */
  --md-sys-color-secondary:              #5a5d72;
  --md-sys-color-on-secondary:           #ffffff;
  --md-sys-color-secondary-container:    #dfe1f9;
  --md-sys-color-on-secondary-container: #171a2c;

  /* Tertiary */
  --md-sys-color-tertiary:              #76546e;
  --md-sys-color-on-tertiary:           #ffffff;
  --md-sys-color-tertiary-container:    #ffd7f6;
  --md-sys-color-on-tertiary-container: #2d1228;

  /* Error */
  --md-sys-color-error:              #ba1a1a;
  --md-sys-color-on-error:           #ffffff;
  --md-sys-color-error-container:    #ffdad6;
  --md-sys-color-on-error-container: #410002;

  /* Surface */
  --md-sys-color-surface:                    #faf9ff;
  --md-sys-color-on-surface:                 #1b1b22;
  --md-sys-color-surface-variant:            #e2e1f3;
  --md-sys-color-on-surface-variant:         #45464f;
  --md-sys-color-surface-container-lowest:   #ffffff;
  --md-sys-color-surface-container-low:      #f4f3fa;
  --md-sys-color-surface-container:          #eeedf4;
  --md-sys-color-surface-container-high:     #e8e7ee;
  --md-sys-color-surface-container-highest:  #e3e2e9;
  --md-sys-color-inverse-surface:            #303037;
  --md-sys-color-inverse-on-surface:         #f2f0f8;
  --md-sys-color-inverse-primary:            #b6c3ff;

  /* Outline */
  --md-sys-color-outline:         #767686;
  --md-sys-color-outline-variant: #c6c5d6;

  /* Background */
  --md-sys-color-background:    #faf9ff;
  --md-sys-color-on-background: #1b1b22;

  /* Scrim */
  --md-sys-color-scrim: #000000;

  /* ── MD3 SHAPE ── */
  --md-sys-shape-corner-none:        0px;
  --md-sys-shape-corner-extra-small: 4px;
  --md-sys-shape-corner-small:       8px;
  --md-sys-shape-corner-medium:      12px;
  --md-sys-shape-corner-large:       16px;
  --md-sys-shape-corner-extra-large: 28px;
  --md-sys-shape-corner-full:        9999px;

  /* ── MD3 ELEVATION SHADOWS ── */
  --md-elevation-1: 0 1px 2px rgba(0,0,0,.3), 0 1px 3px 1px rgba(0,0,0,.15);
  --md-elevation-2: 0 1px 2px rgba(0,0,0,.3), 0 2px 6px 2px rgba(0,0,0,.15);
  --md-elevation-3: 0 4px 8px 3px rgba(0,0,0,.15), 0 1px 3px rgba(0,0,0,.3);
  --md-elevation-4: 0 6px 10px 4px rgba(0,0,0,.15), 0 2px 3px rgba(0,0,0,.3);
  --md-elevation-5: 0 8px 12px 6px rgba(0,0,0,.15), 0 4px 4px rgba(0,0,0,.3);

  /* ── MD3 TYPOGRAPHY ── */
  --md-ref-typeface-brand: 'Roboto', sans-serif;
  --md-ref-typeface-plain: 'Roboto', sans-serif;

  /* ── MD3 MOTION ── */
  --md-sys-motion-easing-standard:     cubic-bezier(0.2, 0, 0, 1);
  --md-sys-motion-easing-emphasized:   cubic-bezier(0.3, 0, 0, 1);
  --md-sys-motion-duration-short:      150ms;
  --md-sys-motion-duration-medium:     250ms;
  --md-sys-motion-duration-medium2:    400ms;

  /* ── COMPATIBILITY ALIASES (для старых классов) ── */
  --ikb:          var(--md-sys-color-primary);
  --transition:   var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-standard);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--md-ref-typeface-plain);
  background-color: var(--md-sys-color-background);
  color: var(--md-sys-color-on-background);
  margin: 0;
  padding: 0;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* ── CONTAINER ──────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ══════════════════════════════════════════════════════════
   MD3 TOP APP BAR
   ══════════════════════════════════════════════════════════ */
.header {
  background-color: var(--md-sys-color-surface-container-lowest);
  position: sticky;
  top: 0;
  z-index: 100;
  transition:
    background-color var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard),
    box-shadow       var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.header.scrolled {
  background-color: var(--md-sys-color-surface-container);
  box-shadow: var(--md-elevation-2);
  border-bottom-color: transparent;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
  flex-wrap: nowrap;
  gap: 12px;
  min-width: 0;
}

.logo-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  height: 40px;
  width: auto;
  flex-shrink: 0;
  display: block;
}

.logo-name {
  font-family: var(--md-ref-typeface-brand);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.35;
  color: var(--md-sys-color-on-surface);
  white-space: nowrap;
}

.logo-name strong {
  font-weight: 700;
  color: var(--md-sys-color-primary);
  display: block;
}

/* Navigation — MD3 Navigation Bar (horizontal) */
.header-nav {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  flex-shrink: 0;
}

.desktop-nav {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2px;
  flex-wrap: nowrap;
}

.desktop-nav a {
  color: var(--md-sys-color-on-surface-variant);
  text-decoration: none;
  font-family: var(--md-ref-typeface-plain);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.006em;
  padding: 6px 16px; /* Slightly more padding for better hit area */
  border-radius: var(--md-sys-shape-corner-full);
  transition: background-color var(--transition), color var(--transition);
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

/* Mobile Menu Toggle Button */
.menu-toggle {
    display: none; /* Hidden on desktop */
    width: 48px;
    height: 48px;
    border: none;
    background: transparent;
    color: var(--md-sys-color-on-surface-variant);
    cursor: pointer;
    border-radius: var(--md-sys-shape-corner-full);
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition);
}
.menu-toggle:hover { background-color: rgba(0,0,0,0.05); }

/* Mobile Drawer Styles */
.mobile-drawer {
    position: fixed;
    top: 64px; /* Height of header */
    left: 0;
    width: 100%;
    height: calc(100vh - 64px);
    background-color: var(--md-sys-color-surface-container-lowest);
    z-index: 1000;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.3, 0, 0, 1), opacity 0.3s;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
}

.mobile-drawer.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-nav-list a {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    border-radius: 16px;
    text-decoration: none;
    color: var(--md-sys-color-on-surface);
    font-size: 1.25rem;
    font-weight: 500;
    background-color: transparent;
    transition: background-color 0.2s;
}

.mobile-nav-list a:hover {
    background-color: var(--md-sys-color-surface-container-low);
}

.mobile-nav-list a .material-symbols-rounded {
    font-size: 24px;
    color: var(--md-sys-color-primary);
}

@media (max-width: 900px) {
    .desktop-nav { display: none; }
    .menu-toggle { display: flex; }
}

/* ── MD3 BENTO LAYOUT (ABOUT SECTION) ────────────────────── */

.about-bento {
  padding-top: 80px;
  padding-bottom: 80px;
}

.about-bento-header {
  margin-bottom: 64px;
}

.about-bento-row {
  margin-top: 56px;
}

.bento-container {
  max-width: 1200px;
}

/* Row 1: Goals Grid (3 Columns) */
.bento-goals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
  align-items: stretch; /* Force same height */
}

/* Row 2: Projects Grid (Featured + Side Stack) */
.bento-projects-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-top: 32px;
  align-items: stretch;
}

.side-projects-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Row 3: Tasks Grid (Auto-flow cards) */
.bento-tasks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

/* Expressive Cards Base */
.md3-expressive-card {
  display: flex;
  flex-direction: column;
  border-radius: 28px;
  padding: 32px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
  border: 1px solid var(--md-sys-color-outline-variant);
  background-color: var(--md-sys-color-surface-container-low);
  height: 100%; /* Fill grid cell */
}

.md3-expressive-card:hover {
  background-color: var(--md-sys-color-surface-container-high);
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

.md3-expressive-card--dark:hover {
    background-color: #08080c; /* Stay dark */
    box-shadow: 0 0 100px rgba(0, 0, 0, 1); /* Pure black depth shadow */
    border-color: rgba(182, 195, 255, 0.4); /* Subtle highlight edge */
    transform: translateY(-4px) scale(1.01); /* Subtle lift */
}

/* Goal Card Specifics */
.md3-expressive-card--goal {
  justify-content: flex-start;
}

.md3-expressive-card--goal .card-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.md3-expressive-card--goal .card-icon-wrap .material-symbols-rounded {
  font-size: 32px;
  font-variation-settings: 'FILL' 1;
}

.md3-expressive-card--goal .card-title {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 12px;
  line-height: 1.2;
}

.md3-expressive-card--goal .card-text {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--md-sys-color-on-surface-variant);
}

/* Featured Project (Dark) */
.md3-expressive-card--dark {
  background-color: #08080c;
  color: #ffffff; /* Explicitly white */
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex-direction: row;
  align-items: center;
  gap: 48px;
  position: relative;
  padding-top: 56px; /* Space for absolute tag */
}

.md3-expressive-card--dark .card-media {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle at center, rgba(182, 195, 255, 0.15) 0%, transparent 70%);
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.md3-expressive-card--dark .card-tag {
  position: absolute;
  top: 24px;
  left: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #b6c3ff;
  background: rgba(182, 195, 255, 0.15);
  padding: 6px 14px;
  border-radius: 100px;
  backdrop-filter: blur(8px);
  text-transform: uppercase;
  z-index: 2;
}

.md3-expressive-card--dark .card-title {
  font-size: 2.25rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: #ffffff !important; /* Force white */
}

.md3-expressive-card--dark .card-text {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 1.125rem;
}

.md3-expressive-card--dark .card-cta {
  margin-left: auto;
  margin-right: 48px; /* Move slightly left from the edge as requested */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #b6c3ff;
  padding: 12px;
  border-radius: 16px;
  background: rgba(182, 195, 255, 0.05);
  transition: all var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-standard);
}

.md3-expressive-card--dark:hover .card-cta {
    background: rgba(182, 195, 255, 0.12);
    color: #fff;
    transform: translateX(-4px); /* Slight lead towards the left when active */
}

/* Secondary Projects */
.md3-expressive-card--secondary {
  flex-direction: row;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
}

.md3-expressive-card--secondary .card-icon-small {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-title-mini {
  font-size: 1.125rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.card-description {
  font-size: 0.875rem;
  color: var(--md-sys-color-on-surface-variant);
  margin: 0;
}

/* Task Cards */
.md3-task-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background-color: var(--md-sys-color-surface-container);
  border-radius: 20px;
  border: 1px solid var(--md-sys-color-outline-variant);
}

.task-card-icon {
  color: var(--md-sys-color-primary);
}

.task-card-text {
  font-size: 0.9375rem;
  font-weight: 500;
}

/* Typography Overrides */
.md3-title-medium {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--md-sys-color-primary);
}

@media (max-width: 1024px) {
  .bento-goals-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-projects-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  
  .bento-goals-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .md3-expressive-card--dark {
    flex-direction: column;
    text-align: center;
    gap: 24px;
    padding: 48px 24px 32px;
  }
  
  .md3-expressive-card--dark .card-media {
    width: 100px;
    height: 100px;
  }
  
  .md3-expressive-card--dark .card-title {
    font-size: 1.75rem;
  }
  
  .md3-expressive-card--dark .card-cta {
    margin: 16px 0 0;
    width: 100%;
    flex-direction: row;
    justify-content: center;
  }

  .about-bento { padding-top: 48px; padding-bottom: 48px; }
  .about-bento-header { margin-bottom: 32px; }
}

@media (max-width: 600px) {
    .main-title { font-size: 2.25rem; }
    .hero { padding: 48px 0 64px; }
    .hero-stat-num { font-size: 1.5rem; }
    .hero-stats { 
        flex-direction: column; 
        gap: 24px;
        padding-top: 32px;
    }
    .hero-stats > div { 
        padding-right: 0; 
        border-right: none; 
        border-bottom: 1px solid var(--md-sys-color-outline-variant);
        padding-bottom: 16px;
        margin-right: 0;
    }
    .hero-stats > div:last-child { border-bottom: none; }
    
    .bento-tasks-grid {
        grid-template-columns: 1fr;
    }
}

/* Vader Mode Overlay (Dark Tint ONLY - BOTTOM LAYER) */
.vader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Deep cinematic black */
    z-index: 5000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Canvas (Particles ONLY - TOP LAYER) */
.vader-canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5010; /* Above EVERYTHING (Particles on first plan) */
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.2s;
}

body.vader-mode-active .vader-overlay,
body.vader-mode-active .vader-canvas-container {
    opacity: 1;
}

/* PROMOTE SECTION TO STAND ABOVE THE TINT BUT KEEP BACKGROUND TRANSPARENT */
body.vader-mode-active .about-bento {
    position: relative;
    z-index: 5001; /* Section is now on top of the dark tint */
    background: transparent !important; /* CRITICAL: Show the black overlay through the section */
}

/* Kill stacking context on all parents to let card pop */
body.vader-mode-active main,
body.vader-mode-active .container,
body.vader-mode-active .bento-container,
body.vader-mode-active .projects-row,
body.vader-mode-active .bento-projects-grid {
    transform: none !important;
    perspective: none !important;
    isolation: auto !important;
}

/* PROMOTE ONLY THE FEATURED CARD within the section */
body.vader-mode-active .md3-expressive-card--dark.featured-project {
    position: relative;
    z-index: 5005; /* Local z-index to be above siblings */
    box-shadow: 0 0 120px rgba(0, 0, 0, 1), 0 0 40px rgba(182, 195, 255, 0.1);
    border-color: rgba(182, 195, 255, 0.6);
    filter: none !important;
    opacity: 1 !important;
}

/* AGGRESSIVELY MUTE OTHER ELEMENTS */
body.vader-mode-active .about-bento-header,
body.vader-mode-active .goals-row,
body.vader-mode-active .tasks-row,
body.vader-mode-active .side-projects-stack,
body.vader-mode-active .projects-row > .md3-title-medium, /* Mute the row heading specifically */
body.vader-mode-active .md3-expressive-card--secondary {
    opacity: 0.05 !important;
    filter: blur(8px) !important;
    pointer-events: none;
    transition: all 0.6s;
}


/* State layer */
.header-nav .nav-list a::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-color: var(--md-sys-color-on-surface-variant);
  opacity: 0;
  transition: opacity var(--transition);
}

.header-nav .nav-list a:hover::before { opacity: 0.08; }
.header-nav .nav-list a:hover { color: var(--md-sys-color-on-surface); }
.header-nav .nav-list a:focus-visible { outline: 3px solid var(--md-sys-color-primary); outline-offset: 2px; }

/* Active state */
.header-nav .nav-list a.active {
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  font-weight: 600;
}


/* ══════════════════════════════════════════════════════════
   MD3 HERO
   ══════════════════════════════════════════════════════════ */
.hero {
  background-color: var(--md-sys-color-surface-container-lowest);
  padding: 80px 0 88px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

/* Subtle MD3 background tonal shape */
.hero::before {
  content: '';
  position: absolute;
  right: -80px;
  bottom: -100px;
  width: 560px;
  height: 560px;
  border-radius: var(--md-sys-shape-corner-full);
  background: radial-gradient(circle, var(--md-sys-color-primary-container) 0%, transparent 70%);
  opacity: 0.45;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

/* MD3 Assist Chip for badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 16px 0 12px;
  border-radius: var(--md-sys-shape-corner-full);
  border: 1px solid var(--md-sys-color-outline);
  background-color: transparent;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.006em;
  margin-bottom: 28px;
}

.hero-badge .material-symbols-rounded {
  font-size: 18px;
  color: var(--md-sys-color-primary);
}

/* MD3 Display Medium */
.main-title {
  font-family: var(--md-ref-typeface-brand);
  font-size: clamp(2.25rem, 5.5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.012em;
  color: var(--md-sys-color-on-surface);
  margin: 0 0 20px 0;
}

.main-title em {
  font-style: normal;
  color: var(--md-sys-color-primary);
  font-weight: 500;
}

/* MD3 Body Large */
.hero-desc {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--md-sys-color-on-surface-variant);
  max-width: 580px;
  margin: 0;
  font-weight: 400;
  letter-spacing: 0.005em;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 36px;
  flex-wrap: wrap;
}

/* MD3 Hero stats */
.hero-stats {
  display: flex;
  gap: 0;
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--md-sys-color-outline-variant);
}

.hero-stats > div {
  padding-right: 40px;
  border-right: 1px solid var(--md-sys-color-outline-variant);
  margin-right: 40px;
}
.hero-stats > div:last-child {
  border-right: none;
  margin-right: 0;
}

/* MD3 Title Large for stat numbers */
.hero-stat-num {
  font-family: var(--md-ref-typeface-brand);
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--md-sys-color-primary);
  line-height: 1;
}

/* MD3 Label Medium */
.hero-stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--md-sys-color-on-surface-variant);
  text-transform: uppercase;
  margin-top: 6px;
}


/* ══════════════════════════════════════════════════════════
   MD3 BUTTONS
   ══════════════════════════════════════════════════════════ */

/* Filled Button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 24px;
  border-radius: var(--md-sys-shape-corner-full);
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  text-decoration: none;
  font-family: var(--md-ref-typeface-plain);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.006em;
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition);
  border: none;
  cursor: pointer;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--md-sys-color-on-primary);
  opacity: 0;
  transition: opacity var(--transition);
}
.btn-primary:hover { box-shadow: var(--md-elevation-1); }
.btn-primary:hover::before { opacity: 0.08; }
.btn-primary:active::before { opacity: 0.12; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:focus-visible { outline: 3px solid var(--md-sys-color-primary); outline-offset: 3px; }

/* Tonal Button (Secondary Container) */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 24px;
  border-radius: var(--md-sys-shape-corner-full);
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  text-decoration: none;
  font-family: var(--md-ref-typeface-plain);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.006em;
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition);
  border: none;
  cursor: pointer;
}

.btn-ghost::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--md-sys-color-on-secondary-container);
  opacity: 0;
  transition: opacity var(--transition);
}
.btn-ghost:hover { box-shadow: var(--md-elevation-1); }
.btn-ghost:hover::before { opacity: 0.08; }

/* Outlined Button */
.btn-outlined {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 24px;
  border-radius: var(--md-sys-shape-corner-full);
  background-color: transparent;
  color: var(--md-sys-color-primary);
  text-decoration: none;
  font-family: var(--md-ref-typeface-plain);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.006em;
  border: 1px solid var(--md-sys-color-outline);
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition);
  cursor: pointer;
}
.btn-outlined::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--md-sys-color-primary);
  opacity: 0;
  transition: opacity var(--transition);
}
.btn-outlined:hover::before { opacity: 0.08; }
.btn-outlined:hover { 
    border-color: var(--md-sys-color-primary);
    box-shadow: var(--md-elevation-1);
}
.btn-outlined:active::before { opacity: 0.12; }

/* Text Button */
.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--md-sys-shape-corner-full);
  background-color: transparent;
  color: var(--md-sys-color-primary);
  text-decoration: none;
  font-family: var(--md-ref-typeface-plain);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.006em;
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
}
.btn-text::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-color: var(--md-sys-color-primary);
  opacity: 0;
  transition: opacity var(--transition);
}
.btn-text:hover::before { opacity: 0.08; }


/* ══════════════════════════════════════════════════════════
   ОБЩИЕ СТИЛИ СЕКЦИЙ
   ══════════════════════════════════════════════════════════ */
.section { padding: 72px 0; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 20px;
}

/* MD3 Headline Medium */
.section-title {
  font-family: var(--md-ref-typeface-brand);
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  font-weight: 400;
  color: var(--md-sys-color-on-surface);
  margin: 0;
  letter-spacing: 0;
  line-height: 1.3;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--md-sys-color-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.006em;
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: var(--md-sys-shape-corner-full);
  position: relative;
  overflow: hidden;
  transition: color var(--transition);
  flex-shrink: 0;
}
.section-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--md-sys-color-primary);
  border-radius: inherit;
  opacity: 0;
  transition: opacity var(--transition);
}
.section-link:hover::before { opacity: 0.08; }


/* ══════════════════════════════════════════════════════════
   СЕКЦИЯ ЦЕЛЕЙ (GOALS) — MD3 Filled Cards
   ══════════════════════════════════════════════════════════ */
.goals {
  background-color: var(--md-sys-color-surface-container-low);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

/* MD3 Filled Card */
.card {
  background-color: var(--md-sys-color-surface-container-highest);
  padding: 24px;
  border-radius: var(--md-sys-shape-corner-medium);
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition);
  cursor: default;
}

/* State layer */
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--md-sys-color-on-surface);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}
.card:hover { box-shadow: var(--md-elevation-1); }
.card:hover::after { opacity: 0.08; }

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--md-sys-shape-corner-small);
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.5rem;
}

.card-icon .material-symbols-rounded {
  font-size: 24px;
}

/* MD3 Title Large */
.card-title {
  font-family: var(--md-ref-typeface-brand);
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--md-sys-color-on-surface);
  margin: 0 0 8px 0;
  line-height: 1.4;
}

/* MD3 Body Medium */
.card-text {
  font-size: 0.875rem;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.65;
  margin: 0;
}


/* ══════════════════════════════════════════════════════════
   СЕКЦИЯ ЗАДАЧ — MD3 List Items
   ══════════════════════════════════════════════════════════ */
.tasks {
  background-color: var(--md-sys-color-surface-container-lowest);
}

.tasks-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 1px;
  background-color: var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-extra-large);
  overflow: hidden;
  box-shadow: var(--md-elevation-1);
}

/* MD3-style list item */
.task-card {
  background-color: var(--md-sys-color-surface-container-lowest);
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  position: relative;
  overflow: hidden;
  transition: background-color var(--transition);
}

.task-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--md-sys-color-primary);
  opacity: 0;
  transition: opacity var(--transition);
}
.task-card:hover::before { opacity: 0.05; }

.task-num {
  font-family: var(--md-ref-typeface-brand);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--md-sys-color-on-primary-container);
  background-color: var(--md-sys-color-primary-container);
  width: 32px;
  height: 32px;
  border-radius: var(--md-sys-shape-corner-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

/* MD3 Body Large */
.task-text {
  font-size: 0.9375rem;
  color: var(--md-sys-color-on-surface);
  line-height: 1.6;
  padding-top: 4px;
}


/* ══════════════════════════════════════════════════════════
   СЕКЦИЯ МЕРОПРИЯТИЙ — MD3 Elevated Cards
   ══════════════════════════════════════════════════════════ */
.events-section {
  background-color: var(--md-sys-color-surface-container-low);
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

/* MD3 Elevated Card */
.event-card {
  background-color: var(--md-sys-color-surface-container-lowest);
  border-radius: var(--md-sys-shape-corner-medium);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--md-elevation-1);
  transition: box-shadow var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard);
  position: relative;
}

/* Card state layer */
.event-card-state {
  position: absolute;
  inset: 0;
  background-color: var(--md-sys-color-primary);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
  z-index: 1;
}

.event-card:hover {
  box-shadow: var(--md-elevation-2);
}
.event-card:hover .event-card-state { opacity: 0.08; }

.card-cover {
  height: 200px;
  position: relative;
  background-color: var(--md-sys-color-surface-container);
  overflow: hidden;
  flex-shrink: 0;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s var(--md-sys-motion-easing-standard);
}

.event-card:hover .card-cover img { transform: scale(1.04); }

.cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,.4));
  pointer-events: none;
  z-index: 1;
}

/* MD3 Assist Chip as tag */
.card-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: var(--md-sys-shape-corner-full);
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* MD3 Title Medium */
.event-title {
  font-family: var(--md-ref-typeface-brand);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  margin: 0 0 8px 0;
  color: var(--md-sys-color-on-surface);
  letter-spacing: 0.006em;
}

/* MD3 Body Small */
.event-desc {
  font-size: 0.8125rem;
  color: var(--md-sys-color-on-surface-variant) !important;
  margin-bottom: 16px;
  flex-grow: 1;
  line-height: 1.6;
}

.card-footer-row {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* MD3 Title Small for date */
.event-date-large {
  font-family: var(--md-ref-typeface-brand);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--md-sys-color-on-surface);
  line-height: 1;
}

.event-date-large span {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--md-sys-color-on-surface-variant);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
  display: block;
}

/* MD3 Icon Button */
.arrow-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--md-sys-shape-corner-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 1.25rem;
  transition: background-color var(--transition), color var(--transition);
  background-color: transparent;
}

.event-card:hover .arrow-icon {
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}


/* ══════════════════════════════════════════════════════════
   MD3 FOOTER
   ══════════════════════════════════════════════════════════ */
.global-footer {
  background-color: var(--md-sys-color-inverse-surface);
  color: var(--md-sys-color-inverse-on-surface);
  padding: 56px 0 64px;
  font-size: 0.875rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-col h3 {
  font-family: var(--md-ref-typeface-brand);
  font-size: 0.6875rem;
  font-weight: 500;
  margin: 0 0 16px 0;
  color: var(--md-sys-color-inverse-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-menu { list-style: none; padding: 0; margin: 0; }
.footer-menu li { margin-bottom: 10px; }

.footer-menu a {
  color: rgba(242, 240, 248, 0.72);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color var(--transition);
  line-height: 1.5;
}
.footer-menu a:hover { color: var(--md-sys-color-inverse-on-surface); }

.brand-col { padding-right: 16px; }

.footer-logo-link { display: inline-block; margin-bottom: 16px; }
.footer-logo { max-width: 140px; height: auto; opacity: 0.85; }

.footer-copyright {
  color: rgba(242, 240, 248, 0.45);
  margin-bottom: 24px;
  font-size: 0.8125rem;
  line-height: 1.55;
}
.footer-copyright p { margin: 0; }


/* ── (REPLACED BY CONSOLIDATED SECTION AT THE END) ── */


/* ══════════════════════════════════════════════════════════
   АРХИВ
   ══════════════════════════════════════════════════════════ */
.archive-hero {
  background-color: var(--md-sys-color-surface-container-lowest);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  padding: 56px 0 52px;
}


/* ══════════════════════════════════════════════════════════
   АДАПТИВНОСТЬ
   ══════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .hero { padding: 56px 0 64px; }
  .hero-stats { gap: 0; }
  .hero-stats > div { padding-right: 28px; margin-right: 28px; }
  .hero::before { width: 380px; height: 380px; }
  .section { padding: 56px 0; }
  .tasks-list { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .container { padding: 0 16px; }
  .header-content { height: 56px; }
  .univ-name { display: none; }
  .main-title { font-size: 2rem; }
  .hero-stats { flex-direction: column; gap: 20px; }
  .hero-stats > div { border-right: none; border-bottom: 1px solid var(--md-sys-color-outline-variant); padding-right: 0; padding-bottom: 20px; margin-right: 0; margin-bottom: 0; }
  .hero-stats > div:last-child { border-bottom: none; padding-bottom: 0; }
  .grid-3 { grid-template-columns: 1fr; }
  .events-grid { grid-template-columns: 1fr; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .tasks-list { grid-template-columns: 1fr; border-radius: var(--md-sys-shape-corner-large); }
}

/* ══════════════════════════════════════════════════════════
   UTILITIES
   ══════════════════════════════════════════════════════════ */@media (max-width: 768px) {
    .events-grid {
        grid-template-columns: 1fr;
    }
    .event-card {
        height: auto;
    }
    .event-title {
        font-size: 1.25rem;
    }
}
.text-primary-md { color: var(--md-sys-color-primary); }
.mt-auto { margin-top: auto; }


/* ══════════════════════════════════════════════════════════
   MD3 OUTLINED CARD (base)
   ══════════════════════════════════════════════════════════ */
.md3-card-outlined {
  background-color: var(--md-sys-color-surface-container-lowest);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-medium);
  position: relative;
  overflow: hidden;
}


/* ══════════════════════════════════════════════════════════
   ABOUT SECTION: TABS + CAROUSEL + TASKS
   ══════════════════════════════════════════════════════════ */
.about-section {
  background-color: var(--md-sys-color-surface-container-low);
}

.about-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── MD3 Primary Tab Bar ── */
.md3-tab-bar {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  position: relative;
}

.md3-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px 10px;
  font-family: var(--md-ref-typeface-plain);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.006em;
  color: var(--md-sys-color-on-surface-variant);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  position: relative;
  transition: color var(--transition), border-color var(--transition);
  white-space: nowrap;
  margin-bottom: -1px;
}

.md3-tab::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--md-sys-color-primary);
  opacity: 0;
  border-radius: 4px 4px 0 0;
  transition: opacity var(--transition);
}
.md3-tab:hover::before { opacity: 0.08; }

.md3-tab.active {
  color: var(--md-sys-color-primary);
  border-bottom-color: var(--md-sys-color-primary);
}

.tab-icon {
  font-size: 18px;
  transition: font-variation-settings var(--transition);
}
.md3-tab.active .tab-icon {
  font-variation-settings: 'FILL' 1;
}

/* Tab panels */
.tab-panel { display: block; }
.tab-panel[hidden] { display: none; }


/* ── Goals Carousel ── */
.goals-carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  /* Hide scrollbar visually */
  scrollbar-width: none;
}
.goals-carousel::-webkit-scrollbar { display: none; }

.goal-card {
  flex: 0 0 340px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition);
  cursor: default;
}

@media (max-width: 680px) {
  .goal-card { flex: 0 0 calc(100vw - 48px); }
}

/* Медиа-зона карточки: градиент primary-container */
.goal-card-media {
  height: 140px;
  background: linear-gradient(135deg,
    var(--md-sys-color-primary-container) 0%,
    rgba(221,225,255,0.4) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--md-sys-color-on-primary-container);
  border-radius: var(--md-sys-shape-corner-medium) var(--md-sys-shape-corner-medium) 0 0;
  flex-shrink: 0;
}

.goal-card-body {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* MD3 Label Small — overline */
.goal-card-overline {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--md-sys-color-primary);
  margin-bottom: 6px;
}

/* MD3 Title Large */
.goal-card-title {
  font-family: var(--md-ref-typeface-brand);
  font-size: 1rem;
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
  margin: 0 0 10px 0;
  line-height: 1.4;
}

/* MD3 Body Medium */
.goal-card-text {
  font-size: 0.875rem;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.65;
  margin: 0;
}

/* Carousel dot indicator */
.carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--md-sys-shape-corner-full);
  background-color: var(--md-sys-color-outline-variant);
  transition: width 0.25s var(--md-sys-motion-easing-standard),
              background-color 0.25s var(--md-sys-motion-easing-standard);
}

.carousel-dot.active {
  width: 24px;
  background-color: var(--md-sys-color-primary);
}


/* ── Tasks (tab panel) ── */
.tasks-card {
  padding: 0;
}

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 24px;
}
.task-item--divider {
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.task-item-num {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  margin-top: 1px;
}

/* MD3 Body Large */
.task-item-text {
  font-size: 0.9375rem;
  color: var(--md-sys-color-on-surface);
  line-height: 1.6;
}


/* ══════════════════════════════════════════════════════════
   ARTICLE PAGE POLISH
   ══════════════════════════════════════════════════════════ */
/* ══════════════════════════════════════════════════════════
   ARTICLE PAGE POLISH (CONSOLIDATED)
   ══════════════════════════════════════════════════════════ */
.article-header {
    background-color: var(--md-sys-color-surface-container-low);
    padding: 64px 0 48px;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.article-main-title {
    font-family: var(--md-ref-typeface-brand);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 400;
    line-height: 1.1;
    color: var(--md-sys-color-on-surface);
    margin: 24px 0;
    letter-spacing: -0.02em;
}

.article-header-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
}

.article-post-tag {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 12px;
    border-radius: var(--md-sys-shape-corner-full);
    background-color: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.article-date-str {
    font-size: 0.875rem;
    color: var(--md-sys-color-on-surface-variant);
}

.article-content-body {
    max-width: 720px;
    margin: 64px auto;
    padding: 0 24px;
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--md-sys-color-on-surface);
    background-color: transparent !important; /* FIX: Remove white square */
}

.article-content-body p { margin-bottom: 24px; }
.article-content-body h2 { margin: 48px 0 24px; font-family: var(--md-ref-typeface-brand); font-weight: 400; color: var(--md-sys-color-on-surface); }
.article-content-body img { border-radius: var(--md-sys-shape-corner-large); margin: 32px 0; box-shadow: var(--md-elevation-1); width: 100%; height: auto; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--md-sys-color-primary);
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--transition);
}
.back-link:hover { opacity: 0.7; transform: translateX(-4px); }
.events-layout { display: flex; flex-direction: column; gap: 16px; }

/* ── MD3 Featured card (horizontal) ── */
.event-card--featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: var(--md-sys-shape-corner-large);
  background-color: var(--md-sys-color-surface-container-lowest);
  box-shadow: var(--md-elevation-1);
  overflow: hidden;
  min-height: 280px;
  transition: box-shadow var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard);
  position: relative;
}

.event-card--featured:hover {
  box-shadow: var(--md-elevation-3);
}

.event-featured-media {
  position: relative;
  overflow: hidden;
}

.event-featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s var(--md-sys-motion-easing-standard);
}

.event-card--featured:hover .event-featured-media img {
  transform: scale(1.04);
}

.event-featured-content {
  padding: 32px 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* MD3 Label with icon */
.event-featured-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: 12px;
}

/* MD3 Headline Small */
.event-featured-title {
  font-family: var(--md-ref-typeface-brand);
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  font-weight: 400;
  line-height: 1.3;
  color: var(--md-sys-color-on-surface);
  margin: 0 0 12px 0;
}

.event-featured-action {
  margin-top: 20px;
}

/* Responsive: featured goes vertical on small screens */
@media (max-width: 720px) {
  .event-card--featured {
    grid-template-columns: 1fr;
    grid-template-rows: 220px auto;
  }
  .event-featured-content {
    padding: 24px 20px;
  }
}


/* ── Regular events grid ── */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

@media (max-width: 680px) {
  .events-grid { grid-template-columns: 1fr; }
}


/* ══════════════════════════════════════════════════════════
   SCROLL ANIMATIONS
   ══════════════════════════════════════════════════════════ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.4s var(--md-sys-motion-easing-standard),
    transform 0.4s var(--md-sys-motion-easing-standard);
  transition-delay: var(--delay, 0s);
}

.animate-on-scroll.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Для тех, кто предпочитает меньше анимаций */
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
}