/*
Theme Name: Smjrifle Pro
Theme URI: https://smjrifle.net
Author: Shailesh Man Joshi (smjrifle)
Author URI: https://smjrifle.net
Description: Professional portfolio theme for Shailesh Man Joshi — Solution Architect & Full Stack Developer. Built with Carbon Fields, Rank Math ready, typography-first design.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: smjrifle-pro
Tags: portfolio, dark, typography, carbon-fields, rank-math, seo
*/

/* =========================================================
   DESIGN TOKENS
   ========================================================= */
:root {
  /* ── Light palette (default) ──────────────────────────── */
  --clr-bg: #f9f8f5;
  --clr-bg-alt: #f2f0ea;
  --clr-surface: #ffffff;
  --clr-surface-2: #ede9e1;
  --clr-border: rgba(0, 0, 0, 0.09);
  --clr-accent: #e05709;
  --clr-accent-dim: #c94b05;
  --clr-accent-glow: rgba(224, 87, 9, 0.1);
  --clr-text: #1c1f2e;
  --clr-text-muted: #556178;
  --clr-text-faint: #9ba3b8;
  --clr-heading: #10121e;
  --clr-white: #ffffff;

  /* ── Theme-aware accent helpers ──────────────────────── */
  --clr-accent-border: rgba(224, 87, 9, 0.2);
  --clr-accent-hover-shadow: rgba(224, 87, 9, 0.1);
  --clr-accent-strong-hover: rgba(224, 87, 9, 0.28);
  --clr-header-scrolled-bg: rgba(249, 248, 245, 0.92);
  --clr-hero-gradient: rgba(224, 87, 9, 0.05);

  color-scheme: light;

  /* Typography */
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-heading: "Cormorant Garant", "Georgia", serif;
  --font-mono: "JetBrains Mono", "Fira Code", "Courier New", monospace;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 2rem;
  --fs-3xl: 2.75rem;
  --fs-4xl: 3.75rem;
  --fs-5xl: 5rem;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semi: 600;
  --fw-bold: 700;
  --fw-black: 800;

  --lh-tight: 1.15;
  --lh-snug: 1.35;
  --lh-normal: 1.6;
  --lh-loose: 1.8;

  --ls-tight: -0.03em;
  --ls-normal: 0;
  --ls-wide: 0.08em;
  --ls-wider: 0.15em;

  /* Spacing */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;
  --sp-32: 8rem;

  /* Layout */
  --max-w-content: 72rem;
  --max-w-text: 65ch;
  --max-w-narrow: 48rem;

  /* Radius */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 20px;
  --r-full: 9999px;

  /* Shadows (light-mode defaults — subtler) */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.13);
  --shadow-accent: 0 0 30px var(--clr-accent-glow);

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 150ms;
  --dur-normal: 300ms;
  --dur-slow: 500ms;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--clr-text);
  background-color: var(--clr-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

img {
  height: auto;
}

a {
  color: var(--clr-accent);
  text-decoration: none;
  transition: color var(--dur-fast) ease;
}

a:hover {
  color: var(--clr-accent-dim);
}

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

ul,
ol {
  list-style: none;
}

table {
  border-collapse: collapse;
}

/* =========================================================
   TYPOGRAPHY SCALE
   ========================================================= */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--clr-heading);
}

h1 {
  font-size: clamp(2.5rem, 6vw, var(--fs-5xl));
  font-weight: var(--fw-black);
}

h2 {
  font-size: clamp(1.8rem, 4vw, var(--fs-4xl));
}

h3 {
  font-size: clamp(1.4rem, 3vw, var(--fs-3xl));
}

h4 {
  font-size: clamp(1.2rem, 2.5vw, var(--fs-2xl));
}

h5 {
  font-size: var(--fs-xl);
}

h6 {
  font-size: var(--fs-lg);
}

p {
  line-height: var(--lh-loose);
  color: var(--clr-text);
}

.lead {
  font-size: var(--fs-md);
  line-height: var(--lh-loose);
  color: var(--clr-text-muted);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--clr-accent);
}

code,
pre,
.monospace {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

pre {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-md);
  padding: var(--sp-6);
  overflow-x: auto;
  line-height: 1.7;
}

code {
  background: var(--clr-surface);
  padding: 0.15em 0.4em;
  border-radius: var(--r-sm);
  color: var(--clr-accent);
}

blockquote {
  border-left: 3px solid var(--clr-accent);
  padding: var(--sp-4) var(--sp-6);
  margin: var(--sp-8) 0;
  background: var(--clr-surface);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-style: italic;
  color: var(--clr-text-muted);
}

/* =========================================================
   LAYOUT UTILITIES
   ========================================================= */
.container {
  width: 100%;
  max-width: var(--max-w-content);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}

@media (min-width: 1200px) {
  .container {
    padding-inline: var(--sp-8);
  }
}

.section {
  padding-block: var(--sp-24);
}

.section--lg {
  padding-block: var(--sp-32);
}

.section--sm {
  padding-block: var(--sp-16);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-6);
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-gap-4 {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.text-center {
  text-align: center;
}

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

.text-muted {
  color: var(--clr-text-muted);
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--r-full);
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  transition: all var(--dur-normal) var(--ease-out);
  text-decoration: none;
}

.btn-primary {
  background: var(--clr-accent);
  color: var(--clr-bg);
}

.btn-primary:hover {
  background: var(--clr-accent-dim);
  color: var(--clr-white);
  box-shadow: var(--shadow-accent);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--clr-accent);
  border: 1px solid var(--clr-accent);
}

.btn-outline:hover {
  background: var(--clr-accent-glow);
  color: var(--clr-accent);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--clr-text-muted);
  padding-inline: var(--sp-4);
}

.btn-ghost:hover {
  color: var(--clr-text);
  background: var(--clr-surface);
}

.btn-lg {
  padding: var(--sp-4) var(--sp-8);
  font-size: var(--fs-base);
}

.btn-sm {
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-xs);
}

/* =========================================================
   SITE HEADER / NAV
   ========================================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 70px;
  display: flex;
  align-items: center;
  transition:
    background var(--dur-normal) ease,
    backdrop-filter var(--dur-normal) ease,
    box-shadow var(--dur-normal) ease;
}

.site-header.scrolled {
  background: var(--clr-header-scrolled-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--clr-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-8);
}

.site-logo {
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: var(--fw-black);
  color: var(--clr-heading);
  letter-spacing: -0.02em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.site-logo span {
  color: var(--clr-accent);
}

.site-logo:hover {
  color: var(--clr-heading);
}

.primary-nav {
  display: none;
}

@media (min-width: 900px) {
  .primary-nav {
    display: flex;
    align-items: center;
    gap: var(--sp-1);
  }
}

.primary-nav a:not(.btn) {
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--clr-text-muted);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md);
  transition:
    color var(--dur-fast) ease,
    background var(--dur-fast) ease;
  letter-spacing: 0.01em;
}

.primary-nav a:not(.btn):hover,
.primary-nav a:not(.btn).active {
  color: var(--clr-text);
  background: var(--clr-surface);
}

.nav-cta {
  margin-left: var(--sp-4);
}

/* Mobile menu toggle */
.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-2);
}

@media (min-width: 900px) {
  .menu-toggle {
    display: none;
  }
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--clr-text);
  border-radius: 2px;
  transition: all var(--dur-normal) ease;
}

/* Mobile nav */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--clr-bg);
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-6);
  transform: translateX(100%);
  transition: transform var(--dur-normal) var(--ease-out);
}

.mobile-nav.open {
  transform: translateX(0);
}

.mobile-nav a:not(.btn) {
  font-family: var(--font-heading);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  color: var(--clr-heading);
  letter-spacing: var(--ls-tight);
}

.mobile-nav a:not(.btn):hover {
  color: var(--clr-accent);
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-block: var(--sp-32);
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 60% 50% at 70% 40%,
      var(--clr-hero-gradient) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 40% 60% at 20% 70%,
      rgba(99, 102, 241, 0.04) 0%,
      transparent 60%
    );
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--clr-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--clr-border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
  -webkit-mask-image: radial-gradient(
    ellipse 80% 80% at 50% 50%,
    black,
    transparent
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}

.hero__eyebrow-dot {
  width: 8px;
  height: 8px;
  background: var(--clr-accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

.hero__title {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: var(--fw-black);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: var(--sp-6);
}

.hero__title-line {
  display: block;
}

.hero__title-accent {
  color: var(--clr-accent);
  display: block;
}

.hero__desc {
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: var(--lh-loose);
  color: var(--clr-text-muted);
  max-width: 55ch;
  margin-bottom: var(--sp-10);
}

.hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-10);
}

.hero__tag {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-full);
  letter-spacing: 0.05em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-bottom: var(--sp-16);
}

.hero__scroll {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--clr-text-faint);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}

.hero__scroll-line {
  width: 40px;
  height: 1px;
  background: var(--clr-text-faint);
}

/* =========================================================
   SECTION HEADER
   ========================================================= */
.section-header {
  margin-bottom: var(--sp-16);
}

.section-header--center {
  text-align: center;
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: var(--sp-16);
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: var(--fw-black);
  letter-spacing: -0.03em;
  margin-top: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.section-desc {
  color: var(--clr-text-muted);
  font-size: var(--fs-md);
  line-height: var(--lh-loose);
}

/* =========================================================
   PORTFOLIO CARDS
   ========================================================= */
.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
}

@media (min-width: 768px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .portfolio-grid .card--featured {
    grid-column: span 2;
  }
}

.card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition:
    transform var(--dur-normal) var(--ease-out),
    border-color var(--dur-normal) ease,
    box-shadow var(--dur-normal) ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--clr-accent-border);
  box-shadow:
    var(--shadow-lg),
    0 0 0 1px var(--clr-accent-hover-shadow);
}

.card__thumb {
  aspect-ratio: 16/9;
  background: var(--clr-bg-alt);
  overflow: hidden;
  position: relative;
}

.card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) ease;
}

.card:hover .card__thumb img {
  transform: scale(1.04);
}

.card__thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: var(--fs-3xl);
  font-weight: var(--fw-black);
  color: var(--clr-text-faint);
  letter-spacing: -0.05em;
}

.card__body {
  padding: var(--sp-6);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card__cats {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: var(--sp-3);
}

.card__cat {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--clr-accent);
  background: var(--clr-accent-glow);
  padding: 2px var(--sp-2);
  border-radius: var(--r-sm);
}

.card__title {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-tight);
  margin-bottom: var(--sp-3);
  line-height: var(--lh-snug);
}

.card__title a {
  color: var(--clr-heading);
  text-decoration: none;
}

.card__title a:hover {
  color: var(--clr-accent);
}

.card__excerpt {
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
  line-height: var(--lh-loose);
  flex: 1;
  margin-bottom: var(--sp-5);
}

.card__stack {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
}

.card__tech {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--clr-text-faint);
  background: var(--clr-bg-alt);
  border: 1px solid var(--clr-border);
  padding: 2px var(--sp-2);
  border-radius: var(--r-sm);
}

.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--clr-border);
}

.card__link {
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  color: var(--clr-accent);
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.card__link:hover {
  gap: var(--sp-2);
  color: var(--clr-accent);
}

/* =========================================================
   ABOUT / SKILLS
   ========================================================= */
.about-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-16);
  align-items: start;
}

@media (min-width: 900px) {
  .about-layout {
    grid-template-columns: 1fr 1.6fr;
  }
}

.about-avatar {
  position: relative;
}

.about-avatar__img {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: var(--r-xl);
  filter: grayscale(20%);
}

.about-avatar__badge {
  position: absolute;
  bottom: -var(--sp-4);
  right: -var(--sp-4);
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.about-content h2 {
  margin-bottom: var(--sp-6);
}

.about-content p {
  margin-bottom: var(--sp-4);
  color: var(--clr-text-muted);
}

.about-content p:last-of-type {
  margin-bottom: var(--sp-8);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
  margin-bottom: var(--sp-8);
}

@media (min-width: 600px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.skill-item {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  transition: border-color var(--dur-fast) ease;
}

.skill-item:hover {
  border-color: var(--clr-accent-strong-hover);
}

.skill-item__dot {
  width: 6px;
  height: 6px;
  background: var(--clr-accent);
  border-radius: 50%;
  flex-shrink: 0;
}

.skill-item__name {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--clr-text);
}

.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-6);
  margin-bottom: var(--sp-8);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.stat__num {
  font-family: var(--font-heading);
  font-size: var(--fs-3xl);
  font-weight: var(--fw-black);
  letter-spacing: var(--ls-tight);
  color: var(--clr-accent);
  line-height: 1;
}

.stat__num span {
  color: var(--clr-accent);
}

.stat__label {
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
}

/* =========================================================
   BLOG / POST CARDS
   ========================================================= */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}

.post-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
  padding: var(--sp-6);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-xl);
  transition:
    border-color var(--dur-normal) ease,
    transform var(--dur-normal) var(--ease-out);
}

@media (min-width: 700px) {
  .post-card {
    grid-template-columns: auto 1fr;
  }
}

.post-card:hover {
  border-color: var(--clr-accent-border);
  transform: translateX(4px);
}

.post-card__date {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--clr-text-faint);
  letter-spacing: var(--ls-wide);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  display: none;
}

@media (min-width: 700px) {
  .post-card__date {
    display: block;
  }
}

.post-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.post-card__cats {
  display: flex;
  gap: var(--sp-2);
}

.post-card__cat {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--clr-accent);
}

.post-card__title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-snug);
}

.post-card__title a {
  color: var(--clr-heading);
}

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

.post-card__excerpt {
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
  line-height: var(--lh-loose);
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  font-size: var(--fs-xs);
  color: var(--clr-text-faint);
  font-family: var(--font-mono);
}

/* =========================================================
   SINGLE POST / PAGE CONTENT
   ========================================================= */
.entry-header {
  padding-top: calc(70px + var(--sp-16));
  padding-bottom: var(--sp-12);
  max-width: var(--max-w-narrow);
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: center;
  margin-bottom: var(--sp-6);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--clr-text-faint);
  letter-spacing: var(--ls-wide);
}

.entry-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: var(--fw-black);
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: var(--sp-6);
}

.entry-content {
  max-width: 72ch;
  font-size: var(--fs-md);
  line-height: var(--lh-loose);
}

.entry-content h2 {
  font-size: var(--fs-2xl);
  margin: var(--sp-12) 0 var(--sp-4);
}

.entry-content h3 {
  font-size: var(--fs-xl);
  margin: var(--sp-8) 0 var(--sp-3);
}

.entry-content p {
  margin-bottom: var(--sp-5);
}

.entry-content ul,
.entry-content ol {
  padding-left: var(--sp-6);
  margin-bottom: var(--sp-5);
  list-style: revert;
  color: var(--clr-text-muted);
}

.entry-content li {
  margin-bottom: var(--sp-2);
}

.entry-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entry-content img {
  border-radius: var(--r-lg);
  margin-block: var(--sp-8);
}

.entry-content hr {
  border: none;
  border-top: 1px solid var(--clr-border);
  margin-block: var(--sp-10);
}

.single-layout {
  display: grid;
  gap: var(--sp-12);
}

@media (min-width: 900px) {
  .single-layout {
    grid-template-columns: 1.6fr 0.9fr;
    align-items: start;
  }
}

.post-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.quote-single {
  padding-block: var(--sp-16);
  text-align: center;
}

.quote-single .entry-header {
  max-width: 760px;
  margin: 0 auto var(--sp-12);
}

.quote-single .entry-title {
  margin-bottom: var(--sp-4);
}

.quote-single .entry-meta {
  justify-content: center;
  gap: var(--sp-3);
  color: var(--clr-text-faint);
}

.quote-display {
  max-width: 860px;
  margin: 0 auto;
  padding: var(--sp-8) var(--sp-6);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-xl);
}

.quote-display blockquote {
  margin: 0;
  padding: 0;
  border-left: none;
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-style: normal;
  font-weight: 600;
  color: var(--clr-text);
}

.quote-display .quote-source {
  margin-top: var(--sp-8);
  font-size: var(--fs-lg);
  color: var(--clr-text-faint);
}

@media (max-width: 740px) {
  .quote-display {
    padding: var(--sp-6);
  }

  .quote-display blockquote {
    font-size: clamp(1.9rem, 8vw, 3rem);
  }
}

.sidebar-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
}

.sidebar-card .eyebrow {
  margin-bottom: var(--sp-4);
}

.quote-card blockquote {
  margin: 0 0 var(--sp-4);
  font-style: italic;
  color: var(--clr-text-muted);
  line-height: var(--lh-loose);
}

.quote-card cite {
  display: block;
  font-size: var(--fs-sm);
  color: var(--clr-text-faint);
  margin-top: var(--sp-3);
}

.seo-preview strong {
  display: block;
  margin-bottom: var(--sp-3);
}

.seo-preview p {
  margin: 0;
  color: var(--clr-text-muted);
}

.summary-note {
  margin-top: var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--clr-text-faint);
}

/* Tags */
.entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-10);
  padding-top: var(--sp-8);
  border-top: 1px solid var(--clr-border);
}

.entry-tag {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-full);
}

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

/* =========================================================
   CONTACT
   ========================================================= */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-12);
}

@media (min-width: 900px) {
  .contact-layout {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-info h3 {
  margin-bottom: var(--sp-4);
}

.contact-info p {
  color: var(--clr-text-muted);
  margin-bottom: var(--sp-8);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.contact-link {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-md);
  color: var(--clr-text);
  transition: all var(--dur-fast) ease;
}

.contact-link:hover {
  border-color: var(--clr-accent-strong-hover);
  color: var(--clr-accent);
  transform: translateX(4px);
}

.contact-link__icon {
  width: 40px;
  height: 40px;
  background: var(--clr-bg-alt);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--fs-base);
  flex-shrink: 0;
}

.contact-link__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-link__label {
  font-size: var(--fs-xs);
  color: var(--clr-text-faint);
  font-family: var(--font-mono);
  letter-spacing: var(--ls-wide);
}

.contact-link__value {
  font-weight: var(--fw-medium);
  font-size: var(--fs-sm);
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.form-group label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wide);
  color: var(--clr-text-muted);
  text-transform: uppercase;
}

.form-group input,
.form-group textarea,
.form-group select {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  color: var(--clr-text);
  font-size: var(--fs-base);
  transition:
    border-color var(--dur-fast) ease,
    box-shadow var(--dur-fast) ease;
  width: 100%;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--clr-accent);
  box-shadow: 0 0 0 3px var(--clr-accent-hover-shadow);
}

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

/* =========================================================
   CONTACT FORM 7 (CF7) STYLES
   ========================================================= */
.wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.wpcf7-form p {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin: 0;
  /* CF7 adds p tags, remove their default margin */
}

.wpcf7-form label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wide);
  color: var(--clr-text-muted);
  text-transform: uppercase;
}

.wpcf7-form-control.wpcf7-text,
.wpcf7-form-control.wpcf7-textarea,
.wpcf7-form-control.wpcf7-select,
.wpcf7-form-control.wpcf7-number,
.wpcf7-form-control.wpcf7-date {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  color: var(--clr-text);
  font-size: var(--fs-base);
  transition:
    border-color var(--dur-fast) ease,
    box-shadow var(--dur-fast) ease;
  width: 100%;
}

.wpcf7-form-control.wpcf7-text:focus,
.wpcf7-form-control.wpcf7-textarea:focus,
.wpcf7-form-control.wpcf7-select:focus,
.wpcf7-form-control.wpcf7-number:focus,
.wpcf7-form-control.wpcf7-date:focus {
  outline: none;
  border-color: var(--clr-accent);
  box-shadow: 0 0 0 3px var(--clr-accent-hover-shadow);
}

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

/* CF7 Submit Button behaves like .btn-primary */
.wpcf7-form-control.wpcf7-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--r-full);
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  transition: all var(--dur-normal) var(--ease-out);
  background: var(--clr-accent);
  color: var(--clr-bg);
  align-self: flex-start;
  margin-top: var(--sp-2);
}

.wpcf7-form-control.wpcf7-submit:hover {
  background: var(--clr-accent-dim);
  color: var(--clr-white);
  box-shadow: var(--shadow-accent);
  transform: translateY(-2px);
}

/* Validation, Spinner & Responses */
.wpcf7-spinner {
  margin-top: var(--sp-2);
}

.wpcf7-response-output {
  margin: var(--sp-4) 0 0 !important;
  padding: var(--sp-4) !important;
  border-radius: var(--r-md) !important;
  font-size: var(--fs-sm);
  border: 1px solid var(--clr-border) !important;
  background: var(--clr-surface);
  color: var(--clr-text);
  line-height: var(--lh-relaxed);
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output {
  border-color: #ff6b6b !important;
}

.wpcf7 form.sent .wpcf7-response-output {
  border-color: var(--clr-accent) !important;
}

.wpcf7-not-valid-tip {
  color: #ff6b6b;
  font-size: var(--fs-xs);
  margin-top: var(--sp-1);
}

/* =========================================================
   BREADCRUMBS
   ========================================================= */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--clr-text-faint);
  letter-spacing: var(--ls-wide);
  padding-top: calc(70px + var(--sp-8));
  margin-bottom: var(--sp-4);
}

.breadcrumbs a {
  color: var(--clr-text-faint);
}

.breadcrumbs a:hover {
  color: var(--clr-accent);
}

.breadcrumbs-sep {
  color: var(--clr-text-faint);
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  padding-block: var(--sp-16) var(--sp-8);
  border-top: 1px solid var(--clr-border);
  background: var(--clr-bg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-10);
  margin-bottom: var(--sp-12);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-brand {
  max-width: 280px;
}

.footer-brand__logo {
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  font-weight: var(--fw-black);
  color: var(--clr-heading);
  margin-bottom: var(--sp-3);
  letter-spacing: var(--ls-tight);
}

.footer-brand__logo span {
  color: var(--clr-accent);
}

.footer-brand p {
  font-size: var(--fs-sm);
  color: var(--clr-text-faint);
  line-height: var(--lh-loose);
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--clr-text-muted);
  margin-bottom: var(--sp-4);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.footer-col ul a {
  font-size: var(--fs-sm);
  color: var(--clr-text-faint);
  transition: color var(--dur-fast) ease;
}

.footer-col ul a:hover {
  color: var(--clr-accent);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--clr-border);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--clr-text-faint);
  letter-spacing: 0.03em;
}

.footer-socials {
  display: flex;
  gap: var(--sp-3);
}

.footer-social {
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  border: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-text-faint);
  font-size: var(--fs-sm);
  transition: all var(--dur-fast) ease;
}

.footer-social:hover {
  border-color: var(--clr-accent);
  color: var(--clr-accent);
  background: var(--clr-accent-glow);
}

/* =========================================================
   MISC / HELPERS
   ========================================================= */
.divider {
  width: 40px;
  height: 2px;
  background: var(--clr-accent);
  margin-block: var(--sp-6);
}

.divider--center {
  margin-inline: auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-full);
  padding: var(--sp-2) var(--sp-4);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
  letter-spacing: var(--ls-wide);
}

.badge--accent {
  background: var(--clr-accent-glow);
  border-color: var(--clr-accent-strong-hover);
  color: var(--clr-accent);
}

.page-hero {
  padding-top: calc(70px + var(--sp-16));
  padding-bottom: var(--sp-12);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  margin-top: var(--sp-16);
}

.pagination a,
.pagination span {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  border: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
  transition: all var(--dur-fast) ease;
}

.pagination a:hover,
.pagination a:hover span,
.pagination .current,
.pagination .current span {
  background: var(--clr-accent);
  border-color: var(--clr-accent);
  color: var(--clr-bg);
}

/* Loading / scroll animations */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

:focus-visible {
  outline: 2px solid var(--clr-accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* WordPress-specific */
.alignleft {
  float: left;
  margin-right: var(--sp-6);
  margin-bottom: var(--sp-4);
}

.alignright {
  float: right;
  margin-left: var(--sp-6);
  margin-bottom: var(--sp-4);
}

.aligncenter {
  display: block;
  margin-inline: auto;
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
  text-align: center;
  margin-top: var(--sp-2);
}

/* Comments */
.comments-area {
  margin-top: var(--sp-16);
}

/* Gutenberg block adjustments */
.wp-block-image img {
  border-radius: var(--r-lg);
}

.wp-block-quote {
  border-left: 3px solid var(--clr-accent);
  background: var(--clr-surface);
}

.wp-block-code {
  font-family: var(--font-mono);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* =========================================================
   HEADING REFINEMENTS — Cormorant Garant
   Cormorant is a high-contrast editorial serif; italic h1
   subtitles look exceptional with it.
   ========================================================= */
h1 em,
h2 em {
  font-style: italic;
}

.hero__title {
  /* Cormorant at large sizes reads better with slightly less
     tight tracking than a geometric sans needs */
  letter-spacing: -0.02em;
}

/* =========================================================
   THEME TRANSITION
   Smooth colour-scheme swap when JS adds/removes .theme-dark.
   ========================================================= */
body {
  transition:
    background-color 0.4s ease,
    color 0.4s ease;
}

/* =========================================================
   DARK THEME
   Activated by JS (type "darkside" Easter egg) or by adding
   class="theme-dark" to <body>. Also auto-activates when the
   user's OS is in dark mode (via @media below).
   ========================================================= */
body.theme-dark {
  --clr-bg: #0d0f14;
  --clr-bg-alt: #141720;
  --clr-surface: #1a1e28;
  --clr-surface-2: #222736;
  --clr-border: rgba(255, 255, 255, 0.07);
  --clr-accent: #e05709;
  --clr-accent-dim: #c94b05;
  --clr-accent-glow: rgba(224, 87, 9, 0.15);
  --clr-text: #e8eaf2;
  --clr-text-muted: #8891a8;
  --clr-text-faint: #4a5168;
  --clr-heading: #f0f2fa;

  /* Dark-specific accent helpers */
  --clr-accent-border: rgba(224, 87, 9, 0.2);
  --clr-accent-hover-shadow: rgba(224, 87, 9, 0.1);
  --clr-accent-strong-hover: rgba(224, 87, 9, 0.3);
  --clr-header-scrolled-bg: rgba(13, 15, 20, 0.88);
  --clr-hero-gradient: rgba(224, 87, 9, 0.06);

  /* Dark-mode shadows are more dramatic */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.6);

  color-scheme: dark;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero__avatar {
  display: none;
  position: absolute;
  right: 4vw;
  bottom: 0;
  width: clamp(200px, 22vw, 360px);
  pointer-events: none;
  user-select: none;
  /* Subtle mix-blend so it feels integrated with the dark bg */
  mix-blend-mode: luminosity;
  filter: contrast(1.2) brightness(1.1);
}

@media (min-width: 1024px) {
  .hero__avatar {
    display: block;
  }

  .hero {
    position: relative;
  }
}

body.theme-dark .hero__avatar {
  opacity: 0.75;
}

/* Dark mode: avatar uses luminosity blend */
body.theme-dark .hero__avatar img {
  mix-blend-mode: luminosity;
  opacity: 0.75;
}

/* Dark mode: cards rely on border, not shadow */
body.theme-dark .card {
  box-shadow: none;
}

/* Dark mode: tags */
body.theme-dark .tag {
  background: rgba(224, 87, 9, 0.08);
  color: var(--clr-accent-dim);
}

/* Dark mode: code */
body.theme-dark pre,
body.theme-dark code {
  background: var(--clr-surface);
  border-color: var(--clr-border);
}

/* =========================================================
   LIGHT MODE COMPONENT SPECIFICS (defaults, since light is base)
   ========================================================= */

/* Light: avatar uses multiply blend — slightly deeper for presence */
.hero__avatar img {
  mix-blend-mode: multiply;
  opacity: 0.88;
}

/* Light: cards get soft shadow */
.card {
  box-shadow:
    0 2px 12px rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(0, 0, 0, 0.04);
}

.card:hover {
  box-shadow:
    0 6px 24px rgba(0, 0, 0, 0.1),
    0 0 0 1px var(--clr-accent-border);
}

/* Light: tags */
.tag {
  background: rgba(224, 87, 9, 0.08);
  color: var(--clr-accent-dim);
}

/* =========================================================
   SYSTEM-PREFERENCE DARK MODE
   Auto-activates the dark palette when no explicit class set.
   ========================================================= */
@media (prefers-color-scheme: dark) {
  body:not(.theme-light) {
    --clr-bg: #0d0f14;
    --clr-bg-alt: #141720;
    --clr-surface: #1a1e28;
    --clr-surface-2: #222736;
    --clr-border: rgba(255, 255, 255, 0.07);
    --clr-accent: #e05709;
    --clr-accent-dim: #c94b05;
    --clr-accent-glow: rgba(224, 87, 9, 0.15);
    --clr-text: #e8eaf2;
    --clr-text-muted: #8891a8;
    --clr-text-faint: #4a5168;
    --clr-heading: #f0f2fa;
    --clr-accent-border: rgba(224, 87, 9, 0.2);
    --clr-accent-hover-shadow: rgba(224, 87, 9, 0.1);
    --clr-accent-strong-hover: rgba(224, 87, 9, 0.3);
    --clr-header-scrolled-bg: rgba(13, 15, 20, 0.88);
    --clr-hero-gradient: rgba(224, 87, 9, 0.06);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }

  body:not(.theme-light) .hero__avatar img {
    mix-blend-mode: luminosity;
    opacity: 0.75;
  }

  body:not(.theme-light) .card {
    box-shadow: none;
  }

  body:not(.theme-light) .tag {
    background: rgba(224, 87, 9, 0.08);
    color: var(--clr-accent);
  }
}

/* =========================================================
   STAR WARS DARK SIDE — TRANSITION OVERLAY
   Applied by JS when the user types "darkside" or "lightside"
   ========================================================= */
.sw-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
}

.sw-overlay--dark {
  background: radial-gradient(ellipse at center, transparent 0%, #000 70%);
  animation: sw-darken 0.7s ease-in forwards;
}

.sw-overlay--light {
  background: radial-gradient(ellipse at center, #fff 0%, transparent 60%);
  animation: sw-lighten 0.6s ease-out forwards;
}

@keyframes sw-darken {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }

  50% {
    opacity: 1;
    transform: scale(1.2);
  }

  100% {
    opacity: 0;
    transform: scale(1);
  }
}

@keyframes sw-lighten {
  0% {
    opacity: 0;
    transform: scale(1.5);
  }

  40% {
    opacity: 0.9;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(0.8);
  }
}

/* =========================================================
   HINT CHARACTER WIDGET
   Random pixel character that whispers the Easter egg.
   Floats bottom-right, appears after 5s, hides after 15s.
   ========================================================= */
.smj-hint {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 8900;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
  pointer-events: none;
}

.smj-hint--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.smj-hint__char {
  width: 56px;
  height: 68px;
  flex-shrink: 0;
  animation: smj-bob 2.4s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.18));
  cursor: pointer;
}

.smj-hint__char svg {
  width: 100%;
  height: 100%;
  shape-rendering: crispEdges;
  /* pixel-crisp look */
}

.smj-hint__bubble {
  position: relative;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 10px 10px 4px 10px;
  padding: 7px 11px;
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--clr-text-muted);
  box-shadow: var(--shadow-md);
  max-width: 136px;
  text-align: center;
}

/* little tail pointing down-right */
.smj-hint__bubble::after {
  content: "";
  position: absolute;
  bottom: -7px;
  right: 14px;
  border-width: 7px 7px 0 0;
  border-style: solid;
  border-color: var(--clr-surface) transparent transparent transparent;
  filter: drop-shadow(0 1px 0 var(--clr-border));
}

.smj-hint__bubble code {
  background: var(--clr-accent-glow);
  color: var(--clr-accent);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 500;
  white-space: nowrap;
}

.smj-hint__close {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 17px;
  height: 17px;
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  border-radius: 50%;
  font-size: 11px;
  cursor: pointer;
  color: var(--clr-text-muted);
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background var(--dur-fast) ease,
    color var(--dur-fast) ease;
}

.smj-hint__close:hover {
  background: var(--clr-accent-glow);
  color: var(--clr-accent);
}

/* The character bounces */
@keyframes smj-bob {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }

  50% {
    transform: translateY(-7px) rotate(1deg);
  }
}

/* Character glow animation on hover while retaining the bob */
.smj-hint--visible:hover .smj-hint__char {
  animation: smj-bob-glow 2s ease-in-out infinite;
}

@keyframes smj-bob-glow {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
    filter: drop-shadow(0 0 4px var(--clr-accent));
  }

  50% {
    transform: translateY(-7px) rotate(1deg);
    filter: drop-shadow(0 0 16px var(--clr-accent));
  }
}
/* On mobile: smaller hint, still visible — keyboard unavailable
   so this is how they discover the Easter egg              */
@media (max-width: 640px) {
  .smj-hint {
    bottom: 16px;
    right: 12px;
    gap: 4px;
  }

  .smj-hint__char {
    width: 44px;
    height: 54px;
  }

  .smj-hint__bubble {
    font-size: 9.5px;
    padding: 5px 8px;
    max-width: 110px;
  }
}

/* ── Avatar triple-tap feedback ──────────────────────── */
.hero__avatar {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* Gentle idle pulse on mobile/tablet to hint at interactivity */
@media (max-width: 900px) {
  .hero__avatar img {
    animation: avatar-idle-pulse 4s ease-in-out 8s infinite;
  }
}

@keyframes avatar-idle-pulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.03);
  }
}

/* Tap squeeze — overwrites idle pulse during tap */
.hero__avatar.avatar--tapped img {
  animation: avatar-tap-squeeze 0.28s ease !important;
}

@keyframes avatar-tap-squeeze {
  0% {
    transform: scale(1);
  }

  40% {
    transform: scale(0.9);
  }

  100% {
    transform: scale(1);
  }
}

/* Dark mode: hint bubble */
body.theme-dark .smj-hint__char {
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

@media (prefers-color-scheme: dark) {
  body:not(.theme-light) .smj-hint__char {
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
  }
}

.custom-logo {
  width: 150px;
}

.writings-filters {
  margin-bottom: var(--sp-8);
}

.d-flex {
  display: flex;
}
.flex-column {
  flex-direction: column;
}
.entry-content a {
  word-wrap: break-word;
}
.writings-filters a.active {
  background: var(--clr-accent-glow);
  color: var(--clr-accent);
}
