/* ============================================================
   Shishir — theme-switcher
   Two themes on shared markup, selected via [data-theme] on <html>:
   - "familiar": stark editorial B/W with purple accent, hairline
     borders, heavy grotesque display type, mono meta
   - "brutal": neubrutalism — cream ground, thick black borders,
     hard offset shadows, vivid sticker accents
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
}

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

button {
  font: inherit;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
}

input,
textarea,
select {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

/* ---------- Theme tokens ---------- */
:root,
[data-theme="familiar"] {
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #000000;
  --text-invert: #ffffff;
  --muted: #4a4a4a;
  --accent: #8309c0;
  --accent-text: #ffffff;
  --accent-soft: #decee7;
  --border-c: #000000;
  --bw: 1px;
  --radius: 0px;
  --radius-lg: 0px;
  --shadow: none;
  --shadow-hover: none;
  --shadow-active: none;
  --lift: 0px;
  --hero-bg: #000000;
  --hero-text: #ffffff;
  --hero-muted: #d8d8d8;
  --chip-bg: transparent;
  --btn-bg: #ffffff;
  --btn-text: #000000;
  --card-bg: #ffffff;
  --footer-bg: #000000;
  --footer-text: #ffffff;
  --font-body: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', 'SF Mono', Menlo, monospace;
  --body-weight: 400;
  --display-weight: 800;
  --focus: #8309c0;
}

[data-theme="brutal"] {
  --bg: #faf3ea;
  --surface: #ffffff;
  --text: #111111;
  --text-invert: #faf3ea;
  --muted: #3d3d3d;
  --accent: #ffd43b;
  --accent-text: #111111;
  --accent-soft: #ff90e8;
  --accent-3: #c4a1ff;
  --accent-4: #4d96ff;
  --accent-5: #6bcb77;
  --border-c: #111111;
  --bw: 3px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 5px 5px 0 #111111;
  --shadow-hover: 8px 8px 0 #111111;
  --shadow-active: 1px 1px 0 #111111;
  --lift: -3px;
  --hero-bg: #faf3ea;
  --hero-text: #111111;
  --hero-muted: #3d3d3d;
  --chip-bg: #ffffff;
  --btn-bg: #ffffff;
  --btn-text: #111111;
  --card-bg: #ffffff;
  --footer-bg: #111111;
  --footer-text: #faf3ea;
  --body-weight: 400;
  --display-weight: 900;
  --focus: #4d96ff;
}

/* ---------- Base ---------- */
body {
  font-family: var(--font-body);
  font-weight: var(--body-weight);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

h1,
h2,
h3,
h4 {
  font-weight: var(--display-weight);
  line-height: 1.08;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}

p {
  overflow-wrap: break-word;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

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

.section {
  padding: 72px 0;
}

.section-title {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin-bottom: 8px;
}

.section-subtitle {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 40px;
}

.accent {
  color: var(--accent);
}

[data-theme="brutal"] .accent {
  color: inherit;
  background: var(--accent);
  padding: 0 0.18em;
  box-shadow: 0.12em 0.12em 0 var(--border-c);
}

[data-theme="familiar"] .hero .accent {
  color: var(--accent-soft);
}

.skip-link {
  position: absolute;
  top: -72px;
  left: 12px;
  z-index: 300;
  padding: 10px 18px;
  background: var(--accent);
  color: var(--accent-text);
  font-family: var(--font-mono);
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Legacy hook classes from the neumorphism era — flat surfaces now */
.neu,
.neu-inset {
  background: var(--card-bg);
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: var(--bw) solid var(--border-c);
}

.navbar>.container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

.nav-logo {
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-bottom: 4px solid var(--accent);
  padding-bottom: 2px;
}

.nav-logo:hover {
  color: var(--accent);
}

[data-theme="brutal"] .nav-logo {
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius);
  background: var(--accent);
  padding: 4px 12px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

[data-theme="brutal"] .nav-logo:hover {
  color: var(--text);
  transform: translate(var(--lift), var(--lift));
  box-shadow: var(--shadow-hover);
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover {
  border-bottom-color: var(--accent);
}

.nav-links a.active {
  border-bottom-color: var(--border-c);
  font-weight: 700;
}

[data-theme="brutal"] .nav-links a.active {
  border-bottom-color: var(--accent-soft);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

[data-theme="brutal"] .hamburger span {
  height: 3px;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  border-top: var(--bw) solid var(--border-c);
  background: var(--bg);
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.9rem;
  text-decoration: none;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-c);
}

.mobile-menu a.active {
  background: var(--accent);
  color: var(--accent-text);
}

[data-theme="brutal"] .mobile-menu a.active {
  color: var(--text);
}

/* ---------- Hero ---------- */
.hero {
  background: var(--hero-bg);
  color: var(--hero-text);
  padding: 96px 0;
  border-bottom: var(--bw) solid var(--border-c);
}

.hero-greeting {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid currentColor;
  padding: 8px 16px;
  margin-bottom: 28px;
}

[data-theme="brutal"] .hero-greeting {
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius);
  background: var(--accent-soft);
  box-shadow: var(--shadow);
  transform: rotate(-2deg);
}

.hero h1 {
  font-size: clamp(2.8rem, 7.5vw, 5rem);
  font-weight: 900;
  margin-bottom: 24px;
  max-width: 900px;
}

.hero-tagline {
  font-size: 1.25rem;
  color: var(--hero-muted);
  max-width: 640px;
  margin-bottom: 40px;
}

.hero-btns {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.neu-btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  text-decoration: none;
  text-align: center;
  padding: 13px 26px;
  color: var(--btn-text);
  background: var(--btn-bg);
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.neu-btn:hover {
  background: var(--text);
  color: var(--bg);
}

[data-theme="brutal"] .neu-btn:hover {
  background: var(--btn-bg);
  color: var(--btn-text);
  transform: translate(var(--lift), var(--lift));
  box-shadow: var(--shadow-hover);
}

[data-theme="brutal"] .neu-btn:active {
  transform: translate(3px, 3px);
  box-shadow: var(--shadow-active);
}

.neu-btn-accent {
  background: var(--accent);
  color: var(--accent-text);
}

.neu-btn-accent:hover {
  background: var(--text);
  color: var(--bg);
}

[data-theme="brutal"] .neu-btn-accent:hover {
  background: var(--accent);
  color: var(--accent-text);
}

/* Buttons sitting on the inverted hero (familiar) */
[data-theme="familiar"] .hero .neu-btn {
  background: transparent;
  color: var(--hero-text);
  border-color: currentColor;
}

[data-theme="familiar"] .hero .neu-btn:hover {
  background: var(--hero-text);
  color: var(--hero-bg);
}

[data-theme="familiar"] .hero .neu-btn-accent {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}

[data-theme="familiar"] .hero .neu-btn-accent:hover {
  background: var(--accent-soft);
  color: #000;
  border-color: var(--accent-soft);
}

/* ---------- Cards ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

.card {
  background: var(--card-bg);
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

[data-theme="familiar"] .card {
  border-width: 0 0 1px;
  padding: 28px 0;
}

[data-theme="brutal"] .card:hover {
  transform: translate(var(--lift), var(--lift));
  box-shadow: var(--shadow-hover);
}

.card h3 {
  font-size: 1.45rem;
}

.card h3 a {
  text-decoration: none;
}

.card h3 a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 5px;
}

[data-theme="brutal"] .card h3 a:hover {
  color: inherit;
  background: var(--accent);
}

.card p {
  color: var(--muted);
  font-size: 1rem;
}

.card-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius);
}

[data-theme="familiar"] .card-icon {
  background: var(--accent-soft);
  border-width: 1px;
}

[data-theme="brutal"] .card-icon {
  background: var(--accent-3);
  box-shadow: 3px 3px 0 var(--border-c);
}

.card-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid var(--border-c);
  border-radius: var(--radius);
  background: var(--chip-bg);
}

[data-theme="brutal"] .tag {
  border-width: 2px;
  background: var(--accent-soft);
}

[data-theme="brutal"] .card-tags .tag:nth-child(2n) {
  background: var(--accent-3);
}

[data-theme="brutal"] .card-tags .tag:nth-child(3n) {
  background: var(--accent);
}

a.tag:hover {
  background: var(--text);
  color: var(--bg);
}

.card-links {
  margin-top: auto;
}

.card-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  text-decoration: underline;
  text-underline-offset: 5px;
}

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

[data-theme="brutal"] .card-link:hover {
  color: inherit;
  background: var(--accent);
}

/* ---------- About block (home) ---------- */
.about-card {
  display: flex;
  gap: 40px;
  align-items: center;
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 44px;
}

.about-avatar {
  width: 110px;
  height: 110px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 900;
  background: var(--accent);
  color: var(--accent-text);
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius-lg);
}

[data-theme="familiar"] .about-avatar {
  border: none;
}

[data-theme="brutal"] .about-avatar {
  box-shadow: var(--shadow);
  transform: rotate(-3deg);
}

.about-text h2 {
  font-size: 1.9rem;
  margin-bottom: 14px;
}

.about-text>p {
  color: var(--muted);
  margin-bottom: 26px;
}

.stats-grid {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.stat-item {
  flex: 1;
  min-width: 110px;
  text-align: center;
  padding: 16px 12px;
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stat-num {
  display: block;
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--accent);
}

[data-theme="brutal"] .stat-num {
  color: var(--text);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ---------- Page header (listing pages) ---------- */
.page-header {
  background: var(--hero-bg);
  color: var(--hero-text);
  border-bottom: var(--bw) solid var(--border-c);
  padding: 72px 0;
}

.page-header .label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid currentColor;
  padding: 7px 14px;
  margin-bottom: 22px;
}

[data-theme="brutal"] .page-header .label {
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius);
  background: var(--accent);
  box-shadow: var(--shadow);
  transform: rotate(-1.5deg);
}

.page-header .title,
.page-header h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 900;
  margin-bottom: 14px;
}

.page-header .tagline {
  color: var(--hero-muted);
  font-size: 1.15rem;
  max-width: 620px;
}

/* ---------- Filter pills ---------- */
.filter-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 40px 0 34px;
}

.filter-pill {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 16px;
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.filter-pill:hover {
  background: var(--accent-soft);
  color: #000;
}

[data-theme="brutal"] .filter-pill:hover {
  transform: translate(var(--lift), var(--lift));
  box-shadow: var(--shadow-hover);
  background: var(--surface);
  color: var(--text);
}

.filter-pill.active {
  background: var(--text);
  color: var(--bg);
}

[data-theme="brutal"] .filter-pill.active {
  background: var(--accent);
  color: var(--accent-text);
}

/* ---------- Search  ---------- */
.search-bar {
  margin: 44px 0 0;
  max-width: 640px;
}

.search-bar input[type="search"] {
  width: 100%;
  padding: 14px 18px;
  font-size: 1rem;
  background: var(--surface);
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.search-bar input[type="search"]::placeholder {
  color: var(--muted);
}

.search-status {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 14px 0 0;
}

.search-results {
  display: grid;
  gap: 16px;
  margin: 22px 0 0;
}

.search-result {
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius);
  background: var(--card-bg);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  text-decoration: none;
  display: block;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

[data-theme="familiar"] .search-result:hover {
  background: var(--accent-soft);
}

[data-theme="brutal"] .search-result:hover {
  transform: translate(var(--lift), var(--lift));
  box-shadow: var(--shadow-hover);
}

.search-result h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.search-result p {
  color: var(--muted);
  font-size: 0.95rem;
}

.search-result .search-result-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  display: block;
  margin-top: 10px;
}

/* ---------- Blog post ---------- */
.post-header {
  background: var(--hero-bg);
  color: var(--hero-text);
  border-bottom: var(--bw) solid var(--border-c);
  padding: 72px 0;
  text-align: center;
}

.post-header h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 900;
  max-width: 880px;
  margin: 0 auto 24px;
}

.post-header .tag {
  color: var(--hero-text);
  border-color: currentColor;
}

[data-theme="brutal"] .post-header .tag {
  color: var(--text);
}

.post-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.post-meta span {
  border: 1px solid currentColor;
  padding: 9px 18px;
  margin-left: -1px;
}

[data-theme="brutal"] .post-meta span {
  border: 2px solid var(--border-c);
  background: var(--surface);
  margin-left: -2px;
}

.post-meta a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.post-content {
  max-width: 1040px;
  margin: 56px auto;
  padding: 0 24px;
  background: transparent;
}

[data-theme="brutal"] .post-content {
  background: var(--surface);
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 44px;
}

.post-content p {
  margin: 26px 0;
  font-size: 1.15rem;
  line-height: 1.7;
}

.post-content h2 {
  font-size: 1.75rem;
  margin: 46px 0 6px;
}

.post-content a {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.post-content a:hover {
  color: var(--accent);
}

.post-content blockquote {
  margin: 34px 0;
  padding: 20px 26px;
  font-size: 1.2rem;
  font-weight: 500;
  background: var(--accent-soft);
  color: #000;
  border-left: 6px solid var(--accent);
}

[data-theme="brutal"] .post-content blockquote {
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--accent);
}

.post-content code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--accent-soft);
  color: #000;
  padding: 2px 6px;
}

[data-theme="brutal"] .post-content code {
  background: var(--accent-3);
  border: 1px solid var(--border-c);
  border-radius: 4px;
}

.prev-next-nav {
  max-width: 800px;
  margin: 0 auto 72px;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.prev-next-btn {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  padding: 12px 20px;
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.prev-next-btn:hover {
  background: var(--text);
  color: var(--bg);
}

[data-theme="brutal"] .prev-next-btn:hover {
  background: var(--surface);
  color: var(--text);
  transform: translate(var(--lift), var(--lift));
  box-shadow: var(--shadow-hover);
}

/* ---------- Project detail ---------- */
.project-hero {
  background: var(--hero-bg);
  color: var(--hero-text);
  border-bottom: var(--bw) solid var(--border-c);
  padding: 72px 0;
}

.project-hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 900;
  margin-bottom: 16px;
}

.project-hero .tagline {
  color: var(--hero-muted);
  font-size: 1.2rem;
  max-width: 640px;
  margin-bottom: 30px;
}

.project-hero .tag {
  color: var(--hero-text);
  border-color: currentColor;
}

[data-theme="brutal"] .project-hero .tag {
  color: var(--text);
}

.project-hero .hero-btns {
  margin-top: 28px;
}

[data-theme="familiar"] .project-hero .neu-btn {
  background: transparent;
  color: var(--hero-text);
  border-color: currentColor;
}

[data-theme="familiar"] .project-hero .neu-btn:hover {
  background: var(--hero-text);
  color: var(--hero-bg);
}

[data-theme="familiar"] .project-hero .neu-btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.overview-card {
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  box-shadow: var(--shadow);
  padding: 40px;
  max-width: 880px;
}

[data-theme="familiar"] .overview-card {
  border-width: 0 0 0 6px;
  border-color: var(--accent);
  padding: 8px 0 8px 30px;
}

.overview-card p {
  color: var(--muted);
  margin-bottom: 18px;
}

.overview-card p:last-child {
  margin-bottom: 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 26px;
}

.feature-card {
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  box-shadow: var(--shadow);
  padding: 26px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

[data-theme="brutal"] .feature-card:hover {
  transform: translate(var(--lift), var(--lift));
  box-shadow: var(--shadow-hover);
}

[data-theme="familiar"] .feature-card {
  border-width: 1px 0 0;
  padding: 26px 0;
}

.feature-icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 16px;
  background: var(--accent-soft);
  color: #000;
  border-radius: var(--radius);
}

[data-theme="brutal"] .feature-icon {
  border: 2px solid var(--border-c);
  box-shadow: 3px 3px 0 var(--border-c);
  background: var(--accent-4);
  color: #fff;
}

.feature-card h3,
.feature-text h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.feature-card p,
.feature-text p {
  color: var(--muted);
  font-size: 0.98rem;
}

.tech-stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}

.tech-item {
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius);
  background: var(--card-bg);
  box-shadow: var(--shadow);
  padding: 18px 20px;
}

.tech-item h3,
.tech-item strong {
  font-size: 1.05rem;
}

.tech-item p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 6px;
}

.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 26px;
}

.screenshot-placeholder {
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius-lg);
  background: var(--accent-soft);
  color: #000;
  box-shadow: var(--shadow);
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

[data-theme="brutal"] .screenshots-grid .screenshot-placeholder:nth-child(2n) {
  background: var(--accent-3);
}

[data-theme="brutal"] .screenshots-grid .screenshot-placeholder:nth-child(3n) {
  background: var(--accent);
}

/* ---------- About page ---------- */
.about-hero {
  background: var(--hero-bg);
  color: var(--hero-text);
  border-bottom: var(--bw) solid var(--border-c);
  padding: 80px 0;
  text-align: center;
}

.about-hero-avatar {
  width: 120px;
  height: 120px;
  margin: 0 auto 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.2rem;
  font-weight: 900;
  background: var(--accent);
  color: var(--accent-text);
  border-radius: var(--radius-lg);
}

[data-theme="brutal"] .about-hero-avatar {
  border: var(--bw) solid var(--border-c);
  box-shadow: var(--shadow);
  transform: rotate(3deg);
}

.about-hero-title {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 900;
  margin-bottom: 12px;
}

.about-hero-tagline {
  color: var(--hero-muted);
  font-size: 1.15rem;
  max-width: 560px;
  margin: 0 auto;
}

.about-bio-card,
.about-cta-card {
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  box-shadow: var(--shadow);
  padding: 40px;
}

.about-bio-card h2,
.about-cta-card h2 {
  margin-bottom: 16px;
  font-size: 1.7rem;
}

.about-bio-card p {
  color: var(--muted);
  margin-bottom: 16px;
}

.about-cta-card {
  text-align: center;
}

.about-cta-card p {
  color: var(--muted);
  margin-bottom: 24px;
}

.about-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
}

.about-stat-item {
  text-align: center;
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 26px 14px;
}

.skills-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 26px;
}

.skill-category {
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  box-shadow: var(--shadow);
  padding: 26px;
}

.skill-category h3 {
  font-size: 1.1rem;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
}

.skill-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.compact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

.compact-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius);
  background: var(--card-bg);
  box-shadow: var(--shadow);
  padding: 20px;
}

[data-theme="familiar"] .compact-card {
  border-width: 0 0 1px;
  padding: 20px 0;
}

.compact-card-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: #000;
  border-radius: var(--radius);
  font-size: 1.15rem;
}

[data-theme="brutal"] .compact-card-icon {
  border: 2px solid var(--border-c);
}

.compact-card-text h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.compact-card-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.compact-card-text p {
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- Tags page ---------- */
.tags-cloud {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.tag-pill {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 9px 18px;
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.tag-pill:hover {
  background: var(--accent-soft);
  color: #000;
}

[data-theme="brutal"] .tag-pill:hover {
  background: var(--surface);
  color: var(--text);
  transform: translate(var(--lift), var(--lift));
  box-shadow: var(--shadow-hover);
}

.tag-pill.active {
  background: var(--text);
  color: var(--bg);
}

[data-theme="brutal"] .tag-pill.active {
  background: var(--accent);
  color: var(--accent-text);
}

.tags-content-grid {
  display: grid;
  gap: 0;
}

[data-theme="brutal"] .tags-content-grid {
  gap: 18px;
}

.tags-content-item {
  display: flex;
  gap: 18px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--border-c);
  text-decoration: none;
}

[data-theme="brutal"] .tags-content-item {
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius);
  background: var(--card-bg);
  box-shadow: var(--shadow);
  padding: 20px 22px;
}

.tags-content-item h3 {
  font-size: 1.2rem;
}

.tags-content-item:hover h3 {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 5px;
}

[data-theme="brutal"] .tags-content-item:hover h3 {
  color: inherit;
  background: var(--accent);
}

.tags-content-item p {
  color: var(--muted);
  font-size: 0.95rem;
}

.tags-content-badge {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border: 1px solid var(--border-c);
}

[data-theme="brutal"] .tags-content-badge {
  border-width: 2px;
  border-radius: 6px;
}

.tags-badge-blog {
  background: var(--accent-soft);
  color: #000;
}

.tags-badge-project {
  background: var(--accent);
  color: var(--accent-text);
}

.tags-content-item.hidden {
  display: none;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 40px;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-detail {
  display: flex;
  gap: 16px;
  align-items: center;
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius);
  background: var(--card-bg);
  box-shadow: var(--shadow);
  padding: 18px 20px;
}

[data-theme="familiar"] .contact-detail {
  border-width: 0 0 1px;
  padding: 18px 0;
}

.contact-detail-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: #000;
  border-radius: var(--radius);
}

[data-theme="brutal"] .contact-detail-icon {
  border: 2px solid var(--border-c);
}

.contact-detail-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.contact-detail-text {
  font-weight: 600;
}

.contact-form-card {
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  box-shadow: var(--shadow);
  padding: 36px;
}

.form-group {
  margin-bottom: 22px;
}

.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 8px;
}

.form-input,
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  background: var(--bg);
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-input.error,
.form-group .error {
  border-color: #d0021b;
}

.form-error {
  display: none;
  color: #d0021b;
  font-size: 0.85rem;
  margin-top: 6px;
}

.form-error.show {
  display: block;
}

.form-success {
  display: none;
  margin-top: 18px;
  padding: 14px 18px;
  font-weight: 600;
  border: var(--bw) solid var(--border-c);
  background: var(--accent-soft);
  color: #000;
}

[data-theme="brutal"] .form-success {
  background: var(--accent-5);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-success.show {
  display: block;
}

/* ---------- Comments (rendered by commento.js) ---------- */
.comments-section {
  max-width: 1040px;
  margin: 0 auto 80px;
  padding: 0 24px;
}

.comments-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-bottom: var(--bw) solid var(--border-c);
  padding-bottom: 14px;
  margin-bottom: 30px;
}

.comments-header h2 {
  font-size: 1.7rem;
}

.comment-count {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.comments-status {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  padding: 18px 0;
}

.comment-login-prompt {
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: #000;
  box-shadow: var(--shadow);
  padding: 20px 24px;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.comment-form-wrapper {
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius);
  background: var(--card-bg);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 34px;
}

.comment-form textarea,
.reply-form textarea {
  width: 100%;
  min-height: 100px;
  resize: vertical;
  padding: 12px 14px;
  background: var(--bg);
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius);
}

.comment-form-actions,
.reply-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 14px;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.comment {
  display: flex;
  gap: 16px;
}

.comment-avatar {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  background: var(--accent);
  color: var(--accent-text);
  border-radius: var(--radius);
  overflow: hidden;
}

[data-theme="brutal"] .comment-avatar {
  border: 2px solid var(--border-c);
}

.comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.comment-username {
  font-weight: 700;
}

.comment-time {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.comment-text {
  margin: 8px 0 10px;
  font-size: 1rem;
}

.comment-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.comment-action-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border: 1px solid var(--border-c);
  border-radius: var(--radius);
  background: var(--surface);
}

[data-theme="brutal"] .comment-action-btn {
  border-width: 2px;
}

.comment-action-btn:hover {
  background: var(--text);
  color: var(--bg);
}

.vote-btn.voted {
  background: var(--accent);
  color: var(--accent-text);
}

.comment-votes {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 2ch;
  text-align: center;
}

.comment-replies {
  margin: 18px 0 0 20px;
  padding-left: 22px;
  border-left: 2px solid var(--border-c);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.comment-replies.collapsed {
  display: none;
}

.reply-form {
  display: none;
  margin: 14px 0 0 58px;
}

.reply-form.open {
  display: block;
}

.load-more-btn {
  align-self: flex-start;
  margin-top: 6px;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  border-top: var(--bw) solid var(--border-c);
  padding: 52px 0;
  text-align: center;
}

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 22px;
}

.social-btn {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid currentColor;
  border-radius: var(--radius);
}

.social-btn:hover {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}

[data-theme="brutal"] .social-btn {
  border: 2px solid var(--footer-text);
}

[data-theme="brutal"] .social-btn:hover {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--footer-text);
}

.footer-text {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  opacity: 0.75;
}

/* ---------- Theme switcher FAB ---------- */
.theme-fab {
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 200;
}

.theme-fab-btn {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: var(--accent);
  color: var(--accent-text);
  border-radius: 50%;
  border: var(--bw) solid var(--border-c);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

[data-theme="familiar"] .theme-fab-btn {
  border: none;
}

.theme-fab-btn:hover {
  transform: scale(1.06);
}

[data-theme="brutal"] .theme-fab-btn:hover {
  transform: translate(var(--lift), var(--lift));
  box-shadow: var(--shadow-hover);
}

.theme-panel {
  position: absolute;
  bottom: 66px;
  right: 0;
  min-width: 210px;
  background: var(--surface);
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 16px;
  display: none;
}

.theme-panel.open {
  display: block;
}

.theme-panel-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 12px;
}

.theme-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  font-size: 0.95rem;
  border: 1px solid var(--border-c);
  border-radius: var(--radius);
  background: var(--bg);
  text-align: left;
}

[data-theme="brutal"] .theme-option {
  border-width: 2px;
}

.theme-option:hover {
  background: var(--accent-soft);
  color: #000;
}

.theme-option.active {
  background: var(--text);
  color: var(--bg);
}

.theme-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--border-c);
  flex-shrink: 0;
}

.theme-dot-familiar {
  background: linear-gradient(135deg, #000 50%, #8309c0 50%);
}

.theme-dot-brutal {
  background: linear-gradient(135deg, #ffd43b 50%, #ff90e8 50%);
}

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 250;
  max-width: 380px;
  background: var(--surface);
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px 22px;
}

[data-theme="familiar"] .cookie-banner {
  box-shadow: 6px 6px 0 var(--accent-soft);
}

.cookie-banner.hidden {
  display: none;
}

.cookie-banner p {
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.cookie-banner-actions {
  display: flex;
  gap: 10px;
}

.cookie-btn {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 9px 16px;
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius);
  background: var(--bg);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.cookie-accept {
  background: var(--accent);
  color: var(--accent-text);
}

.cookie-btn:hover {
  background: var(--text);
  color: var(--bg);
}

[data-theme="brutal"] .cookie-btn {
  box-shadow: 3px 3px 0 var(--border-c);
}

[data-theme="brutal"] .cookie-btn:hover {
  background: var(--bg);
  color: var(--text);
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--border-c);
}

[data-theme="brutal"] .cookie-accept:hover {
  background: var(--accent);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .about-card {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero {
    padding: 64px 0;
  }

  .section {
    padding: 52px 0;
  }

  .post-content {
    padding: 0 16px;
  }

  [data-theme="brutal"] .post-content {
    padding: 26px;
  }

  .cards-grid,
  .features-grid {
    grid-template-columns: 1fr;
  }

  .reply-form {
    margin-left: 0;
  }

  .comment-replies {
    margin-left: 6px;
    padding-left: 14px;
  }

  .theme-fab {
    bottom: 18px;
    right: 18px;
  }

  .cookie-banner {
    left: 12px;
    right: 12px;
    max-width: none;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Print ---------- */
@media print {

  .navbar,
  .footer,
  .theme-fab,
  .cookie-banner,
  .hamburger,
  .mobile-menu,
  .comments-section,
  .search-bar,
  .filter-pills,
  .hero-btns,
  .prev-next-nav {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  .hero,
  .page-header,
  .post-header,
  .project-hero,
  .about-hero {
    background: #fff;
    color: #000;
    border: none;
    padding: 12pt 0;
  }

  .card,
  .post-content,
  .overview-card {
    border: 1pt solid #000;
    box-shadow: none;
  }

  a {
    text-decoration: underline;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
  }
}

/* ---------- Utilities (replace CSP-blocked inline styles) ---------- */
.u-center {
  text-align: center;
}

.u-pt0 {
  padding-top: 0;
}

.u-tags-center {
  justify-content: center;
  margin-bottom: 20px;
}

.u-full {
  width: 100%;
  display: block;
}

/* ---------- Search modal (threedots-style) ---------- */
.search-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 1rem;
}

[data-theme="familiar"] .search-toggle {
  border: none;
}

.search-toggle:hover {
  background: var(--accent-soft);
  color: #000;
}

[data-theme="brutal"] .search-toggle:hover {
  background: var(--surface);
  color: var(--text);
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-hover);
}

.navbar .search-toggle {
  margin-left: 24px;
}

@media (max-width: 768px) {
  .navbar .search-toggle {
    margin-left: auto;
    margin-right: 14px;
  }
}

body.search-open {
  overflow: hidden;
}

.search-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(0, 0, 0, 0.55);
  overflow-y: auto;
  padding: 8vh 16px 16px;
}

.search-modal-box {
  max-width: 680px;
  margin: 0 auto;
  background: var(--surface);
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}

[data-theme="familiar"] .search-modal-box {
  box-shadow: 8px 8px 0 var(--accent);
}

.search-modal-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: var(--bw) solid var(--border-c);
}

.search-modal-bar input {
  flex: 1;
  border: var(--bw) solid var(--border-c);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 11px 14px;
  font-size: 1.05rem;
}

.search-modal-clear {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: var(--bw) solid var(--border-c);
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  font-size: 1rem;
  line-height: 1;
}

.search-modal-clear:hover {
  background: var(--accent);
  color: var(--accent-text);
}

.search-modal-results {
  overflow-y: auto;
  flex: 1;
}

.search-result-group {
  padding: 6px 16px 14px;
}

.search-group-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 12px 4px 8px;
  border-bottom: 1px solid var(--border-c);
  margin-bottom: 10px;
}

.search-result-item {
  display: block;
  text-decoration: none;
  padding: 14px;
  border: var(--bw) solid transparent;
  border-radius: var(--radius);
  margin-bottom: 8px;
}

.search-result-item:hover,
.search-item-selected {
  border-color: var(--border-c);
  background: var(--bg);
  box-shadow: var(--shadow);
}

[data-theme="familiar"] .search-item-selected,
[data-theme="familiar"] .search-result-item:hover {
  background: var(--accent-soft);
  color: #000;
}

.search-result-item-title {
  font-size: 1.08rem;
  margin-bottom: 4px;
}

.search-result-item-snippet {
  font-size: 0.92rem;
  color: var(--muted);
}

[data-theme="familiar"] .search-item-selected .search-result-item-snippet,
[data-theme="familiar"] .search-result-item:hover .search-result-item-snippet {
  color: #222;
}

.search-result-item-snippet mark {
  background: #ffe45c;
  color: #000;
  padding: 0 2px;
}

[data-theme="brutal"] .search-result-item-snippet mark {
  background: var(--accent);
}

.search-result-item-meta {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.search-modal-status {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--muted);
  padding: 22px 20px;
}

.search-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-top: var(--bw) solid var(--border-c);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.search-modal-footer kbd {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  border: 1px solid var(--border-c);
  border-radius: 4px;
  padding: 1px 5px;
  margin: 0 2px;
  background: var(--bg);
}

@media (max-width: 600px) {
  .search-modal {
    padding-top: 4vh;
  }

  .search-modal-keys {
    display: none;
  }
}