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

:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: #1a2236;
  --bg-card-hover: #1f2a42;
  --border: #2a3a5c;
  --accent: #38bdf8;
  --accent-dim: rgba(56, 189, 248, 0.15);
  --accent-glow: rgba(56, 189, 248, 0.3);
  --green: #4ade80;
  --green-dim: rgba(74, 222, 128, 0.15);
  --yellow: #facc15;
  --purple: #a78bfa;
  --pink: #f472b6;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 900px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #7dd3fc;
}

/* ── Animated Background ─────────────────────────────────── */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
}

/* ── Layout ──────────────────────────────────────────────── */
.container {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Nav ─────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.nav-logo {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.nav-logo span {
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  padding: 120px 0 60px;
  text-align: center;
}

.hero-model-name {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.hero-model-name .org {
  color: var(--text-secondary);
}

.hero-model-name .sep {
  color: var(--text-muted);
  margin: 0 2px;
}

.hero-model-name .model {
  color: var(--accent);
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 12px;
}

.hero-title {
  font-size: 1.25rem;
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 24px;
}

.hero-typing {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--green);
  min-height: 1.5em;
  margin-bottom: 32px;
}

.hero-typing .cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--green);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: var(--font-mono);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  transition: border-color 0.2s, background 0.2s;
}

.badge:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
}

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

/* ── Section ─────────────────────────────────────────────── */
.section {
  padding: 60px 0;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 8px;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

/* ── About / Description ─────────────────────────────────── */
.about-text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 720px;
}

.about-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

.relocating {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 8px 16px;
  background: var(--accent-dim);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--accent);
}

/* ── Skills / Benchmarks ─────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.skill-category:hover {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-dim);
}

.skill-category-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.skill-category-title .icon {
  font-size: 1rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  padding: 5px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  transition: all 0.2s;
}

.skill-tag:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  background: var(--accent-dim);
}

.skill-tag.highlight {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* ── Experience / Fine-tuning ────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--border));
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

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

.timeline-dot {
  position: absolute;
  left: -29px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--accent);
  z-index: 2;
}

.timeline-item:first-child .timeline-dot {
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.timeline-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  margin-bottom: 8px;
}

.timeline-role {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.timeline-company {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.timeline-bullets {
  list-style: none;
  padding: 0;
}

.timeline-bullets li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.timeline-bullets li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 700;
}

/* ── Education / Training Data ───────────────────────────── */
.education-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.education-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: border-color 0.3s;
}

.education-card:hover {
  border-color: var(--accent);
}

.education-degree {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
}

.education-school {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.education-year {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

/* ── Contact / API Reference ─────────────────────────────── */
.api-endpoints {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.api-endpoint {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.api-endpoint:last-child {
  border-bottom: none;
}

.api-endpoint:hover {
  background: var(--bg-card-hover);
}

.api-method {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  min-width: 52px;
  text-align: center;
  flex-shrink: 0;
}

.api-method.get {
  background: var(--green-dim);
  color: var(--green);
}

.api-method.post {
  background: rgba(250, 204, 21, 0.15);
  color: var(--yellow);
}

.api-path {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-secondary);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.api-path .param {
  color: var(--accent);
}

.api-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ── Blog Cards ──────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

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

.blog-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.blog-card-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.blog-card-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.blog-card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

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

.blog-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 9999px;
  background: var(--accent-dim);
  color: var(--accent);
}

/* ── Blog Post Content ───────────────────────────────────── */
.post-header {
  padding: 120px 0 40px;
  text-align: center;
}

.post-back {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  transition: color 0.2s;
}

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

.post-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 12px;
}

.post-content {
  padding: 0 0 80px;
}

.post-content h1,
.post-content h2,
.post-content h3 {
  color: var(--text-primary);
  font-weight: 700;
  margin: 2em 0 0.75em;
  letter-spacing: -0.02em;
}

.post-content h1 { font-size: 1.75rem; }
.post-content h2 { font-size: 1.4rem; }
.post-content h3 { font-size: 1.15rem; }

.post-content p {
  margin-bottom: 1.2em;
  color: var(--text-secondary);
}

.post-content code {
  font-family: var(--font-mono);
  background: var(--bg-card);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.88em;
  color: var(--accent);
}

.post-content pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  overflow-x: auto;
  margin: 1.5em 0;
}

.post-content pre code {
  background: none;
  padding: 0;
  color: var(--text-secondary);
}

.post-content ul,
.post-content ol {
  padding-left: 1.5em;
  margin-bottom: 1.2em;
  color: var(--text-secondary);
}

.post-content li {
  margin-bottom: 0.5em;
}

.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px;
  margin: 1.5em 0;
  background: var(--accent-dim);
  border-radius: 0 8px 8px 0;
  color: var(--text-secondary);
}

.post-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 1.5em 0;
}

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

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
}

.footer-text {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Blog Empty State ────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 0;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 0.95rem;
}

/* ── Blog Listing Page ───────────────────────────────────── */
.blog-hero {
  padding: 120px 0 40px;
  text-align: center;
}

.blog-hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.blog-hero p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero-title {
    font-size: 1.05rem;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .education-grid {
    grid-template-columns: 1fr;
  }

  .api-endpoint {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .api-desc {
    display: none;
  }

  .timeline {
    padding-left: 24px;
  }

  .timeline-dot {
    left: -21px;
    width: 10px;
    height: 10px;
  }

  .nav-links {
    gap: 16px;
  }
}
