/* =========================================
   FONTS
   ========================================= */
@import url("https://fonts.googleapis.com/css2?family=PT+Mono&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Source+Serif+Pro:ital,wght@0,400;0,600;1,400&display=swap");

/* =========================================
   RESET
   ========================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* =========================================
   VARIABLES — dark (default)
   ========================================= */
:root {
  --bg: #282828;
  --bg-alt: #242424;
  --fg: #d4d4d4;
  --fg1: #ebdbb2;
  --fg-dim: #6e6e6e;
  --accent: #a8c4a2;
  --border: #383838;
  --font: "Source Serif Pro", serif;
  --mono: "PT Mono", monospace;
  --max-width: 100ch;
}

/* =========================================
   VARIABLES — light
   ========================================= */
[data-theme="light"] {
  --bg: #f9f5f0;
  --bg-alt: #ede8e0;
  --fg: #3c3836;
  --fg1: #1d2021;
  --fg-dim: #928374;
  --accent: #427b58;
  --border: #d5c4a1;
}

/* =========================================
   GLOBAL
   ========================================= */
html {
  font-size: 20px;
  background-color: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  line-height: 1.75;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

/* =========================================
   LINKS
   ========================================= */
a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* =========================================
   HEADER LINKS ()
   ========================================= */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  padding-top: 1rem;
  padding-bottom: 0.5rem;
  margin-bottom: 2rem;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

/* =========================================
   LOGO / MONOGRAM
   ========================================= */
.monogram {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  opacity: 0.85;
}

.monogram:hover {
  opacity: 1;
  text-decoration: none;
}

.monogram img {
  filter: invert(1);
}

[data-theme="light"] .monogram img {
  filter: none;
}

/* =========================================
   HEADER (Logo, theme-toggle, rss)
   ========================================= */
.header-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.header-actions a {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--fg-dim);
  letter-spacing: 0.05em;
}

.header-actions a:hover {
  color: var(--accent);
  text-decoration: none;
}

.icon-link {
  display: flex;
  align-items: center;
}

.icon-link img {
  width: 18px;
  height: 18px;
}

/* =========================================
   THEME TOGGLE
   ========================================= */
.theme-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--fg-dim);
  display: flex;
  align-items: center;
}

.theme-toggle img {
  width: 24px;
  height: 24px;
}

.theme-toggle:hover {
  color: var(--accent);
}

[data-theme="dark"] .icon-moon {
  display: none;
}
[data-theme="light"] .icon-sun {
  display: none;
}

.theme-toggle svg {
  transition: filter 0.25s ease;
}

.icon-sun:hover {
  filter: drop-shadow(0 0 6px rgba(255, 204, 0, 0.4));
}

.icon-moon:hover {
  filter: drop-shadow(0 0 6px rgba(120, 120, 120, 1.6));
}

/* =========================================
   NAV
   ========================================= */
nav {
  display: flex;
  gap: 1.8rem;
  border-top: 1px solid var(--border);
  padding-top: 0.6rem;
}

nav a {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--fg-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

nav a.nav-active {
  color: var(--fg);
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}

/* =========================================
   POST LIST
   ========================================= */
.post-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.post-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.6rem;
  align-items: baseline;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--border);
}

.post-date {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--fg-dim);
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 0.15em;
}

.post-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.post-title a {
  color: var(--fg);
  font-size: 1.1rem;
  line-height: 1.4;
}

.post-title a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* =========================================
   YEAR GROUPS
   ========================================= */
.year-group {
  margin-bottom: 2rem;
}

.year-heading {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: normal;
  color: var(--fg-dim);
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

/* =========================================
   TAGS
   ========================================= */
.tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--fg-dim);
  border: 1px solid var(--border);
  padding: 0.05em 0.45em;
  white-space: nowrap;
  line-height: 1.8;
}

.tag:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

.tag-filter-label {
  font-size: 0.9rem;
  color: var(--fg-dim);
  margin-bottom: 1.5rem;
}

.tag-filter-clear {
  margin-left: 0.5rem;
  color: var(--fg-dim);
  font-size: 0.85rem;
}

.tag-filter-clear:hover {
  color: var(--accent);
}

/* =========================================
   SINGLE POST
   ========================================= */
article h1 {
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--fg1);
  margin-bottom: 0.6rem;
}

.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--fg-dim);
  margin-bottom: 3rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.post-meta svg {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  position: relative;
  top: -2.7px;
}

.post-body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--fg);
}

.post-body p {
  margin-bottom: 1.4rem;
}

.post-body h2 {
  font-size: 1.3rem;
}

.post-body h3 {
  font-size: 1rem;
}

.post-body h2,
.post-body h3 {
  font-family: var(--font);
  font-weight: bold;
  color: var(--fg1);
  letter-spacing: 0.03em;
  margin: 2.5rem 0 0.6rem;
}

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

.post-body ul,
.post-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.4rem;
}

.post-body li {
  margin-bottom: 0.3rem;
}

.post-body blockquote {
  border-left: 2px solid var(--fg-dim);
  margin: 1.8rem 0;
  padding: 0.2rem 1.2rem;
  color: var(--fg-dim);
  font-style: italic;
}

/* =========================================
   CODE — inline
   ========================================= */
.post-body code {
  font-family: var(--mono);
  font-size: 0.83em;
  color: var(--fg1);
  background: var(--bg-alt);
  padding: 0.1em 0.35em;
  border-radius: 2px;
}

/* =========================================
   CODE — blocks
   ========================================= */
.post-body pre,
.post-body .chroma {
  background: var(--bg-alt) !important;
}

.post-body pre {
  position: relative;
  border-left: 2px solid var(--accent);
  padding: 1.1rem 1.3rem;
  overflow-x: auto;
  margin: 1.8rem 0;
  line-height: 1.6;
}

.post-body pre code {
  font-size: 0.82rem;
  color: var(--fg);
  background: none;
  padding: 0;
}

.post-body pre .code-lang {
  position: absolute;
  top: 0.5rem;
  right: 0.7rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--fg-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  user-select: none;
}

/* =========================================
   TABLES
   ========================================= */
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.88rem;
  margin: 1.5rem 0;
}

table,
th,
td {
  border: 1px solid var(--border);
}

th,
td {
  padding: 0.5rem 0.8rem;
  text-align: left;
}

th {
  font-family: var(--mono);
  font-weight: normal;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-dim);
  background: var(--bg-alt);
}

/* =========================================
   BACK LINK
   ========================================= */
.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2.5rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--fg-dim);
  transition:
    color 0.2s,
    border-color 0.2s;
}

.back-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

.back-link svg {
  width: 18px;
  height: 18px;
}

/* =========================================
   COPY BUTTON
   ========================================= */
.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: transparent;
  border: none;
  color: var(--fg-dim);
  padding: 0.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  transition: color 0.2s;
}

.copy-btn:hover {
  color: var(--accent);
}

.copy-btn svg {
  width: 18px;
  height: 18px;
}

/* =========================================
   GO TO TOP BUTTON
   ========================================= */
#top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: transparent;
  border: 2px solid var(--border);
  color: var(--fg-dim);
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition:
    color 0.2s,
    border-color 0.2s;
}

#top-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

#top-btn svg {
  width: 18px;
  height: 18px;
}

/* =========================================
   FOOTER
   ========================================= */
footer {
  margin-top: 5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--fg-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
  letter-spacing: 0.03em;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.footer-social a {
  display: inline-flex;
  opacity: 0.6;
}

.footer-social a:hover {
  opacity: 1;
  text-decoration: none;
}

.footer-social img {
  width: 1.9rem;
  height: 1.9rem;
  filter: invert(1);
}

[data-theme="light"] .footer-social img {
  filter: none;
}

/* =========================================
   ADMONITIONS
   ========================================= */
.post-body .admonition {
  margin: 1.8rem 0;
  border-left: 2px solid var(--border);
  padding: 0.75rem 1rem;
  background: var(--bg-alt);
}

.post-body .adm-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.post-body .adm-title::before {
  font-size: 0.85rem;
  line-height: 1;
}

.post-body .adm-body {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--fg);
}

.post-body .adm-body > *:last-child {
  margin-bottom: 0;
}
.post-body .adm-body p {
  margin-bottom: 0.5rem;
}

.post-body .adm-note {
  border-color: #83a598;
}
.post-body .adm-tip {
  border-color: var(--accent);
}
.post-body .adm-important {
  border-color: #d3869b;
}
.post-body .adm-warning {
  border-color: #d79921;
}
.post-body .adm-caution {
  border-color: #cc241d;
}

.post-body .adm-note .adm-title {
  color: #83a598;
}
.post-body .adm-tip .adm-title {
  color: var(--accent);
}
.post-body .adm-important .adm-title {
  color: #d3869b;
}
.post-body .adm-warning .adm-title {
  color: #d79921;
}
.post-body .adm-caution .adm-title {
  color: #cc241d;
}

.post-body .adm-note .adm-title::before {
  content: "note";
}
.post-body .adm-tip .adm-title::before {
  content: "tip";
}
.post-body .adm-important .adm-title::before {
  content: "important";
}
.post-body .adm-warning .adm-title::before {
  content: "warning";
}
.post-body .adm-caution .adm-title::before {
  content: "caution";
}

/* =========================================
   FOOTNOTES
   ========================================= */
.post-body .footnotes {
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px dashed var(--border);
}

.post-body .footnotes hr {
  display: none;
}

.post-body .footnotes > h2 {
  margin: 0 0 0.9rem;
  font-size: 1.05em;
  font-weight: 600;
  color: var(--fg1);
  letter-spacing: normal;
  text-transform: none;
}

.post-body sup a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.72em;
  line-height: 1;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 0.45rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--fg-dim);
  text-decoration: none;
  margin-left: 0.15rem;
  vertical-align: super;
}

.post-body sup a:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.post-body .footnotes ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: fn-counter;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.post-body .footnotes li {
  counter-increment: fn-counter;
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0.65rem 0.75rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--fg-dim);
}

.post-body .footnotes li::before {
  content: counter(fn-counter);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.8rem;
  height: 1.8rem;
  font-family: var(--mono);
  font-size: 0.82em;
  color: var(--fg1);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.post-body .footnotes li p {
  margin: 0;
  line-height: 1.55;
}

.post-body .footnotes a.footnote-backref {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  margin-left: 0.5rem;
  padding: 0.05em 0.35em;
  color: var(--fg-dim);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--mono);
}

.post-body .footnotes a.footnote-backref:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* =========================================
   RESUME
   ========================================= */
.resume {
  max-width: 80ch;
}

.resume-header {
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.resume-name {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--fg1);
  line-height: 1.2;
  margin-bottom: 0.3rem;
}

.resume-title {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.resume-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.2rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--fg-dim);
}

.resume-contact a {
  color: var(--fg-dim);
  text-decoration: none;
}
.resume-contact a:hover {
  color: var(--accent);
}

.resume-section {
  margin-bottom: 2.5rem;
}

.resume-section-title {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px dashed var(--border);
}

.resume-timeline {
  position: relative;
  padding-left: 1.2rem;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.resume-timeline .resume-entry {
  position: relative;
  margin-bottom: 0;
}

.resume-timeline .resume-entry::before {
  content: "";
  position: absolute;
  left: -1.48rem;
  top: 0.45rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent);
}

.resume-entry {
  margin-bottom: 1.8rem;
}

.resume-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.6rem;
}

.resume-entry-org {
  font-weight: 600;
  color: var(--fg1);
  font-size: 0.95rem;
  margin-right: 0.6rem;
}

.resume-entry-role {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--fg-dim);
  letter-spacing: 0.03em;
}

.resume-entry-meta {
  display: flex;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--fg-dim);
  white-space: nowrap;
  flex-shrink: 0;
}

.resume-note {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--fg-dim);
  margin-top: 0.3rem;
}

.resume-list {
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.resume-list li {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--fg);
}

mark.resume-metric {
  background: none;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.88em;
  font-weight: bold;
}

.resume-skills {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.resume-skill-row {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  align-items: baseline;
}

.resume-skill-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--fg-dim);
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.resume-skill-value {
  color: var(--fg);
  line-height: 1.5;
}

.resume-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.resume-tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--fg-dim);
  border: 1px solid var(--border);
  padding: 0.1em 0.5em;
  line-height: 1.8;
  white-space: nowrap;
}

.resume-tag:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.resume-project-link {
  color: var(--fg-dim);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.72rem;
}

.resume-project-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.resume-download {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* =========================================
   PROJECTS PAGE
   ========================================= */
.projects {
  display: flex;
  flex-direction: column;
}

.project {
  padding: 2rem 0;
}

.project-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

.project-banner {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.project-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.06) 1px,
    transparent 1px
  );
  background-size: 18px 18px;
}

.project-banner-label {
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.18);
  text-transform: lowercase;
  position: relative;
  z-index: 1;
  user-select: none;
}

.project-banner--kvmcli {
  background-color: #1e2d1e;
}
.project-banner--bacli {
  background-color: #1e1e2d;
}
.project-banner--zars {
  background-color: #2d1e1e;
}
.project-banner--homelab {
  background-color: #1e2a2d;
}
.project-banner--orgmaster {
  background-color: #2a2d1e;
}

.project-body {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.project-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.project-title {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: normal;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.project-link {
  font-size: 0.85rem;
  color: var(--fg-dim);
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.project-link:hover {
  color: var(--accent);
}

.project-link img {
  width: 38px;
  height: 38px;
  display: block;
}

/* .project-link img:hover { */
/*   color: var(--accent); */
/* } */

.project-desc {
  font-size: 0.95rem;
  color: var(--fg-dim);
  line-height: 1.7;
  margin: 0;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--fg-dim);
  border: 1px solid var(--border);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: 0.03em;
}

/* =========================================
   COURSES PAGE
   ========================================= */
.courses {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.course-card {
  border: 1px solid var(--border);
  padding: 1.6rem;
}

.course-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}

.course-header-left {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.course-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg1);
  margin: 0;
}

.course-desc {
  font-size: 0.88rem;
  color: var(--fg-dim);
  line-height: 1.7;
  max-width: 75ch;
}

.no-courses {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.course-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  flex-shrink: 0;
}

.course-stat {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--fg-dim);
  white-space: nowrap;
}

.course-badge {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15em 0.55em;
  border: 1px solid;
  white-space: nowrap;
}

.course-badge--progress {
  color: #d79921;
  border-color: #d79921;
}
.course-badge--complete {
  color: var(--accent);
  border-color: var(--accent);
}

.course-difficulty {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.course-difficulty--beginner {
  color: var(--accent);
}
.course-difficulty--intermediate {
  color: #d79921;
}
.course-difficulty--advanced {
  color: #cc241d;
}

.course-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1px solid var(--border);
  color: var(--fg-dim);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  padding: 0.3em 0.8em;
  cursor: pointer;
  text-transform: uppercase;
  transition:
    border-color 0.15s,
    color 0.15s;
}

.course-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.course-lessons {
  margin-top: 1.2rem;
  border-top: 1px dashed var(--border);
  padding-top: 1rem;
}

.lesson-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.lesson {
  display: grid;
  grid-template-columns: 2rem 1.2rem 1fr auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.55rem 0;
}

.lesson:last-child {
  border-bottom: none;
}

.lesson-num {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--fg-dim);
  text-align: right;
}

.lesson-icon {
  width: 20px;
  height: 20px;
  opacity: 0.9;
  filter: invert(1);
}

[data-theme="light"] .lesson-icon {
  filter: none;
}

.lesson-title {
  font-size: 0.92rem;
  color: var(--fg);
  text-decoration: none;
  line-height: 1.4;
}

.lesson-title:hover {
  color: var(--accent);
  text-decoration: none;
}

.lesson-meta {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--fg-dim);
  white-space: nowrap;
}

.lesson--video {
  margin-top: 0.4rem;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--border);
  border-bottom: none;
}

.toggle-arrow {
  transition: transform 0.25s ease;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 600px) {
  body {
    padding: 2rem 1rem 4rem;
  }

  .post-list li {
    flex-direction: column;
    gap: 0.15rem;
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }

  .resume-entry-header {
    flex-direction: column;
    gap: 0.2rem;
  }

  .resume-entry-meta {
    white-space: normal;
    flex-wrap: wrap;
    gap: 0.3rem 0.8rem;
  }

  .resume-skill-row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .resume-skill-label {
    color: var(--accent);
  }

  .resume-timeline {
    padding-left: 0.8rem;
  }

  .course-header {
    flex-direction: column;
    gap: 1rem;
  }

  .course-meta {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .lesson {
    grid-template-columns: 2rem 1.2rem 1fr;
  }

  .lesson-meta {
    display: none;
  }
}

/* =========================================
   HOME PAGE
   ========================================= */
.home {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

/* ── Intro ── */
.home-intro {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid var(--border);
}

.home-name {
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--fg1);
  line-height: 1.2;
}

.home-role {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.home-bio {
  font-size: 1rem;
  color: var(--fg);
  line-height: 1.8;
  max-width: 65ch;
  margin-top: 0.4rem;
}

.home-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  margin-top: 0.6rem;
  font-family: var(--mono);
  font-size: 0.78rem;
}

.home-links a {
  color: var(--fg-dim);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.home-links a:hover {
  color: var(--accent);
}

/* ── Sections ── */
.home-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.home-section-title {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: normal;
  color: var(--fg-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed var(--border);
}

.home-see-all {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--fg-dim);
  text-decoration: none;
  letter-spacing: 0.04em;
  align-self: flex-start;
  margin-top: 0.2rem;
}

.home-see-all:hover {
  color: var(--accent);
  text-decoration: none;
}

/* ── Projects ── */
.home-projects {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.home-project {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.home-project:first-child {
  padding-top: 0;
}

.home-project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.home-project-title {
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--accent);
  letter-spacing: 0.06em;
}

.home-project-link {
  display: inline-flex;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.home-project-link:hover {
  opacity: 1;
  text-decoration: none;
}

.home-project-link img {
  width: 20px;
  height: 20px;
  filter: invert(1);
}

[data-theme="light"] .home-project-link img {
  filter: none;
}

.home-project-desc {
  font-size: 0.88rem;
  color: var(--fg-dim);
  line-height: 1.65;
  margin: 0;
}

.home-project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.2rem;
}

/* =========================================
   PROJECTS PAGE — updated
   ========================================= */

/* Stats row */
.project-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.2rem;
  margin-bottom: 0.6rem;
}

.project-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--fg-dim);
  letter-spacing: 0.03em;
}

.project-stat svg {
  flex-shrink: 0;
  opacity: 0.7;
}

/* Status badge */
.project-stat--status {
  padding: 0.1em 0.5em;
  border: 1px solid;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.65rem;
}

.project-stat--active {
  color: var(--accent);
  border-color: var(--accent);
}

.project-stat--wip {
  color: #d79921;
  border-color: #d79921;
}

.project-stat--archived {
  color: var(--fg-dim);
  border-color: var(--border);
}

/* Header actions (github link) */
.project-header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.project-link {
  display: inline-flex;
  opacity: 0.5;
  transition: opacity 0.2s;
  text-decoration: none;
}

.project-link:hover {
  opacity: 1;
  text-decoration: none;
}

.project-link img {
  width: 22px;
  height: 22px;
  filter: invert(1);
}

[data-theme="light"] .project-link img {
  filter: none;
}

/* Expand toggle */
.project-expand {
  margin-top: 0.6rem;
}

.project-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: 1px solid var(--border);
  color: var(--fg-dim);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  padding: 0.2em 0.65em;
  cursor: pointer;
  text-transform: uppercase;
  transition:
    border-color 0.15s,
    color 0.15s;
}

.project-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.project-toggle-icon {
  transition: transform 0.2s ease;
}

/* Expanded body */
.project-body-detail {
  margin-top: 0.9rem;
  padding: 0.9rem 1rem;
  border-left: 2px solid var(--border);
  font-size: 0.9rem;
  color: var(--fg-dim);
  line-height: 1.75;
}

.project-body-detail p {
  margin-bottom: 0.6rem;
}

.project-body-detail p:last-child {
  margin-bottom: 0;
}
