/* =====================================================================
   REEL PALETTE: charcoal desk, warm light, soft whites, cinematic page
   colors. The turquoise from the GitHub profile stays as the accent.
   Loaded after styles.css, so these rules win.
   ===================================================================== */
:root {
  --night: #070706; --soft: #f6f4ef; --soft-2: #e4e0d8; --ink: #14181a; --edge: #2c3030; --muted: #a9a79f; --frost: #f4f1ea;
  --grain1: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='900'%3E%3Cfilter id='a' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.0025 .34' numOctaves='5' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .24  0 0 0 0 .21  0 0 0 0 .18  .55 0 0 0 -.17'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");
}
body, .room { background: #050504; }
.wood { background: var(--grain1), var(--grain2), linear-gradient(180deg, #0e0d0c 0%, #080807 55%, #030303 100%); background-size: 900px 900px, 600px 600px, auto; }
.light { background: radial-gradient(ellipse 62% 58% at var(--lx, 50%) var(--ly, 54%), rgba(255, 243, 226, 0.18), rgba(255, 226, 190, 0.06) 46%, transparent 72%), radial-gradient(ellipse 120% 100% at 50% 50%, transparent 38%, rgba(0, 0, 0, 0.74) 100%); }
.leafblur { background: radial-gradient(ellipse, rgba(58, 92, 66, 0.5), transparent 66%); }
.pencil { background: linear-gradient(90deg, #f1ead9 0 8%, #3b3c3d 8% 82%, #d6b98c 82% 92%, #1c1c1c 92%); }
.card { background: #f6f4ef; }

.dock { background: rgba(22, 21, 20, 0.72); border-color: rgba(255, 255, 255, 0.12); }
.dock button { color: #e9e5dc; }
.intro h1 em, .intro-k { color: #c4f3ea; }
.intro-s, .hint, .dock output { color: var(--muted); }

.face { background: #0c0c0c; }
.board { background: var(--noise), linear-gradient(160deg, #1f1f1d, #0b0b0a); border-color: #2c2c2a; box-shadow: 0 8px 0 -2px #050505; }
.pg { background: linear-gradient(150deg, #1b1e1f, #0b0d0d 72%); }
.pg.light { background: linear-gradient(150deg, #f8f6f2, #e6e2da); color: var(--ink); }
.pg.cover { background: var(--noise), linear-gradient(145deg, #202020 0%, #0f0f0e 55%, #070707 100%); }
.hc p, .dtext p, .lead, .ctext p { color: rgba(244, 241, 234, 0.8); }
.light .hc p { color: rgba(20, 24, 26, 0.76); }
.about, .arch, .principles, .gh, .contact { background: radial-gradient(circle at 78% 42%, rgba(64, 224, 208, 0.13), transparent 56%), linear-gradient(150deg, #1b1e1f, #0a0c0c 72%); }
.aegis { background: radial-gradient(circle at 76% 42%, rgba(86, 140, 255, 0.3), transparent 56%), linear-gradient(150deg, #0f2150, #08122c 62%, #04070f); }
.aegis-d { background: radial-gradient(circle at 20% 90%, rgba(86, 140, 255, 0.16), transparent 55%), linear-gradient(150deg, #0c1a3d, #060d20 70%); }
.bank { background: radial-gradient(circle at 76% 45%, rgba(214, 181, 120, 0.22), transparent 55%), linear-gradient(150deg, #1f1a13, #0d0c0a 62%, #050505); }
.bank-d { background: radial-gradient(circle at 20% 90%, rgba(214, 181, 120, 0.12), transparent 55%), linear-gradient(150deg, #17140f, #090806 70%); }
.b1 { background: linear-gradient(135deg, #f5e5bd, #d0aa5e 52%, #8d6c33); color: #1b1408; }
.b2 { background: linear-gradient(135deg, #2c261b, #14110c); border-color: rgba(230, 200, 140, 0.3); }
.bank .float { background: rgba(255, 240, 210, 0.1); border-color: rgba(255, 230, 180, 0.3); }
.aura { background: radial-gradient(circle at 76% 45%, rgba(64, 224, 208, 0.17), transparent 55%), linear-gradient(150deg, #08150f, #040a07 62%, #020403); }
.aura-d { background: linear-gradient(150deg, #07120d, #030706 70%); }
.pg.buses { background: linear-gradient(140deg, #fff1e4, #ffd3ae 55%, #f6a982); }
.buses .routeart path:first-child { stroke: #14181a; }
.pg.biblio { background: linear-gradient(150deg, #f9f6ef, #e6dfd1); }
.blogs { background: radial-gradient(circle at 78% 40%, rgba(255, 214, 170, 0.12), transparent 55%), linear-gradient(150deg, #1c1f20, #0b0d0d 70%); }
.post { background: #f6f4ef; }
.mtasks { background: radial-gradient(circle at 76% 45%, rgba(86, 140, 255, 0.22), transparent 55%), linear-gradient(150deg, #11263f, #08121f 70%); }
.pg.sbtasks { background: linear-gradient(150deg, #f2f6f9, #d4dfe8); }
.lab { background: radial-gradient(circle at 76% 45%, rgba(150, 120, 255, 0.24), transparent 55%), linear-gradient(150deg, #1e1939, #0c0a1d 70%); }

/* ---------- reading animations ---------- */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.06em 0.06em 0.16em 0.02em; margin: -0.06em -0.06em -0.16em -0.02em; }
.w > span { display: inline-block; will-change: transform; }
@keyframes slideUp { from { translate: 0 28px; opacity: 0; } to { translate: 0 0; opacity: 1; } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes growx { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes drive { from { transform: translate(10px, 300px); opacity: 0; } 20% { opacity: 1; } to { transform: translate(120px, 190px); opacity: 1; } }
@keyframes draw { from { stroke-dashoffset: 900; } to { stroke-dashoffset: 0; } }
@keyframes pop { 0% { transform: rotate(45deg) scale(0); } 70% { transform: rotate(45deg) scale(1.3); } 100% { transform: rotate(45deg) scale(1); } }
.books i:not(.lean) { transform-origin: bottom; }
.books i:nth-child(1) { --k: 0; } .books i:nth-child(2) { --k: 1; } .books i:nth-child(3) { --k: 2; } .books i:nth-child(4) { --k: 3; }
.books i:nth-child(5) { --k: 4; } .books i:nth-child(6) { --k: 5; } .books i:nth-child(7) { --k: 6; } .books i:nth-child(8) { --k: 7; }
.pg.in .books i:not(.lean) { animation: grow 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(0.3s + var(--k) * 70ms); }
.pg.in .books i.lean { animation: slideUp 0.8s 1s both; }
.routeart g:last-child { transform: translate(120px, 190px); }
.pg.in .routeart g:last-child { animation: drive 3.4s cubic-bezier(0.5, 0, 0.2, 1) 0.4s both; }
.pg.in .hexart polygon, .pg.in .archart .hx { stroke-dasharray: 900; animation: draw 1.8s ease-out both; }
.pg.in .gchip { animation: bob 5s ease-in-out infinite; }
.pg.in .gchip:nth-of-type(2) { animation-delay: -1.2s; } .pg.in .gchip:nth-of-type(3) { animation-delay: -2.4s; } .pg.in .gchip:nth-of-type(4) { animation-delay: -3.6s; }
.pg.in .b2 { animation: slideUp 0.9s 0.05s both, bob 7s ease-in-out 1.2s infinite; }
.pg.in .b1 { animation: slideUp 0.9s 0.25s both, bob 6s ease-in-out -2s infinite; }
.pg.in .float { animation: slideUp 0.7s 0.7s both, bob 5s ease-in-out 1.4s infinite; }
.pg.in .post { animation: slideUp 0.8s both; }
.pg.in .p2 { animation-delay: 0.15s; } .pg.in .p3 { animation-delay: 0.3s; }
.pg.in .col i { animation: slideUp 0.6s 0.3s both; } .pg.in .col i.hl { animation-delay: 0.8s; }
.pg.in .row { animation: slideUp 0.6s both; }
.pg.in .row:nth-child(2) { animation-delay: 0.1s; } .pg.in .row:nth-child(3) { animation-delay: 0.2s; } .pg.in .row:nth-child(4) { animation-delay: 0.3s; } .pg.in .row:nth-child(5) { animation-delay: 0.4s; }
.pg.in .row.done i::after { animation: pop 0.4s 0.7s both; }
.pg.in .lang-bar i { transform-origin: left; animation: growx 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.5s both; }

/* spotlight cards: glow that follows the mouse */
.glow { position: relative; transition: translate 0.25s ease, box-shadow 0.25s; }
.glow::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.3s; background: radial-gradient(170px circle at var(--mx, 50%) var(--my, 50%), rgba(64, 224, 208, 0.2), transparent 70%); }
.glow:hover::before { opacity: 1; }
.glow:hover { translate: 0 -3px; }
.light .glow::before { background: radial-gradient(170px circle at var(--mx, 50%) var(--my, 50%), rgba(20, 184, 166, 0.22), transparent 70%); }

@media (prefers-reduced-motion: reduce) { .pg.in * { animation: none !important; } }
