/* =========================================================================
   Pinku Daimari — pinkudaimari.com
   Custom stylesheet. Bootstrap 5 provides layout/grid utilities via CDN;
   everything visual/brand-specific lives here.
   Design language: a cloud/DevOps engineer's terminal — dark editor canvas,
   syntax-highlight accent palette, monospace structural type.
   ========================================================================= */

:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  /* ---- Color tokens (syntax-highlight inspired) ----
     Lifted a couple of notches from the original near-black so panels
     stay legible even at low screen brightness, with accents pushed
     more saturated to compensate. */
  --bg-canvas: #10141d;         /* page background, blue-black */
  --bg-canvas-rgb: 16, 20, 29;  /* same color, as r,g,b for rgba() use (header blur, etc.) */
  --bg-canvas-2: #151b27;       /* secondary page wash, for gradients */
  --bg-surface: #1a212f;        /* cards / panels */
  --bg-surface-2: #212939;      /* raised panels, terminal chrome */
  --bg-elevated: #283148;       /* hover state surfaces */
  --border-subtle: #2b3549;
  --border-strong: #3d4a68;

  --text-primary: #f2f5fb;
  --text-secondary: #aab6cc;
  --text-muted: #7e8aa0;

  --accent-teal: #5eead4;       /* prompt / primary accent */
  --accent-teal-dim: #2dd4bf;
  --accent-amber: #fbbf24;      /* comments / secondary accent */
  --accent-violet: #c4b5fd;     /* keywords / tertiary accent */
  --accent-rose: #fb7185;       /* errors / destructive */
  --accent-green: #4ade80;      /* success / uptime */

  --shadow-soft: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 0 1px rgba(94, 234, 212, 0.18), 0 8px 28px -6px rgba(94, 234, 212, 0.28);

  --avatar-ring-shadow: 0 0 42px -6px rgba(94, 234, 212, 0.45);
  --noise-opacity: 0.05;
}

/* ---- Light theme ----
   A crisp, high-contrast paper-and-ink take on the same terminal
   language rather than a washed-out inverted dark theme. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg-canvas: #f5f6fb;
  --bg-canvas-rgb: 245, 246, 251;
  --bg-canvas-2: #eceffa;
  --bg-surface: #ffffff;
  --bg-surface-2: #eef1f9;
  --bg-elevated: #e5e9f5;
  --border-subtle: #dde2f0;
  --border-strong: #c3cbe3;

  --text-primary: #10141f;
  --text-secondary: #4a5470;
  --text-muted: #6f7893;

  --accent-teal: #0d9488;
  --accent-teal-dim: #0f766e;
  --accent-amber: #b45309;
  --accent-violet: #7c3aed;
  --accent-rose: #e11d48;
  --accent-green: #15803d;

  --shadow-soft: 0 10px 30px -14px rgba(16, 20, 31, 0.18);
  --shadow-glow: 0 0 0 1px rgba(13, 148, 136, 0.16), 0 8px 24px -10px rgba(13, 148, 136, 0.28);

  --avatar-ring-shadow: 0 0 30px -8px rgba(13, 148, 136, 0.35);
  --noise-opacity: 0.025;
}

:root {
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --container-max: 1320px;
}

/* Theme swap should feel immediate on the toggle, not laggy elsewhere */
body, .site-header, .win-card, .about-card, .terminal-window, .stack-group,
.contact-side-card, .cta-band, .site-footer, .theme-toggle, .timeline-card,
.philosophy-card, .oss-card {
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

/* ---------------------------------------------------------------------
   Base
   --------------------------------------------------------------------- */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.container-fluid.px-wide {
  max-width: var(--container-max);
  padding-left: clamp(1.25rem, 4vw, 3rem);
  padding-right: clamp(1.25rem, 4vw, 3rem);
  margin-left: auto;
  margin-right: auto;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-primary);
  letter-spacing: -0.01em;
  font-weight: 600;
}

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

::selection { background: var(--accent-teal); color: #05201c; }

/* Visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.btn:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid var(--accent-teal);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 2000;
  background: var(--accent-teal);
  color: #05201c;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-mono);
  font-weight: 600;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

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

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--accent-teal);
  text-transform: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-teal);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.18);
  flex-shrink: 0;
}

.section {
  padding-block: clamp(4rem, 8vw, 7rem);
  position: relative;
}
.section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin-bottom: 0.5rem;
}
.section-lede {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.95rem;
}

.divider-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
  border: none;
  margin: 0;
}

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

/* ---------------------------------------------------------------------
   Navbar
   --------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(var(--bg-canvas-rgb), 0.72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--border-subtle);
  background: rgba(var(--bg-canvas-rgb), 0.92);
}

.navbar { padding-block: 0.85rem; }

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-primary);
}
.brand-logo:hover { color: var(--text-primary); }
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--accent-teal), var(--accent-violet));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #05121a;
  font-size: 0.95rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-glow);
}
.brand-logo .brand-prompt { color: var(--accent-teal); }
.brand-logo .brand-text { color: var(--text-secondary); }

.navbar-nav .nav-link {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 0.5rem 0.9rem !important;
  position: relative;
}
.navbar-nav .nav-link::before { content: "./"; color: var(--text-muted); }
.navbar-nav .nav-link[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.45;
  cursor: not-allowed;
}
.navbar-nav .nav-link[aria-disabled="true"]::after {
  content: "soon";
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-left: 0.35rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.05rem 0.4rem;
  vertical-align: middle;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active { color: var(--text-primary); }
.navbar-nav .nav-link.active::after {
  content: "";
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.15rem;
  height: 2px;
  background: var(--accent-teal);
  border-radius: 2px;
}

.btn-nav-cta {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.5rem 1.1rem;
}

.navbar-toggler {
  border: 1px solid var(--border-strong);
  padding: 0.4rem 0.55rem;
}
.navbar-toggler:focus { box-shadow: 0 0 0 2px var(--accent-teal); }
.navbar-toggler-icon {
  filter: invert(1) grayscale(1);
}
:root[data-theme="light"] .navbar-toggler-icon {
  filter: none;
}

/* ---------------------------------------------------------------------
   Theme toggle
   --------------------------------------------------------------------- */
.theme-toggle {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface-2);
  color: var(--accent-teal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  margin-left: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease, background-color 0.25s ease;
}
@media (min-width: 992px) {
  .theme-toggle { margin-left: 1.5rem; }
}
.theme-toggle:hover { border-color: var(--accent-teal); box-shadow: var(--shadow-glow); }
.theme-toggle:active { transform: scale(0.92); }
.theme-toggle i { pointer-events: none; }
.theme-toggle [data-theme-icon="light"] { display: none; }
:root[data-theme="light"] .theme-toggle [data-theme-icon="dark"] { display: none; }
:root[data-theme="light"] .theme-toggle [data-theme-icon="light"] { display: inline-block; }

/* ---------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------- */
.btn {
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-terminal {
  background: var(--accent-teal);
  color: #05201c;
  border: 1px solid var(--accent-teal);
  font-family: var(--font-mono);
}
.btn-terminal:hover {
  background: var(--accent-teal-dim);
  border-color: var(--accent-teal-dim);
  color: #05201c;
  box-shadow: var(--shadow-glow);
}

.btn-outline-terminal {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
}
.btn-outline-terminal:hover {
  border-color: var(--accent-teal);
  color: var(--accent-teal);
  background: rgba(94, 234, 212, 0.06);
}

/* ---------------------------------------------------------------------
   Hero
   --------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-top: clamp(3.5rem, 8vw, 6rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
  overflow: hidden;
}

/* Ambient particle-network canvas — fixed to the viewport and painted
   first in <body>, so it sits behind every section on every page
   (not just the hero) while staying beneath cards, the header, and
   any other opaque surface that comes later in the DOM. */
.site-canvas-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-grid-fade {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 12% 0%, rgba(94, 234, 212, 0.14), transparent 60%),
    radial-gradient(ellipse 45% 45% at 100% 15%, rgba(199, 165, 250, 0.12), transparent 60%),
    radial-gradient(ellipse 40% 35% at 70% 100%, rgba(251, 113, 133, 0.08), transparent 60%);
  pointer-events: none;
}
:root[data-theme="light"] .hero-grid-fade {
  background:
    radial-gradient(ellipse 60% 50% at 12% 0%, rgba(13, 148, 136, 0.10), transparent 60%),
    radial-gradient(ellipse 45% 45% at 100% 15%, rgba(124, 58, 237, 0.08), transparent 60%),
    radial-gradient(ellipse 40% 35% at 70% 100%, rgba(225, 29, 72, 0.06), transparent 60%);
}

.hero-content { position: relative; z-index: 1; }

/* ---------------------------------------------------------------------
   Ambient background orbs — reusable drifting color blobs used behind
   several sections to keep dark mode feeling alive without extra JS.
   --------------------------------------------------------------------- */
.bg-orb-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  animation: orb-drift 22s ease-in-out infinite;
}
:root[data-theme="light"] .bg-orb { opacity: 0.22; }
.bg-orb.teal { background: var(--accent-teal); }
.bg-orb.violet { background: var(--accent-violet); }
.bg-orb.amber { background: var(--accent-amber); }
.bg-orb.rose { background: var(--accent-rose); }
@keyframes orb-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(4%, -6%) scale(1.08); }
  66% { transform: translate(-3%, 5%) scale(0.94); }
}
@media (prefers-reduced-motion: reduce) {
  .bg-orb { animation: none; }
}

.hero-avatar-wrap {
  display: flex;
  justify-content: flex-end;
}

.hero-avatar {
  position: relative;
  width: clamp(150px, 16vw, 196px);
  height: clamp(150px, 16vw, 196px);
  flex-shrink: 0;
  filter: drop-shadow(var(--avatar-ring-shadow));
}
.hero-avatar .avatar-glow {
  position: absolute;
  inset: -34px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 234, 212, 0.35), transparent 68%);
  filter: blur(6px);
  animation: avatar-pulse 4.5s ease-in-out infinite;
  pointer-events: none;
}
:root[data-theme="light"] .hero-avatar .avatar-glow {
  background: radial-gradient(circle, rgba(13, 148, 136, 0.22), transparent 68%);
}
@keyframes avatar-pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.04); }
}
.hero-avatar .avatar-ring {
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  background: conic-gradient(from 180deg, var(--accent-teal), var(--accent-violet), var(--accent-amber), var(--accent-rose), var(--accent-teal));
  padding: 3px;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: spin-ring 8s linear infinite;
}
@keyframes spin-ring { to { transform: rotate(360deg); } }

.hero-avatar .avatar-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-surface-2);
  border: 4px solid var(--bg-canvas);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.hero-avatar .avatar-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.hero-avatar .avatar-photo .avatar-placeholder {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0.5rem;
  line-height: 1.4;
}
.hero-avatar .status-dot {
  position: absolute;
  bottom: 6%;
  right: 6%;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-green);
  border: 3px solid var(--bg-canvas);
  z-index: 2;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  animation: status-ping 2.4s ease-out infinite;
}
@keyframes status-ping {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-avatar .avatar-glow,
  .hero-avatar .status-dot { animation: none; }
}

.hero-kicker {
  font-family: var(--font-mono);
  color: var(--accent-amber);
  font-size: 0.85rem;
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 3.75rem);
  line-height: 1.08;
  margin-block: 1rem;
}
.hero-title .accent { color: var(--accent-teal); }

.hero-sub {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 46ch;
}

/* Terminal window (signature element) */
.terminal-window {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.terminal-titlebar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  background: var(--bg-surface-2);
  border-bottom: 1px solid var(--border-subtle);
}
.terminal-dot { width: 11px; height: 11px; border-radius: 50%; }
.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }
.terminal-title {
  margin-left: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.terminal-body {
  padding: 1.25rem 1.4rem 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  min-height: 210px;
}
.terminal-line { margin-bottom: 0.55rem; color: var(--text-secondary); }
.terminal-prompt { color: var(--accent-teal); }
.terminal-path { color: var(--accent-violet); }
.terminal-output { color: var(--text-primary); }
.terminal-comment { color: var(--text-muted); }
.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  background: var(--accent-teal);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-scroll-cue {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* ---------------------------------------------------------------------
   About
   --------------------------------------------------------------------- */
.about-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
.about-fact-list { list-style: none; padding: 0; margin: 0; }
.about-fact-list li {
  display: flex;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--border-subtle);
  font-size: 0.95rem;
}
.about-fact-list li:last-child { border-bottom: none; }
.about-fact-list .key {
  font-family: var(--font-mono);
  color: var(--accent-teal);
  min-width: 9.5rem;
  flex-shrink: 0;
}
.about-fact-list .val { color: var(--text-secondary); }

/* ---------------------------------------------------------------------
   Timeline ("career.log")
   --------------------------------------------------------------------- */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-teal), var(--border-strong) 90%);
}
.timeline-item { position: relative; padding-bottom: 2.25rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -2rem;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-canvas);
  border: 2px solid var(--accent-teal);
  box-shadow: 0 0 0 4px rgba(94, 234, 212, 0.15);
}
.timeline-item .timeline-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-teal);
  margin-bottom: 0.3rem;
  display: inline-block;
}
.timeline-item h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.timeline-item p { color: var(--text-secondary); font-size: 0.94rem; margin-bottom: 0; }

/* ---------------------------------------------------------------------
   Philosophy / how-I-work cards
   --------------------------------------------------------------------- */
.philosophy-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 3vw, 1.85rem);
  height: 100%;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.philosophy-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.philosophy-card .philosophy-glyph {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}
.philosophy-card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.philosophy-card p { color: var(--text-secondary); font-size: 0.92rem; margin-bottom: 0; }

/* ---------------------------------------------------------------------
   Open-source / GitHub activity card
   --------------------------------------------------------------------- */
.oss-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}
.oss-card .oss-copy { max-width: 46ch; }
.oss-card h3 { margin-bottom: 0.5rem; }
.oss-card p { color: var(--text-secondary); margin-bottom: 0; }
.oss-graph {
  display: grid;
  grid-template-columns: repeat(18, 1fr);
  gap: 3px;
  flex-shrink: 0;
}
.oss-graph span {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  background: var(--bg-elevated);
}
.oss-graph span.l1 { background: rgba(94, 234, 212, 0.25); }
.oss-graph span.l2 { background: rgba(94, 234, 212, 0.5); }
.oss-graph span.l3 { background: rgba(94, 234, 212, 0.75); }
.oss-graph span.l4 { background: var(--accent-teal); }

/* ---------------------------------------------------------------------
   Cards: services / window style
   --------------------------------------------------------------------- */
.win-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 100%;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.win-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
}
.win-card .win-titlebar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.9rem;
  background: var(--bg-surface-2);
  border-bottom: 1px solid var(--border-subtle);
}
.win-card .win-titlebar .terminal-dot { width: 8px; height: 8px; }
.win-card .win-titlebar .win-filename {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}
.win-card .win-body { padding: 1.5rem; }
.win-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(94, 234, 212, 0.1);
  color: var(--accent-teal);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}
.win-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.win-card p { color: var(--text-secondary); font-size: 0.94rem; margin-bottom: 0.75rem; }
.win-card .win-quip {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px dashed var(--border-subtle);
  padding-top: 0.65rem;
  margin-top: auto;
}

/* alternate accent colors per card via nth-child for variety, not meaning-bearing */
.win-card:nth-of-type(2) .win-icon { background: rgba(167, 139, 250, 0.1); color: var(--accent-violet); }
.win-card:nth-of-type(3) .win-icon { background: rgba(245, 166, 35, 0.12); color: var(--accent-amber); }
.win-card:nth-of-type(4) .win-icon { background: rgba(251, 113, 133, 0.1); color: var(--accent-rose); }
.win-card:nth-of-type(5) .win-icon { background: rgba(63, 185, 80, 0.12); color: var(--accent-green); }

/* ---------------------------------------------------------------------
   Tech stack tags
   --------------------------------------------------------------------- */
.stack-group {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 3vw, 2rem);
  height: 100%;
}
.stack-group h3 {
  font-size: 1rem;
  font-family: var(--font-mono);
  color: var(--accent-teal);
  margin-bottom: 1.1rem;
}
.stack-tags { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.stack-tag {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.stack-tag:hover { border-color: var(--accent-teal); color: var(--text-primary); }
.stack-tag i { color: var(--accent-teal); font-size: 0.9rem; }

/* ---------------------------------------------------------------------
   Stats
   --------------------------------------------------------------------- */
.stat-card {
  text-align: center;
  padding: 1.75rem 1rem;
  border-right: 1px dashed var(--border-subtle);
}
.stat-card:last-child { border-right: none; }
.stat-num {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--accent-teal);
  line-height: 1;
}
.stat-label {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.stat-quip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ---------------------------------------------------------------------
   CTA band
   --------------------------------------------------------------------- */
.cta-band {
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-surface-2) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.5rem);
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(94, 234, 212, 0.15), transparent 70%);
  top: -120px;
  right: -80px;
  pointer-events: none;
}

/* ---------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------- */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding-block: clamp(3rem, 6vw, 4rem) 1.5rem;
}
.site-footer h5 {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.55rem; }
.footer-links a { color: var(--text-secondary); font-size: 0.92rem; }
.footer-links a:hover { color: var(--accent-teal); }

.footer-social {
  display: flex;
  gap: 0.6rem;
}
.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.footer-social a:hover {
  border-color: var(--accent-teal);
  color: var(--accent-teal);
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}
.uptime-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-green);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.uptime-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(63, 185, 80, 0.18);
}

/* ---------------------------------------------------------------------
   Scroll reveal (progressive enhancement via IntersectionObserver)
   --------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---------------------------------------------------------------------
   Inner / secondary pages (contact, privacy, terms)
   --------------------------------------------------------------------- */
.page-hero {
  padding-top: clamp(3rem, 7vw, 4.5rem);
  padding-bottom: clamp(2rem, 5vw, 3rem);
  border-bottom: 1px solid var(--border-subtle);
}
.breadcrumb-mono {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
}
.breadcrumb-mono a { color: var(--text-secondary); }

.legal-content { max-width: 74ch; }
.legal-content h2 {
  font-size: 1.3rem;
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
  color: var(--accent-teal);
}
.legal-content p, .legal-content li { color: var(--text-secondary); }
.legal-content ul { padding-left: 1.25rem; }
.legal-content .updated-badge {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  display: inline-block;
}

/* Contact form */
.contact-form label {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}
.contact-form .form-control {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  font-family: var(--font-body);
}
.contact-form .form-control:focus {
  background: var(--bg-surface-2);
  color: var(--text-primary);
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.15);
}
.contact-form .form-control::placeholder { color: var(--text-muted); }
.contact-form textarea.form-control { min-height: 150px; resize: vertical; }

/* honeypot field must stay invisible to humans, reachable to simple bots */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-side-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.contact-side-card .item {
  display: flex;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
.contact-side-card .item:last-child { margin-bottom: 0; }
.contact-side-card .item-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(94, 234, 212, 0.1);
  color: var(--accent-teal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.form-status {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  display: none;
}
.form-status.is-visible { display: block; }
.form-status.success { background: rgba(63, 185, 80, 0.1); color: var(--accent-green); border: 1px solid rgba(63, 185, 80, 0.3); }
.form-status.error { background: rgba(251, 113, 133, 0.1); color: var(--accent-rose); border: 1px solid rgba(251, 113, 133, 0.3); }

/* ---------------------------------------------------------------------
   Secondary-page layout: content column + right-hand aside.
   Used by privacy/terms/about/blog-post so prose pages use the full
   container width instead of one narrow centered column.
   --------------------------------------------------------------------- */
.sticky-aside {
  position: sticky;
  top: 104px;
}
.aside-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.75rem;
  margin-bottom: 1.5rem;
}
.aside-card:last-child { margin-bottom: 0; }
.aside-card h3 {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-teal);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}
.aside-card ul { list-style: none; padding: 0; margin: 0; }
.aside-card ul li {
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--border-subtle);
  font-size: 0.92rem;
}
.aside-card ul li:last-child { border-bottom: none; }
.aside-card ul.toc-list li a {
  color: var(--text-secondary);
  display: inline-flex;
  gap: 0.5rem;
}
.aside-card ul.toc-list li a::before { content: "→"; color: var(--accent-teal); }
.aside-card ul.toc-list li a:hover { color: var(--accent-teal); }
.aside-card p { color: var(--text-secondary); font-size: 0.92rem; }
.aside-card .mini-quip {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  margin-bottom: 0;
}

/* ---------------------------------------------------------------------
   Blog listing
   --------------------------------------------------------------------- */
.post-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.post-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-soft); }
.post-thumb {
  height: 148px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1.8rem;
  color: var(--bg-canvas);
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-violet));
}
.post-thumb.alt-1 { background: linear-gradient(135deg, var(--accent-amber), var(--accent-rose)); }
.post-thumb.alt-2 { background: linear-gradient(135deg, var(--accent-violet), var(--accent-teal-dim)); }
.post-thumb.alt-3 { background: linear-gradient(135deg, var(--accent-green), var(--accent-teal)); }
.post-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.35) 1px, transparent 1px);
  background-size: 14px 14px;
  opacity: 0.35;
}
.post-thumb i { position: relative; font-size: 2.1rem; }
.post-card .win-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex-grow: 1; }
.post-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-teal);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.post-card h3 { font-size: 1.08rem; margin: 0.5rem 0 0.6rem; }
.post-card h3 a { color: var(--text-primary); }
.post-card h3 a:hover { color: var(--accent-teal); }
.post-card p.post-excerpt { color: var(--text-secondary); font-size: 0.92rem; flex-grow: 1; }
.post-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--border-subtle);
}

.featured-post {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}
@media (max-width: 767.98px) {
  .featured-post { grid-template-columns: 1fr; }
}
.featured-post .featured-copy { padding: clamp(1.75rem, 4vw, 2.75rem); display: flex; flex-direction: column; justify-content: center; }
.featured-post .featured-visual {
  background: linear-gradient(150deg, var(--accent-violet), var(--accent-teal));
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.featured-post .featured-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.4) 1.5px, transparent 1.5px);
  background-size: 20px 20px;
  opacity: 0.3;
}
.featured-post .featured-visual i { font-size: 3.5rem; color: var(--bg-canvas); position: relative; }
.featured-post h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0.75rem 0 1rem; }

.newsletter-band {
  background: var(--bg-surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  text-align: center;
}
.newsletter-band .form-control { max-width: 340px; }

/* ---------------------------------------------------------------------
   Article (single blog post)
   --------------------------------------------------------------------- */
.article-meta {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}
.article-meta .post-tag { font-size: 0.72rem; }
.article-title { font-size: clamp(1.9rem, 4vw, 2.75rem); margin: 0.75rem 0 1rem; line-height: 1.15; }
.article-lede { color: var(--text-secondary); font-size: 1.08rem; max-width: 68ch; }

.author-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}
.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--border-subtle);
}
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-row .author-name { font-weight: 600; color: var(--text-primary); font-size: 0.92rem; }
.author-row .author-role { color: var(--text-muted); font-size: 0.8rem; }

.article-prose { max-width: 70ch; }
.article-prose > p, .article-prose > ul, .article-prose > ol { color: var(--text-secondary); font-size: 1.02rem; }
.article-prose h2 {
  font-size: 1.4rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  scroll-margin-top: 100px;
}
.article-prose h3 {
  font-size: 1.12rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--accent-teal);
  scroll-margin-top: 100px;
}
.article-prose ul, .article-prose ol { padding-left: 1.4rem; }
.article-prose li { margin-bottom: 0.4rem; }
.article-prose a { text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.article-prose blockquote {
  margin: 1.75rem 0;
  padding: 1rem 1.5rem;
  border-left: 3px solid var(--accent-teal);
  background: var(--bg-surface);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-primary);
  font-style: italic;
}
.article-prose blockquote p:last-child { margin-bottom: 0; }
.article-prose pre {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.3rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}
.article-prose code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  color: var(--accent-teal);
  background: var(--bg-surface-2);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}
.article-prose pre code { background: none; padding: 0; color: var(--text-primary); }
.article-prose hr { border-color: var(--border-subtle); margin: 2.5rem 0; }
.article-prose strong { color: var(--text-primary); }

.article-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2.5rem; }

.share-row { display: flex; gap: 0.6rem; }
.share-row a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.share-row a:hover { border-color: var(--accent-teal); color: var(--accent-teal); }

.related-post-link {
  display: block;
  padding: 1rem 0;
  border-bottom: 1px dashed var(--border-subtle);
}
.related-post-link:last-child { border-bottom: none; }
.related-post-link .post-tag { display: block; margin-bottom: 0.3rem; }
.related-post-link .related-title { color: var(--text-primary); font-size: 0.95rem; font-weight: 600; }
.related-post-link:hover .related-title { color: var(--accent-teal); }

/* ---------------------------------------------------------------------
   404
   --------------------------------------------------------------------- */
.error-page {
  min-height: 78vh;
  display: flex;
  align-items: center;
  padding-block: clamp(3rem, 6vw, 4rem);
}
.error-code {
  font-family: var(--font-mono);
  font-size: clamp(4.5rem, 12vw, 8rem);
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.error-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* ---------------------------------------------------------------------
   Responsive tweaks
   --------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .navbar-nav .nav-link.active::after { display: none; }
  .navbar-collapse {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-top: 0.75rem;
  }
  .hero-avatar-wrap { justify-content: flex-start; margin-bottom: 1.5rem; }
}

@media (max-width: 767.98px) {
  .stat-card {
    border-right: none;
    border-bottom: 1px dashed var(--border-subtle);
  }
  .stat-card:last-child { border-bottom: none; }
}
