/* ============================================
   vaishnav varma — personal site
   warm-dark minimal, one theme done right
   ============================================ */

/* ============================================
   design tokens
   ============================================ */
:root,
[data-palette="amber"] {
  /* palette — warm brown-black, golden accent, cream text */
  --bg:            #1a1511;
  --bg-raised:     #211d18;
  --bg-surface:    #2a2520;
  --border:        #3d362e;
  --border-accent: #daa520;

  --text:          #ddd2c7;
  --text-secondary:#a89a8c;
  --text-muted:    #6b5d4f;

  --accent:        #daa520;
  --accent-dim:    rgba(218, 165, 32, 0.10);

  --link:          #daa520;
  --link-hover:    #e8c547;
}

[data-palette="sage"] {
  --bg:            #131a15;
  --bg-raised:     #1a211c;
  --bg-surface:    #222a24;
  --border:        #2e3d32;
  --border-accent: #7c9a72;

  --text:          #d2ddd0;
  --text-secondary:#8ca88a;
  --text-muted:    #5a6b58;

  --accent:        #7c9a72;
  --accent-dim:    rgba(124, 154, 114, 0.10);

  --link:          #7c9a72;
  --link-hover:    #9ab890;
}

[data-palette="rose"] {
  --bg:            #1a1316;
  --bg-raised:     #211a1d;
  --bg-surface:    #2a2225;
  --border:        #3d2e34;
  --border-accent: #c4837a;

  --text:          #ddd2d5;
  --text-secondary:#a8928c;
  --text-muted:    #6b5960;

  --accent:        #c4837a;
  --accent-dim:    rgba(196, 131, 122, 0.10);

  --link:          #c4837a;
  --link-hover:    #d9a099;
}

[data-palette="ocean"] {
  --bg:            #11151a;
  --bg-raised:     #181d22;
  --bg-surface:    #20252b;
  --border:        #2e353d;
  --border-accent: #c4a645;

  --text:          #cdd5dd;
  --text-secondary:#8c9aa8;
  --text-muted:    #586070;

  --accent:        #c4a645;
  --accent-dim:    rgba(196, 166, 69, 0.10);

  --link:          #c4a645;
  --link-hover:    #d9bf60;
}

:root {
  /* typography */
  --font-body:     'Source Serif 4', 'Georgia', serif;
  --font-display:  'Instrument Serif', 'Georgia', serif;
  --font-mono:     'JetBrains Mono', 'Cascadia Code', monospace;

  /* spacing — fibonacci scale */
  --sp-1:   1rem;       /* 16px */
  --sp-phi: 1.618rem;   /* 25.9px */
  --sp-2:   2.618rem;   /* 41.9px */
  --sp-3:   4.236rem;   /* 67.8px */
  --sp-4:   6.854rem;   /* 109.7px */

  /* layout */
  --max-width:     860px;
  --gutter:        2rem;
  --transition:    0.2s ease;
}


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

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.6s ease, color 0.4s ease;
}

/* palette transition — smooth color shifts when cycling */
body,
.site-wrapper,
.site-nav,
.site-footer,
.work-item,
.project-card,
.post-item,
.command-palette__box {
  transition: color 0.4s ease, background-color 0.4s ease, border-color 0.4s ease;
}

/* warm-tinted scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }


/* ============================================
   layout
   ============================================ */
.site-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--sp-2) var(--gutter) var(--sp-3);
  min-height: 100vh;
}


/* ============================================
   nav
   ============================================ */
.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-1);
  border-bottom: 1px dashed var(--border);
}

.site-nav__links {
  list-style: none;
  display: flex;
  gap: var(--sp-phi);
}

.site-nav__links a {
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  transition: color var(--transition);
}

.site-nav__links a:hover {
  color: var(--text);
}

.site-nav__links a.active {
  color: var(--accent);
}

.cmd-hint {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition);
}

.cmd-hint:hover {
  border-color: var(--accent);
  color: var(--accent);
}


/* ============================================
   typography
   ============================================ */
h1, h2, h3, h4 {
  font-family: var(--font-body);
  font-weight: 400;  /* tufte approach — large but light */
  line-height: 1.3;
  color: var(--text);
}

h1 { font-size: 1.75rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.35rem; margin-bottom: 0.5rem; }
h3 { font-size: 1.1rem;  margin-bottom: 0.4rem; }

p {
  margin-bottom: var(--sp-1);
  line-height: 1.7;
}

a {
  color: var(--link);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.3s ease, color var(--transition);
}

a:hover {
  color: var(--link-hover);
  background-size: 100% 1px;
}

/* links inside nav/footer/meta shouldn't have the underline sweep */
.site-nav a,
.site-footer a,
.cmd-hint,
.post-item,
.project-card,
.hero__links a {
  background-image: none;
}

strong, b {
  color: var(--accent);
  font-weight: 600;
}

small, .text-sm { font-size: 0.85rem; }
.text-muted     { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-surface);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  color: var(--accent);
}

pre {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: var(--sp-1) 1.25rem;
  overflow-x: auto;
  margin-bottom: var(--sp-phi);
  font-size: 0.85rem;
  line-height: 1.6;
}

pre code {
  background: none;
  padding: 0;
  color: var(--text);
}

hr {
  border: none;
  border-top: 1px dashed var(--border);
  margin: var(--sp-2) 0;
}

blockquote {
  border-left: 2px solid var(--accent);
  padding-left: var(--sp-1);
  margin: var(--sp-phi) 0;
  color: var(--text-secondary);
  font-style: italic;
}


/* ============================================
   section label (the mono "now", "recent" etc)
   ============================================ */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: var(--sp-1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s ease-out 0.2s;
}

.fade-in.visible .section-label::after {
  transform: scaleX(1);
}


/* ============================================
   hero / intro
   ============================================ */
.hero {
  margin-bottom: var(--sp-3);
}

.hero__name {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 400;
  margin-bottom: 0.6rem;
  color: var(--text);
  background: linear-gradient(
    90deg,
    var(--text) 0%, var(--text) 40%,
    var(--accent) 50%,
    var(--text) 60%, var(--text) 100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: nameShimmer 8s ease-in-out infinite;
}

@keyframes nameShimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.hero__bio {
  color: var(--text-secondary);
  font-size: 1.15rem;
  line-height: 1.85;
  max-width: 65ch;
}

.hero__links {
  display: flex;
  gap: var(--sp-phi);
  margin-top: var(--sp-1);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.hero__links a {
  color: var(--text-muted);
  transition: color var(--transition);
}

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


/* ============================================
   "now" section — hybrid: status line + cards
   ============================================ */
.now-section {
  margin-bottom: var(--sp-3);
}

.now-status {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: var(--sp-phi);
  line-height: 1.6;
}

.now-status .cursor {
  display: inline-block;
  width: 0.5em;
  height: 1.1em;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

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

.now-item {
  padding: var(--sp-1) 1.2rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease, border-color var(--transition);
}

.fade-in.visible .now-item { opacity: 1; transform: translateY(0); }
.fade-in.visible .now-item:nth-child(1) { transition-delay: 0.15s; }
.fade-in.visible .now-item:nth-child(2) { transition-delay: 0.23s; }
.fade-in.visible .now-item:nth-child(3) { transition-delay: 0.31s; }
.fade-in.visible .now-item:nth-child(4) { transition-delay: 0.39s; }

.now-item:hover {
  border-color: var(--text-muted);
}

.now-item__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.now-item__value {
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.6;
}

.now-item__value a {
  color: var(--link);
}


/* ============================================
   posts feed
   ============================================ */
.posts-section {
  margin-bottom: var(--sp-3);
}

.post-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--sp-1);
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: all var(--transition);
}

.post-item:last-child {
  border-bottom: none;
}

.post-item:hover {
  padding-left: 0.5rem;
}

.post-item:hover .post-item__title {
  color: var(--accent);
}

.post-item__title {
  font-size: 1rem;
  color: var(--text);
  transition: color var(--transition);
  line-height: 1.4;
}

.post-item__date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.view-all {
  display: inline-block;
  margin-top: var(--sp-1);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color var(--transition);
  background-image: none;
}

.view-all:hover {
  color: var(--accent);
}


/* ============================================
   footer
   ============================================ */
.site-footer {
  margin-top: var(--sp-3);
  padding-top: var(--sp-1);
  border-top: 1px dashed var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.site-footer a {
  color: var(--text-muted);
  transition: color var(--transition);
  background-image: none;
}

.site-footer a:hover {
  color: var(--text-secondary);
}

.site-footer__links {
  display: flex;
  gap: var(--sp-1);
}

.site-footer__signoff {
  font-style: italic;
  font-family: var(--font-body);
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}


/* ============================================
   blog list page
   ============================================ */
.page-title {
  font-size: 1.5rem;
  margin-bottom: 0.3rem;
}

.page-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: var(--sp-phi);
}

.blog-search {
  width: 100%;
  padding: 0.6rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
  margin-bottom: var(--sp-phi);
}

.blog-search:focus {
  border-color: var(--accent);
}

.blog-search::placeholder {
  color: var(--text-muted);
}


/* ============================================
   blog post page — left accent border
   ============================================ */
.post-page {
  max-width: var(--max-width);
}

.post-header {
  margin-bottom: var(--sp-2);
}

.post-header__title {
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.post-header__meta {
  display: flex;
  gap: var(--sp-1);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.post-header__tags {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--accent);
  transition: border-color var(--transition);
}

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

/* series nav — links between posts in a series */
.series-nav {
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: var(--sp-1) 1.2rem;
  margin: var(--sp-phi) 0;
  background: var(--bg-raised);
}

.series-nav__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.series-nav__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.series-nav__item {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.series-nav__item a {
  color: var(--text-secondary);
}

.series-nav__item a:hover {
  color: var(--accent);
}

.series-nav__item--current {
  color: var(--text);
  font-weight: 500;
}

.post-content {
  font-size: 1rem;
  line-height: 1.8;
  border-left: 2px solid var(--border);
  padding-left: var(--sp-phi);
}

.post-content h2 {
  margin-top: var(--sp-2);
  margin-bottom: 0.75rem;
}

.post-content h3 {
  margin-top: var(--sp-phi);
  margin-bottom: 0.5rem;
}

.post-content p {
  margin-bottom: 1.25rem;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 3px;
  border: 1px solid var(--border);
  margin: var(--sp-phi) 0;
}

.post-content figure.meme {
  text-align: center;
  margin: var(--sp-phi) auto;
  max-width: 420px;
}

.post-content figure.meme img {
  max-width: 100%;
  border-radius: 5px;
  border: 1px solid var(--border);
  margin: 0;
}

.post-content figure.meme figcaption {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
  font-style: italic;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--sp-phi) 0;
  font-size: 0.92rem;
}

.post-content th,
.post-content td {
  padding: 0.5rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.post-content th {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: lowercase;
  color: var(--text-dim);
}

.post-content tr:last-child td {
  border-bottom: none;
}

.post-content ul, .post-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.post-content li {
  margin-bottom: 0.3rem;
}

.post-footer {
  margin-top: var(--sp-2);
  padding-top: var(--sp-1);
  border-top: 1px dashed var(--border);
}

.back-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  background-image: none;
}

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


/* ============================================
   work page
   ============================================ */
.work-section {
  margin-bottom: var(--sp-2);
}

.work-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-phi);
}

.work-item {
  padding-bottom: var(--sp-phi);
  border-bottom: 1px solid var(--border);
}

.work-item:last-child {
  border-bottom: none;
}

.work-item__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--sp-1);
  margin-bottom: 0.2rem;
}

.work-item__role {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.work-item__company a {
  color: var(--link);
}

.work-item__date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.work-item__desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-top: 0.4rem;
}

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

.project-card {
  padding: var(--sp-1);
  border: 1px solid var(--border);
  border-radius: 3px;
  transition: border-color var(--transition);
  text-decoration: none;
  display: block;
  background-image: none;
}

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

.project-card__name {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.project-card__desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}


/* ============================================
   command palette
   ============================================ */
.command-palette {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 21, 17, 0.85);
  backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 20vh;
  opacity: 1;
  transition: opacity 0.15s ease;
}

.command-palette.hidden {
  display: none;
  opacity: 0;
}

.command-palette__box {
  width: 100%;
  max-width: 480px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  animation: cmdSlide 0.15s ease;
}

@keyframes cmdSlide {
  from { transform: translateY(-10px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.command-palette__input {
  width: 100%;
  padding: 0.9rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  outline: none;
  color: var(--text);
  caret-color: var(--accent);
}

.command-palette__input::placeholder {
  color: var(--text-muted);
}

.command-palette__results {
  max-height: 300px;
  overflow-y: auto;
  padding: 0.4rem 0;
}

.command-palette__item {
  padding: 0.6rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  cursor: pointer;
  transition: background 0.1s ease;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.command-palette__item:hover,
.command-palette__item.selected {
  background: var(--accent-dim);
}

.command-palette__item-icon {
  color: var(--accent);
  min-width: 16px;
  text-align: center;
  font-size: 0.85rem;
}

.command-palette__item-name {
  flex: 1;
  color: var(--text);
}

.command-palette__item-type {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.command-palette__empty {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}


/* ============================================
   mascot v2 — canvas Q-learning creature
   ============================================ */
.mascot {
  position: fixed;
  z-index: 50;
  pointer-events: auto;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.mascot:hover { opacity: 1; }

.mascot__canvas {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.mascot__shadow {
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 4px;
  background: rgba(0,0,0,0.15);
  border-radius: 50%;
  pointer-events: none;
  transition: opacity 0.2s;
}

.mascot__bubble {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 7px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.mascot__bubble.visible { opacity: 1; }

.mascot__bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--border);
}

/* pellets — food for the mascot */
.mascot-pellet {
  position: fixed;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 49;
  opacity: 0.95;
  transition: opacity 0.5s;
}

.mascot-pellet--click {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent), 0 0 16px var(--accent-dim);
  animation: pelletGlow 2s ease-in-out infinite;
}
.mascot-pellet--reading {
  background: var(--text-secondary);
  box-shadow: 0 0 6px var(--text-muted), 0 0 12px rgba(168, 154, 140, 0.2);
  width: 6px;
  height: 6px;
  animation: pelletDrift 3s ease-in-out infinite;
}
.mascot-pellet--code {
  background: #7c9a72;
  box-shadow: 0 0 6px rgba(124, 154, 114, 0.6), 0 0 14px rgba(124, 154, 114, 0.2);
  animation: pelletPulse 2.5s ease-in-out infinite;
}

@keyframes pelletGlow {
  0%, 100% { box-shadow: 0 0 8px var(--accent), 0 0 16px var(--accent-dim); }
  50% { box-shadow: 0 0 12px var(--accent), 0 0 24px var(--accent-dim); }
}
@keyframes pelletDrift {
  0%, 100% { transform: translateY(0); opacity: 0.8; }
  50% { transform: translateY(-2px); opacity: 0.95; }
}
@keyframes pelletPulse {
  0%, 100% { box-shadow: 0 0 6px rgba(124, 154, 114, 0.6), 0 0 14px rgba(124, 154, 114, 0.2); }
  50% { box-shadow: 0 0 10px rgba(124, 154, 114, 0.8), 0 0 20px rgba(124, 154, 114, 0.3); }
}

/* emote particles */
.mascot-emote {
  position: absolute;
  font-size: 10px;
  pointer-events: none;
  animation: emoteFloat 1.5s ease-out forwards;
}

@keyframes emoteFloat {
  0%   { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-20px); }
}


/* ============================================
   easter egg toast + doom modal
   ============================================ */
.easter-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-raised);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 0.6rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 10000;
  pointer-events: none;
  white-space: nowrap;
}

.easter-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.easter-toast code {
  background: var(--bg-surface);
  padding: 0.1em 0.3em;
  border-radius: 2px;
}

.doom-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
}

.doom-modal__content {
  width: 640px;
  max-width: 90vw;
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 4px;
  overflow: hidden;
}

.doom-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
}

.doom-modal__close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0;
  line-height: 1;
}

.doom-modal__close:hover { color: var(--text); }


/* ============================================
   fade-in on scroll animation
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ============================================
   responsive
   ============================================ */
@media (max-width: 640px) {
  .site-wrapper {
    padding: var(--sp-phi) var(--gutter) var(--sp-2);
  }

  .site-nav {
    margin-bottom: var(--sp-2);
  }

  .site-nav__links {
    gap: var(--sp-1);
  }

  .hero {
    margin-bottom: var(--sp-phi);
  }

  h1, .hero__name { font-size: 1.4rem; }
  .post-header__title { font-size: 1.3rem; }

  .now-grid {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .work-item__header {
    flex-direction: column;
    gap: 0.2rem;
  }

  .post-content {
    padding-left: var(--sp-1);
  }
}

@media (max-width: 400px) {
  .site-footer {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}
