/* ============================================
   Minilux Portfolio — Style System v2
   CERN Control Room × Deep Space
   ============================================ */

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

:root {
  --bg-deep:       #000000;
  --bg-surface:    #0a0a0a;
  --bg-elevated:   #141414;
  --bg-nav-mobile: rgba(0, 0, 0, 0.97);
  --text-primary:  #ffffff;
  --text-muted:    #6b6b6b;
  --accent:        #c0c0c0;
  --accent-hover:  #ffffff;
  --accent-glow:   rgba(192, 192, 192, 0.1);
  --teal:          #888888;
  --teal-glow:     rgba(136, 136, 136, 0.1);
  --border:        rgba(255, 255, 255, 0.08);
  --border-hover:  rgba(255, 255, 255, 0.2);
  --border-accent: rgba(192, 192, 192, 0.15);
  --font-display:  'Oxanium', sans-serif;
  --font-body:     'Inter', sans-serif;
  --font-mono:     'JetBrains Mono', monospace;
  --nav-h:         3.5rem;
}

html, body {
  overflow-x: hidden;
  width: 100%;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  cursor: none;
}

@media (pointer: coarse) {
  body { cursor: auto; }
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--accent-hover); }

strong { font-weight: 500; }
em { font-style: normal; color: var(--accent); }

::selection {
  background: var(--accent);
  color: var(--bg-deep);
}

.container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Screen-reader only — visible to crawlers + a11y */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ============================================
   Custom Cursor — Canvas Overlay
   ============================================ */
#cursor-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

@media (pointer: coarse) {
  #cursor-canvas { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  #cursor-canvas { display: none; }
  body, body * { cursor: auto !important; }
}


/* ============================================
   Navigation — Frosted Glass
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: rgba(6, 10, 20, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.4s, backdrop-filter 0.4s, box-shadow 0.4s;
}
.nav.scrolled {
  background: rgba(6, 10, 20, 0.85);
  box-shadow: 0 1px 40px rgba(0, 0, 0, 0.4);
}

.nav__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  letter-spacing: 0.05em;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--accent);
  border-radius: 0.375rem;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.nav__logo:hover {
  background: var(--accent);
  color: var(--bg-deep);
  box-shadow: 0 0 16px var(--accent-glow);
}

.nav__links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}

.nav__link {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0.08em;
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.2s;
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav__link:hover,
.nav__link.active {
  color: var(--text-primary);
}
.nav__link.active::after,
.nav__link:hover::after {
  width: 100%;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
}
.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav__toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav__toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav__toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


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

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.85;
  transition: transform 0.15s ease-out;
}

.hero__particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.5;
  transition: transform 0.15s ease-out;
}

/* Dot grid background */
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 30%, transparent 100%);
  transition: transform 0.15s ease-out;
}

.hero__aurora-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease-out;
}

/* Aurora blob behind text */
.hero__aurora {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  z-index: 1;
  background:
    radial-gradient(ellipse 60% 50% at 40% 45%, rgba(192, 192, 192, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 60% 55%, rgba(136, 136, 136, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 50% 50%, rgba(192, 192, 192, 0.06) 0%, transparent 60%);
  filter: blur(60px);
  pointer-events: none;
  animation: auroraPulse 8s ease-in-out infinite alternate;
}

@keyframes auroraPulse {
  0%   { opacity: 0.7; transform: translate(-50%, -50%) scale(1); }
  50%  { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
  100% { opacity: 0.8; transform: translate(-50%, -50%) scale(0.95); }
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 1.5rem;
  transition: transform 0.15s ease-out;
}

.hero__greeting {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

/* Glitch effect on hero name */
.hero__name {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 8rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary) 40%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.hero__name::before,
.hero__name::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--text-primary) 40%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  pointer-events: none;
}

.hero__name::before {
  animation: glitch1 8s infinite;
}
.hero__name::after {
  animation: glitch2 8s infinite;
}

@keyframes glitch1 {
  0%, 92%, 94%, 96%, 100% { opacity: 0; transform: translate(0); }
  93% { opacity: 0.8; transform: translate(-3px, -1px); clip-path: inset(20% 0 60% 0); }
  95% { opacity: 0.6; transform: translate(2px, 1px); clip-path: inset(50% 0 10% 0); }
}

@keyframes glitch2 {
  0%, 91%, 93.5%, 95.5%, 100% { opacity: 0; transform: translate(0); }
  92% { opacity: 0.5; transform: translate(3px, 1px); clip-path: inset(40% 0 30% 0); }
  94.5% { opacity: 0.7; transform: translate(-2px, -1px); clip-path: inset(10% 0 70% 0); }
}

.hero__subtitle {
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 2.5rem;
}

.hero__cta {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  padding: 0.75rem 2rem;
  border: 1.5px solid var(--accent);
  border-radius: 0.25rem;
  color: var(--accent);
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}
.hero__cta:hover {
  background: var(--accent);
  color: var(--bg-deep);
  box-shadow: 0 0 30px rgba(192, 192, 192, 0.3), 0 0 60px rgba(192, 192, 192, 0.1);
}

.hero__scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.hero__scroll-hint span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.hero__scroll-line {
  width: 1px;
  height: 2.5rem;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}


/* Typing cursor blink */
.hero__subtitle .typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 0.8s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* CTA shimmer */
.hero__cta::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  animation: ctaShimmer 3s ease-in-out infinite;
}
@keyframes ctaShimmer {
  0%   { left: -100%; }
  40%  { left: 150%; }
  100% { left: 150%; }
}


/* ============================================
   Section Common — Scroll Reveal
   ============================================ */
.section {
  padding: 6rem 0;
}
.section--alt {
  background: var(--bg-surface);
}

/* Entrance animation */
.section__inner {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.section__inner.visible {
  opacity: 1;
  transform: translateY(0);
}

.section__title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
}
.section__title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--teal));
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}
.section__title.animated::after {
  width: 2.5rem;
}


/* ============================================
   About
   ============================================ */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about__text p {
  margin-bottom: 1.25rem;
  color: var(--accent);
  font-size: 1.025rem;
  word-break: break-word;
  overflow-wrap: break-word;
}
.about__text p:last-child {
  margin-bottom: 0;
}

/* 3D Atom diagram */
.about__diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 400px;
  height: 400px;
  justify-self: center;
}

#atom-canvas {
  width: 400px;
  height: 400px;
  cursor: grab;
  filter: drop-shadow(0 0 12px rgba(192, 192, 192, 0.3));
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
#atom-canvas:active {
  cursor: grabbing;
}
#atom-canvas.reveal {
  opacity: 1;
  transform: scale(1);
}

.atom-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.atom-label {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.08em;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  opacity: 0.8;
  transition: opacity 0.15s ease-out;
  pointer-events: none;
  user-select: none;
  background: none;
  border: none;
  padding: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.15);
}

.atom-label .label-short {
  display: none;
}
.atom-label .label-full {
  display: inline;
}

@media (max-width: 768px) {
  .atom-label .label-full {
    display: none;
  }
  .atom-label .label-short {
    display: inline;
  }
}

/* Nucleus center label */
.atom-label--nucleus {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.08em;
  opacity: 0.9;
  text-shadow: 0 0 16px rgba(192, 192, 192, 0.5), 0 0 32px rgba(192, 192, 192, 0.2);
  z-index: 2;
}


/* ============================================
   Projects — Glassmorphism Cards
   ============================================ */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: 1.5rem;
}

.card {
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-accent);
  border-radius: 0.625rem;
  padding: 2rem;
  transition: border-color 0.35s, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s, background 0.35s;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  z-index: 0;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(192, 192, 192, 0.03) 0%, transparent 50%);
  pointer-events: none;
}
/* Animated gradient border on hover */
.card::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: calc(0.625rem + 2px);
  background: linear-gradient(90deg, #c0c0c0, #888888, #c0c0c0);
  background-size: 200% 100%;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s;
  animation: cardBorderSlide 2s linear infinite;
}
.card:hover::after {
  opacity: 1;
}
@keyframes cardBorderSlide {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.card:hover {
  border-color: rgba(192, 192, 192, 0.35);
  transform: translateY(-6px);
  box-shadow: 0 0 30px rgba(192, 192, 192, 0.15), 0 20px 60px rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.04);
}

/* Blog Card Visual Enhancements */
.blog-card__header {
  height: 40px;
  position: relative;
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.015),
    rgba(255, 255, 255, 0.015) 10px,
    rgba(255, 255, 255, 0.035) 10px,
    rgba(255, 255, 255, 0.035) 20px
  );
  border-bottom: 1px solid var(--border);
  margin: -1.5rem -1.5rem 1.5rem -1.5rem;
  border-top-left-radius: 0.625rem;
  border-top-right-radius: 0.625rem;
  overflow: hidden;
}

.tag--floating {
  position: absolute;
  top: 50%;
  left: 1.5rem;
  transform: translateY(-50%);
  z-index: 2;
}

.blog-card__number {
  position: absolute;
  bottom: 0.5rem;
  right: 1.5rem;
  font-family: var(--font-display);
  font-size: 80px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.04);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: -1;
}

.card--coming-soon {
  opacity: 0.55;
  border-style: dashed;
  border-color: rgba(192, 192, 192, 0.1);
}
.card--coming-soon:hover {
  opacity: 0.75;
  transform: translateY(-3px);
}

.card__icon {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.card__icon svg {
  width: 100%;
  height: 100%;
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.card__desc {
  color: var(--accent);
  font-size: 0.925rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
  flex: 1;
}

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  color: var(--accent);
  letter-spacing: 0.03em;
  transition: border-color 0.2s, color 0.2s;
}
.card:hover .tag {
  border-color: rgba(192, 192, 192, 0.2);
  color: var(--text-primary);
}

.card__link {
  font-family: var(--font-mono);
  font-size: 0.825rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  transition: gap 0.2s;
}
.card__link:hover {
  gap: 0.75rem;
}
.card__link svg {
  width: 16px;
  height: 16px;
}
.card__link--disabled {
  color: var(--accent);
  cursor: default;
}
.card__link--disabled:hover {
  gap: 0.5rem;
}


/* ============================================
   Skills — Glowing Tags + Stagger
   ============================================ */
.skills__groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 2.5rem;
}

.skills__group-title {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.skills__group-count {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.25);
  margin-top: -0.25rem;
  margin-bottom: 1rem;
}

.skills__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.skill-tag {
  font-family: var(--font-mono);
  font-size: 0.825rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(12px);
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s,
              opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.skill-tag.visible {
  opacity: 1;
  transform: translateY(0);
}
.skill-tag:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.1);
}
.skill-tag small {
  color: var(--accent);
  font-size: 0.7rem;
}


/* ============================================
   Timeline / Education
   ============================================ */
.timeline {
  position: relative;
  padding-left: 0;
}

.timeline__item {
  position: relative;
  padding-left: 2rem;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 2.5rem;
  transition: border-color 0.3s;
}
.timeline__item:last-child {
  padding-bottom: 0;
}
.timeline__item:hover {
  border-left-color: rgba(255, 255, 255, 0.6);
}

.timeline__marker {
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 9px;
  height: 9px;
  background: #ffffff;
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 0 3px var(--bg-surface), 0 0 12px rgba(255, 255, 255, 0.4);
}

.timeline__year {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-primary);
  letter-spacing: 0.08em;
  display: inline-block;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  margin-bottom: 0.625rem;
}

.timeline__heading {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.timeline__location {
  font-size: 0.875rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.timeline__desc {
  color: var(--accent);
  font-size: 0.925rem;
  max-width: 40rem;
}


/* ============================================
   Contact Section Redesign
   ============================================ */
.contact {
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 6rem 0;
  text-align: center;
}

[data-theme="light"] .contact {
  background: rgba(0, 0, 0, 0.015);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.contact__title {
  position: relative;
  display: inline-block;
  margin-bottom: 3.5rem;
}

.contact__title::after {
  content: '';
  position: absolute;
  bottom: -1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 3.5rem;
  height: 2px;
  background: var(--text-primary);
  opacity: 0.2;
}

.contact__content {
  margin: 0 auto;
  max-width: 42rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact__text {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 2.5rem;
  text-align: center;
  max-width: 34rem;
}

.contact__links {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.contact__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 0.75rem 1.6rem;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  color: var(--text-primary);
  background: transparent;
  transition: border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
}

[data-theme="light"] .contact__pill {
  border: 1.5px solid rgba(0, 0, 0, 0.15);
}

.contact__pill svg {
  width: 18px;
  height: 18px;
}

.contact__pill:hover {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.08);
  color: var(--accent-hover);
}

[data-theme="light"] .contact__pill:hover {
  border-color: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}


/* ============================================
   Footer
   ============================================ */
.footer {
  padding: 3rem 0;
  border-top: none;
  text-align: center;
  position: relative;
}
/* Animated gradient line at top of footer */
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #c0c0c0, #888888, #c0c0c0, transparent);
  background-size: 200% 100%;
  animation: footerLine 4s linear infinite;
}
@keyframes footerLine {
  0%   { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}

.footer__tagline {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
  background: linear-gradient(90deg, var(--text-primary), var(--accent), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer__copy {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}


/* ============================================
   Scroll to Top Button
   ============================================ */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(192, 192, 192, 0.15);
  border: 1px solid rgba(192, 192, 192, 0.3);
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s, background 0.3s, box-shadow 0.3s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.scroll-top:hover {
  background: rgba(192, 192, 192, 0.3);
  box-shadow: 0 0 20px rgba(192, 192, 192, 0.2);
}
.scroll-top svg {
  width: 18px;
  height: 18px;
}


/* ============================================
   Loading Screen
   ============================================ */
.loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s, visibility 0.6s;
}
.loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader__content {
  text-align: center;
}
.loader__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  animation: loaderPulse 1.5s ease-in-out infinite;
}
@keyframes loaderPulse {
  0%, 100% { opacity: 0.5; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1); }
}
.loader__bar {
  width: 120px;
  height: 2px;
  background: var(--border);
  border-radius: 1px;
  overflow: hidden;
  margin: 0 auto;
}
.loader__bar-fill {
  width: 0;
  height: 100%;
  background: var(--accent);
  border-radius: 1px;
  animation: loaderFill 1.5s ease-out forwards;
}
@keyframes loaderFill {
  0% { width: 0; }
  100% { width: 100%; }
}


/* ============================================
   Nav Controls (Lang + Theme toggles)
   ============================================ */
.nav__controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.nav__btn {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  color: var(--accent);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.nav__btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}
.nav__btn svg {
  width: 14px;
  height: 14px;
}


/* ============================================
   Hero CTA Outline Variant
   ============================================ */
.hero__cta--outline {
  background: transparent;
  margin-left: 0.75rem;
}
.hero__cta--outline:hover {
  background: rgba(192, 192, 192, 0.1);
  color: var(--accent);
}


/* ============================================
   Blog Cards
   ============================================ */
.blog__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1.5rem;
}
.blog-card {
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-accent);
  border-radius: 0.625rem;
  padding: 1.75rem;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  position: relative;
}
.blog-card:hover {
  border-color: rgba(192, 192, 192, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 0 24px rgba(192, 192, 192, 0.1), 0 12px 40px rgba(0, 0, 0, 0.2);
}
.blog-card__date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.08em;
}
.blog-card__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0.5rem 0;
}
.blog-card__desc {
  color: var(--accent);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.blog-card__status {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  opacity: 0.6;
}


/* ============================================
   Light Theme
   ============================================ */
[data-theme="light"] {
  --bg-deep:       #f5f5f5;
  --bg-surface:    #e5e5e5;
  --bg-elevated:   #ffffff;
  --bg-nav-mobile: rgba(245, 245, 245, 0.97);
  --text-primary:  #0a0a0a;
  --text-muted:    #777777;
  --accent:        #1a1a1a;
  --accent-hover:  #000000;
  --accent-glow:   rgba(26, 26, 26, 0.08);
  --teal:          #666666;
  --teal-glow:     rgba(102, 102, 102, 0.08);
  --border:        rgba(0, 0, 0, 0.08);
  --border-hover:  rgba(0, 0, 0, 0.2);
  --border-accent: rgba(26, 26, 26, 0.15);
}
[data-theme="light"] body {
  background: var(--bg-deep);
  color: var(--text-primary);
}
[data-theme="light"] .nav {
  background: rgba(245, 245, 245, 0.85);
}
[data-theme="light"] .nav.scrolled {
  background: rgba(245, 245, 245, 0.95);
  box-shadow: 0 1px 40px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .hero__grid {
  background-image: radial-gradient(circle, rgba(0,0,0,0.04) 1px, transparent 1px);
}
[data-theme="light"] .card,
[data-theme="light"] .blog-card {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(26, 26, 26, 0.12);
}
[data-theme="light"] .card:hover,
[data-theme="light"] .blog-card:hover {
  background: rgba(255, 255, 255, 0.9);
}
[data-theme="light"] .skill-tag {
  background: rgba(255, 255, 255, 0.6);
}
[data-theme="light"] .loader {
  background: var(--bg-deep);
}
[data-theme="light"] .atom-label {
  color: rgba(10, 10, 10, 0.5);
  text-shadow: 0 0 6px rgba(10, 10, 10, 0.15);
}
[data-theme="light"] .blog-card__header {
  background: repeating-linear-gradient(
    45deg,
    rgba(0, 0, 0, 0.015),
    rgba(0, 0, 0, 0.015) 10px,
    rgba(0, 0, 0, 0.03) 10px,
    rgba(0, 0, 0, 0.03) 20px
  );
  border-bottom-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .blog-card__number {
  color: rgba(0, 0, 0, 0.03);
}
[data-theme="light"] .skills__group-count {
  color: rgba(10, 10, 10, 0.25);
}
[data-theme="light"] .skill-tag {
  border-color: rgba(0, 0, 0, 0.15);
}
[data-theme="light"] .skill-tag:hover {
  border-color: rgba(0, 0, 0, 0.5);
  background: rgba(0, 0, 0, 0.03);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .timeline__item {
  border-left-color: rgba(0, 0, 0, 0.15);
}
[data-theme="light"] .timeline__item:hover {
  border-left-color: rgba(0, 0, 0, 0.6);
}
[data-theme="light"] .timeline__marker {
  background: #0a0a0a;
  box-shadow: 0 0 0 3px var(--bg-surface), 0 0 12px rgba(10, 10, 10, 0.2);
}
[data-theme="light"] .timeline__year {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--text-primary);
}


/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .section__inner { opacity: 1; transform: none; }
  .skill-tag { opacity: 1; transform: none; }
  #cursor-canvas { display: none; }
  body, body * { cursor: auto !important; }
  .scroll-top { display: none; }
}


/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .nav__links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--bg-nav-mobile);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 1rem 0;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
    border-bottom: 1px solid var(--border);
  }
  .nav__links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav__links li {
    width: 100%;
    text-align: center;
  }
  .nav__link {
    display: block;
    padding: 0.75rem 1rem;
  }
  .nav__link::after {
    display: none;
  }
  .nav__toggle {
    display: flex;
  }

  .about__grid {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
  }
  .about__diagram {
    margin: 0 auto;
  }
  #atom-canvas {
    max-width: 300px;
    height: 300px;
    margin: 0 auto;
  }

  .hero__aurora {
    width: 300px;
    height: 300px;
  }

  .section {
    padding: 4rem 0;
  }
}

@media (max-width: 480px) {
  .hero__name {
    font-size: 3rem;
  }
  .projects__grid {
    grid-template-columns: 1fr;
  }
  .contact__links {
    flex-direction: column;
  }
}
