/*
Theme Name: DevTools
Theme URI: #
Author: DevTools
Description: A lightweight, custom theme for independent development and product showcases.
Version: 1.0.0
Text Domain: devtools
*/

/* ═══════════════════════════════════════════
   DEVTOOLS — style.css
   ═══════════════════════════════════════════ */

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

:root {
  --bg:        #0B0B0C;
  --bg-alt:    #111114;
  --bg-card:   #16161A;
  --bg-card2:  #1C1C21;
  --primary:   #4F46E5;
  --primary-g: #6366F1;
  --primary-dim: rgba(79,70,229,0.12);
  --primary-glow: rgba(79,70,229,0.35);
  --text:      #EEEEEE;
  --text-muted:#9CA3AF;
  --gray:      #6B7280;
  --border:    rgba(255,255,255,0.07);
  --border-h:  rgba(255,255,255,0.13);
  --radius:    10px;
  --radius-lg: 16px;
  --font-display: 'Special Gothic Expanded One', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;
  --nav-h: 64px;
  --transition: 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2A2A35; border-radius: 99px; }

/* ── Scroll Progress Bar ── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--primary-g));
  z-index: 200;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px var(--primary-glow);
}

/* ── Container ── */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ═══════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════ */
.nav-wrap {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), backdrop-filter var(--transition);
}
.nav-wrap.scrolled {
  background: rgba(11,11,12,0.85);
  backdrop-filter: blur(16px);
  border-color: var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0;
}
.logo-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
}
.logo-text { color: var(--text); }

.nav__links {
  display: flex;
  gap: 32px;
}
.nav__links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color var(--transition);
  position: relative;
  padding-bottom: 2px;
}
.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0%; height: 1.5px;
  background: var(--primary-g);
  border-radius: 2px;
  transition: width 0.25s ease;
  box-shadow: 0 0 6px var(--primary-glow);
}
.nav__links a:hover,
.nav__links a.nav-active { color: var(--text); }
.nav__links a.nav-active::after,
.nav__links a:hover::after { width: 100%; }

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

/* Language Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px 6px;
}
.lang-btn {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--gray);
  padding: 3px 6px;
  border-radius: 5px;
  transition: color var(--transition), background var(--transition);
  letter-spacing: 0.05em;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active {
  color: var(--primary-g);
  background: var(--primary-dim);
}
.lang-sep { color: var(--border-h); font-size: 0.75rem; user-select: none; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  padding: 4px;
}
.hamburger span {
  display: block;
  height: 1.5px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger.open span:first-child { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:last-child  { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1);
}
.mobile-menu.open { max-height: 320px; }
.mobile-menu a {
  display: block;
  padding: 14px 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  transition: color var(--transition), background var(--transition);
}
.mobile-menu a:hover { color: var(--text); background: var(--bg-card); }

/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 11px 24px;
  border-radius: var(--radius);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition);
  white-space: nowrap;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}
.btn:hover { transform: translateY(-2px); }

/* Ripple base */
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transform: scale(0);
  animation: ripple-anim 0.55s linear;
  pointer-events: none;
}
@keyframes ripple-anim {
  to { transform: scale(4); opacity: 0; }
}

.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(79,70,229,0.28);
}
.btn--primary:hover {
  background: var(--primary-g);
  box-shadow: 0 8px 32px rgba(99,102,241,0.55);
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-h);
}
.btn--ghost:hover {
  color: var(--text);
  border-color: var(--border-h);
  box-shadow: 0 4px 16px rgba(255,255,255,0.04);
}

.btn--outline {
  background: transparent;
  color: var(--primary-g);
  border: 1px solid rgba(99,102,241,0.35);
}
.btn--outline:hover {
  background: var(--primary-dim);
  border-color: var(--primary-g);
  box-shadow: 0 4px 16px var(--primary-dim);
}

.btn--sm { font-size: 0.8rem; padding: 7px 16px; border-radius: 8px; }

.btn--ghost-sm {
  background: transparent;
  color: var(--gray);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  padding: 7px 16px;
  border-radius: 8px;
}
.btn--ghost-sm:hover {
  color: var(--text);
  border-color: var(--border-h);
}

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

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 100%);
  opacity: 0.6;
}

.hero__glow {
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(79,70,229,0.15) 0%, transparent 70%);
  filter: blur(40px);
}

.hero__inner {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--nav-h) + 80px);
  padding-bottom: 100px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--primary-dim);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: 99px;
  padding: 5px 14px 5px 10px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--primary-g);
  letter-spacing: 0.04em;
  margin-bottom: 28px;
}
.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary-g);
  animation: pulse 2s ease-in-out infinite;
}

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

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0;
  margin-bottom: 24px;
  color: var(--text);
}
.hero__title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--primary-g), #818CF8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__sub {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 10px;
  max-width: 640px;
}

.hero__desc {
  font-size: 0.9rem;
  color: var(--gray);
  margin-bottom: 40px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

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

.hero__scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.scroll-line {
  display: block;
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--primary-g), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.1); }
}

/* ═══════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════ */
.section {
  padding: 100px 0;
}
.section--alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  margin-bottom: 56px;
}
.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-g);
  background: var(--primary-dim);
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 14px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: 0;
  color: var(--text);
  line-height: 1.15;
}
.section-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 560px;
  line-height: 1.7;
  margin-top: -32px;
  margin-bottom: 48px;
}

/* ═══════════════════════════════════════════
   PROJECTS
   ═══════════════════════════════════════════ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  /* 3D tilt perspective */
  transform-style: preserve-3d;
}
/* Gradient border glow via pseudo */
.project-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, transparent 40%, rgba(99,102,241,0.5), transparent 60%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 0;
}
/* Light sweep effect */
.project-card::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
  transform: skewX(-15deg);
  transition: left 0.55s ease;
  pointer-events: none;
  z-index: 1;
}
.project-card:hover::before { opacity: 0.5; }
.project-card:hover::after  { left: 160%; }
.project-card:hover {
  box-shadow: 0 24px 60px rgba(0,0,0,0.45), 0 0 0 1px rgba(79,70,229,0.35);
  border-color: rgba(79,70,229,0.4);
}
.project-card__inner {
  position: relative;
  z-index: 2;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Tag hover glow */
.tag {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  padding: 3px 9px;
  border-radius: 5px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  letter-spacing: 0.02em;
  transition: color var(--transition), border-color var(--transition), box-shadow var(--transition);
  cursor: default;
}
.tag:hover {
  color: var(--primary-g);
  border-color: rgba(99,102,241,0.4);
  box-shadow: 0 0 8px var(--primary-dim);
}

.project-card__header {
  display: flex;
  align-items: center;
  gap: 14px;
}
.project-icon {
  font-size: 1.8rem;
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card2);
  border-radius: 10px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.project-card__meta {
  flex: 1;
}
.project-card__meta h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0;
  color: var(--text);
}
.project-type {
  font-size: 0.75rem;
  color: var(--gray);
  font-family: var(--font-mono);
}
.project-status {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  padding: 3px 9px;
  border-radius: 99px;
  font-weight: 500;
}
.status--active {
  background: rgba(16,185,129,0.12);
  color: #34D399;
  border: 1px solid rgba(52,211,153,0.25);
}

.project-card__desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
/* tag styles now above in project-card section */

.project-card__body {
  font-size: 0.85rem;
  color: var(--gray);
  line-height: 1.65;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

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

/* ═══════════════════════════════════════════
   PROJECT TABS
   ═══════════════════════════════════════════ */
.proj-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin: 0 -28px;
  padding: 0 28px;
}
.proj-tab {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--gray);
  padding: 10px 16px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.proj-tab:hover { color: var(--text-muted); }
.proj-tab.active {
  color: var(--primary-g);
  border-bottom-color: var(--primary-g);
  box-shadow: 0 2px 12px var(--primary-glow);
}

.proj-tab-panel {
  /* display: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease; */

  /* opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  position: absolute;
  width: 100%;
  transition: opacity 0.25s ease, transform 0.25s ease; */
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  position: absolute;
  width: 100%;
}
.proj-tab-panel.active {
  display: flex;
  flex-direction: column;
  gap: 16px;

  /* opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  position: relative; */
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  position: relative;
  /* transition: opacity 0.25s ease, transform 0.25s ease; */
  transition: opacity 0.25s ease 0.05s, transform 0.25s ease 0.05s;
}
.proj-tab-panel.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Compact roadmap inside card */
.roadmap-cols--compact {
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 560px) {
  .roadmap-cols--compact { grid-template-columns: 1fr; }
}

/* Compact accordion inside card */
.accordion--compact {
  border-radius: var(--radius);
}
.accordion--compact .accordion__trigger {
  padding: 14px 18px;
  font-size: 0.85rem;
}

/* ═══════════════════════════════════════════
   ROADMAP
   ═══════════════════════════════════════════ */
.roadmap-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.roadmap-col {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.roadmap-col__label {
  margin-bottom: 24px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 99px;
  letter-spacing: 0.04em;
}
.status-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-badge--progress {
  background: rgba(245,158,11,0.1);
  color: #FBBF24;
  border: 1px solid rgba(251,191,36,0.25);
}
.status-badge--progress::before { background: #FBBF24; animation: pulse 2s ease-in-out infinite; }
.status-badge--planned {
  background: rgba(107,114,128,0.12);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.status-badge--planned::before { background: var(--gray); }

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border);
}
.timeline__item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 10px 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  position: relative;
}
.timeline__dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  flex-shrink: 0;
  margin-top: 1px;
  position: relative;
  z-index: 1;
  transition: border-color var(--transition);
}
.timeline__dot--active {
  border-color: var(--primary-g);
  background: var(--primary-dim);
  box-shadow: 0 0 8px var(--primary-glow);
}

/* ═══════════════════════════════════════════
   CHANGELOG / ACCORDION
   ═══════════════════════════════════════════ */
.accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.accordion__item {
  border-bottom: 1px solid var(--border);
}
.accordion__item:last-child { border-bottom: none; }

.accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-card);
  transition: background var(--transition), color var(--transition);
}
.accordion__trigger:hover {
  background: var(--bg-card2);
  color: var(--text);
}
.accordion__trigger[aria-expanded="true"] {
  color: var(--primary-g);
  background: var(--bg-card2);
}

.accordion__version { letter-spacing: 0.04em; }

.accordion__arrow {
  color: var(--gray);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.accordion__trigger[aria-expanded="true"] .accordion__arrow {
  transform: rotate(180deg);
  color: var(--primary-g);
}

.accordion__body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px);
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.28s ease,
              transform 0.28s ease,
              padding 0.3s ease;
}
.accordion__body.open {
  max-height: 300px;
  opacity: 1;
  transform: translateY(0);
  padding: 6px 0 6px;
}
.accordion__body ul {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 10px 24px 20px 42px;
}
.accordion__body li {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 6px 0;
  position: relative;
  line-height: 1.55;
}
.accordion__body li::before {
  content: '—';
  position: absolute;
  left: -18px;
  color: var(--primary-g);
  opacity: 0.6;
  font-size: 0.75rem;
}

/* ═══════════════════════════════════════════
   ABOUT
   ═══════════════════════════════════════════ */
.about-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color var(--transition), transform var(--transition);
}
.about-card:hover {
  border-color: var(--border-h);
  transform: translateY(-2px);
}
.about-card__icon {
  font-size: 1.5rem;
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card2);
  border-radius: 10px;
  border: 1px solid var(--border);
}
.about-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ═══════════════════════════════════════════
   BLOG
   ═══════════════════════════════════════════ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.blog-card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 16px 48px rgba(0,0,0,0.35);
  border-color: var(--border-h);
}

.blog-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.blog-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--primary-g);
  background: var(--primary-dim);
  padding: 3px 9px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  font-weight: 500;
}
.blog-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gray);
}

.blog-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.35;
  color: var(--text);
}

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

.blog-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--primary-g);
  transition: gap var(--transition);
}
.blog-link:hover { gap: 10px; }

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

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--primary-g);
  background: var(--primary-dim);
  border: 1px solid rgba(99,102,241,0.2);
  padding: 12px 18px;
  border-radius: var(--radius);
  transition: background var(--transition), box-shadow var(--transition);
}
.contact-email:hover {
  background: rgba(99,102,241,0.18);
  box-shadow: 0 4px 20px var(--primary-dim);
}
.contact-info p {
  font-size: 0.82rem;
  color: var(--gray);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.88rem;
  padding: 12px 16px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: none;
}
.form-input::placeholder { color: var(--gray); }
.form-input:focus {
  border-color: rgba(99,102,241,0.5);
  box-shadow: 0 0 0 3px var(--primary-dim);
}
.form-textarea {
  height: 120px;
  font-size: 0.88rem;
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--gray);
  letter-spacing: 0;
}
.footer__copy {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gray);
  letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════════
   SCROLL ANIMATIONS
   ═══════════════════════════════════════════ */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-up:nth-child(1) { transition-delay: 0.05s; }
.fade-up:nth-child(2) { transition-delay: 0.12s; }
.fade-up:nth-child(3) { transition-delay: 0.18s; }
.fade-up:nth-child(4) { transition-delay: 0.24s; }
.fade-up:nth-child(5) { transition-delay: 0.3s; }
.fade-up:nth-child(6) { transition-delay: 0.36s; }

.reveal {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(4px);
  transition: opacity 0.6s ease, transform 0.6s ease, filter 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
/* Staggered children inside reveal containers */
.reveal-children > * {
  opacity: 0;
  transform: translateY(20px);
  filter: blur(3px);
  transition: opacity 0.5s ease, transform 0.5s ease, filter 0.5s ease;
}
.reveal-children.visible > *:nth-child(1) { opacity:1; transform:none; filter:none; transition-delay: 0.05s; }
.reveal-children.visible > *:nth-child(2) { opacity:1; transform:none; filter:none; transition-delay: 0.12s; }
.reveal-children.visible > *:nth-child(3) { opacity:1; transform:none; filter:none; transition-delay: 0.19s; }
.reveal-children.visible > *:nth-child(4) { opacity:1; transform:none; filter:none; transition-delay: 0.26s; }

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .hamburger { display: flex; }
  .mobile-menu { display: flex; }

  .roadmap-cols { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .section { padding: 72px 0; }
  .hero__inner { padding-top: calc(var(--nav-h) + 60px); padding-bottom: 80px; }
  .projects-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .project-card__actions { flex-direction: column; }
  .project-card__actions .btn { width: 100%; justify-content: center; }
  .footer__inner { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 400px) {
  .hero__title { font-size: 2.4rem; }
  .hero__cta { flex-direction: column; }
  .hero__cta .btn { width: 100%; justify-content: center; }
}







/* ── Blog Single — scoped overrides ── */

/* Article hero */
.article-hero {
  padding-top: calc(var(--nav-h) + 72px);
  padding-bottom: 60px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.article-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 20%, transparent 100%);
  opacity: 0.4;
  pointer-events: none;
}
.article-hero__inner {
  position: relative;
  z-index: 1;
  /* max-width: 720px; */
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.article-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--primary-g);
  background: var(--primary-dim);
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.06em;
}
.article-date,
.article-reading {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gray);
  letter-spacing: 0.04em;
}
.meta-sep { color: var(--border-h); font-size: 0.8rem; }

.article-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 20px;
}
.article-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  font-weight: 300;
  max-width: 620px;
}

/* ── Article body ── */
.article-wrap {
  padding: 72px 0 100px;
}
.article-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 64px;
  align-items: start;
}

/* Content typography */
.article-body {
  max-width: 720px;
  font-size: 0.97rem;
  line-height: 1.85;
  color: var(--text-muted);
}
.article-body > * + * { margin-top: 1.5em; }

.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-top: 2.8em;
  padding-top: 2em;
  border-top: 1px solid var(--border);
}
.article-body h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-top: 2em;
}
.article-body p { color: var(--text-muted); }
.article-body a {
  color: var(--primary-g);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-body strong { color: var(--text); font-weight: 500; }

/* Blockquote */
.article-body blockquote {
  margin: 2em 0;
  padding: 20px 24px;
  border-left: 3px solid var(--primary-g);
  background: var(--bg-card);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.75;
  position: relative;
}
.article-body blockquote::before {
  content: '"';
  position: absolute;
  top: -4px; left: 18px;
  font-size: 3rem;
  color: var(--primary-g);
  opacity: 0.25;
  font-family: Georgia, serif;
  line-height: 1;
}

/* Code block */
.code-block {
  position: relative;
  margin: 2em 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  background: #0D0D10;
}
.code-block__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #141418;
  border-bottom: 1px solid var(--border);
}
.code-block__lang {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--gray);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.code-block__dots {
  display: flex;
  gap: 5px;
}
.code-block__dots span {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.code-block__dots span:nth-child(1) { background: #FF5F57; }
.code-block__dots span:nth-child(2) { background: #FEBC2E; }
.code-block__dots span:nth-child(3) { background: #28C840; }

.code-block__copy {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--gray);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 10px;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}
.code-block__copy:hover { color: var(--text); border-color: var(--border-h); }
.code-block__copy.copied { color: #34D399; border-color: rgba(52,211,153,0.4); }

.code-block pre {
  overflow-x: auto;
  padding: 22px 22px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.7;
  color: #C9D1D9;
  tab-size: 2;
}
/* Token colours (simple, no library) */
.tok-keyword  { color: #FF7B72; }
.tok-string   { color: #A5D6FF; }
.tok-comment  { color: #8B949E; font-style: italic; }
.tok-fn       { color: #D2A8FF; }
.tok-num      { color: #79C0FF; }
.tok-var      { color: #E3B341; }
.tok-punct    { color: #C9D1D9; }

/* Inline code */
.article-body code:not(.code-block code) {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--primary-g);
}

/* Sidebar TOC */
.article-toc {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.article-toc__title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 14px;
}
.article-toc__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.article-toc__list a {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 5px 8px;
  border-radius: 6px;
  display: block;
  transition: background var(--transition), color var(--transition);
  line-height: 1.4;
}
.article-toc__list a:hover,
.article-toc__list a.toc-active {
  background: var(--primary-dim);
  color: var(--primary-g);
}

/* Navigation bar (prev / next / back) */
.article-nav {
  border-top: 1px solid var(--border);
  padding: 40px 0 0;
  margin-top: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.article-nav__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  color: var(--gray);
  transition: color var(--transition), gap var(--transition);
}
.article-nav__back:hover { color: var(--text); gap: 12px; }

.article-nav__siblings {
  display: flex;
  gap: 12px;
}
.article-nav__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  max-width: 220px;
  transition: border-color var(--transition), background var(--transition);
}
.article-nav__item:hover {
  border-color: var(--border-h);
  background: var(--bg-card2);
}
.article-nav__label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--gray);
  text-transform: uppercase;
}
.article-nav__item-title {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Responsive */
@media (max-width: 860px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-toc { display: none; }
}
@media (max-width: 540px) {
  .article-nav { flex-direction: column; align-items: flex-start; }
  .article-nav__siblings { flex-direction: column; width: 100%; }
  .article-nav__item { max-width: 100%; }
}

/* 追加到 style.css 中修复 WP 默认链接样式 */
.article-tag a, 
.blog-tag a {
  color: inherit;
  text-decoration: none;
  display: inline-block;
}
.article-tag a:hover, 
.blog-tag a:hover {
  text-decoration: underline;
}