:root {
  --bg: #070c16;
  --bg-soft: #111a2b;
  --bg-card: rgba(15, 23, 42, 0.6);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --primary: #3b82f6;
  --accent: #22d3ee;
  --line: rgba(148, 163, 184, 0.15);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Barra de progresso de scroll vertical */
#scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 4px;
  height: 0%;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  z-index: 9999;
  transition: height 0.1s ease-out;
  box-shadow: 2px 0 12px rgba(34, 211, 238, 0.4);
}

@media (max-width: 768px) {
  #scroll-progress-bar {
    width: 3px;
  }
}

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

body {
  font-family: "Inter", sans-serif;
  color: var(--text);
  line-height: 1.6;
  overflow-x: clip;
  max-width: 100vw;
}

body.theme-transitioning,
body.theme-transitioning * {
  transition: background-color 0.4s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  max-width: 100vw;
}

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

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

h1, h2, h3, h4, h5, h6 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.page {
  overflow: visible;
}

.container {
  width: min(1200px, 90%);
  margin: 0 auto;
}

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

.section + .section {
  margin-top: 0;
}

.impact-section {
  margin-top: 60px;
  padding-top: 80px;
  border-top: 1px solid var(--line);
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}

.section-header p {
  color: var(--muted);
  max-width: 720px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
  background: rgba(11, 18, 32, 0.85);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease, border-color 0.3s ease;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-family: "Space Grotesk", sans-serif;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #051123;
}

.site-nav {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color var(--transition);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.site-nav a:hover {
  color: var(--text);
}

.site-nav a:hover::after {
  width: 100%;
}

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

.lang-switcher {
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--transition);
}

.lang-btn.active {
  background: var(--primary);
  color: #081022;
  font-weight: 600;
}

.nav-toggle {
  width: 38px;
  height: 38px;
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  position: relative;
}

.nav-toggle span {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  background: var(--text);
  transition: transform var(--transition);
}

.nav-toggle span:first-child {
  top: 12px;
}

.nav-toggle span:last-child {
  bottom: 12px;
}

.hero {
  padding-top: 120px;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 48px;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 12px;
  position: relative;
  display: inline-block;
  padding: 8px 20px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(34, 211, 238, 0.15));
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  backdrop-filter: blur(10px);
  color: var(--accent);
}

.hero-title {
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hero-role {
  color: var(--accent);
  font-weight: 700;
}

.hero-summary {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 560px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.btn {
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  cursor: pointer;
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #081022;
}

.btn.primary:hover {
  box-shadow: 0 18px 40px rgba(34, 211, 238, 0.35);
  transform: translateY(-2px);
}

.btn.ghost {
  border-color: var(--line);
  color: var(--text);
}

.btn.ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.meta-pill {
  display: flex;
  gap: 8px;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
}

.meta-label {
  color: var(--muted);
}

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

.avatar-frame {
  width: min(320px, 90%);
  aspect-ratio: 1/1;
  border-radius: 36px;
  padding: 12px;
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.4), rgba(34, 211, 238, 0.2));
  box-shadow: var(--shadow);
}

.avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 28px;
  border: 1px solid var(--line);
}

.hero-highlights {
  width: 100%;
  display: grid;
  gap: 14px;
}

.highlight-card {
  background: var(--bg-card);
  padding: 16px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform var(--transition);
}

.highlight-card:hover {
  transform: translateY(-6px);
}

.highlight-label {
  color: var(--muted);
  font-size: 12px;
}

.highlight-value {
  font-weight: 700;
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  align-items: start;
}

.about-panel {
  display: grid;
  gap: 20px;
}

.about-card {
  background: var(--bg-card);
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.about-card.subtle {
  background: linear-gradient(150deg, rgba(34, 211, 238, 0.15), rgba(59, 130, 246, 0.08));
}

.about-list {
  list-style: none;
  display: grid;
  gap: 12px;
  margin-top: 16px;
  color: var(--muted);
}

.about-tag {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 12px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
}

.skills-group {
  display: grid;
  gap: 16px;
}

.skill-card {
  background: var(--bg-card);
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.skill-header {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.skill-level {
  color: var(--accent);
  font-weight: 600;
}

.skill-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  margin-top: 10px;
  overflow: hidden;
}

.skill-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 1.2s ease;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  background: var(--bg-card);
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  display: grid;
  gap: 12px;
  transition: transform var(--transition), border-color var(--transition), background 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.4);
}

.card-header-with-icon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.card-title {
  font-weight: 600;
  margin: 0;
  flex: 1;
  font-family: "Space Grotesk", sans-serif;
}

.github-icon {
  flex-shrink: 0;
  color: var(--muted);
  transition: all 0.3s ease;
  opacity: 0.6;
}

.card:hover .github-icon {
  color: var(--text);
  opacity: 1;
  transform: scale(1.1);
}

.card-meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

.recommendations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

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

.recommendation-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  height: 100%;
}

.recommendation-quote {
  flex: 1;
}

.recommendation-quote p {
  font-style: italic;
  color: var(--muted);
  line-height: 1.7;
}

.recommendation-author {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.recommendation-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(10, 102, 194, 0.3);
  flex-shrink: 0;
}

.author-info {
  flex: 1;
  min-width: 0;
}

.author-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.author-header strong {
  font-size: 1rem;
  color: var(--text);
}

.linkedin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #0a66c2;
  transition: all 0.2s ease;
  opacity: 0.7;
}

.linkedin-link:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.linkedin-link svg {
  width: 18px;
  height: 18px;
}

.slider-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  transition: background var(--transition);
}

.slider-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

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

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

.stat-card {
  background: linear-gradient(160deg, rgba(59, 130, 246, 0.15), rgba(34, 211, 238, 0.08));
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  display: grid;
  gap: 8px;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

.stat-card-wide {
  grid-column: 1 / -1;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #22d3ee, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  color: var(--muted);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-subtitle {
  color: var(--muted);
  font-size: 0.75rem;
  opacity: 0.7;
}

/* Stats Freshness Indicator */
.stats-freshness {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.stats-freshness svg {
  color: var(--accent);
  flex-shrink: 0;
}

.stats-freshness.stale {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}

.stats-freshness.stale svg {
  color: #fbbf24;
}

.freshness-warning {
  margin-left: auto;
  color: #fbbf24;
  font-weight: 500;
  font-size: 0.813rem;
}

/* Activity Breakdown */
.activity-breakdown {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.breakdown-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.breakdown-bar {
  height: 8px;
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.breakdown-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: var(--muted);
}

.breakdown-label strong {
  color: var(--text);
}

/* Recent Activity */
.recent-activity {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1.5rem;
}

.recent-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.recent-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
}

.recent-value {
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, #22d3ee, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.recent-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Responsive */
@media (max-width: 768px) {
  .recent-activity {
    grid-template-columns: repeat(2, 1fr);
  }
}

.contact-card {
  display: grid;
  gap: 18px;
  background: var(--bg-card);
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.contact-card a {
  color: var(--accent);
}

.contact-panel {
  display: grid;
  align-items: start;
}

.contact-highlight {
  background: linear-gradient(150deg, rgba(34, 211, 238, 0.18), rgba(59, 130, 246, 0.1));
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--accent);
  display: grid;
  gap: 20px;
  text-align: center;
}

.contact-highlight h3 {
  font-size: 1.5rem;
  color: var(--accent);
}

.contact-highlight p {
  font-size: 1.1rem;
  line-height: 1.6;
}

.whatsapp-qr {
  background: var(--bg-card);
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  text-align: center;
  margin-top: 24px;
}

.whatsapp-qr h4 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--accent);
}

.whatsapp-qr img {
  width: min(200px, 100%);
  height: auto;
  border-radius: var(--radius);
  margin: 0 auto 12px;
  border: 2px solid var(--line);
}

.whatsapp-qr p {
  font-size: 0.9rem;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 20px;
  background: rgba(7, 12, 22, 0.6);
}

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

.footer-brand {
  display: flex;
  gap: 16px;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 16px;
  color: var(--muted);
}

.footer-bottom {
  margin-top: 24px;
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  color: var(--muted);
  margin-top: 16px;
  display: none;
}

.empty-state.visible {
  display: block;
}

@media (max-width: 900px) {
  .site-nav {
    position: fixed;
    top: 72px;
    right: 16px;
    flex-direction: column;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    border: 1px solid var(--line);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition);
  }

  .site-nav.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-toggle {
    display: grid;
  }
}

/* Featured Projects */
.featured-projects-grid {
  display: grid;
  gap: 32px;
}

.featured-project-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.featured-project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 24px 48px rgba(34, 211, 238, 0.15);
}

.project-header {
  padding: 32px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(34, 211, 238, 0.05));
  border-bottom: 1px solid var(--line);
}

.project-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 8px;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.02em;
}

.project-category {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.15);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-body {
  padding: 32px;
  display: grid;
  gap: 24px;
}

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

.metric-item {
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.2);
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  margin-bottom: 4px;
}

.metric-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-badge {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--text);
  transition: all var(--transition);
}

.tech-badge:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.project-section {
  margin-top: 16px;
}

.project-section h4 {
  font-size: 0.875rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.project-section ul {
  list-style: none;
  display: grid;
  gap: 8px;
}

.project-section li {
  padding-left: 20px;
  position: relative;
  color: var(--muted);
  line-height: 1.6;
}

.project-section li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* Tech Stack Grid */
.tech-stack-grid {
  display: grid;
  gap: 32px;
}

.tech-category {
  background: var(--bg-card);
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}

.tech-category h3 {
  font-size: 1.125rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
}

.tech-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.tech-item:hover {
  transform: translateY(-6px);
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--primary);
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.2);
}

.tech-logo {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  object-fit: contain;
  filter: grayscale(30%);
  transition: filter var(--transition);
}

.tech-item:hover .tech-logo {
  filter: grayscale(0%);
}

.tech-name {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.tech-level {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: capitalize;
}

/* Blog Articles */
.blog-card {
  position: relative;
  overflow: hidden;
}

.blog-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transition: transform var(--transition);
}

.blog-card:hover::before {
  transform: scaleX(1);
}

.blog-featured-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #081022;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.blog-meta-info {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
}

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.blog-tag {
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 11px;
  color: var(--muted);
}

/* Theme Toggle */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all var(--transition);
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
  transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.theme-toggle:hover svg {
  transform: rotate(180deg);
}

/* Light Theme */
/* Dark theme (default) */
body {
  background: radial-gradient(circle at top, #101c30 0%, var(--bg) 55%);
}

/* Light Theme */
body.light-theme {
  --bg: #f1f5f9;
  --bg-soft: #e2e8f0;
  --bg-card: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --line: rgba(15, 23, 42, 0.15);
  --shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
  --primary: #3b82f6;
  --accent: #0ea5e9;
  background: radial-gradient(circle at top, #dbeafe 0%, var(--bg) 55%);
}

body.light-theme .site-header {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(20px);
}

body.light-theme .card,
body.light-theme .skill-card,
body.light-theme .stat-card,
body.light-theme .about-card,
body.light-theme .contact-card {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

body.light-theme .btn.ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.5);
}

body.light-theme .btn.ghost:hover {
  background: rgba(59, 130, 246, 0.1);
}

body.light-theme .avatar-frame {
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.3), rgba(14, 165, 233, 0.15));
}

body.light-theme .tech-item {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(15, 23, 42, 0.1);
}

body.light-theme .tech-item:hover {
  background: rgba(59, 130, 246, 0.05);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

body.light-theme .heatmap-day.level-0 {
  background: rgba(15, 23, 42, 0.05);
}

body.light-theme #scroll-progress-bar {
  box-shadow: 2px 0 12px rgba(59, 130, 246, 0.3);
}

/* Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  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; }

/* Counter Animation */
.counter {
  font-variant-numeric: tabular-nums;
}

/* Smooth Cursor */
.custom-cursor {
  width: 20px;
  height: 20px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.15s ease, opacity 0.15s ease;
  opacity: 0;
}

.custom-cursor.active {
  opacity: 0.6;
}

.custom-cursor.click {
  transform: scale(0.8);
  background: var(--accent);
}

/* Enhanced Hover Effects */
.card,
.skill-card,
.stat-card,
.tech-item {
  position: relative;
  overflow: hidden;
}

.card::after,
.skill-card::after,
.stat-card::after,
.tech-item::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.card:hover::after,
.skill-card:hover::after,
.stat-card:hover::after,
.tech-item:hover::after {
  width: 300px;
  height: 300px;
}

@media (max-width: 720px) {
  .hero {
    padding-top: 110px;
  }

  .slider-btn {
    display: none;
  }
  
  .tech-items {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
  
  .custom-cursor {
    display: none;
  }
}

/* Article Modal */
.article-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.article-modal.active {
  display: flex;
}

.article-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 18, 32, 0.92);
  backdrop-filter: blur(8px);
  animation: articleFadeIn 0.3s ease;
}

.article-modal-content {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: articleSlideUp 0.4s ease;
}

.article-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.article-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
  transform: rotate(90deg);
}

.article-modal-image {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.article-modal-body-wrap {
  padding: 32px 40px 40px;
}

.article-modal-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
  line-height: 1.3;
}

.article-modal-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.article-modal-text {
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 32px;
  white-space: pre-line;
}

.article-modal-text p {
  margin-bottom: 16px;
}

.article-modal-text h2,
.article-modal-text h3 {
  color: var(--text);
  margin: 24px 0 12px;
  font-size: 1.2rem;
}

.article-modal-text blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  margin: 16px 0;
  font-style: italic;
  color: var(--text);
}

.article-modal-text ul {
  list-style: none;
  padding: 0;
}

.article-modal-text li {
  padding-left: 20px;
  position: relative;
  margin-bottom: 8px;
}

.article-modal-text li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.article-modal-link {
  display: inline-flex;
  margin-top: 8px;
}

@keyframes articleFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@media (max-width: 768px) {
  .article-modal-body-wrap {
    padding: 24px;
  }

  .article-modal-title {
    font-size: 1.4rem;
  }

  .article-modal-image {
    max-height: 200px;
  }
}

body.light-theme .article-modal-overlay {
  background: rgba(241, 245, 249, 0.92);
}

body.light-theme .article-modal-content {
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.15);
}

/* Blog card image */
.blog-card-image {
  display: block;
  width: calc(100% + 48px);
  margin: -24px -24px 16px;
  height: 200px;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius) var(--radius) 0 0;
}

/* Uniform blog card layout */
.blog-card {
  display: flex;
  flex-direction: column;
}

.blog-card p {
  flex: 1 1 auto;
}

.blog-card .blog-meta-info,
.blog-card .blog-tags {
  margin-top: auto;
}

/* Clickable blog card */
.blog-card.has-body {
  cursor: pointer;
}
