/* ============================================================
   DESIGN SYSTEM — Personal Site
   Light & clean with subtle gradients, glassmorphism,
   Inter + Outfit typography, dark-mode toggle support
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@500;600;700;800&display=swap');

/* ---------- Custom Properties ---------- */
:root {
  /* palette */
  --color-bg:           #f8f9fc;
  --color-bg-alt:       #ffffff;
  --color-surface:      rgba(255, 255, 255, 0.72);
  --color-surface-solid:#ffffff;
  --color-text:         #1e293b;
  --color-text-muted:   #64748b;
  --color-heading:      #0f172a;
  --color-primary:      #6366f1;
  --color-primary-light:#a5b4fc;
  --color-primary-dark: #4338ca;
  --color-accent:       #8b5cf6;
  --color-accent-light: #c4b5fd;
  --color-border:       rgba(148, 163, 184, 0.22);
  --color-shadow:       rgba(100, 116, 139, 0.10);
  --color-code-bg:      #f1f5f9;
  --color-tag-bg:       #ede9fe;
  --color-tag-text:     #6d28d9;

  /* gradient */
  --gradient-hero:      linear-gradient(135deg, #e0e7ff 0%, #f5f3ff 40%, #fdf4ff 100%);
  --gradient-accent:    linear-gradient(135deg, #6366f1, #8b5cf6, #a78bfa);
  --gradient-card:      linear-gradient(145deg, rgba(255,255,255,0.8), rgba(248,250,255,0.5));

  /* typography */
  --font-body:   'Inter', system-ui, -apple-system, sans-serif;
  --font-heading:'Outfit', system-ui, -apple-system, sans-serif;
  --fs-xs:   0.75rem;
  --fs-sm:   0.875rem;
  --fs-base: 1rem;
  --fs-md:   1.125rem;
  --fs-lg:   1.25rem;
  --fs-xl:   1.5rem;
  --fs-2xl:  2rem;
  --fs-3xl:  2.5rem;
  --fs-4xl:  3.25rem;
  --fs-5xl:  4rem;

  /* spacing */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;

  /* radii & shadows */
  --radius-sm:  0.5rem;
  --radius-md:  0.75rem;
  --radius-lg:  1rem;
  --radius-xl:  1.5rem;
  --shadow-sm:  0 1px 3px var(--color-shadow);
  --shadow-md:  0 4px 16px var(--color-shadow);
  --shadow-lg:  0 8px 32px var(--color-shadow);
  --shadow-glass: 0 8px 32px rgba(99, 102, 241, 0.08);

  /* transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 300ms;

  /* layout */
  --max-width: 1120px;
  --nav-height: 72px;
}

/* ---------- Dark Mode ---------- */
[data-theme="dark"] {
  --color-bg:           #0f172a;
  --color-bg-alt:       #1e293b;
  --color-surface:      rgba(30, 41, 59, 0.75);
  --color-surface-solid:#1e293b;
  --color-text:         #e2e8f0;
  --color-text-muted:   #94a3b8;
  --color-heading:      #f1f5f9;
  --color-primary:      #818cf8;
  --color-primary-light:#a5b4fc;
  --color-primary-dark: #6366f1;
  --color-accent:       #a78bfa;
  --color-accent-light: #c4b5fd;
  --color-border:       rgba(148, 163, 184, 0.15);
  --color-shadow:       rgba(0, 0, 0, 0.25);
  --color-code-bg:      #1e293b;
  --color-tag-bg:       rgba(139, 92, 246, 0.15);
  --color-tag-text:     #c4b5fd;

  --gradient-hero:      linear-gradient(135deg, #0f172a 0%, #1e1b4b 40%, #1e1b3a 100%);
  --gradient-accent:    linear-gradient(135deg, #818cf8, #a78bfa, #c4b5fd);
  --gradient-card:      linear-gradient(145deg, rgba(30,41,59,0.8), rgba(15,23,42,0.5));
}

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

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

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--duration) var(--ease),
              color var(--duration) var(--ease);
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}

a:hover {
  color: var(--color-primary-dark);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  line-height: 1.2;
}

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}

.section {
  padding-block: var(--sp-24);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: var(--sp-4);
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--gradient-accent);
  border-radius: 1px;
}

.section-title {
  font-size: var(--fs-3xl);
  font-weight: 700;
  margin-bottom: var(--sp-6);
}

.section-subtitle {
  font-size: var(--fs-md);
  color: var(--color-text-muted);
  max-width: 600px;
  margin-bottom: var(--sp-12);
}

.gradient-text {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Scroll Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

/* stagger children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.reveal-stagger.visible > *:nth-child(1)  { transition-delay: 0s;    }
.reveal-stagger.visible > *:nth-child(2)  { transition-delay: 0.08s; }
.reveal-stagger.visible > *:nth-child(3)  { transition-delay: 0.16s; }
.reveal-stagger.visible > *:nth-child(4)  { transition-delay: 0.24s; }
.reveal-stagger.visible > *:nth-child(5)  { transition-delay: 0.32s; }
.reveal-stagger.visible > *:nth-child(6)  { transition-delay: 0.40s; }
.reveal-stagger.visible > *:nth-child(7)  { transition-delay: 0.48s; }
.reveal-stagger.visible > *:nth-child(8)  { transition-delay: 0.56s; }
.reveal-stagger.visible > *:nth-child(9)  { transition-delay: 0.64s; }
.reveal-stagger.visible > *:nth-child(10) { transition-delay: 0.72s; }

.reveal-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  background: var(--color-surface);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--duration) var(--ease),
              background var(--duration) var(--ease);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: var(--fs-xl);
  color: var(--color-heading);
  letter-spacing: -0.02em;
}

.nav-logo span {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  list-style: none;
}

.nav-links a {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  position: relative;
  padding-bottom: 2px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--gradient-accent);
  border-radius: 1px;
  transition: width var(--duration) var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-heading);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Theme toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: var(--fs-lg);
  transition: color var(--duration) var(--ease),
              background var(--duration) var(--ease),
              border-color var(--duration) var(--ease);
}

.theme-toggle:hover {
  color: var(--color-primary);
  background: var(--color-tag-bg);
  border-color: var(--color-primary-light);
}

/* Mobile nav toggle */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-2);
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--duration) var(--ease),
              opacity var(--duration) var(--ease);
}

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

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

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

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-height);
}

.hero::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, transparent 70%);
  top: -100px;
  right: -150px;
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(139,92,246,0.10) 0%, transparent 70%);
  bottom: -80px;
  left: -100px;
  border-radius: 50%;
  animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(20px, -30px); }
}

.hero .container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--sp-16);
}

.hero-content {
  flex: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  background: var(--color-surface);
  backdrop-filter: blur(8px);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-primary);
  margin-bottom: var(--sp-6);
  animation: fadeInUp 0.8s var(--ease) both;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-size: var(--fs-5xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: var(--sp-6);
  animation: fadeInUp 0.8s var(--ease) 0.1s both;
}

.hero-subtitle {
  font-size: var(--fs-lg);
  color: var(--color-text-muted);
  max-width: 520px;
  margin-bottom: var(--sp-10);
  animation: fadeInUp 0.8s var(--ease) 0.2s both;
}

.hero-actions {
  display: flex;
  gap: var(--sp-4);
  animation: fadeInUp 0.8s var(--ease) 0.3s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* hero avatar */
.hero-visual {
  flex: 0 0 340px;
  display: flex;
  justify-content: center;
  animation: fadeInUp 1s var(--ease) 0.4s both;
}

.avatar-wrapper {
  position: relative;
  width: 300px;
  height: 300px;
}

.avatar-wrapper::before {
  content: '';
  position: absolute;
  inset: -8px;
  background: var(--gradient-accent);
  border-radius: 50%;
  opacity: 0.25;
  filter: blur(20px);
  animation: float 6s ease-in-out infinite;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--color-bg-alt);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
  background: var(--color-surface-solid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  color: var(--color-primary-light);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  transition: transform var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease),
              background var(--duration) var(--ease),
              color var(--duration) var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.4);
  color: #fff;
}

.btn-secondary {
  background: var(--color-surface-solid);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-md);
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-16);
  align-items: center;
}

.about-text p {
  color: var(--color-text-muted);
  font-size: var(--fs-md);
  margin-bottom: var(--sp-6);
}

.about-stats {
  display: flex;
  gap: var(--sp-10);
  margin-top: var(--sp-8);
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--fs-3xl);
  font-weight: 700;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.about-image {
  position: relative;
}

.about-card {
  background: var(--gradient-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--sp-10);
  box-shadow: var(--shadow-glass);
}

.about-card-icon {
  font-size: 48px;
  margin-bottom: var(--sp-4);
}

.about-card h3 {
  font-size: var(--fs-xl);
  margin-bottom: var(--sp-3);
}

.about-card p {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

/* ============================================================
   SKILLS SECTION
   ============================================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-8);
}

.skill-category {
  background: var(--gradient-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--sp-8);
  box-shadow: var(--shadow-glass);
  transition: transform var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
}

.skill-category:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.skill-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--color-tag-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: var(--sp-5);
}

.skill-category h3 {
  font-size: var(--fs-lg);
  margin-bottom: var(--sp-4);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.skill-tag {
  padding: var(--sp-1) var(--sp-3);
  background: var(--color-tag-bg);
  color: var(--color-tag-text);
  font-size: var(--fs-xs);
  font-weight: 600;
  border-radius: 100px;
  transition: transform var(--duration) var(--ease),
              background var(--duration) var(--ease);
}

.skill-tag:hover {
  transform: scale(1.05);
  background: var(--color-primary-light);
  color: #fff;
}

/* ============================================================
   PROJECTS SECTION
   ============================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-8);
}

.project-card {
  background: var(--gradient-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-glass);
  transition: transform var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
}

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

.project-thumbnail {
  height: 200px;
  background: var(--gradient-hero);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  overflow: hidden;
  position: relative;
}

.project-thumbnail::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, var(--color-surface-solid));
  opacity: 0.3;
}

.project-body {
  padding: var(--sp-6);
}

.project-body h3 {
  font-size: var(--fs-xl);
  margin-bottom: var(--sp-3);
}

.project-body p {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-4);
  line-height: 1.6;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
}

.project-links {
  display: flex;
  gap: var(--sp-3);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-primary);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  transition: background var(--duration) var(--ease),
              border-color var(--duration) var(--ease);
}

.project-link:hover {
  background: var(--color-tag-bg);
  border-color: var(--color-primary-light);
}

/* ============================================================
   BLOG PREVIEW SECTION
   ============================================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-8);
  margin-bottom: var(--sp-12);
}

.blog-card {
  background: var(--gradient-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--sp-6);
  box-shadow: var(--shadow-glass);
  transition: transform var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
  display: flex;
  flex-direction: column;
}

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

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--sp-4);
}

.blog-card-meta .tag {
  padding: var(--sp-1) var(--sp-3);
  background: var(--color-tag-bg);
  color: var(--color-tag-text);
  border-radius: 100px;
  font-weight: 600;
}

.blog-card h3 {
  font-size: var(--fs-lg);
  margin-bottom: var(--sp-3);
  line-height: 1.3;
}

.blog-card h3 a {
  color: var(--color-heading);
}

.blog-card h3 a:hover {
  color: var(--color-primary);
}

.blog-card p {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  flex: 1;
  margin-bottom: var(--sp-4);
}

.blog-card .read-more {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
}

.blog-card .read-more:hover {
  gap: var(--sp-2);
}

.blog-more-link {
  text-align: center;
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */
.contact-wrapper {
  text-align: center;
  max-width: 600px;
  margin-inline: auto;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: var(--sp-4);
  margin-top: var(--sp-8);
}

.contact-link {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  background: var(--gradient-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease),
              border-color var(--duration) var(--ease);
}

.contact-link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-light);
  color: var(--color-primary);
}

.contact-link svg {
  width: 20px;
  height: 20px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: var(--sp-8) 0;
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.footer p {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

/* ============================================================
   BLOG PAGE STYLES
   ============================================================ */
.blog-listing {
  padding-top: calc(var(--nav-height) + var(--sp-16));
}

.blog-listing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-8);
}

/* ---------- Blog Post Article ---------- */
.post-page {
  padding-top: calc(var(--nav-height) + var(--sp-16));
  padding-bottom: var(--sp-24);
}

.post-header {
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: var(--sp-12);
  text-align: center;
}

.post-header .back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--sp-8);
}

.post-header .back-link:hover {
  color: var(--color-primary);
}

.post-header h1 {
  font-size: var(--fs-4xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-4);
}

.post-meta {
  display: flex;
  justify-content: center;
  gap: var(--sp-4);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.post-meta .tag {
  padding: var(--sp-1) var(--sp-3);
  background: var(--color-tag-bg);
  color: var(--color-tag-text);
  border-radius: 100px;
  font-weight: 600;
  font-size: var(--fs-xs);
}

/* Prose styles for blog content */
.post-content {
  max-width: 720px;
  margin-inline: auto;
  font-size: var(--fs-md);
  line-height: 1.8;
}

.post-content h2 {
  font-size: var(--fs-2xl);
  margin-top: var(--sp-12);
  margin-bottom: var(--sp-4);
}

.post-content h3 {
  font-size: var(--fs-xl);
  margin-top: var(--sp-8);
  margin-bottom: var(--sp-3);
}

.post-content p {
  margin-bottom: var(--sp-6);
  color: var(--color-text);
}

.post-content ul,
.post-content ol {
  margin-bottom: var(--sp-6);
  padding-left: var(--sp-6);
}

.post-content li {
  margin-bottom: var(--sp-2);
}

.post-content blockquote {
  margin: var(--sp-8) 0;
  padding: var(--sp-4) var(--sp-6);
  border-left: 4px solid var(--color-primary);
  background: var(--color-code-bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--color-text-muted);
}

.post-content pre {
  margin: var(--sp-6) 0;
  padding: var(--sp-6);
  background: var(--color-code-bg);
  border-radius: var(--radius-md);
  overflow-x: auto;
  border: 1px solid var(--color-border);
  font-size: var(--fs-sm);
  line-height: 1.6;
}

.post-content code {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.9em;
}

.post-content :not(pre) > code {
  padding: 2px 6px;
  background: var(--color-code-bg);
  border-radius: 4px;
  color: var(--color-primary-dark);
}

.post-content img {
  border-radius: var(--radius-md);
  margin: var(--sp-8) auto;
  box-shadow: var(--shadow-md);
}

.post-content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-color: var(--color-primary-light);
  text-underline-offset: 3px;
}

.post-content a:hover {
  text-decoration-color: var(--color-primary);
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--sp-10) 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .hero-title { font-size: var(--fs-4xl); }
  .hero-visual { flex: 0 0 260px; }
  .avatar-wrapper { width: 240px; height: 240px; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --nav-height: 64px; }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg);
    flex-direction: column;
    justify-content: center;
    gap: var(--sp-8);
    transform: translateX(100%);
    transition: transform var(--duration) var(--ease);
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: var(--fs-xl);
  }

  .nav-hamburger { display: flex; }

  /* hero */
  .hero .container {
    flex-direction: column-reverse;
    text-align: center;
    padding-top: var(--sp-8);
  }

  .hero-title  { font-size: var(--fs-3xl); }
  .hero-subtitle { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual { flex: 0 0 auto; }
  .avatar-wrapper { width: 200px; height: 200px; }

  /* about */
  .about-grid { grid-template-columns: 1fr; gap: var(--sp-10); }
  .about-stats { justify-content: center; }

  /* skills */
  .skills-grid { grid-template-columns: 1fr; }

  /* projects */
  .projects-grid { grid-template-columns: 1fr; }

  /* blog */
  .blog-grid { grid-template-columns: 1fr; }
  .blog-listing-grid { grid-template-columns: 1fr; }

  /* contact */
  .contact-links { flex-wrap: wrap; justify-content: center; }

  /* post */
  .post-header h1 { font-size: var(--fs-2xl); }
}

@media (max-width: 480px) {
  .hero-title  { font-size: var(--fs-2xl); }
  .section { padding-block: var(--sp-16); }
  .section-title { font-size: var(--fs-2xl); }
  .hero-actions { flex-direction: column; align-items: center; }
}
