/* ============================================================
   Home page -- portfolio landing (karolina-inspired).
   Hero + neofetch feature card + writing-forward post list
   + side-quest cards. Scoped to the homepage only.
   Shared colour vars + top bar + footer live in the global
   theme_head.html partial.
   ============================================================ */

body > header,
body > footer {
  display: none;
}

html {
  scroll-behavior: smooth;
}
#current-quest {
  scroll-margin-top: 1.5rem;
}

body {
  max-width: none;
  padding: 0;
  background-color: var(--home-bg);
  color: var(--home-fg);
  font-family: var(--home-sans);
  background-image: radial-gradient(
    circle,
    var(--grid-dot) 1.5px,
    transparent 1.5px
  );
  background-size: 38px 38px;
}

.home-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(1.2rem, 4vw, 2.5rem) clamp(1rem, 4vw, 2rem) 3rem;
}

/* homepage sits the nav tighter to the hero than inner pages */
.home-topbar {
  margin-bottom: 0.5rem;
}

/* ---- hero ---- */
.hero-hi {
  margin: 0.5rem 0 0;
  color: var(--home-muted);
  font-size: 0.95rem;
}
.hero-name {
  margin: 0 0 0.9rem;
  font-family: var(--home-sans);
  font-weight: 700;
  font-size: clamp(2.6rem, 11vw, 5.4rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--home-fg);
  opacity: 0.92;
}
.hero-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.7rem;
  margin: 0 0 1.2rem;
}
.hero-email {
  font-family: var(--home-mono);
  font-size: 0.85rem;
  color: var(--home-fg);
}
.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.28em 0.7em;
  border: 1px solid var(--home-line-strong);
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--home-mono);
  font-size: 0.75rem;
  color: var(--home-muted);
  transition:
    border-color 0.15s,
    color 0.15s;
}
.social-pill:hover {
  border-color: var(--home-fg);
  color: var(--home-fg);
  text-decoration: none;
}
.social-icon {
  height: 1em;
  width: auto;
  fill: currentColor;
}
.social-icon.social-icon-sm {
  height: 0.85em;
}

.hero-bio {
  margin: 0 0 1.3rem;
  color: var(--home-muted);
  line-height: 1.65;
}
.hero-bio a {
  color: var(--home-fg);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.worked-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.6rem;
  margin: 0 0 2.2rem;
  font-size: 0.82rem;
}
.worked-label {
  color: var(--home-faint);
  font-family: var(--home-mono);
  font-size: 0.78rem;
  margin-right: 0.2rem;
}
.worked-tag {
  font-family: var(--home-mono);
  font-size: 0.78rem;
  color: var(--home-muted);
  border: 1px solid var(--home-line);
  border-radius: 6px;
  padding: 0.2em 0.6em;
  text-decoration: none;
  transition:
    border-color 0.15s,
    color 0.15s;
}
a.worked-tag:hover {
  border-color: var(--home-fg);
  color: var(--home-fg);
  text-decoration: none;
}
.worked-tag.now {
  color: var(--home-bg);
  background: var(--pill-blue);
  border-color: transparent;
  font-weight: 600;
}

.xp {
  margin: 0 0 2.2rem;
}
.xp .worked-row {
  margin-bottom: 0;
}
.xp-tab {
  font-family: var(--home-mono);
  font-size: 0.78rem;
  color: var(--home-muted);
  background: none;
  border: 1px solid var(--home-line);
  border-radius: 6px;
  padding: 0.2em 0.6em;
  cursor: pointer;
  transition:
    border-color 0.15s,
    color 0.15s;
}
.xp-tab:hover {
  border-color: var(--home-fg);
  color: var(--home-fg);
}
.xp-tab::after {
  content: " +";
  color: var(--home-faint);
}
.xp-tab.active {
  border-color: var(--home-line-strong);
  color: var(--home-fg);
}
.xp-tab.active::after {
  content: " -";
}
.xp-tab.now {
  color: var(--home-bg);
  background: var(--pill-blue);
  border-color: transparent;
  font-weight: 600;
}
.xp-tab.now::after {
  color: var(--home-bg);
  opacity: 0.75;
}
.xp-tab.now:hover,
.xp-tab.now.active {
  color: var(--home-bg);
  border-color: transparent;
  opacity: 0.9;
}
.xp-panel {
  display: none;
  margin-top: 0.9rem;
  border: 1px solid var(--home-line);
  border-radius: 12px;
  background: var(--home-panel);
  padding: 1rem 1.2rem;
}
.xp-panel.active {
  display: block;
}
.xp-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1em;
  margin-bottom: 0.5em;
  flex-wrap: wrap;
}
.xp-role {
  font-weight: 600;
  color: var(--home-fg);
  font-size: 0.95rem;
}
.xp-dates {
  font-family: var(--home-mono);
  font-size: 0.75rem;
  color: var(--home-faint);
}
.xp-desc {
  margin: 0 0 0.7em;
  color: var(--home-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}
.xp-stack {
  margin: 0 0 0.9em;
  font-family: var(--home-mono);
  font-size: 0.72rem;
  color: var(--home-faint);
}
.xp-panel .proj-link {
  display: inline-block;
}

/* ---- section heads ---- */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin: 0 0 1rem;
}
.section-head h2 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--home-fg);
}
.section-head::before {
  content: "##";
  font-family: var(--home-mono);
  color: var(--pill-mauve);
  font-weight: 700;
  font-size: 1.05rem;
}
.section-head .count {
  margin-left: auto;
  font-family: var(--home-mono);
  font-size: 0.75rem;
  color: var(--home-faint);
}

/* ---- cards ---- */
.proj-card {
  border-radius: 14px;
  border: 1px solid var(--home-line);
  background: var(--home-panel);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease;
}
.proj-card:hover {
  transform: translateY(-3px);
  border-color: var(--home-line-strong);
}
.proj-body {
  padding: 1.15rem 1.35rem 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.proj-pills {
  display: flex;
  gap: 0.4em;
  flex-wrap: wrap;
  margin-bottom: 0.6em;
}
.proj-pill {
  font-family: var(--home-mono);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.24em 0.7em;
  border-radius: 999px;
  color: var(--home-bg);
  letter-spacing: 0.02em;
}
.proj-pill.blue {
  background: var(--pill-blue);
}
.live-dot {
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: currentColor;
  margin-right: 0.4em;
  vertical-align: middle;
}
.proj-title {
  margin: 0 0 0.4em;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--home-fg);
  line-height: 1.3;
}
.proj-desc {
  margin: 0 0 1em;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--home-muted);
  flex: 1;
}
.proj-links {
  display: flex;
  gap: 0.5em;
  flex-wrap: wrap;
  margin-top: auto;
}
.proj-link {
  font-family: var(--home-mono);
  font-size: 0.76rem;
  text-decoration: none;
  color: var(--home-muted);
  border: 1px solid var(--home-line-strong);
  padding: 0.28em 0.8em;
  border-radius: 999px;
  transition:
    border-color 0.15s,
    color 0.15s;
}
.proj-link:hover {
  border-color: var(--home-fg);
  color: var(--home-fg);
  text-decoration: none;
}
.proj-link.primary {
  background: var(--home-fg);
  color: var(--home-bg);
  border-color: transparent;
}
.proj-link.primary:hover {
  color: var(--home-bg);
  opacity: 0.85;
}

/* ---- feature card (current quest) ---- */
.feature-card {
  margin-bottom: 2.4rem;
}
.feature-grid {
  display: grid;
  grid-template-columns: 46% 1fr;
}
@media (max-width: 700px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}
.neofetch {
  background: var(--home-bg);
  padding: 1.35rem 1.5rem;
  font-family: var(--home-mono);
  font-size: 0.78rem;
  line-height: 1.7;
  border-right: 1px solid var(--home-line);
  color: var(--home-muted);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
@media (max-width: 700px) {
  .neofetch {
    border-right: none;
    border-bottom: 1px solid var(--home-line);
  }
}
.neofetch .nf-user {
  color: var(--pill-green);
}
.neofetch .nf-rule {
  color: var(--home-faint);
}
.neofetch .nf-key {
  color: var(--pill-blue);
  display: inline-block;
  width: 5.5em;
}
.neofetch .nf-swatch {
  margin-top: 0.6rem;
  letter-spacing: 0.1em;
}
.nf-swatch .sw-red {
  color: #f38ba8;
}
.nf-swatch .sw-peach {
  color: #fab387;
}
.nf-swatch .sw-yellow {
  color: #f9e2af;
}
.nf-swatch .sw-green {
  color: #a6e3a1;
}
.nf-swatch .sw-blue {
  color: #89b4fa;
}
.nf-swatch .sw-mauve {
  color: #cba6f7;
}
.feature-body {
  padding: 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
}
/* the feature card leads with a bigger title and a non-growing blurb */
.feature-body .proj-title {
  font-size: 1.35rem;
}
.feature-body .proj-desc {
  flex: unset;
}
.stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
  margin: 0.2em 0 1.1em;
}
.stat-chip {
  font-family: var(--home-mono);
  font-size: 0.72rem;
  color: var(--home-muted);
  border: 1px solid var(--home-line);
  border-radius: 6px;
  padding: 0.2em 0.55em;
}
.stat-chip b {
  color: var(--home-fg);
  font-weight: 600;
}

/* ---- writing: featured post + list ---- */
.feat {
  border: 1px solid var(--home-line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--home-panel);
  margin-bottom: 1.5rem;
  transition: border-color 0.18s;
  display: block;
  text-decoration: none;
}
.feat:hover,
.feat:hover .feat-title {
  border-color: var(--home-line-strong);
  text-decoration: none;
}
.feat-term {
  background: var(--home-bg);
  border-bottom: 1px solid var(--home-line);
  font-family: var(--home-mono);
  font-size: 0.76rem;
}
.feat-bar {
  display: flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.55em 0.9em;
  border-bottom: 1px solid var(--home-line);
}
.term-dot {
  width: 0.62em;
  height: 0.62em;
  border-radius: 50%;
}
.term-dot.red {
  background: #f38ba8;
}
.term-dot.yellow {
  background: #f9e2af;
}
.term-dot.green {
  background: #a6e3a1;
}
.feat-cmd {
  padding: 0.7em 1em;
  color: var(--home-muted);
}
.term-prompt {
  color: var(--pill-green);
}
.term-path {
  color: var(--pill-blue);
}
.term-comment {
  color: var(--home-faint);
}
.feat-body {
  padding: 1.2rem 1.4rem 1.4rem;
}
.feat-title {
  margin: 0 0 0.35em;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--home-fg);
  line-height: 1.25;
}
.feat-meta {
  font-family: var(--home-mono);
  font-size: 0.74rem;
  color: var(--home-faint);
  margin: 0 0 0.7em;
}
.feat-sum {
  margin: 0 0 1.1em;
  color: var(--home-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.postlist {
  display: flex;
  flex-direction: column;
}
.post-row {
  display: grid;
  grid-template-columns: 5.5em 1fr;
  gap: 0.6em 1em;
  align-items: baseline;
  padding: 0.85em 0;
  border-top: 1px solid var(--home-line);
  text-decoration: none;
  transition: opacity 0.12s;
}
.post-row:last-child {
  border-bottom: 1px solid var(--home-line);
}
.post-row:hover {
  opacity: 0.7;
  text-decoration: none;
}
.post-date {
  font-family: var(--home-mono);
  font-size: 0.74rem;
  color: var(--home-faint);
  white-space: nowrap;
}
.post-name {
  font-size: 0.95rem;
  color: var(--home-fg);
  line-height: 1.35;
}
@media (max-width: 520px) {
  .post-row {
    grid-template-columns: 5em 1fr;
  }
}
.listfoot {
  margin: 1.1rem 0 2.4rem;
  display: flex;
  gap: 0.5em;
}
