:root {
  --accent: #0ea5a5;
  --accent-dim: rgba(14, 165, 165, 0.15);
  --accent-glow: rgba(14, 165, 165, 0.3);
  --bg: #f8fafc;
  --bg-elevated: #ffffff;
  --text: #0f172a;
  --text-secondary: #475569;
  --border: #e2e8f0;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.12);
  --radius: 16px;
  --radius-sm: 8px;
  --radius-full: 9999px;
  --font-sans: "Space Grotesk", sans-serif;
  --font-serif: "Newsreader", serif;
  --nav-blur: 12px;
}

[data-theme="dark"] {
  --accent: #2dd4bf;
  --accent-dim: rgba(45, 212, 191, 0.12);
  --accent-glow: rgba(45, 212, 191, 0.25);
  --bg: #080c18;
  --bg-elevated: #0f172a;
  --text: #e2e8f0;
  --text-secondary: #94a3b8;
  --border: #1e293b;
  --shadow: 0 4px 24px rgba(2, 6, 23, 0.5);
  --shadow-lg: 0 20px 60px rgba(2, 6, 23, 0.7);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-serif);
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  overflow-x: hidden;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  margin: 0 0 12px;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

p { margin: 0 0 16px; }

::selection {
  background: var(--accent-dim);
  color: var(--text);
}

.page {
  position: relative;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
}

.narrow {
  max-width: 900px;
  padding: 0 32px;
}

.section {
  padding: 96px 0;
  position: relative;
}

section.reveal {
  opacity: 1;
  transform: none;
}

.section-heading {
  max-width: 800px;
  margin-bottom: 48px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-lead {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.eyebrow {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}

.meta {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ─── Scroll Progress Bar ─── */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #06b6d4, var(--accent));
  background-size: 200% 100%;
  animation: gradient-shift 4s ease-in-out infinite;
  z-index: 100;
  width: 0%;
  transition: width 0.1s linear;
}

/* ─── Floating Particles ─── */
.particle-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.15;
  animation: particle-float linear infinite;
}

@keyframes particle-float {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% { opacity: 0.15; }
  90% { opacity: 0.15; }
  100% {
    transform: translateY(-10vh) rotate(720deg);
    opacity: 0;
  }
}

/* ─── Wave Divider ─── */
.section-wave-divider {
  position: relative;
}

.section-wave-divider::before {
  content: "";
  position: absolute;
  top: -30px;
  left: 0;
  right: 0;
  height: 30px;
  background: var(--bg-elevated);
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  opacity: 0.4;
  pointer-events: none;
}

/* ─── Section Title Underline Animation ─── */
.section-title::after {
  content: "";
  display: block;
  width: 0;
  height: 3px;
  margin-top: 8px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 2px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.section.is-visible .section-title::after,
.reveal.is-visible .section-title::after {
  width: 80px;
}

/* ─── Card Gradient Border ─── */
.card {
  position: relative;
  background-clip: padding-box;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(
    135deg,
    var(--border),
    var(--accent-dim) 30%,
    var(--border) 60%,
    var(--accent-dim) 100%
  );
  background-size: 200% 200%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card:hover::before {
  opacity: 1;
  animation: gradient-border-shift 3s ease-in-out infinite;
}

@keyframes gradient-border-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ─── Skill Bars ─── */
.skill-group {
  display: grid;
  gap: 20px;
}

.skill-block {
  display: grid;
  gap: 8px;
}

.skill-category {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 2px;
}

.skill-items {
  display: grid;
  gap: 8px;
}

.skill-bar-wrapper {
  display: grid;
  gap: 3px;
}

.skill-bar-label {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
}

.skill-bar-track {
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), #06b6d4);
  width: 0;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-bar-fill.animated {
  /* width is set via inline style, triggered by JS class addition */
}

/* ─── Animated Counters ─── */
.stat-count {
  display: inline-block;
}

.counter-digit {
  display: inline-block;
  transition: transform 0.3s ease;
}

/* ─── Skip link ─── */
.skip-link {
  position: absolute;
  left: -999px;
  top: 10px;
  background: var(--accent);
  color: #080c18;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  z-index: 100;
  font-family: var(--font-sans);
  font-weight: 600;
}
.skip-link:focus { left: 10px; }

/* ─── Header / Nav ─── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(var(--nav-blur));
  -webkit-backdrop-filter: blur(var(--nav-blur));
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 30px rgba(2, 6, 23, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
}

.brand {
  display: grid;
  gap: 2px;
  font-family: var(--font-sans);
}

.brand-name {
  font-weight: 700;
  font-size: 1.1rem;
}

.brand-title {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.site-nav {
  display: flex;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

.site-nav a {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  transition: background 0.2s ease, color 0.2s ease;
  font-weight: 500;
}

.site-nav a:hover {
  background: var(--accent-dim);
  color: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  font-size: 1.1rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
  line-height: 1;
}

.theme-toggle:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 40;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  font-family: var(--font-sans);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu a {
  font-size: 1.5rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius);
  transition: background 0.2s ease;
}

.mobile-menu a:hover {
  background: var(--accent-dim);
}

@media (max-width: 860px) {
  .site-nav {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .mobile-menu {
    display: flex;
  }
}

/* ─── Hero ─── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-bg-grid {
  position: absolute;
  inset: -50%;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.3;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

[data-theme="dark"] .hero-bg-grid {
  opacity: 0.15;
}

.hero-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
  top: -100px;
  right: -100px;
  filter: blur(80px);
}

.hero-glow-2 {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
  bottom: -100px;
  left: -100px;
  filter: blur(60px);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, var(--accent), #06b6d4, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradient-shift 4s ease-in-out infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 540px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:focus-visible,
.theme-toggle:focus-visible,
.site-nav a:focus-visible,
.text-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.button.primary {
  background: var(--accent);
  color: #080c18;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.button.ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.button.ghost:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-highlights span {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
}

.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.hero-image-frame {
  position: relative;
  width: 260px;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: hero-float 6s ease-in-out infinite;
}

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

.hero-image-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  filter: blur(30px);
  animation: hero-glow-pulse 4s ease-in-out infinite;
}

@keyframes hero-glow-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.hero-profile-img {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 2;
  border: 4px solid var(--bg-elevated);
  box-shadow: 0 0 0 2px var(--accent-dim), var(--shadow-lg);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.hero-profile-img:hover {
  transform: scale(1.04);
  box-shadow: 0 0 0 4px var(--accent-dim), var(--shadow-lg);
}

.hero-image-ring {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 2px solid var(--accent-dim);
  z-index: 1;
  animation: hero-ring-spin 12s linear infinite;
}

.hero-image-ring-2 {
  inset: -28px;
  border-color: color-mix(in srgb, var(--accent) 20%, transparent);
  border-style: dashed;
  animation-duration: 20s;
  animation-direction: reverse;
}

@keyframes hero-ring-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-status-dot {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #22c55e;
  border: 3px solid var(--bg-elevated);
  z-index: 3;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.4), 0 0 12px rgba(34, 197, 94, 0.3);
  animation: status-pulse 2s ease-in-out infinite;
}

@keyframes status-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.4), 0 0 12px rgba(34, 197, 94, 0.3); }
  50% { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2), 0 0 20px rgba(34, 197, 94, 0.5); }
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  z-index: 0;
  opacity: 0.5;
}

.hero-orb-1 {
  width: 12px;
  height: 12px;
  background: var(--accent);
  top: 10%;
  right: 5%;
  animation: orb-drift-1 8s ease-in-out infinite;
}

.hero-orb-2 {
  width: 8px;
  height: 8px;
  background: #06b6d4;
  bottom: 15%;
  left: 8%;
  animation: orb-drift-2 10s ease-in-out infinite;
}

.hero-orb-3 {
  width: 6px;
  height: 6px;
  background: var(--accent);
  top: 50%;
  right: -5%;
  animation: orb-drift-3 7s ease-in-out infinite;
}

@keyframes orb-drift-1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(10px, -10px); }
}

@keyframes orb-drift-2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-8px, 8px); }
}

@keyframes orb-drift-3 {
  0%, 100% { transform: translate(0, 0); opacity: 0.5; }
  50% { transform: translate(12px, -8px); opacity: 1; }
}

.hero-image-stats {
  display: flex;
  gap: 12px;
}

.hero-image-stat {
  text-align: center;
  padding: 12px 20px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  min-width: 80px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.hero-image-stat:hover {
  transform: translateY(-2px);
  border-color: var(--accent-dim);
}

.hero-image-stat .stat-value {
  font-family: var(--font-sans);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.hero-image-stat .stat-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.text-link {
  font-family: var(--font-sans);
  color: var(--accent);
  font-weight: 500;
  position: relative;
  transition: color 0.2s ease;
}

.text-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.text-link:hover::after {
  transform: scaleX(1);
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hero-visual {
    order: -1;
  }
  .hero-image-frame {
    width: 200px;
    height: 200px;
  }
  .hero-profile-img {
    width: 170px;
    height: 170px;
  }
  .hero-image-ring {
    inset: -10px;
  }
  .hero-image-ring-2 {
    inset: -22px;
  }
  .hero-image-stats {
    flex-wrap: wrap;
    justify-content: center;
  }
}

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

.about-grid {
  grid-template-columns: 1.2fr 0.8fr;
}

.card {
  border-radius: var(--radius);
  background: var(--bg-elevated);
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  position: relative;
  background-clip: padding-box;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-lg);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-active {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.badge-archived {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-secondary);
}

.badge-experiment {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-row span,
.chips span {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
}

.chip-group {
  display: grid;
  gap: 18px;
}

.card-cta {
  margin-top: 4px;
}

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

/* ─── Achievements Timeline ─── */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 32px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -27px;
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}

.timeline-card {
  border-radius: var(--radius);
  background: var(--bg-elevated);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.timeline-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-lg);
}

.timeline-card h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.timeline-card .meta {
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.timeline-card p {
  margin-bottom: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

@media (max-width: 720px) {
  .timeline {
    padding-left: 24px;
  }
  .timeline-item::before {
    left: -19px;
    width: 12px;
    height: 12px;
  }
}

/* ─── Contact ─── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.contact-info h2 {
  margin-bottom: 16px;
}

.contact-info .section-lead {
  margin-bottom: 24px;
}

.contact-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.social-link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.contact-card {
  border-radius: var(--radius);
  background: var(--bg-elevated);
  padding: 32px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.contact-card h3 {
  margin-bottom: 16px;
}

.contact-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.contact-item:last-child {
  border-bottom: none;
}

.contact-item .label {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.contact-item .value {
  font-family: var(--font-sans);
  font-weight: 500;
  margin-top: 4px;
}

@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ─── Footer ─── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 48px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
}

.footer-socials {
  display: flex;
  gap: 16px;
}

.footer-socials a {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.footer-socials a:hover {
  color: var(--accent);
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ─── Back to top ─── */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 40;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #080c18;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 20px var(--accent-glow);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

/* ─── Reveal Animations ─── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ─── Rich Text ─── */
.rich-text ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

.rich-text li {
  margin-bottom: 6px;
}

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

/* ─── Section CTA ─── */
.section-cta {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}

/* ─── Responsive ─── */
@media (max-width: 720px) {
  .section {
    padding: 64px 0;
  }
  .hero {
    min-height: auto;
    padding: 120px 0 64px;
  }
  .header-inner {
    padding: 14px 0;
  }
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

/* ─── Hero Stagger Entrance ─── */
.hero-stagger {
  opacity: 0;
  transform: translateY(20px);
  animation: hero-stagger-in 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hero-stagger-1 { animation-delay: 0.1s; }
.hero-stagger-2 { animation-delay: 0.25s; }
.hero-stagger-3 { animation-delay: 0.4s; }
.hero-stagger-4 { animation-delay: 0.55s; }
.hero-stagger-5 { animation-delay: 0.65s; }
.hero-stagger-6 { animation-delay: 0.75s; }

@keyframes hero-stagger-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── 3D Tilt ─── */
.tilt-element {
  transition: transform 0.15s ease-out;
  will-change: transform;
}

/* ─── Button Ripple ─── */
.button {
  position: relative;
  overflow: hidden;
}

.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0);
  animation: ripple-anim 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple-anim {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ─── Magnetic Button Wrap ─── */
.magnetic-wrap {
  display: inline-flex;
  transition: transform 0.15s ease-out;
}

/* ─── Editorial Blog ─── */

.blog-header {
  max-width: 680px;
  margin: 0 auto 56px;
  text-align: center;
}

.blog-header-eyebrow {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 8px;
}

.blog-header-title {
  font-family: var(--font-serif);
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.5;
  font-style: italic;
}

.blog-feed {
  max-width: 1200px;
  margin: 0 auto;
}

/* ── Featured Carousel ── */
.featured-carousel {
  position: relative;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
  min-width: 100%;
}

.carousel-btn {
  position: absolute;
  top: 28%;
  transform: translateY(-50%);
  z-index: 2;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: var(--bg-elevated);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  color: var(--text);
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  opacity: 0;
  line-height: 1;
}

.featured-carousel:hover .carousel-btn {
  opacity: 0.7;
}

.carousel-btn:hover {
  opacity: 1 !important;
  background: var(--accent);
  color: #fff;
}

.carousel-prev { left: 4px; }
.carousel-next { right: 4px; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 8px;
}

.carousel-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  padding: 0;
}

.carousel-dot.active {
  background: var(--accent);
  transform: scale(1.3);
}

.blog-featured-img-wrap {
  position: relative;
  width: 100%;
  max-height: 120px;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.blog-featured-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--bg-elevated);
}

.blog-featured-title {
  font-family: var(--font-serif);
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.blog-featured-body {
  font-size: 0.75rem;
  line-height: 1.5;
}

.featured-carousel .blog-entry-meta {
  font-size: 0.65rem;
  margin-bottom: 6px;
}

.featured-carousel .blog-entry-desc {
  font-size: 0.78rem;
  margin-bottom: 6px;
}

/* ── Post Grid ── */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.blog-card {
  display: flex;
  flex-direction: column;
}

.blog-card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 3px 16px rgba(0, 0, 0, 0.07);
}

.blog-card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--bg-elevated);
}

.blog-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.blog-card-meta {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 10px;
}

.blog-card-desc {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 14px;
  font-style: italic;
}

.blog-card-content {
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--text);
}

.blog-card-content p {
  margin-bottom: 14px;
}

/* ── Shared Entry Styles ── */
.blog-entry-meta {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}

.blog-entry-dot {
  opacity: 0.35;
}

.blog-entry-tag {
  font-weight: 500;
  color: var(--accent);
}

.blog-entry-desc {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-style: italic;
}

.blog-entry-body {
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--text);
}

.blog-entry-body p {
  margin-bottom: 18px;
}

.blog-entry-body h2 {
  font-family: var(--font-sans);
  font-size: 1.3rem;
  margin-top: 28px;
  margin-bottom: 12px;
  font-weight: 700;
}

.blog-entry-body h3 {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  margin-top: 24px;
  margin-bottom: 10px;
  font-weight: 600;
}

.blog-entry-body code {
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 0.88em;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent-dim);
  color: var(--accent);
}

.blog-entry-body pre {
  padding: 20px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  overflow-x: auto;
  margin: 20px 0;
  font-size: 0.92rem;
}

.blog-entry-body pre code {
  background: none;
  padding: 0;
  color: var(--text);
}

.blog-entry-body img {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin: 24px 0;
}

.blog-entry-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 24px;
  margin: 24px 0;
  color: var(--text-secondary);
  font-style: italic;
  background: var(--accent-dim);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.blog-entry-body blockquote p {
  margin-bottom: 0;
}

.blog-entry-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}

.blog-entry-body ul,
.blog-entry-body ol {
  padding-left: 22px;
  margin-bottom: 18px;
}

.blog-entry-body li {
  margin-bottom: 6px;
  line-height: 1.7;
}

.blog-empty {
  text-align: center;
  padding: 80px 0;
  color: var(--text-secondary);
  font-style: italic;
}

@media (max-width: 860px) {
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 720px) {
  .blog-featured-img-wrap {
    aspect-ratio: 4 / 3;
    margin-bottom: 20px;
  }
  
  .blog-card-img-wrap {
    aspect-ratio: 4 / 3;
    margin-bottom: 16px;
  }
}

/* ─── Blog Single Article ─── */

.blog-entry-single {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 0;
}

.blog-back {
  display: inline-flex;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  transition: color 0.2s ease;
  font-weight: 500;
}

.blog-back:hover {
  color: var(--accent);
}

/* Share footer */
.blog-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.blog-share {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.blog-share-label {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  font-weight: 600;
}

.blog-share a {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--accent-dim);
  transition: background 0.2s ease, color 0.2s ease;
}

.blog-share a:hover {
  background: var(--accent);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
