/* ================================================================
   niemil.com — main stylesheet  (redesign: dark charcoal + indigo)
   ================================================================ */

:root {
  --bg:        #09090b;
  --bg2:       #111116;
  --bg3:       #18181f;
  --blue:      #818CF8;       /* indigo-400 — professional, not space-cyan */
  --blue-dim:  #6366F1;       /* indigo-500 */
  --glow:      rgba(129, 140, 248, 0.3);
  --glow-soft: rgba(129, 140, 248, 0.08);
  --text:      #F1F5F9;
  --text2:     rgba(241, 245, 249, 0.58);
  --text3:     rgba(241, 245, 249, 0.26);
  --border:    rgba(129, 140, 248, 0.16);
  --border2:   rgba(129, 140, 248, 0.07);
  --font:      'Ubuntu', sans-serif;
  --mono:      'JetBrains Mono', monospace;
  --radius:    12px;
  --ease:      cubic-bezier(0.4, 0, 0.2, 1);
  --t:         0.25s;
}

/* === RESET ============================================================= */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: var(--font); }

/* === THREE.JS CANVAS =================================================== */
#bg-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
}

/* === CUSTOM CURSOR ===================================================== */
.cursor {
  position: fixed;
  width: 8px; height: 8px;
  background: var(--blue);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width var(--t), height var(--t), opacity var(--t);
  mix-blend-mode: normal;
}
.cursor-ring {
  position: fixed;
  width: 32px; height: 32px;
  border: 1px solid rgba(129, 140, 248, 0.45);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.12s var(--ease), height 0.12s var(--ease), border-color var(--t);
}
body:has(a:hover) .cursor { width: 14px; height: 14px; }
body:has(a:hover) .cursor-ring { width: 48px; height: 48px; border-color: var(--blue); }
.cursor-ring--hover { width: 48px; height: 48px; border-color: var(--blue); }

/* === NAVIGATION ======================================================== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 16px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  background: rgba(9, 9, 11, 0.82);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
}
nav.nav-hidden { transform: translateY(-100%); }

.nav-logo {
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0;
  position: relative;
  transition: all 0.4s var(--ease);
}
.nav-logo:hover {
  transform: scale(1.05);
}
.nav-logo .logo-ni  { color: rgba(241, 245, 249, 0.3); transition: color 0.4s; }
.nav-logo .logo-emil{ color: var(--blue); }
.nav-logo:hover .logo-ni { color: var(--blue); }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  color: var(--text2);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  transition: color var(--t);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 1px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t) var(--ease);
}
.nav-links a:hover { color: var(--blue); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  cursor: pointer;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--t);
  display: block;
}
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-mobile {
  display: none;
  position: fixed;
  top: 61px; left: 0; right: 0;
  background: rgba(9, 9, 11, 0.97);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
  z-index: 199;
  flex-direction: column;
  gap: 16px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  color: var(--text2);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  transition: color var(--t);
}
.nav-mobile a:hover { color: var(--blue); }

/* === HERO ============================================================== */
.section-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 24px;
  pointer-events: none;
}
.hero-content > * { pointer-events: auto; }

.hero-name {
  font-size: clamp(88px, 22vw, 280px);
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 0.85;
  margin-bottom: 24px;
  user-select: none;
  overflow: visible;
  white-space: nowrap;
  display: inline-flex;
  gap: 0;
  text-shadow: 
    0 0 1rem var(--glow),
    0 0 3rem var(--blue),
    0 0 6rem var(--blue-dim);
  filter: drop-shadow(0 35px 70px rgba(99,102,241,0.4));
  transform-style: preserve-3d;
}

.name-ni,
.name-emil,
.name-emi,
.name-l {
  display: inline;
  color: var(--blue);
  animation: emiGlow 4s ease-in-out infinite;
}

@keyframes emiGlow {
  0%, 100% { text-shadow: 0 0 40px rgba(129,140,248,0.35), 0 0 90px rgba(129,140,248,0.12); }
  50%       { text-shadow: 0 0 65px rgba(129,140,248,0.65), 0 0 160px rgba(129,140,248,0.22); }
}

.hero-tagline {
  font-size: clamp(15px, 2vw, 20px);
  color: var(--text2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 70px;
}
#typewriter {
  color: var(--blue);
  font-weight: 600;
  min-width: 160px;
  text-align: left;
}
#typewriter::after {
  content: '|';
  animation: blink 0.65s step-end infinite;
}

.scroll-hint {
  position: absolute;
  bottom: 44px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text3);
  font-size: 9px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-family: var(--mono);
}
.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--blue), transparent);
  animation: scrollDrop 2s ease-in-out infinite;
}

/* === STATUS BAR ======================================================== */
.section-status {
  position: relative;
  z-index: 1;
  background: var(--bg2);
  border-top: 1px solid rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  padding: 12px 0;
  overflow: hidden;
}
.section-status::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 60px;
  background: linear-gradient(to right, var(--bg2), transparent);
  z-index: 1;
}
.status-scroll-wrapper {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 0 48px;
  flex-wrap: wrap;
  position: relative;
  z-index: 0;
}
.status-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 8px rgba(74,222,128,0.6);
  flex-shrink: 0;
  animation: dotPulse 2.5s ease-in-out infinite;
}
.status-label {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--text3);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.status-value {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text2);
}
.status-updated {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text3);
  margin-left: auto;
  padding-right: 24px;
}

/* === SHARED LAYOUT ===================================================== */
.section-about,
.section-blog,
.section-contact {
  position: relative;
  z-index: 1;
  padding: 120px 0;
}
.section-timeline {
  position: relative;
  z-index: 1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
}

.section-tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: block;
}
.section-title {
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 14px;
}
.section-title .char { display: inline-block; }
.section-sub {
  color: var(--text2);
  font-size: 1rem;
  margin-bottom: 56px;
  max-width: 520px;
}

/* === BLOG (moved high — first content after hero/status) ============== */
.section-blog { background: var(--bg); }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.blog-card {
  display: block;
  padding: 28px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  background: var(--bg2);
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform, box-shadow;
}
.blog-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
  opacity: 0;
  transition: opacity 0.35s, transform 0.35s;
  transform: scaleX(0);
  transform-origin: left;
}
.blog-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(129,140,248,0.08) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.blog-card:hover {
  border-color: rgba(129,140,248,0.35);
  box-shadow: 0 25px 70px rgba(99,102,241,0.15), inset 0 1px 0 rgba(129,140,248,0.1);
  transform: translateY(-4px) scale(1.01);
}
.blog-card:hover::before { opacity: 1; transform: scaleX(1); }
.blog-card:hover::after { opacity: 1; }

/* Recent (< 7 days) post highlight */
.blog-card--new {
  border-color: rgba(129,140,248,0.22);
  background: linear-gradient(145deg, rgba(99,102,241,0.05) 0%, var(--bg2) 60%);
}
.blog-card--new::before { opacity: 0.6; }

.new-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 100px;
  background: rgba(99,102,241,0.14);
  border: 1px solid rgba(99,102,241,0.32);
  font-size: 9px;
  font-family: var(--mono);
  color: var(--blue);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-left: 10px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.blog-card-date {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}
.blog-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 18px;
}
.blog-card-arrow {
  color: var(--blue);
  font-size: 1.1rem;
  transition: transform var(--t);
}
.blog-card:hover .blog-card-arrow { transform: translateX(6px); }

.no-posts {
  color: var(--text2);
  font-size: 1rem;
  grid-column: 1 / -1;
  padding: 20px 0;
}

/* === PINNED SCROLL-REVEAL SECTION ====================================== */
.section-pinned-scroll {
  position: relative;
  z-index: 1;
  background: var(--bg2);
  border-top: 1px solid rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.pinned-inner {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 40px;
  text-align: center;
}
.pinned-headline {
  font-size: clamp(34px, 7vw, 96px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--text);
}
.pinned-headline .word {
  display: inline-block;
  overflow: hidden;
  margin-right: 0.2em;
}
.pinned-headline .char { display: inline-block; will-change: transform, opacity; }
.pinned-headline .em { color: var(--blue); }

/* === ABOUT ============================================================= */
.section-about { background: var(--bg); }

.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 72px;
  align-items: start;
  margin-top: 56px;
}

.photo-frame {
  position: relative;
  width: 260px; height: 260px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 0 60px rgba(129,140,248,0.05);
}
.photo-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.35);
  pointer-events: none;
}
.photo-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #111120, #08080f);
  font-size: 72px;
  font-weight: 900;
  color: rgba(129, 140, 248, 0.25);
  letter-spacing: -0.06em;
}
.photo-frame img:not([src=""]):not([src*="placeholder"]) + .photo-placeholder {
  display: none;
}

.about-text p {
  color: var(--text2);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 18px;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 32px;
}
.tech-tag {
  padding: 4px 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 100px;
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text2);
  background: var(--bg2);
  transition: all 0.35s var(--ease);
  position: relative;
  overflow: hidden;
  will-change: transform, box-shadow;
}
.tech-tag::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(129,140,248,0.3), transparent);
  opacity: 0;
}
.tech-tag:hover {
  background: rgba(129,140,248,0.12);
  border-color: var(--blue);
  color: var(--blue);
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 24px rgba(99,102,241,0.15);
}

/* === TIMELINE ========================================================== */
.section-timeline {
  background: var(--bg2);
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.timeline-header {
  padding: 80px 48px 0;
}
.timeline-outer {
  overflow: hidden;
  position: relative;
  padding: 60px 0 80px;
}
.timeline-track {
  display: flex;
  padding: 20px 48px 20px;
  gap: 0;
  will-change: transform;
  position: relative;
}
.timeline-track::before {
  content: '';
  position: absolute;
  left: 48px;
  right: 48px;
  top: 38px;
  height: 1px;
  background: rgba(255,255,255,0.07);
}

.timeline-item {
  flex-shrink: 0;
  width: 300px;
  padding-right: 48px;
  position: relative;
  opacity: 0;
  transform: translateY(24px);
}
.timeline-item.visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.timeline-marker {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 14px var(--glow), 0 0 30px rgba(129,140,248,0.18);
  margin-bottom: 26px;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.timeline-year {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.timeline-content h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.35;
}
.timeline-content p {
  font-size: 0.88rem;
  color: var(--text2);
  line-height: 1.65;
}
.timeline-type-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 2px 8px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.08);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  background: rgba(255,255,255,0.03);
}

/* === SECOND ANIMATED STATEMENT ======================================== */
.section-statement {
  position: relative;
  z-index: 1;
  padding: 100px 0;
  background: var(--bg);
}

/* ================================================================
   LIGHT / DARK MODE
   ================================================================ */
[data-theme="light"] {
  --bg:        #f8f9fb;
  --bg2:       #eef1f7;
  --bg3:       #e2e8f0;
  --blue:      #4F46E5;
  --blue-dim:  #4338CA;
  --glow:      rgba(79, 70, 229, 0.4);
  --glow-soft: rgba(79, 70, 229, 0.1);
  --text:      #0f0f14;
  --text2:     rgba(15, 15, 20, 0.58);
  --text3:     rgba(15, 15, 20, 0.3);
  --border:    rgba(79, 70, 229, 0.2);
  --border2:   rgba(79, 70, 229, 0.08);
}
[data-theme="light"] #bg-canvas {
  opacity: 0.12;
  mix-blend-mode: multiply;
}
[data-theme="light"] .section-status  { background: var(--bg2); }
[data-theme="light"] .section-contact { background: var(--bg2); }
[data-theme="light"] .section-timeline{ background: var(--bg2); }
[data-theme="light"] .blog-card        { background: #fff; }


/* ================================================================
   THEME TOGGLE BUTTON
   ================================================================ */
.theme-toggle {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.09);
  background: transparent;
  color: var(--text2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all var(--t);
  flex-shrink: 0;
  line-height: 1;
  padding: 0;
}
.theme-toggle:hover {
  border-color: var(--border);
  color: var(--blue);
  background: rgba(129,140,248,0.07);
}

/* ================================================================
   BACKGROUND (very subtle, not space-like)
   ================================================================ */
.bg-grid {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, transparent 30%, black 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, transparent 30%, black 100%);
}

/* ================================================================
   MARQUEE SECTION
   ================================================================ */
.section-marquee {
  position: relative; z-index: 1;
  overflow: hidden;
  padding: 14px 0;
  background: var(--bg2);
  border-top: 1px solid rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 32px;
  width: max-content;
  animation: marqueeScroll 32s linear infinite;
  will-change: transform;
}
.marquee-track:hover { animation-play-state: paused; }
.marquee-item {
  font-size: clamp(12px, 1.5vw, 14px);
  font-weight: 500;
  color: var(--text3);
  letter-spacing: 0.06em;
  white-space: nowrap;
  transition: color var(--t);
}
.marquee-item:hover { color: var(--blue); cursor: default; }
.marquee-dot { color: var(--blue); opacity: 0.3; font-size: 0.4rem; line-height: 1; }
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ================================================================
   NUMBERS / STATS SECTION
   ================================================================ */
.section-numbers {
  position: relative; z-index: 1;
  background: var(--bg2);
  padding: 80px 0;
  border-top: 1px solid rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.numbers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 40px;
  text-align: center;
}
.number-item { display: flex; flex-direction: column; align-items: center; }
.number-display { display: flex; align-items: baseline; gap: 2px; line-height: 1; margin-bottom: 10px; }
.number-val {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  color: var(--blue);
  font-family: var(--mono);
  letter-spacing: -0.04em;
}
.number-suffix {
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 700;
  color: var(--blue);
  opacity: 0.6;
}
.number-label {
  font-size: 10px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-family: var(--mono);
}

/* ================================================================
   COOKIE / PRIVACY NOTICE
   ================================================================ */
.privacy-banner {
  position: fixed;
  bottom: 20px; left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  background: var(--bg3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 560px;
  width: calc(100vw - 40px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-size: 0.8rem;
  color: var(--text2);
  transition: opacity 0.4s, transform 0.4s;
}
.privacy-banner.hidden {
  opacity: 0; pointer-events: none;
  transform: translateX(-50%) translateY(20px);
}
.privacy-banner a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.privacy-banner p { flex: 1; line-height: 1.5; }
.privacy-dismiss {
  flex-shrink: 0;
  padding: 5px 12px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  background: none;
  color: var(--text2);
  font-size: 0.76rem;
  cursor: pointer;
  transition: all var(--t);
  white-space: nowrap;
  font-family: var(--font);
}
.privacy-dismiss:hover { border-color: var(--blue); color: var(--blue); }

/* ================================================================
   PRIVACY PAGE
   ================================================================ */
.privacy-page {
  padding: 140px 0 100px;
  min-height: 100vh;
  position: relative; z-index: 1;
}
.privacy-page h1 { font-size: clamp(26px, 4vw, 48px); font-weight: 700; margin-bottom: 40px; }
.privacy-page h2 { font-size: 1.15rem; font-weight: 600; color: var(--blue); margin: 32px 0 10px; }
.privacy-page p, .privacy-page li { color: var(--text2); line-height: 1.85; margin-bottom: 14px; }
.privacy-page ul { margin-left: 20px; }

/* ================================================================
   ADMIN STYLES
   ================================================================ */
.chart-wrap {
  background: var(--bg3);
  border-radius: 10px;
  padding: 20px;
  margin: 20px 0;
  position: relative;
  height: 260px;
}
.stats-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}
.stats-list { list-style: none; }
.stats-list li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 0; border-bottom: 1px solid var(--border2);
  font-size: 0.86rem; color: var(--text2);
}
.stats-list li .count {
  font-family: var(--mono); font-size: 0.78rem; color: var(--blue);
}
@media (max-width: 700px) { .stats-two-col { grid-template-columns: 1fr; } }

/* === CONTACT =========================================================== */
.section-contact { background: var(--bg2); text-align: center; }
.contact-intro { color: var(--text2); font-size: 1.1rem; margin-bottom: 48px; max-width: 480px; margin-left: auto; margin-right: auto; }
.contact-links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.contact-link {
  padding: 13px 32px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  color: var(--text2); font-size: 0.88rem; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  transition: all 0.4s var(--ease);
  background: var(--bg3);
  position: relative;
  overflow: hidden;
  will-change: transform, box-shadow;
}
.contact-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(129,140,248,0.15) 100%);
  opacity: 0;
  transition: opacity 0.4s;
}
.contact-link:hover {
  border-color: var(--border);
  color: var(--blue);
  background: rgba(129,140,248,0.08);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(99,102,241,0.2);
}
.contact-link:hover::before { opacity: 1; }
.contact-link svg { position: relative; z-index: 1; }

/* === BUTTONS =========================================================== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 26px; border-radius: var(--radius);
  font-size: 0.86rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; transition: all 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.2) 0%, transparent 60%);
  opacity: 0;
  pointer-events: none;
}
.btn-primary {
  background: var(--blue-dim); color: #fff;
  box-shadow: 0 0 24px rgba(99,102,241,0.25);
}
.btn-primary:hover {
  background: var(--blue);
  box-shadow: 0 0 40px rgba(129,140,248,0.4);
  transform: translateY(-2px);
}
.btn-outline {
  border: 1px solid rgba(255,255,255,0.1); color: var(--text2);
  background: var(--bg3);
}
.btn-outline:hover {
  border-color: var(--border); color: var(--blue);
  background: rgba(129,140,248,0.05);
  transform: translateY(-2px);
}

/* === FOOTER ============================================================ */
footer {
  position: relative; z-index: 1;
  padding: 36px 48px;
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,0.05);
  color: var(--text3);
  font-family: var(--mono); font-size: 11px;
  transition: all 0.4s;
}
footer a { 
  color: var(--text3); 
  transition: all 0.35s var(--ease); 
  position: relative;
}
footer a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
footer a:hover { 
  color: var(--blue); 
}
footer a:hover::after { 
  transform: scaleX(1);
}

/* === ADMIN STYLES ====================================================== */
.admin-body { background: var(--bg); min-height: 100vh; }
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--bg2);
  border-right: 1px solid rgba(255,255,255,0.05);
  padding: 0;
  position: fixed; top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 100;
}
.admin-sidebar-logo {
  padding: 26px 24px 18px;
  font-size: 1.15rem; font-weight: 800; letter-spacing: -0.04em;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: block;
}
.admin-sidebar-logo .em { color: var(--blue); }
.admin-nav { padding: 12px 0; }
.admin-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 24px;
  color: var(--text2); font-size: 0.88rem; font-weight: 500;
  transition: all var(--t);
}
.admin-nav a:hover, .admin-nav a.active {
  color: var(--blue); background: rgba(129,140,248,0.06);
  border-right: 2px solid var(--blue);
}
.admin-main {
  margin-left: 240px; flex: 1;
  padding: 40px;
  max-width: calc(100vw - 240px);
}
.admin-header {
  margin-bottom: 32px;
  display: flex; align-items: center; justify-content: space-between;
}
.admin-header h1 { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; }

.admin-card {
  background: var(--bg2);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.admin-stats {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px; margin-bottom: 32px;
}
.stat-card {
  background: var(--bg2); border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius); padding: 22px;
}
.stat-card .stat-number {
  font-size: 2.2rem; font-weight: 800;
  color: var(--blue); line-height: 1;
  margin-bottom: 6px; font-family: var(--mono);
}
.stat-card .stat-label {
  font-size: 0.78rem; color: var(--text2);
  text-transform: uppercase; letter-spacing: 0.1em;
}

/* Admin table */
.admin-table {
  width: 100%; border-collapse: collapse; font-size: 0.88rem;
}
.admin-table th {
  text-align: left; padding: 9px 14px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--text3);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.admin-table td {
  padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text2); vertical-align: middle;
}
.admin-table tr:hover td { background: rgba(255,255,255,0.018); }
.admin-table .post-title { color: var(--text); font-weight: 600; }
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 100px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.badge-pub   { background: rgba(129,140,248,0.12); color: var(--blue); }
.badge-draft { background: rgba(255,255,255,0.05); color: var(--text3); }
.badge-me    { background: rgba(74,222,128,0.12); color: #4ADE80; }
.table-actions { display: flex; gap: 8px; }
.table-actions a {
  padding: 4px 10px; border-radius: 6px; font-size: 11px;
  border: 1px solid rgba(255,255,255,0.08); color: var(--text2);
  transition: all var(--t);
}
.table-actions a:hover { border-color: var(--border); color: var(--blue); }
.table-actions .del { border-color: rgba(248,113,113,0.2); color: rgba(248,113,113,0.6); }
.table-actions .del:hover { border-color: rgba(248,113,113,0.5); color: rgb(248,113,113); }

/* Visitor log */
.visitor-row-me td { background: rgba(74,222,128,0.03) !important; }
.visitor-row-me .post-title { color: #4ADE80 !important; }
.note-input {
  background: transparent; border: none; outline: none;
  color: var(--text2); font-size: 0.82rem; width: 100%;
  font-family: var(--font);
}
.note-input:focus { color: var(--text); }
.flag { font-size: 1rem; line-height: 1; }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block; font-size: 11px; font-weight: 600;
  color: var(--text3); text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: 7px;
}
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 11px 14px;
  background: var(--bg3); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; color: var(--text);
  font-size: 0.93rem; font-family: var(--font);
  transition: border-color var(--t), box-shadow var(--t);
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(129,140,248,0.1);
}
.form-textarea { resize: vertical; min-height: 90px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.form-check input { width: 16px; height: 16px; accent-color: var(--blue); cursor: pointer; }
.form-hint { font-size: 0.78rem; color: var(--text3); margin-top: 6px; line-height: 1.5; }

/* Quill editor skin */
.ql-toolbar.ql-snow {
  background: var(--bg3) !important;
  border-color: rgba(255,255,255,0.08) !important;
  border-radius: 8px 8px 0 0 !important;
}
.ql-container.ql-snow {
  background: var(--bg3) !important;
  border-color: rgba(255,255,255,0.08) !important;
  border-radius: 0 0 8px 8px !important;
  color: var(--text) !important;
  font-family: var(--font) !important;
  font-size: 1rem !important;
  min-height: 420px;
}
.ql-editor { min-height: 380px; color: var(--text); line-height: 1.8; }
.ql-snow .ql-stroke { stroke: var(--text2) !important; }
.ql-snow .ql-fill { fill: var(--text2) !important; }
.ql-snow .ql-picker { color: var(--text2) !important; }

/* Login page */
.login-wrapper {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
}
.login-box {
  width: 100%; max-width: 380px;
  background: var(--bg2); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px; padding: 44px;
}
.login-box h1 { font-size: 1.7rem; font-weight: 800; margin-bottom: 8px; }
.login-box .login-sub { color: var(--text2); font-size: 0.88rem; margin-bottom: 32px; }
.login-box .logo-ni { color: rgba(241,245,249,0.28); }
.login-box .logo-em { color: var(--blue); }
.alert {
  padding: 11px 14px; border-radius: 8px; margin-bottom: 18px; font-size: 0.88rem;
}
.alert-error { background: rgba(248,113,113,0.08); border: 1px solid rgba(248,113,113,0.25); color: #F87171; }

/* === Blog full list page =============================================== */
.blog-list { display: flex; flex-direction: column; gap: 0; }
.blog-list-item {
  display: flex; align-items: center; gap: 28px;
  padding: 24px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: all 0.35s var(--ease);
  cursor: pointer;
  position: relative;
}
.blog-list-item::before {
  content: '';
  position: absolute;
  left: -24px;
  width: 0;
  height: 1px;
  background: var(--blue);
  transition: width 0.35s var(--ease);
}
.blog-list-item:hover { 
  padding-left: 8px;
}
.blog-list-item:hover::before {
  width: 16px;
}
.blog-list-date {
  font-family: var(--mono); font-size: 10px;
  color: var(--text3); white-space: nowrap;
  text-transform: uppercase; letter-spacing: 0.1em;
  min-width: 80px;
}
.blog-list-content { flex: 1; }
.blog-list-content h2 { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 5px; }
.blog-list-content p { font-size: 0.88rem; color: var(--text2); }
.blog-list-arrow { 
  color: var(--blue); 
  font-size: 1.1rem; 
  transition: transform 0.35s var(--ease);
}
.blog-list-item:hover .blog-list-arrow { 
  transform: translateX(6px);
}

/* Single post */
.post-hero { padding: 140px 0 60px; background: var(--bg2); }
.post-hero .post-date {
  font-family: var(--mono); font-size: 10px; color: var(--blue);
  letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 18px;
}
.post-hero h1 {
  font-size: clamp(28px, 4.5vw, 56px); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.1; color: var(--text);
  max-width: 800px;
}
.post-body { padding: 72px 0 100px; background: var(--bg); }
.post-content {
  max-width: 700px;
  font-size: 1.04rem; line-height: 1.85; color: var(--text2);
}
.post-content h2 { color: var(--text); font-size: 1.5rem; font-weight: 700; margin: 44px 0 14px; }
.post-content h3 { color: var(--text); font-size: 1.15rem; font-weight: 600; margin: 32px 0 10px; }
.post-content p { margin-bottom: 18px; }
.post-content a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.post-content ul, .post-content ol { margin: 14px 0 18px 24px; }
.post-content li { margin-bottom: 7px; }
.post-content blockquote {
  border-left: 2px solid var(--blue); padding-left: 22px; margin: 24px 0;
  color: var(--text2); font-style: italic;
}
.post-content pre {
  background: var(--bg2); border: 1px solid rgba(255,255,255,0.07); border-radius: 8px;
  padding: 18px; overflow-x: auto; margin: 22px 0; font-family: var(--mono); font-size: 0.86rem;
}
.post-content code {
  background: rgba(129,140,248,0.1); border-radius: 4px;
  padding: 2px 5px; font-family: var(--mono); font-size: 0.87em; color: var(--blue);
}
.post-content pre code { background: none; padding: 0; color: var(--text); }
.post-content img { border-radius: 10px; margin: 24px 0; }

/* Pagination */
.pagination { display: flex; gap: 8px; margin-top: 44px; flex-wrap: wrap; }
.page-btn {
  padding: 7px 14px; border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; color: var(--text2); font-size: 0.88rem; transition: all var(--t);
}
.page-btn:hover, .page-btn.active { border-color: var(--blue); color: var(--blue); background: rgba(129,140,248,0.07); }

/* === KEYFRAMES ========================================================= */
@keyframes blink     { 50% { opacity: 0; } }
@keyframes dotPulse  { 50% { box-shadow: 0 0 12px rgba(74,222,128,0.7), 0 0 24px rgba(74,222,128,0.3); } }
@keyframes scrollDrop {
  0%   { opacity: 0; transform: scaleY(0); transform-origin: top; }
  50%  { opacity: 1; transform: scaleY(1); }
  100% { opacity: 0; transform: scaleY(1); }
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: none; } }
@keyframes glow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(129,140,248,0.3)); }
  50% { filter: drop-shadow(0 0 20px rgba(129,140,248,0.6)); }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to { opacity: 1; transform: translateX(0); }
}

/* === RESPONSIVE ======================================================== */
@media (max-width: 900px) {
  nav { padding: 14px 20px; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .container { padding: 0 20px; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .photo-frame { width: 180px; height: 180px; }
  .admin-sidebar { display: none; }
  .admin-main { margin-left: 0; max-width: 100vw; padding: 20px; }
  .form-row { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 10px; text-align: center; }
  .timeline-header { padding: 60px 20px 0; }
  .timeline-track { padding: 20px; }
  .timeline-track::before { left: 20px; right: 20px; }
}
@media (max-width: 600px) {
  .section-about, .section-blog, .section-contact { padding: 72px 0; }
  .blog-grid { grid-template-columns: 1fr; }
  .contact-links { flex-direction: column; align-items: stretch; max-width: 340px; margin: 0 auto; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .timeline-item { width: 260px; }
}

/* ================================================================
   SCROLL PROGRESS BAR
   ================================================================ */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue-dim), var(--blue));
  transform-origin: left;
  transform: scaleX(0);
  z-index: 9999;
  pointer-events: none;
}

/* ================================================================
   HERO ENHANCEMENTS — orbs + spotlight
   ================================================================ */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}
.hero-orb-1 {
  width: 700px; height: 700px;
  top: -20%; left: -15%;
  background: radial-gradient(circle, rgba(99,102,241,0.18) 0%, transparent 70%);
  animation: orbDrift1 22s ease-in-out infinite alternate;
}
.hero-orb-2 {
  width: 500px; height: 500px;
  bottom: -10%; right: -5%;
  background: radial-gradient(circle, rgba(139,92,246,0.12) 0%, transparent 70%);
  animation: orbDrift2 18s ease-in-out infinite alternate;
}
.hero-orb-3 {
  width: 350px; height: 350px;
  top: 40%; left: 55%;
  background: radial-gradient(circle, rgba(59,130,246,0.08) 0%, transparent 70%);
  animation: orbDrift1 28s ease-in-out infinite alternate-reverse;
}
.section-hero:hover .hero-orb-1 { animation-play-state: paused; }
.section-hero:hover .hero-orb-2 { animation-play-state: paused; }
.section-hero:hover .hero-orb-3 { animation-play-state: paused; }
@keyframes orbDrift1 {
  0%   { transform: translate(0, 0) scale(1); opacity: 0.4; }
  50%  { opacity: 0.6; }
  100% { transform: translate(80px, 50px) scale(1.12); opacity: 0.4; }
}
@keyframes orbDrift2 {
  0%   { transform: translate(0, 0) scale(1); opacity: 0.3; }
  50%  { opacity: 0.5; }
  100% { transform: translate(-60px, -40px) scale(1.08); opacity: 0.3; }
}

.hero-spotlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.4s;
  background: radial-gradient(circle 500px at 50% 50%, rgba(129,140,248,0.07) 0%, transparent 70%);
}
.section-hero:hover .hero-spotlight { opacity: 1; }

/* ================================================================
   BLOG CARD — 3D TILT SUPPORT
   ================================================================ */
.blog-card {
  transform-style: preserve-3d;
  will-change: transform;
}
.blog-card-inner-highlight {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(129,140,248,0.1) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.blog-card:hover .blog-card-inner-highlight { opacity: 1; }

/* ================================================================
   SOCIAL ICON LINKS
   ================================================================ */
.contact-links { align-items: center; }
.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
}
.contact-link svg {
  width: 18px; height: 18px;
  flex-shrink: 0;
  transition: transform var(--t);
}
.contact-link:hover svg { transform: scale(1.15); }

/* ================================================================
   NAV ACTIVE STATE (current section)
   ================================================================ */
.nav-links a.active-section {
  color: var(--blue);
}
.nav-links a.active-section::after { transform: scaleX(1); }

/* ================================================================
   ABOUT PHOTO — parallax wrapper
   ================================================================ */
.photo-parallax { will-change: transform; }

/* ================================================================
   SECTION TAG — char-by-char reveal
   ================================================================ */
.section-tag .char {
  display: inline-block;
  will-change: transform, opacity;
}

/* ================================================================
   CLIP PATH for reveals
   ================================================================ */
.clip-reveal { overflow: hidden; }

/* ================================================================
   MAGNETIC WRAPPER (for js magnetic effect)
   ================================================================ */
.magnetic { display: inline-block; position: relative; }

/* ================================================================
   SCRAMBLE CHARS
   ================================================================ */
.scramble-char { display: inline-block; }

/* ================================================================
   TOGGLE SWITCH (admin settings)
   ================================================================ */
.toggle-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.toggle-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}
.toggle-track {
  display: inline-block;
  width: 42px; height: 24px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  transition: background 0.2s, border-color 0.2s;
  position: relative;
  flex-shrink: 0;
}
.toggle-track::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: rgba(255,255,255,0.35);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}
.toggle-label input:checked ~ .toggle-track {
  background: rgba(99,102,241,0.35);
  border-color: var(--blue);
}
.toggle-label input:checked ~ .toggle-track::after {
  transform: translateX(18px);
  background: var(--blue);
}

/* ================================================================
   PHOTO UPLOAD PREVIEW
   ================================================================ */
.photo-preview {
  width: 100px; height: 100px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 12px;
  display: block;
}

/* ================================================================
   LIGHT THEME ADDITIONS
   ================================================================ */
[data-theme="light"] .hero-orb-1 {
  background: radial-gradient(circle, rgba(79,70,229,0.1) 0%, transparent 70%);
}
[data-theme="light"] .hero-orb-2 {
  background: radial-gradient(circle, rgba(109,40,217,0.07) 0%, transparent 70%);
}


/* ── Daily AI Reflection ─────────────────────────────────────── */
@keyframes aiFadeIn {
    from { opacity: 0; transform: translateY(32px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes aiRotateBorder {
    0%   { --angle: 0deg; }
    100% { --angle: 360deg; }
}
@keyframes shimmerMove {
    0%   { transform: translateX(-120%) skewX(-15deg); }
    100% { transform: translateX(280%) skewX(-15deg); }
}
@keyframes auroraFloat {
    0%, 100% { transform: translateY(0) scale(1);   opacity: 0.18; }
    50%       { transform: translateY(-8px) scale(1.04); opacity: 0.28; }
}
@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.daily-ai {
    position: relative;
    max-width: 680px;
    margin: 52px auto 56px;
    border-radius: 22px;
    padding: 2px;
    background: conic-gradient(
        from var(--angle),
        #6366f1 0%,
        #818cf8 15%,
        #a5b4fc 30%,
        #c084fc 45%,
        #818cf8 60%,
        #6366f1 75%,
        #4f46e5 90%,
        #6366f1 100%
    );
    animation:
        aiFadeIn 1.1s cubic-bezier(0.22,1,0.36,1) both,
        aiRotateBorder 5s linear 1.2s infinite;
    overflow: hidden;
    box-shadow:
        0 0 28px -6px rgba(99,102,241,0.45),
        0 0 60px -20px rgba(129,140,248,0.25),
        0 20px 60px -20px rgba(0,0,0,0.6);
}

.daily-ai-inner {
    background: #0d0d12;
    border-radius: 20px;
    padding: 34px 38px 30px;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* Aurora glow blobs inside card */
.daily-ai-inner::before,
.daily-ai-inner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(48px);
    pointer-events: none;
    animation: auroraFloat 6s ease-in-out infinite;
}
.daily-ai-inner::before {
    width: 220px; height: 160px;
    background: rgba(99,102,241,0.22);
    top: -40px; left: -40px;
    animation-delay: 0s;
}
.daily-ai-inner::after {
    width: 180px; height: 140px;
    background: rgba(192,132,252,0.15);
    bottom: -30px; right: -30px;
    animation-delay: 3s;
}

/* Shimmer sweep */
.daily-ai-shimmer {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    border-radius: 22px;
    overflow: hidden;
}
.daily-ai-shimmer::after {
    content: '';
    position: absolute;
    top: -60%;
    left: 0;
    width: 40%;
    height: 220%;
    background: linear-gradient(105deg,
        transparent 20%,
        rgba(255,255,255,0.06) 50%,
        transparent 80%);
    animation: shimmerMove 5s ease-in-out 2s infinite;
}

/* "DAILY REFLECTION" micro-label */
.daily-ai-label {
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(129,140,248,0.5);
    text-align: center;
    margin: 0 0 12px;
    position: relative;
    z-index: 2;
}

/* Main title */
.daily-ai-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 14px;
    text-align: center;
    line-height: 1.2;
    position: relative;
    z-index: 2;
    text-shadow: 0 0 24px rgba(129,140,248,0.4);
}

/* Day description */
.daily-ai-desc {
    font-size: 0.875rem;
    line-height: 1.65;
    color: rgba(241,245,249,0.5);
    text-align: center;
    max-width: 500px;
    margin: 0 auto 20px;
    position: relative;
    z-index: 2;
}

/* Divider */
.daily-ai-desc + .ai-content {
    border-top: 1px solid rgba(129,140,248,0.14);
    padding-top: 20px;
    margin-top: 0;
}

/* The poem */
.ai-content {
    font-size: 1.02rem;
    line-height: 1.9;
    color: rgba(241,245,249,0.82);
    text-align: center;
    font-style: italic;
    position: relative;
    z-index: 2;
    font-weight: 300;
}

@media (max-width: 600px) {
    .daily-ai { margin: 36px 12px 40px; }
    .daily-ai-inner  { padding: 26px 20px 22px; }
    .daily-ai-title  { font-size: 1.25rem; }
    .ai-content      { font-size: 0.95rem; }
    .daily-ai-desc   { font-size: 0.82rem; }
}