/* ============================================================
   TILAK.DEV — Minimal Light Theme
   Content lives in content/data.json + content/posts/*.md
   Edit this file only to change appearance.
   ============================================================ */

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-hover: #f1f5f9;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent: #0ea5e9;
  --accent-hover: #0284c7;
  --accent-bg: rgba(14, 165, 233, 0.08);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --purple: #8b5cf6;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
  --shadow-md:
    0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --radius: 8px;
  --radius-lg: 12px;
}

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

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   NAVIGATION
   ============================================================ */

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}
.nav-brand .accent {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 28px;
}
.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  padding: 72px 32px 56px;
  text-align: center;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.hero-label {
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  margin-bottom: 14px;
}

.hero-avatar {
  margin-bottom: 20px;
}

.hero-avatar img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: block;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 14px;
  letter-spacing: -1px;
}
.hero h1 .accent {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.15s;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  text-decoration: none;
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.btn-large {
  padding: 14px 32px;
  font-size: 1rem;
}

/* ============================================================
   SECTIONS
   ============================================================ */

.section {
  padding: 56px 0;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 28px;
  text-align: center;
  color: var(--text);
  letter-spacing: -0.3px;
}

.section-intro {
  text-align: center;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 28px;
  font-size: 0.95rem;
}

.center {
  text-align: center;
  margin-top: 28px;
}

/* ============================================================
   PROJECT CARDS
   ============================================================ */

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

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition:
    box-shadow 0.2s,
    border-color 0.2s;
  box-shadow: var(--shadow-sm);
}

.project-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.card-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.tag-red {
  background: rgba(239, 68, 68, 0.08);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.15);
}
.tag-blue {
  background: var(--accent-bg);
  color: var(--accent);
  border: 1px solid rgba(14, 165, 233, 0.15);
}
.tag-purple {
  background: rgba(139, 92, 246, 0.08);
  color: var(--purple);
  border: 1px solid rgba(139, 92, 246, 0.15);
}

.project-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.project-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 14px;
  line-height: 1.55;
}

.card-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}
.card-link-soon {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================================
   BLOG LIST
   ============================================================ */

.blog-list {
  max-width: 720px;
  margin: 0 auto;
}

.blog-card {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}
.blog-card:last-child {
  border-bottom: none;
}

.blog-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.blog-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 6px 0 10px;
}
.blog-card h2 a {
  color: var(--text);
}
.blog-card h2 a:hover {
  color: var(--accent);
  text-decoration: none;
}

.blog-excerpt {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 10px;
  line-height: 1.55;
}

.blog-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 500;
  background: var(--bg);
  color: var(--text-secondary);
  margin-right: 5px;
  border: 1px solid var(--border);
}

/* ============================================================
   TIMELINE MINI
   ============================================================ */

.timeline-mini {
  display: flex;
  justify-content: space-between;
  max-width: 820px;
  margin: 0 auto;
  position: relative;
  padding-top: 16px;
}
.timeline-mini::before {
  content: "";
  position: absolute;
  top: 24px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: var(--border);
}

.tl-item {
  text-align: center;
  max-width: 170px;
  position: relative;
}
.tl-dot {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--border);
  margin: 0 auto 10px;
  position: relative;
  z-index: 2;
  border: 2px solid var(--surface);
}
.tl-dot.done {
  background: var(--success);
}
.tl-dot.current {
  background: var(--accent);
}

.tl-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}
.tl-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */

.page-header {
  padding: 48px 32px 36px;
  text-align: center;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.page-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}
.page-header .subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto;
}

.project-tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(239, 68, 68, 0.06);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.12);
  margin-bottom: 12px;
}

/* ============================================================
   PROJECT STATS
   ============================================================ */

.project-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}
.p-stat {
  text-align: center;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.p-num {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -1px;
}
.p-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* ============================================================
   PROBLEM / STAGES
   ============================================================ */

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}
.problem-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.problem-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}
.problem-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 6px;
  line-height: 1.5;
}
.problem-fatal {
  color: var(--danger) !important;
  font-weight: 600;
}
.solution {
  border-color: var(--accent);
  background: var(--accent-bg);
}
.solution h4 {
  color: var(--accent);
}
.solution-win {
  color: var(--success) !important;
  font-weight: 600;
}

.stages {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 24px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}
.stage {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.stage-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
}
.stage h4 {
  font-size: 1rem;
  margin-bottom: 6px;
}
.stage p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.stage:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -22px;
  top: 28px;
  font-size: 1.3rem;
  color: var(--accent);
  z-index: 2;
}
.stage-arrow {
  display: none;
}
.cycle-note {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 20px;
  background: var(--surface);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
  font-size: 0.9rem;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}

/* ============================================================
   JOURNEY / TIMELINE
   ============================================================ */

.journey-intro {
  max-width: 680px;
  margin: 0 auto 40px;
  font-size: 1.05rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.7;
}

.timeline {
  max-width: 840px;
  margin: 0 auto;
}

.timeline-item {
  display: flex;
  margin-bottom: 40px;
  position: relative;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: 142px;
  top: 0;
  bottom: -40px;
  width: 1px;
  background: var(--border);
}
.timeline-item:last-child::before {
  display: none;
}

.timeline-marker {
  width: 170px;
  flex-shrink: 0;
  text-align: right;
  padding-right: 32px;
  padding-left: 8px;
}
.timeline-year {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.timeline-grade {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}

.timeline-content {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.timeline-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}
.timeline-content h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  margin: 18px 0 6px;
}
.timeline-content p {
  color: var(--text-secondary);
  margin-bottom: 10px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.timeline-item.highlight .timeline-content {
  border-color: var(--accent);
  background: var(--accent-bg);
}
.timeline-item.future .timeline-content {
  border-style: dashed;
  border-color: var(--border-strong);
}

/* ============================================================
   BELIEFS
   ============================================================ */

.beliefs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}
.belief {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.belief h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.belief p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.55;
}

/* ============================================================
   BLOG POST
   ============================================================ */

.blog-post {
  padding-bottom: 48px;
}

.post-header {
  text-align: center;
  padding: 32px 0 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.post-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}
.post-header h1 {
  font-size: 2rem;
  font-weight: 800;
  margin: 10px 0 14px;
  letter-spacing: -0.5px;
}
.post-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 14px;
}
.post-tags {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}

.post-content {
  max-width: 680px;
  margin: 0 auto;
}
.post-content h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 32px 0 14px;
  color: var(--text);
}
.post-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 24px 0 10px;
  color: var(--text);
}
.post-content p {
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.7;
}
.post-content ul,
.post-content ol {
  color: var(--text-secondary);
  margin-bottom: 18px;
  padding-left: 22px;
}
.post-content li {
  margin-bottom: 6px;
  line-height: 1.6;
}
.post-content pre {
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  overflow-x: auto;
  margin: 18px 0;
  font-family: "SF Mono", Monaco, "Courier New", monospace;
  font-size: 0.8rem;
  color: var(--text);
  line-height: 1.5;
}
.post-content code {
  font-family: "SF Mono", Monaco, "Courier New", monospace;
  background: #f1f5f9;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--accent-hover);
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 32px 32px;
  text-align: center;
}
.footer p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 6px;
}
.footer-small {
  font-size: 0.75rem !important;
  color: var(--text-muted) !important;
}
.footer-links a {
  margin: 0 6px;
  font-size: 0.85rem;
}

/* ============================================================
   PROTOTYPE / LEARNINGS
   ============================================================ */

.prototype-content p {
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-size: 0.9rem;
}
.prototype-content ul {
  padding-left: 20px;
  margin-bottom: 14px;
}
.prototype-content li {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 5px;
}
.prototype-data {
  font-weight: 600;
  color: var(--accent) !important;
}

.learnings {
  max-width: 720px;
  margin: 0 auto;
}
.learning {
  margin-bottom: 24px;
}
.learning h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.learning p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.repo-text {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* ============================================================
   PROTOTYPE IMAGE
   ============================================================ */

.prototype-image-wrap {
  max-width: 720px;
  margin: 0 auto 28px;
  text-align: center;
}

.prototype-image {
  width: 100%;
  max-width: 680px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  display: block;
  margin: 0 auto;
}

.prototype-caption {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 10px;
  font-style: italic;
  line-height: 1.4;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 10px;
    padding: 14px;
  }
  .hero {
    padding: 48px 20px 40px;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
  .project-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .problem-grid {
    grid-template-columns: 1fr;
  }
  .stages {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  .stage {
    max-width: 280px;
    width: 100%;
  }
  .stage::after {
    display: none;
  }
  .stage-arrow {
    display: block;
    transform: rotate(90deg);
    padding: 0;
    font-size: 1.3rem;
    color: var(--accent);
  }
  .timeline-item {
    flex-direction: column;
  }
  .timeline-item::before {
    left: 20px;
  }
  .timeline-marker {
    text-align: left;
    padding: 0 0 10px 0;
    width: auto;
  }
  .beliefs {
    grid-template-columns: 1fr;
  }
  .timeline-mini {
    flex-direction: column;
    gap: 20px;
  }
  .timeline-mini::before {
    display: none;
  }
}
