/* =============================================================
   JayQiu — Modern Portfolio Theme
   Pattern : Portfolio Grid
   Style   : Swiss Modernism 2.0 (clean, professional, technical)
   Fonts   : Space Grotesk (heading) + Inter (body)
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ---------- 1. Design Tokens ---------- */
:root {
  /* Color — Light */
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-muted: #f1f5f9;
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-soft: #334155;
  --text-muted: #64748b;
  --text-faint: #94a3b8;

  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #dbeafe;
  --accent-foreground: #ffffff;

  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;

  /* Layout */
  --container: 72rem;          /* 1152px */
  --container-wide: 80rem;     /* 1280px */
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Shadow */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, .08), 0 2px 4px rgba(15, 23, 42, .04);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, .10), 0 4px 8px rgba(15, 23, 42, .04);
  --shadow-glow: 0 0 0 4px rgba(37, 99, 235, .12);

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, 'PingFang SC',
               'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  /* Motion */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --t-fast: 150ms;
  --t-med: 250ms;
  --t-slow: 400ms;

  /* Navbar height */
  --nav-h: 68px;
}

/* Dark theme tokens */
:root[data-theme="dark"] {
  --bg: #0b1120;
  --bg-soft: #0f172a;
  --bg-muted: #1e293b;
  --surface: #111a2e;
  --surface-elevated: #172033;
  --border: #1e293b;
  --border-strong: #334155;
  --text: #f8fafc;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;
  --text-faint: #64748b;

  --accent: #60a5fa;
  --accent-hover: #93c5fd;
  --accent-soft: rgba(96, 165, 250, .15);
  --accent-foreground: #0b1120;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .35);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
  --shadow-glow: 0 0 0 4px rgba(96, 165, 250, .2);
}

/* ---------- 2. Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color var(--t-med) var(--ease),
              color var(--t-med) var(--ease);
}

img, svg, video { max-width: 100%; display: block; }
img { height: auto; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}
a:hover { color: var(--accent-hover); }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

p { margin: 0 0 1rem; color: var(--text-soft); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
  margin: 0 0 .75rem;
  letter-spacing: -.02em;
  line-height: 1.2;
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.625rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }

code, pre, kbd { font-family: var(--font-mono); font-size: .9em; }
hr { border: 0; height: 1px; background: var(--border); margin: 2rem 0; }

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

/* ---------- 3. Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.container-wide { max-width: var(--container-wide); }
.container-narrow { max-width: 48rem; }

.section { padding: 4rem 0; }
.section-lg { padding: 6rem 0; }
.section-tight { padding: 2.5rem 0; }

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.stack { display: flex; flex-direction: column; gap: 1rem; }
.row   { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.center { display: flex; align-items: center; justify-content: center; }

/* ---------- 4. Navbar ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  width: 100%;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: .625rem;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -.01em;
}
.nav-brand:hover { color: var(--text); }
.nav-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -.02em;
  box-shadow: var(--shadow-sm);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: .25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  padding: .5rem .875rem;
  border-radius: var(--radius-sm);
  font-size: .9375rem;
  font-weight: 500;
  color: var(--text-soft);
  transition: color var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease);
}
.nav-links a:hover {
  color: var(--text);
  background: var(--bg-muted);
}
.nav-links a.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.nav-actions { display: flex; align-items: center; gap: .5rem; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease);
}
.icon-btn:hover {
  background: var(--bg-muted);
  color: var(--text);
  border-color: var(--border-strong);
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .sun-icon { display: none; }
:root[data-theme="dark"] .icon-btn .moon-icon { display: none; }
:root[data-theme="dark"] .icon-btn .sun-icon { display: block; }

.nav-toggle { display: none; }

@media (max-width: 768px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: .25rem;
    padding: 1rem 1.25rem 1.5rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t-med) var(--ease),
                transform var(--t-med) var(--ease);
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { padding: .75rem 1rem; font-size: 1rem; }
}

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.25rem;
  font-family: var(--font-sans);
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
  white-space: nowrap;
}
.btn:focus-visible { box-shadow: var(--shadow-glow); outline: none; }
.btn svg { width: 16px; height: 16px; }

.btn-primary {
  background: var(--accent);
  color: var(--accent-foreground);
}
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-foreground); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-outline:hover { background: var(--bg-muted); border-color: var(--text-muted); color: var(--text); }

.btn-ghost {
  background: transparent;
  color: var(--text-soft);
}
.btn-ghost:hover { background: var(--bg-muted); color: var(--text); }

.btn-sm { padding: .5rem .875rem; font-size: .875rem; }
.btn-lg { padding: .9375rem 1.5rem; font-size: 1rem; }

/* ---------- 6. Badges & Chips ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .25rem .625rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}
.badge-neutral {
  background: var(--bg-muted);
  color: var(--text-soft);
  border-color: var(--border);
}
.badge-dot::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: .25rem .625rem;
  font-size: .8125rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  background: var(--bg-muted);
  color: var(--text-soft);
  border: 1px solid var(--border);
}

/* ---------- 7. Card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--t-fast) var(--ease),
              box-shadow var(--t-med) var(--ease),
              background-color var(--t-fast) var(--ease);
}
.card-body { padding: 1.5rem; }
.card-title { font-size: 1.125rem; margin-bottom: .5rem; }
.card-text { color: var(--text-soft); font-size: .9375rem; line-height: 1.65; margin: 0; }

a.card,
.card-link {
  display: block;
  color: inherit;
  cursor: pointer;
}
a.card:hover,
.card-link:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  color: inherit;
}

/* ---------- 8. Project Card ---------- */
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  color: inherit;
  transition: border-color var(--t-fast) var(--ease),
              box-shadow var(--t-med) var(--ease);
}
.project-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  color: inherit;
}
.project-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--bg-muted);
  overflow: hidden;
}
.project-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease),
              filter var(--t-med) var(--ease);
}
.project-card:hover .project-cover img { transform: scale(1.05); }
.project-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.35));
  opacity: 0;
  transition: opacity var(--t-med) var(--ease);
}
.project-card:hover .project-cover::after { opacity: 1; }
.project-body {
  padding: 1.25rem 1.375rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  flex: 1;
}
.project-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--text);
  margin: 0;
  letter-spacing: -.01em;
}
.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
  margin-top: .25rem;
}
.project-arrow {
  margin-top: .5rem;
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--accent);
  opacity: .85;
  transition: opacity var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
}
.project-arrow svg { width: 14px; height: 14px; flex-shrink: 0; }
.project-card:hover .project-arrow { opacity: 1; transform: translateX(2px); }

/* ---------- 9. Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 0 4rem;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 10%, color-mix(in srgb, var(--accent) 12%, transparent) 0%, transparent 45%),
    radial-gradient(circle at 88% 90%, color-mix(in srgb, #7c3aed 10%, transparent) 0%, transparent 45%);
  pointer-events: none;
  z-index: 0;
}
.hero > .container { position: relative; z-index: 1; }

.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.15fr .85fr; }
  .hero { padding: 6rem 0 5rem; }
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .375rem .75rem;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--text-soft);
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
}
.hero-eyebrow .pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  position: relative;
}
.hero-eyebrow .pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0%   { transform: scale(1);   opacity: .8; }
  100% { transform: scale(2.6); opacity: 0; }
}

.hero-title {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  line-height: 1.1;
  margin-bottom: 1rem;
}
.hero-title .gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 50%, #ec4899 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-lead {
  font-size: 1.0625rem;
  color: var(--text-soft);
  max-width: 36rem;
  margin-bottom: 1.75rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.hero-card {
  position: relative;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 30%, transparent), transparent 60%);
  z-index: -1;
}
.avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 2px var(--accent), var(--shadow-md);
  object-fit: cover;
  background: var(--bg-muted);
}
.avatar-lg { width: 128px; height: 128px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.stat-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text);
  letter-spacing: -.02em;
}
.stat-label {
  font-size: .75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-top: .25rem;
}

/* ---------- 10. Page Header ---------- */
.page-header {
  padding: 4.5rem 0 2.5rem;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at top, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.page-header > .container { position: relative; z-index: 1; }
.page-header .badge { margin-bottom: 1rem; }
.page-title {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: .75rem;
  letter-spacing: -.03em;
}
.page-subtitle {
  font-size: 1.0625rem;
  color: var(--text-soft);
  max-width: 38rem;
  margin: 0 auto;
}
.page-header.centered { text-align: center; }
.page-header.centered .page-subtitle { margin-left: auto; margin-right: auto; }

/* ---------- 11. Section Header ---------- */
.section-header { margin-bottom: 2.5rem; }
.section-header.centered { text-align: center; }
.section-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .8125rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: .5rem;
}
.section-title { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: .5rem; }
.section-desc  { color: var(--text-soft); margin: 0 auto; max-width: 38rem; }

/* ---------- 12. Skills / Progress ---------- */
.skill-row { margin-bottom: 1.25rem; }
.skill-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: .5rem;
}
.skill-name { font-weight: 500; color: var(--text); }
.skill-value { font-family: var(--font-mono); font-size: .8125rem; color: var(--text-muted); }
.progress {
  height: 8px;
  width: 100%;
  background: var(--bg-muted);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #7c3aed);
  border-radius: inherit;
  transition: width 1s var(--ease);
}

/* ---------- 13. Timeline ---------- */
.timeline {
  position: relative;
  padding-left: 1.75rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border);
  border-radius: 2px;
}
.timeline-item {
  position: relative;
  padding: 0 0 2rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.75rem;
  top: 6px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
.timeline-date {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .8125rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: .25rem;
}
.timeline-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--text);
  margin: 0 0 .375rem;
}
.timeline-desc { color: var(--text-soft); margin: 0; font-size: .9375rem; }

/* ---------- 14. Footer ---------- */
.footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 2rem;
  margin-top: 5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer h4 {
  font-size: .8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text);
  margin: 0 0 1rem;
}
.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .625rem;
}
.footer-list a {
  color: var(--text-soft);
  font-size: .9375rem;
}
.footer-list a:hover { color: var(--accent); }
.footer-brand p { color: var(--text-muted); font-size: .9375rem; max-width: 22rem; }

.footer-social {
  display: flex;
  gap: .5rem;
  margin-top: 1.25rem;
}
.social-btn {
  width: 38px; height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  transition: background-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease);
}
.social-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}
.social-btn svg { width: 18px; height: 18px; }

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: .875rem;
}

/* ---------- 15. Blog list ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}
.blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.375rem;
  cursor: pointer;
  color: inherit;
  transition: border-color var(--t-fast) var(--ease),
              box-shadow var(--t-med) var(--ease),
              transform var(--t-med) var(--ease);
}
.blog-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  color: inherit;
}
.blog-meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8125rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: .75rem;
}
.blog-meta .dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--text-faint);
}
.blog-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 .625rem;
  letter-spacing: -.01em;
  line-height: 1.35;
}
.blog-excerpt {
  color: var(--text-soft);
  font-size: .9375rem;
  line-height: 1.6;
  margin: 0 0 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-readmore {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--accent);
  transition: gap var(--t-fast) var(--ease);
}
.blog-readmore svg { width: 14px; height: 14px; flex-shrink: 0; }
.blog-card:hover .blog-readmore { gap: .625rem; }

/* ---------- 16. Article ---------- */
.article {
  max-width: 44rem;
  margin: 0 auto;
}
.article-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  background: var(--bg-muted);
}
.article-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.article-meta img {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  box-shadow: var(--shadow-xs);
}
.article-author { font-weight: 500; color: var(--text); display: block; line-height: 1.2; }
.article-date { font-size: .8125rem; color: var(--text-muted); font-family: var(--font-mono); }
.article-body p { color: var(--text-soft); font-size: 1.0625rem; line-height: 1.75; }
.article-body img {
  width: 100%;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  background: var(--bg-muted);
}
.article-body h2 { margin-top: 2.5rem; }
.article-body h3 { margin-top: 2rem; }

/* ---------- 17. Detail page ---------- */
.detail {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .detail { grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr); align-items: start; }
}
.detail-gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.detail-gallery img {
  width: 100%;
  border-radius: var(--radius);
  background: var(--bg-muted);
  border: 1px solid var(--border);
}
.detail-cover {
  width: 100%;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  background: var(--bg-muted);
  border: 1px solid var(--border);
}
.info-card {
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.info-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: .75rem 1rem;
}
.info-card dt {
  font-size: .8125rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 500;
}
.info-card dd {
  margin: 0;
  font-size: .9375rem;
  color: var(--text);
  font-weight: 500;
}

/* ---------- 18. Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.contact-card {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--t-fast) var(--ease),
              box-shadow var(--t-med) var(--ease);
}
.contact-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}
.contact-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
}
.contact-icon svg { width: 22px; height: 22px; }
.contact-label {
  font-size: .8125rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  font-weight: 500;
}
.contact-value {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  word-break: break-all;
}
.copy-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .375rem .625rem;
  font-size: .8125rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease);
}
.copy-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}
.copy-btn svg { width: 14px; height: 14px; }
.copy-btn.copied {
  background: color-mix(in srgb, var(--success) 12%, transparent);
  color: var(--success);
  border-color: var(--success);
}

/* ---------- 19. Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: var(--bg);
  padding: .75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  transition: transform var(--t-med) var(--ease),
              opacity var(--t-med) var(--ease);
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ---------- 20. Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

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

/* ---------- 21. Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 22. Skip link ---------- */
.skip-link {
  position: absolute;
  top: -40px;
  left: 1rem;
  background: var(--accent);
  color: var(--accent-foreground);
  padding: .5rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  z-index: 100;
  transition: top var(--t-fast) var(--ease);
}
.skip-link:focus { top: .5rem; color: var(--accent-foreground); }

/* ---------- 23. Utilities ---------- */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-soft   { color: var(--text-soft); }
.font-mono   { font-family: var(--font-mono); }
.mt-0  { margin-top: 0; }
.mt-2  { margin-top: .5rem; }
.mt-4  { margin-top: 1rem; }
.mt-6  { margin-top: 1.5rem; }
.mb-0  { margin-bottom: 0; }
.mb-2  { margin-bottom: .5rem; }
.mb-4  { margin-bottom: 1rem; }
.mb-6  { margin-bottom: 1.5rem; }
.gap-2 { gap: .5rem; }
.gap-4 { gap: 1rem; }
