:root {
  --bg: #ffffff;
  --bg-soft: #f6f8fa;
  --border: #d0d7de;
  --text: #1f2328;
  --text-dim: #59636e;
  --accent: #0e8a6d;
  --accent-dim: #0a6e57;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  --sans: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

[data-theme="dark"] {
  --bg: #0d1117;
  --bg-soft: #161b22;
  --border: #30363d;
  --text: #e6edf3;
  --text-dim: #8b949e;
  --accent: #58e6b0;
  --accent-dim: #2ea07f;
}

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

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

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

/* Nav */
nav {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
nav .container { display: flex; justify-content: space-between; align-items: center; }
.brand {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--accent);
  text-decoration: none;
}
.brand::before { content: "~/"; color: var(--text-dim); }
nav .links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  margin-left: 22px;
  font-family: var(--mono);
}
nav .links a:hover, nav .links a.active { color: var(--text); }

.theme-toggle {
  margin-left: 22px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1;
  padding: 5px 9px;
  cursor: pointer;
  vertical-align: middle;
}
.theme-toggle:hover { color: var(--text); border-color: var(--accent-dim); }

/* Hero */
.hero { padding: 88px 0 64px; }
.hero .prompt {
  font-family: var(--mono);
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 14px;
}
.hero .prompt .dollar { color: var(--accent); }
.hero h1 { font-size: 42px; letter-spacing: -0.5px; margin-bottom: 10px; }
.hero .tagline { color: var(--text-dim); font-size: 17px; }
.hero .tagline a { color: var(--accent); text-decoration: none; }
.hero .tagline a:hover { text-decoration: underline; }
.cursor {
  display: inline-block; width: 9px; height: 1.1em;
  background: var(--accent); vertical-align: text-bottom;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Section headings */
.section-title {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent);
  text-transform: lowercase;
  margin-bottom: 20px;
}
.section-title::before { content: "## "; color: var(--text-dim); }

/* Tutorial cards (accordion) */
.card {
  display: block;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-soft);
  padding: 20px 22px;
  margin-bottom: 14px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--accent-dim); transform: translateY(-1px); }
.card h3 { font-size: 18px; margin-bottom: 6px; }
.card p { color: var(--text-dim); font-size: 14.5px; }
.card .meta {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-dim);
  margin-top: 12px;
}
.card .meta span { color: var(--accent-dim); }
.card .card-head { position: relative; padding-right: 28px; }
.card .card-head::after {
  content: "+";
  position: absolute;
  right: 0; top: 0;
  font-family: var(--mono);
  font-size: 20px;
  color: var(--text-dim);
}
.card.open .card-head::after { content: "−"; color: var(--accent); }
.card .card-body { display: none; cursor: auto; }
.card.open .card-body {
  display: block;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}
.card .card-body article { padding: 20px 0 6px; }

/* About */
.about-section { padding: 56px 0 24px; }
.bio { color: var(--text); font-size: 16.5px; max-width: 640px; }
.bio a { color: var(--accent); text-decoration: none; }
.bio a:hover { text-decoration: underline; }
.bio + .bio { margin-top: 14px; }

.timeline { margin-top: 8px; }
.timeline-item {
  border-left: 2px solid var(--border);
  padding: 0 0 28px 22px;
  position: relative;
}
.timeline-item:last-child { padding-bottom: 4px; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -6px; top: 6px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent-dim);
}
.timeline-item .period {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-dim);
}
.timeline-item h3 { font-size: 17px; margin: 2px 0; }
.timeline-item .role { color: var(--accent); font-size: 14.5px; }
.timeline-item p { color: var(--text-dim); font-size: 14.5px; margin-top: 6px; max-width: 600px; }

.highlights { list-style: none; }
.highlights li {
  padding: 10px 0 10px 26px;
  position: relative;
  color: var(--text-dim);
  font-size: 15px;
  border-bottom: 1px dashed var(--border);
}
.highlights li:last-child { border-bottom: none; }
.highlights li::before {
  content: ">";
  position: absolute; left: 4px;
  color: var(--accent);
  font-family: var(--mono);
}
.highlights li strong { color: var(--text); }

/* Article (tutorial) */
article { padding: 56px 0; }
article header h1 { font-size: 34px; letter-spacing: -0.4px; margin-bottom: 8px; }
article header .meta {
  font-family: var(--mono); font-size: 13px; color: var(--text-dim);
  margin-bottom: 36px;
}
article h2 { font-size: 24px; margin: 40px 0 14px; }
article h3 { font-size: 19px; margin: 30px 0 10px; }
article p { color: var(--text); margin-bottom: 16px; max-width: 680px; }
article img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 0 0 16px;
  display: block;
}
article a { color: var(--accent); text-decoration: none; }
article a:hover { text-decoration: underline; }
article ul, article ol { margin: 0 0 16px 24px; color: var(--text); }
article li { margin-bottom: 6px; }
article code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
}
article pre {
  position: relative;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  margin: 0 0 20px;
  overflow-x: auto;
}
article pre code {
  background: none; border: none; padding: 0;
  font-size: 13.5px; line-height: 1.6;
}
.copy-btn {
  position: absolute; top: 8px; right: 8px;
  font-family: var(--mono); font-size: 11.5px;
  color: var(--text-dim);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 4px 10px;
  cursor: pointer;
}
.copy-btn:hover { color: var(--text); border-color: var(--accent-dim); }
.copy-btn.copied { color: var(--accent); border-color: var(--accent-dim); }

/* Skill cards (accordion) */
.skill-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-soft);
  padding: 20px 22px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.skill-card:hover { border-color: var(--accent-dim); }
.skill-card .skill-head::after {
  content: "+";
  font-family: var(--mono);
  font-size: 20px;
  color: var(--text-dim);
  margin-left: auto;
}
.skill-card.open .skill-head::after { content: "−"; color: var(--accent); }
.skill-card > .meta {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-dim);
  margin-top: 8px;
}
.skill-card .skill-body { display: none; cursor: auto; }
.skill-card.open .skill-body {
  display: block;
  border-top: 1px solid var(--border);
  margin-top: 14px;
  padding-top: 6px;
}
.skill-card .skill-head {
  display: flex;
  justify-content: flex-start;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.skill-card h3 { font-size: 18px; }
.skill-card .gh-link {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
}
.skill-card .gh-link:hover { text-decoration: underline; }
.skill-card .desc { color: var(--text-dim); font-size: 14.5px; margin-top: 6px; }
.skill-card .desc a { color: var(--accent); text-decoration: none; }
.skill-card .desc a:hover { text-decoration: underline; }
.skill-card .skill-row { margin-top: 14px; }
.skill-card .skill-label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  text-transform: lowercase;
  margin-bottom: 5px;
}
.skill-card pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  margin: 0;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
}

.skill-list {
  list-style: none;
  columns: 3;
  column-gap: 24px;
  margin: 6px 0 10px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
}
.skill-list li {
  padding: 3px 0 3px 16px;
  position: relative;
  break-inside: avoid;
}
.skill-list li::before {
  content: "•";
  position: absolute; left: 2px;
  color: var(--accent);
}
@media (max-width: 600px) {
  .skill-list { columns: 2; }
}

/* Callout */
.callout {
  border: 1px solid var(--accent-dim);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: var(--bg-soft);
  padding: 16px 20px;
  margin: 0 0 20px;
  max-width: 680px;
}
.callout p { margin: 0; }
.callout code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
}
.callout p + p { margin-top: 10px; }
.callout .callout-title {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 8px;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  margin-top: 72px;
  padding: 28px 0 40px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
}
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .hero { padding: 56px 0 40px; }
  .hero h1 { font-size: 32px; }
}
