/* BONFIRE THEME — visual overrides. Existing layout remains in styles.css. */
body {
  background: radial-gradient(ellipse at 85% 8%, rgba(127,59,24,.15),transparent 37%),
              radial-gradient(ellipse at 14% 48%, rgba(79,49,30,.09),transparent 40%), var(--bg);
}
.site-shell { position:relative; }
.site-shell::after { content:""; position:absolute; inset:0; pointer-events:none; z-index:5; opacity:.11;
  background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.4'/%3E%3C/svg%3E"); }
.site-header { background:rgba(16,13,12,.94); border-bottom:1px solid #413128; }
.nav-wrap { min-height:78px; }
.brand { font-family:var(--font-display); font-weight:600; letter-spacing:.09em; }
.brand-symbol { width:40px; height:40px; font-size:23px; border:1px solid #75533b; border-radius:50%; text-shadow:0 0 13px #d87b34; letter-spacing:0; }
.brand-label { font-size:.7rem; }
.nav a { color:#d4c5b6; }
.nav .nav-contact { border-color:#80502e; background:rgba(115,55,24,.12); }
.hero { min-height:750px; padding-top:95px; padding-bottom:105px; gap:clamp(38px,5vw,90px); }
.hero-overline { color:#b7a38c; letter-spacing:.2em; }
h1 { font-size:clamp(2.85rem,5.2vw,5.2rem); font-weight:500; letter-spacing:-.045em; line-height:1.2; }
h1 em,h2 em { color:#e8a563; text-shadow:0 1px 25px rgba(190,88,31,.22); }
h2 { font-weight:500; letter-spacing:-.035em; }
.hero-lead { color:#d2c4b6; max-width:520px; }
.hero-detail { color:#afa096; }
.eyebrow { letter-spacing:.075em; }
.pulse-dot { animation: emberPulse 3s ease-in-out infinite; }
@keyframes emberPulse { 50% {box-shadow:0 0 26px 7px rgba(215,109,38,.35); opacity:.72;} }
.btn { border-radius:2px; font-size:.78rem; letter-spacing:.03em; }
.btn-primary { background:linear-gradient(125deg,#bc7942,#e5ae74); color:#17100b; border:1px solid #efbd83; box-shadow:0 0 29px rgba(204,102,38,.13); }
.btn-secondary { background:#231b17; border-color:#7b5539; }
.btn-tertiary { background:transparent; border:1px solid #493931; color:#d0c4b8; }
.btn-primary:hover { background:#f1bf86; }
.hero-stats { border-color:#503a2b; }
.hero-stats strong { font-family:var(--font-display); font-size:.87rem; font-weight:500; }
/* Art: original self-authored SVG scene. No game-owned imagery. */
.bonfire-panel { overflow:hidden; min-height:560px; padding:0; background:#120d0b url('../assets/bonfire-scene.svg') center center/cover no-repeat; border:1px solid #60402b; border-radius:2px; box-shadow:0 30px 90px #050303,0 0 50px rgba(201,80,20,.09); }
.bonfire-panel::before { background:linear-gradient(180deg,rgba(10,8,7,.82),transparent 25%,transparent 70%,rgba(10,7,5,.85)); border-radius:0; z-index:0; }
.bonfire-art-top { display:flex; justify-content:space-between; padding:25px 24px; color:#f4c69b; font:.59rem var(--font-mono); letter-spacing:.14em; position:relative; z-index:2; }
.bonfire-scene { flex:1; position:relative; min-height:300px; }
.bonfire-halo { position:absolute; width:160px; height:160px; border-radius:50%; left:49%; top:67%; transform:translate(-50%,-50%); background:radial-gradient(circle,rgba(245,127,45,.24),rgba(229,100,27,.10) 40%,transparent 73%); filter:blur(14px); animation:emberPulse 3s ease-in-out infinite; }
.bonfire-orb { position:absolute; width:7px; height:7px; border-radius:50%; background:#ffd5a4; left:50%; top:61%; box-shadow:0 0 25px 12px #d56529,0 0 80px 25px rgba(195,76,20,.32); }
.bonfire-ground,.bonfire-embers { position:absolute; inset:0; pointer-events:none; }
.bonfire-embers { background-image:radial-gradient(circle at 43% 62%,#eaa15e 1px,transparent 2px),radial-gradient(circle at 55% 47%,#f4c184 1px,transparent 2px),radial-gradient(circle at 60% 59%,#ca6a37 1px,transparent 2px),radial-gradient(circle at 39% 53%,#e7a477 1px,transparent 2px); filter:drop-shadow(0 0 4px #f0934b); animation:emberDrift 5s ease-in-out infinite alternate; }
@keyframes emberDrift { to {transform:translateY(-22px); opacity:.52;} }
.bonfire-bottom { display:flex; align-items:center; gap:15px; padding:25px; position:relative; z-index:2; border-top:1px solid rgba(204,138,91,.25); background:linear-gradient(90deg,rgba(22,13,9,.86),rgba(22,13,9,.34)); }
.bonfire-bottom p { font-family:var(--font-display); font-size:1rem; line-height:1.7; margin:0; color:#e0cbb7; }
.bonfire-bottom strong { color:#f9d2a6; font-weight:500; }
.bonfire-cross { font-size:2.4rem; line-height:1; color:#e2a362; text-shadow:0 0 22px #df6e24; }
.bonfire-side { margin-left:auto; color:#bf9a7b; font:.53rem/1.9 var(--font-mono); letter-spacing:.07em; }
.projects { border-color:#473227; }
.project-card { background:#1c1613; border-color:#4a352b; box-shadow:inset 0 1px rgba(255,215,174,.025); }
.project-card:hover { border-color:#c78b5b; box-shadow:0 12px 40px rgba(0,0,0,.26),0 0 24px rgba(219,99,25,.07); }
.project-visual { background-image:linear-gradient(90deg,rgba(227,173,118,.03) 1px,transparent 1px),linear-gradient(rgba(227,173,118,.03) 1px,transparent 1px); background-color:#231a16; background-size:28px 28px; }
.visual-flight { background:radial-gradient(ellipse at 60% 50%,rgba(154,73,29,.2),transparent 58%),linear-gradient(145deg,#322118,#160f0d); }
.visual-django { background:radial-gradient(ellipse at 50% 30%,rgba(156,101,55,.12),transparent 55%),#201a17; }
.visual-btree { background:radial-gradient(ellipse at 50% 30%,rgba(115,76,47,.18),transparent 58%),#211a16; }
.state-flow div { background:#2e211a; border-color:#81593d; }
.state-flow div.current { background:#c98b50; border-color:#eeae69; color:#160e08; }
.mock-user,.mock-rule { background:#28201a; border-color:#69503e; }
.mock-rule { border-color:#bd7f49; }
.project-content h3 { letter-spacing:-.035em; font-weight:500; }
.project-content p,.about-grid p { color:#c9bcb0; }
.tag-list li { border-color:#675040; color:#ddcabb; }
.approach-section { background:linear-gradient(120deg,#1b1512,#211811 70%,#1a1311); }
.principles h3 { font-family:var(--font-display); font-weight:500; }
.footer { background:#17110f; }
.footer-layout strong { letter-spacing:-.02em; font-weight:500; }
@media(max-width:980px) { .hero { min-height:0; } .bonfire-panel { width:100%; max-width:650px; min-height:470px; } }
@media(max-width:700px) { .nav { background:#191310; } .hero { padding-top:57px; } h1 { font-size:clamp(2.65rem,9vw,4rem); } .bonfire-panel { min-height:440px; } .bonfire-scene { min-height:255px; } .bonfire-art-top {padding:20px 17px;font-size:.49rem;} .bonfire-bottom {padding:18px;} .bonfire-bottom p {font-size:.82rem;} .bonfire-side {font-size:.44rem;} .hero-actions {gap:9px;} .btn {padding:12px 14px;gap:11px;} }
@media(max-width:370px) { .bonfire-side {display:none;} .brand-label {font-size:.59rem;} }
@media(prefers-reduced-motion:reduce) { .pulse-dot,.bonfire-halo,.bonfire-embers {animation:none;} }

/* V2.1 — Fourth project and live demo actions */
.visual-travel { background:radial-gradient(circle at 65% 26%,rgba(215,128,54,.16),transparent 47%),linear-gradient(155deg,#29201c,#151113); }
.travel-scene { flex:1; min-height:142px; position:relative; overflow:hidden; isolation:isolate; margin:18px 0 12px; border:1px solid rgba(197,130,82,.28); background:linear-gradient(180deg,#48302b 0%,#251b1c 68%,#181311 100%); }
.travel-sun { position:absolute; top:13%; right:21%; width:52px; height:52px; border-radius:50%; background:#d49b68; box-shadow:0 0 46px 16px rgba(221,110,44,.16); }
.travel-mountain { position:absolute; inset:auto -10% 0; height:67%; clip-path:polygon(0 100%,20% 35%,32% 71%,53% 9%,70% 65%,86% 25%,100% 100%); }
.travel-mountain-back { bottom:17%; background:#40302d; opacity:.9; }
.travel-mountain-front { height:57%; background:#181716; clip-path:polygon(0 100%,12% 59%,33% 96%,47% 20%,66% 92%,83% 53%,100% 100%); }
.travel-scene-label { position:absolute; bottom:14px; left:16px; z-index:2; display:flex; flex-direction:column; gap:3px; color:#f3d4b0; text-shadow:0 2px 8px #090606; }
.travel-scene-label span { font: .5rem var(--font-mono); letter-spacing:.2em; }
.travel-scene-label strong { font:500 .83rem var(--font-display); letter-spacing:.06em; }
.project-actions { margin-top:auto; display:flex; flex-wrap:wrap; align-items:stretch; gap:10px; width:100%; }
.project-actions .card-link { flex:1 1 130px; margin:0; min-width:0; gap:12px; }
.project-actions .demo-link { color:#f0b47c; }
.demo-note { font-size:.77rem !important; line-height:1.55 !important; color:#c4aa94 !important; margin-top:-7px; margin-bottom:18px !important; padding-left:11px; border-left:2px solid #a96c3d; }
@media(max-width:700px) { .travel-scene {min-height:170px;} }


/* V2.2 — External Sorting Engine illustration */
.visual-sorting { background:radial-gradient(ellipse at 52% 40%,rgba(193,102,46,.16),transparent 65%),linear-gradient(145deg,#261b16,#15100e); }
.sort-scene { flex:1; min-height:170px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; padding:18px 8px; }
.sort-label { color:#ad927c; font: .56rem var(--font-mono); letter-spacing:.15em; }
.sort-run { display:flex; gap:7px; }
.sort-run span { display:grid; place-items:center; width:39px; height:34px; border:1px solid #76543c; border-radius:3px; background:#2c211b; color:#e0c8b4; font: .77rem var(--font-mono); }
.sort-run.sorted span { border-color:#c1844b; background:#483020; color:#ffe0b9; }
.sort-arrow { color:#d79b65; font-size:1.3rem; line-height:1; }
.project-content .source-note { margin-top:auto; margin-bottom:0; padding-top:15px; border-top:1px solid var(--line); font-size:.77rem; color:#ac9280; }
@media(max-width:370px) { .sort-run span { width:34px; height:32px; } }

/* Bilingual navigation and RPI research plan */
.language-switch { display:flex;align-items:center;gap:7px;white-space:nowrap;border:1px solid #65513c;padding:5px 7px;border-radius:5px;color:#9c8c79; }
.language-switch button {border:0;background:transparent;color:#c0b0a0;padding:4px 7px;cursor:pointer;font:600 .75rem var(--font-mono);}
.language-switch button[aria-pressed="true"] {color:#17100b;background:#d89a57;border-radius:3px;}
.research-section {border-top:1px solid var(--line);}
.research-head {display:flex;align-items:start;justify-content:space-between;gap:24px;margin-bottom:32px;}
.research-head h2 {max-width:760px;}
.research-head p {color:var(--muted);max-width:640px;}
.research-badge {font:.64rem var(--font-mono);color:var(--accent);border:1px solid var(--border);padding:12px;white-space:nowrap;}
.research-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px;}
.research-item {background:var(--surface);border:1px solid var(--border);padding:28px;border-radius:var(--radius);}
.research-item > span {font:.67rem var(--font-mono);color:var(--accent)}
.research-item h3 {font-size:1.35rem;margin:21px 0 12px;}
.research-item p,.research-footnote {color:var(--muted);font-size:.88rem;line-height:1.7;}
.research-footnote {margin-top:23px;}
@media(max-width:900px){.research-grid{grid-template-columns:1fr}.research-head{flex-direction:column}.research-badge{white-space:normal}.nav{gap:14px;}}
@media(max-width:650px){.research-item{padding:20px}.language-switch{align-self:flex-start}.research-head h2{font-size:2.1rem}}


/* V2.6 — bonfire-triggered e-pitch player */
.bonfire-play {
  position: absolute;
  z-index: 4;
  top: 36%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  width: max-content;
  max-width: calc(100% - 24px);
  padding: 12px 16px;
  border: 0;
  background: transparent;
  color: #f0c69c;
  font-family: var(--font-mono);
  font-weight: 500;
  text-align: center;
  letter-spacing: .11em;
  cursor: pointer;
  text-shadow: 0 2px 12px #070504;
}
.bonfire-play-icon {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  padding-left: 4px;
  border-radius: 50%;
  border: 1px solid #dca36e;
  background: rgba(24, 14, 10, .70);
  color: #f5c796;
  font-size: 24px;
  line-height: 1;
  box-shadow: 0 0 28px rgba(205, 98, 31, .16), inset 0 0 20px rgba(197, 94, 29, .1);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.bonfire-play:hover .bonfire-play-icon,
.bonfire-play:focus-visible .bonfire-play-icon {
  transform: scale(1.08);
  background: rgba(110, 55, 24, .63);
  box-shadow: 0 0 42px rgba(216, 128, 57, .5);
}
.bonfire-play-title { font-size: .71rem; }
.bonfire-play-sub { font-size: .55rem; color: #c7a281; letter-spacing: .1em; }

/* Modal is intentionally dark, including when the overall website is in light mode. */
.epitch-dialog {
  box-sizing: border-box;
  width: min(960px, calc(100vw - 28px));
  max-width: none;
  max-height: calc(100dvh - 28px);
  overflow: auto;
  padding: clamp(14px, 2.7vw, 28px);
  border: 1px solid #96704d;
  border-radius: 3px;
  background: #130e0c;
  color: #eee0d0;
  box-shadow: 0 24px 85px #000;
}
.epitch-dialog::backdrop {
  background: rgba(0, 0, 0, .85);
  backdrop-filter: blur(9px);
}
.epitch-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.epitch-kicker { font: 500 .61rem var(--font-mono); letter-spacing: .13em; color: #d4a274; }
.epitch-header h2 { font: 500 clamp(1.4rem, 2.9vw, 2rem)/1.25 var(--font-display); letter-spacing: -.03em; margin: 9px 0 4px; color: #f0dec8; }
.epitch-description { font: 400 .84rem/1.6 var(--font-body); color: #c1ae9d; margin: 9px 0 18px; }
.epitch-close {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border: 1px solid #785337;
  border-radius: 2px;
  background: #211811;
  color: #f0c69c;
  cursor: pointer;
  font-size: 1.5rem;
}
.epitch-close:hover { background: #422817; border-color: #dba46f; }
.epitch-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #030303;
  border: 1px solid #65462f;
  object-fit: contain;
}
body.epitch-open { overflow: hidden; }
@media (max-width: 700px) {
  .bonfire-play { top: 36%; gap: 9px; }
  .bonfire-play-icon { width: 66px; height: 66px; font-size: 21px; }
  .bonfire-play-title { font-size: .64rem; }
  .epitch-dialog { padding: 12px; }
  .epitch-description { font-size: .75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .bonfire-play-icon { transition: none; }
}
