/* =========================================================
   DAIVIK PATEL — PORTFOLIO
   Theme: "Minimalist Canopy" — a blend of Modern Minimalist
   (charcoal/grayscale precision) and Forest Canopy (forest
   green, sage, ivory earth tones), expressed through a
   terminal-and-monospace motif that mirrors Daivik's real
   Kitty + Tmux Linux workflow.
   ========================================================= */

:root {
  /* --- color tokens --- */
  --charcoal: #2c332f;
  --charcoal-2: #3c463f;
  --forest: #2d4a2b;
  --forest-light: #3f6a3c;
  --sage: #7d8471;
  --olive: #a4ac86;
  --slate: #708090;
  --ivory: #faf9f6;
  --paper: #f1efe7;
  --line: #ddd9cd;
  --white: #ffffff;

  /* --- semantic tokens (swap per theme) --- */
  --bg-page: var(--ivory);
  --bg-alt: var(--paper);
  --bg-surface: var(--white);
  --text-1: var(--charcoal);
  --text-2: var(--charcoal-2);
  --border-c: var(--line);

  /* --- type tokens --- */
  --font-mono:
    "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-body:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* --- scale (generous, for readability) --- */
  --fs-base: 18px;
  --measure: 68ch;
}

:root[data-theme="dark"] {
  --bg-page: #1a1f1b;
  --bg-alt: #20261f;
  --bg-surface: #262e26;
  --text-1: #f3f1e9;
  --text-2: #c6cabb;
  --border-c: #38423a;
  --slate: #9aa7a0;
  --forest: #6fae64;
  --forest-light: #86c47a;
  --sage: #a6ad94;
  --olive: #c3caa8;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--text-1);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition:
    background-color 0.25s ease,
    color 0.25s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* =========================== NAV =========================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg-page) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-c);
  transition: background 0.3s ease;
}
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
}
.nav-brand {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.nav-brand .dot {
  color: var(--forest);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 22px;
}

.theme-toggle {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 1px solid var(--border-c);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}
.theme-toggle:hover {
  border-color: var(--forest);
  transform: translateY(-1px);
}
.theme-icon {
  position: absolute;
  font-size: 1.05rem;
  line-height: 1;
  transition:
    opacity 0.2s ease,
    transform 0.3s ease;
}
.theme-icon-sun {
  color: #c9922e;
  opacity: 1;
  transform: scale(1) rotate(0deg);
}
.theme-icon-moon {
  color: var(--sage);
  opacity: 0;
  transform: scale(0.5) rotate(-40deg);
}
:root[data-theme="dark"] .theme-icon-sun {
  opacity: 0;
  transform: scale(0.5) rotate(40deg);
}
:root[data-theme="dark"] .theme-icon-moon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 34px;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  padding: 4px 0;
}
.nav-links a .cmd {
  color: var(--sage);
  font-size: 0.78rem;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--forest);
  transition: width 0.25s ease;
}
.nav-links a:hover::after {
  width: 100%;
}
.nav-links a:hover {
  color: var(--forest);
}

.nav-cta {
  background: var(--forest);
  color: var(--ivory) !important;
  padding: 8px 16px !important;
  border-radius: 3px;
}
.nav-cta::after {
  display: none;
}
.nav-cta:hover {
  background: var(--forest-light);
  color: var(--ivory) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-1);
  display: block;
}

/* =========================== HERO =========================== */
.hero {
  padding: 156px 32px 96px;
  background: var(--bg-page);
  border-bottom: 1px solid var(--border-c);
}
.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}
.hero-inner > * {
  min-width: 0;
}
.eyebrow {
  font-family: var(--font-mono);
  color: var(--forest);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}
.hero-title {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: clamp(3rem, 6.2vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--text-1);
  margin-bottom: 28px;
}
.hero-sub {
  font-size: 1.18rem;
  max-width: 46ch;
  color: var(--text-2);
  margin-bottom: 36px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.btn {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 14px 26px;
  border-radius: 3px;
  border: 1.5px solid transparent;
  display: inline-block;
  transition: all 0.2s ease;
}
.btn-primary {
  background: var(--forest);
  color: var(--ivory);
}
.btn-primary:hover {
  background: var(--forest-light);
  transform: translateY(-2px);
}
.btn-ghost {
  border-color: var(--text-1);
  color: var(--text-1);
}
.btn-ghost:hover {
  background: var(--text-1);
  color: var(--bg-page);
  transform: translateY(-2px);
}

.hero-meta {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--slate);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.hero-meta .sep {
  color: var(--line);
}
/* PILL */

.cmd-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 4px;
}
.cmd-pill {
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--charcoal);
  color: var(--olive);
  border: 1px solid var(--charcoal-2);
  border-radius: 20px;
  padding: 7px 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cmd-pill:hover,
.cmd-pill:focus-visible {
  border-color: var(--sage);
}
.cmd-name {
  pointer-events: none;
}
.cmd-pop {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(4px);
  width: max-content;
  max-width: min(230px, 72vw);
  background: var(--charcoal-2);
  color: var(--ivory);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.82rem;
  line-height: 1.4;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  box-shadow: 0 14px 34px -12px rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
  z-index: 5;
}
.cmd-pop::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--charcoal-2);
}
.cmd-pill.open .cmd-pop {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
@media (hover: hover) {
  .cmd-pill:hover .cmd-pop,
  .cmd-pill:focus-visible .cmd-pop {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
  }
}

/* --- terminal signature element --- */
.terminal {
  background: var(--charcoal);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 60px -20px rgba(44, 51, 47, 0.45);
  border: 1px solid var(--charcoal-2);
  min-width: 0;
  max-width: 100%;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--charcoal-2);
  min-width: 0;
}
.tdot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.tdot.r {
  background: #c96b5a;
}
.tdot.y {
  background: #d9b35c;
}
.tdot.g {
  background: #7d9d6f;
}
.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--olive);
  margin-left: 10px;
  opacity: 0.8;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.terminal-body {
  padding: 26px 24px 30px;
  min-height: 260px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--ivory);
  min-width: 0;
  overflow-wrap: anywhere;
}
.terminal-body p {
  margin-bottom: 14px;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.prompt {
  color: var(--olive);
  font-weight: 600;
}
.path {
  color: var(--sage);
  margin-right: 6px;
}
.out {
  color: var(--white);
  padding-left: 2px;
}
.hidden-line {
  opacity: 0;
}
.cursor {
  animation: blink 1s step-end infinite;
  color: var(--olive);
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* --- playground terminal --- */
.playground-intro {
  max-width: var(--measure);
  font-size: 1.06rem;
  color: var(--text-2);
  margin: -6px 0 40px;
}
.playground-intro code {
  font-family: var(--font-mono);
  background: var(--bg-surface);
  border: 1px solid var(--border-c);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--forest);
  font-size: 0.92em;
}
.playground-terminal {
  max-width: 900px;
}
.playground-body {
  max-height: 360px;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 180px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.playground-body .out {
  color: var(--ivory);
}
.playground-body .hl {
  color: var(--olive);
  font-weight: 600;
}
.playground-body .cmd-echo {
  color: var(--white);
  overflow-wrap: anywhere;
}
.playground-body .err {
  color: #d98a7a;
}
.playground-body::-webkit-scrollbar {
  width: 8px;
}
.playground-body::-webkit-scrollbar-thumb {
  background: var(--charcoal-2);
  border-radius: 4px;
}
.playground-inputline {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px 22px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  border-top: 1px solid var(--charcoal-2);
  min-width: 0;
}
.playground-inputline .prompt,
.playground-inputline .path {
  flex-shrink: 0;
}
.playground-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--ivory);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  caret-color: var(--olive);
}
.playground-input::placeholder {
  color: var(--sage);
  opacity: 0.7;
}

/* =========================== SECTIONS =========================== */
.section {
  padding: 108px 32px;
}
.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border-c);
  border-bottom: 1px solid var(--border-c);
}
.section-inner {
  max-width: 1180px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-mono);
  color: var(--sage);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 18px;
}
.section-label .cmd {
  color: var(--forest);
  margin-right: 4px;
}
.section-label.light {
  color: var(--olive);
}

.section-title {
  font-family: var(--font-mono);
  font-weight: 800;
  letter-spacing: -0.01em;
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  color: var(--text-1);
  margin-bottom: 20px;
}

/* --- about --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 56px;
  align-items: start;
}
.about-grid > * {
  min-width: 0;
}
.about-copy a {
  color: var(--forest);
  font-weight: 600;
  border-bottom: 1.5px solid var(--olive);
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 26px;
}
.fact {
  background: var(--bg-surface);
  border: 1px solid var(--border-c);
  border-radius: 6px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fact-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--sage);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.fact-value {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.35;
}
.fact-value a {
  color: var(--forest);
  border-bottom: 1.5px solid var(--olive);
}

.about-line {
  max-width: var(--measure);
  font-size: 1.08rem;
  color: var(--text-2);
}

/* --- skills --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 44px;
}
.skill-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-c);
  border-radius: 6px;
  padding: 26px 24px;
}
.skill-card h3 {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--forest);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tags span {
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--bg-alt);
  color: var(--text-2);
  border: 1px solid var(--border-c);
}

/* --- projects --- */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 44px;
}
.project {
  padding: 36px 0;
  border-top: 1px solid var(--border-c);
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.project:last-child {
  border-bottom: 1px solid var(--border-c);
}
.project-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.project-head h3 {
  font-family: var(--font-mono);
  font-size: 1.32rem;
  font-weight: 700;
  color: var(--text-1);
}
.project-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--forest);
  color: var(--ivory);
  padding: 4px 10px;
  border-radius: 20px;
}
.project-stack {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--sage);
  font-weight: 500;
}
.project-desc {
  max-width: var(--measure);
  color: var(--text-2);
  font-size: 1.02rem;
}
.project-links {
  display: flex;
  gap: 20px;
  margin-top: 6px;
}
.project-links a {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--forest);
  border-bottom: 1.5px solid transparent;
}
.project-links a:hover {
  border-color: var(--forest);
}
.project-muted {
  opacity: 0.86;
}
.project-muted h3 {
  color: var(--text-2);
}

/* --- experience / timeline --- */
.timeline {
  margin-top: 44px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.tl-item {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 24px;
  padding-bottom: 40px;
  position: relative;
}
.tl-item::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 24px;
  bottom: -2px;
  width: 1.5px;
  background: var(--border-c);
}
.tl-item:last-child::before {
  display: none;
}
.tl-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 3px solid var(--forest);
  margin-top: 4px;
}
.tl-date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--sage);
  font-weight: 600;
  margin-bottom: 6px;
}
.tl-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-1);
}
.tl-content p {
  color: var(--text-2);
  max-width: var(--measure);
}
.tl-content a {
  color: var(--forest);
  font-weight: 600;
  border-bottom: 1.5px solid var(--olive);
}

.achievements {
  margin-top: 24px;
  padding-top: 44px;
  border-top: 1px solid var(--border-c);
}
.achv-title {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--forest);
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.achv-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 32px;
}
.achv-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--border-c);
  font-size: 0.98rem;
}
.achv-list li span {
  color: var(--text-1);
  font-weight: 600;
}
.achv-list li em {
  color: var(--slate);
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  white-space: nowrap;
}

/* --- studio --- */
.studio-card {
  margin-top: 36px;
  background: var(--charcoal);
  color: var(--ivory);
  border-radius: 10px;
  padding: 56px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: center;
}
.studio-card .section-title {
  color: var(--ivory);
}
.studio-text p {
  color: var(--olive);
  font-size: 1.06rem;
  max-width: 58ch;
}
.role-label {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 600;
  border: 1.5px solid var(--sage);
  color: var(--olive);
  padding: 12px 18px;
  border-radius: 4px;
  display: inline-block;
}

/* =========================== FOOTER =========================== */
.footer {
  background: var(--charcoal);
  color: var(--ivory);
  padding: 100px 32px 40px;
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
}
.footer-title {
  font-family: var(--font-mono);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: clamp(2.4rem, 5vw, 4rem);
  margin-bottom: 56px;
  line-height: 1.02;
}
.footer-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--charcoal-2);
}
.footer-link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--charcoal-2);
  border-radius: 6px;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}
.footer-link:hover {
  border-color: var(--sage);
  background: var(--charcoal-2);
}
.fl-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--sage);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.fl-value {
  font-size: 0.98rem;
  font-weight: 600;
  word-break: break-word;
}
.footer-bottom {
  margin-top: 28px;
  font-size: 0.85rem;
  color: var(--slate);
  font-family: var(--font-mono);
}

/* =========================== SCROLL REVEAL =========================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* =========================== RESPONSIVE =========================== */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .studio-card {
    grid-template-columns: 1fr;
    padding: 40px;
  }
  .footer-links {
    grid-template-columns: repeat(2, 1fr);
  }
  .achv-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  :root {
    --fs-base: 17px;
  }
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg-page);
    border-bottom: 1px solid var(--border-c);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav-links.open {
    max-height: 420px;
  }
  .nav-links li {
    width: 100%;
  }
  .nav-links a {
    width: 100%;
    padding: 16px 32px;
  }
  .nav-links a::after {
    display: none;
  }
  .nav-cta {
    margin: 12px 32px;
    display: inline-block;
  }
  .hero {
    padding: 100px 20px 64px;
  }
  .section {
    padding: 76px 20px;
  }
  .studio-card {
    padding: 30px;
  }
  .footer {
    padding: 76px 20px 32px;
  }
  .footer-links {
    grid-template-columns: 1fr;
  }

  /* skills: keep 2-up, just tighten so it's a quick scan, not a scroll */
  .skill-card {
    padding: 16px 14px;
  }
  .skill-card h3 {
    font-size: 0.8rem;
    margin-bottom: 10px;
  }
  .tags {
    gap: 6px;
  }
  .tags span {
    font-size: 0.8rem;
    padding: 5px 10px;
  }

  /* about: facts grid stays 2-up and compact */
  .facts {
    gap: 10px;
  }
  .fact {
    padding: 12px 14px;
  }
  .fact-value {
    font-size: 0.9rem;
  }

  /* terminal: smaller, tighter, no overflow */
  .terminal-body {
    padding: 20px 16px 0px;
    font-size: 0.84rem;
    min-height: 210px;
  }
  .terminal-title {
    font-size: 0.72rem;
  }
  .playground-terminal {
    max-width: 100%;
  }
  .playground-body {
    padding: 20px 16px 22px;
    font-size: 0.84rem;
    max-height: 280px;
  }
  .playground-inputline {
    padding: 12px 16px 16px;
    font-size: 0.84rem;
  }
  .playground-input {
    font-size: 0.84rem;
  }
}

@media (max-width: 420px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .facts {
    grid-template-columns: 1fr;
  }
  .terminal-body {
    font-size: 0.78rem;
    padding: 16px 14px 18px;
  }
  .playground-body {
    font-size: 0.78rem;
    padding: 16px 14px 18px;
  }
  .playground-inputline {
    font-size: 0.78rem;
    padding: 10px 14px 14px;
    gap: 6px;
  }
  .playground-input {
    font-size: 0.78rem;
  }
  .terminal-title {
    font-size: 0.68rem;
    margin-left: 6px;
  }
  .hero-title {
    font-size: clamp(2.4rem, 11vw, 3.2rem);
  }
}
