/* Erick AI — "studio desk" look: cream paper + dot grid, retro monitor, macOS-style windows,
   glossy navy keys with a synthesised key-click. Body font = Bahnschrift (his house font, Barlow elsewhere). */
:root {
  --bg: #f6f5f0;
  --dot: #d9d6cc;
  --ink: #15182e;
  --ink2: #3a3e57;
  --muted: #6a6e84;
  --line: #dddbd2;
  --win: #ffffff;
  --bar1: #f4f3ef;
  --bar2: #e7e5df;
  --navy: #1f2a6b;
  --navy-hi: #4558d4;
  --navy-lo: #18205a;
  --accent: #3346b8;
  --radius: 14px;
  --sans: "Bahnschrift", "Barlow", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Consolas, monospace;
  --pixel: "Silkscreen", "JetBrains Mono", monospace;
  --shadow: 0 1px 0 rgba(255,255,255,.8) inset, 0 18px 40px -18px rgba(21, 24, 46, .28), 0 2px 6px rgba(21, 24, 46, .06);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1px, transparent 1.2px);
  background-size: 18px 18px;
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
svg.i { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.mono { font-family: var(--mono); }
.grad-text { color: inherit; }
::selection { background: #c9d0ff; }

/* ---------- Top bar ---------- */
.top { position: sticky; top: 0; z-index: 50; background: rgba(246, 245, 240, .86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { font: 700 17px/1 var(--pixel); letter-spacing: .04em; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.logo-mark { display: none; }
.nav { display: flex; gap: 22px; align-items: center; }
.nav a { font: 500 12px var(--mono); letter-spacing: .06em; text-transform: lowercase; color: var(--muted); }
.nav a:hover { color: var(--ink); }
.top-right { display: flex; gap: 10px; align-items: center; }
.sound { font: 500 11px var(--mono); color: var(--muted); background: none; border: 1px dashed var(--line); border-radius: 999px; padding: 6px 10px; cursor: pointer; }
.sound:hover { color: var(--ink); border-color: #bdbab0; }
.burger { display: none; background: none; border: 0; font-size: 22px; cursor: pointer; }

/* ---------- Glossy keys ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 999px; font: 600 15px/1 var(--sans); letter-spacing: .01em; cursor: pointer; white-space: nowrap;
  color: var(--ink); background: linear-gradient(180deg, #ffffff 0%, #f1f0f6 55%, #e4e2ee 100%);
  border: 1px solid #cdcbdc; box-shadow: 0 1px 0 #fff inset, 0 -2px 0 rgba(21, 24, 46, .06) inset, 0 6px 14px -6px rgba(21, 24, 46, .3);
  transition: transform .08s, box-shadow .15s, filter .15s; overflow: hidden;
}
.btn::before { content: ""; position: absolute; left: 10%; right: 10%; top: 3px; height: 42%; border-radius: 999px; background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,0)); pointer-events: none; }
.btn:hover { filter: brightness(1.03); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 #fff inset, 0 2px 6px -3px rgba(21, 24, 46, .35); }
.btn-woso, .btn.primary {
  color: #fff; border-color: var(--navy-lo);
  background: linear-gradient(180deg, var(--navy-hi) 0%, #2e3cae 50%, var(--navy) 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 -3px 0 rgba(0,0,0,.18) inset, 0 10px 22px -8px rgba(31, 42, 107, .6);
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
}
.btn-woso::before, .btn.primary::before { background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0)); }
.btn-sm { padding: 8px 15px; font-size: 13px; }
.copy.ok { color: #fff; background: linear-gradient(180deg, #4caf6e, #2f8a50); border-color: #26703f; }

/* ---------- Hero ---------- */
.hero { max-width: 1120px; margin: 0 auto; padding: 40px 22px 70px; text-align: center; }
.monitor {
  position: relative; width: min(560px, 100%); margin: 0 auto 34px; padding: 18px 18px 30px; border-radius: 18px;
  background: linear-gradient(180deg, #ece5cd 0%, #ddd3b4 100%);
  box-shadow: 0 2px 0 #f7f2e1 inset, 0 -3px 0 rgba(0,0,0,.08) inset, 0 30px 50px -24px rgba(60, 50, 20, .45), 0 3px 8px rgba(60, 50, 20, .12);
}
.screen {
  position: relative; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; text-align: left;
  background: radial-gradient(120% 90% at 50% 40%, #142040 0%, #0b1226 70%, #070b18 100%);
  box-shadow: 0 0 0 6px #2a2a2a inset, 0 0 0 7px #0f0f0f inset, 0 0 40px rgba(80, 120, 255, .15) inset;
  padding: 22px 24px;
}
.screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 3px); }
.screen .title { font: 700 clamp(28px, 6vw, 46px)/.95 var(--pixel); color: #8fb0ff; text-shadow: 0 0 12px rgba(120, 160, 255, .55); letter-spacing: .02em; }
.screen .term { position: absolute; left: 24px; bottom: 22px; font: 12px/1.7 var(--mono); color: #b9c4e6; max-width: 58%; }
.caret { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.screen .avatar { position: absolute; right: 26px; bottom: 18px; width: 30%; max-width: 150px; }
.screen .avatar img { width: 100%; image-rendering: pixelated; border-radius: 6px; box-shadow: 0 0 0 3px #0b1226, 0 0 0 5px #8fb0ff; }
.app { position: absolute; font: 700 9px/1 var(--pixel); color: #fff; padding: 6px 7px; border-radius: 6px; box-shadow: 0 2px 0 rgba(0,0,0,.35); animation: bob 3.4s ease-in-out infinite; }
.app.yt { background: #e22b2b; right: 34%; top: 30%; animation-delay: -.4s; }
.app.ig { background: linear-gradient(45deg, #f5a623, #d6249f, #5b4bdb); right: 24%; top: 14%; animation-delay: -1.2s; }
.app.tt { background: #111; box-shadow: 2px 2px 0 #25f4ee, -2px -2px 0 #fe2c55; right: 8%; top: 22%; animation-delay: -2s; }
.app.ai { background: #10a37f; right: 38%; top: 54%; animation-delay: -2.6s; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.monitor .brand { position: absolute; right: 22px; bottom: 9px; font: 700 10px var(--mono); letter-spacing: .3em; color: #9d9479; }
.monitor .led { position: absolute; left: 22px; bottom: 11px; width: 8px; height: 8px; border-radius: 50%; background: #5ee08a; box-shadow: 0 0 8px #5ee08a; }
.hero h1 { font: 700 clamp(32px, 5vw, 52px)/1.1 var(--sans); letter-spacing: -.02em; color: var(--ink); max-width: 760px; margin: 0 auto 14px; }
.hero .lede { font-size: 19px; color: var(--ink2); max-width: 560px; margin: 0 auto 28px; }
.hero .ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.stats-row { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; margin-top: 34px; font: 500 12px var(--mono); color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.stats-row b { color: var(--ink); font-weight: 700; }

/* ---------- Sections = app windows ---------- */
.sec { max-width: 1120px; margin: 0 auto; padding: 46px 22px; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: center; }
.sec.flip { grid-template-columns: 360px minmax(0, 1fr); }
.sec.flip .window { order: 2; }
.sec.solo { grid-template-columns: 1fr; }
canvas.ascii { width: 100%; height: 360px; display: block; }
.window { background: var(--win); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.reveal { opacity: 0; transform: translateY(26px) scale(.985); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.titlebar { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; background: linear-gradient(180deg, var(--bar1), var(--bar2)); border-bottom: 1px solid var(--line); }
.lights { display: flex; gap: 7px; }
.lights i { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 -1px 0 rgba(0,0,0,.15); }
.lights i:nth-child(1) { background: #ff5f57; } .lights i:nth-child(2) { background: #febc2e; } .lights i:nth-child(3) { background: #28c840; }
.titlebar .name { flex: 1; text-align: center; font: 500 12px var(--mono); color: var(--muted); padding-right: 48px; }
.win-body { padding: 22px 24px 20px; }
.label { font: 500 11px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.win-body h2 { font: 700 28px/1.15 var(--sans); letter-spacing: -.01em; margin: 6px 0 6px; }
.win-body > p { color: var(--ink2); margin-bottom: 16px; }
.statusbar { display: flex; align-items: center; gap: 8px; padding: 10px 24px; border-top: 1px solid var(--line); font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.statusbar .dot { width: 7px; height: 7px; border-radius: 50%; background: #28c840; box-shadow: 0 0 6px #28c840; }

.search { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 18px; border-radius: 999px; border: 1px solid #d3d1e2; background: linear-gradient(180deg, #fbfbfd, #f2f1f7); color: var(--muted); margin-bottom: 14px; }
.search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font: 15px var(--sans); color: var(--ink); }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(51, 70, 184, .12); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { font: 500 11px var(--mono); letter-spacing: .06em; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); background: #fafaf7; color: var(--muted); cursor: pointer; }
.chip.on { color: #fff; background: var(--navy); border-color: var(--navy); }

/* lists inside windows */
.list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.list-head { font: 500 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding: 9px 14px; background: #fafaf7; border-bottom: 1px solid var(--line); }
.group[hidden], .gcard[hidden] { display: none !important; }
.gcard { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; cursor: pointer; transition: background .15s; }
.gcard:last-child { border-bottom: 0; }
.gcard:hover { background: #f5f6fd; }
.gcard h3 { font: 600 15px/1.3 var(--sans); text-transform: uppercase; letter-spacing: .01em; }
.gcard .meta { display: block; font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.gcard .go { color: var(--muted); transition: transform .15s, color .15s; }
.gcard:hover .go { color: var(--accent); transform: translate(2px, -2px); }
.gcard.new h3::after { content: "new"; margin-left: 8px; font: 600 10px var(--mono); letter-spacing: .08em; color: #fff; background: var(--accent); border-radius: 4px; padding: 2px 5px; vertical-align: 2px; text-transform: lowercase; }

/* video tiles */
.vids { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.vcard { display: block; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; transition: transform .15s, box-shadow .15s; }
.vcard:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -14px rgba(21, 24, 46, .4); }
.vcard img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.vcard div { padding: 9px 12px 11px; }
.vcard b { display: block; font: 600 14px/1.3 var(--sans); }
.vcard span { font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* tool window */
.tool-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.promo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding: 9px 9px 9px 14px; border-radius: 10px; border: 1px dashed #b9bde0; background: #f7f8fe; }
.promo-label { font: 500 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.promo-code { font: 700 17px var(--mono); letter-spacing: .08em; color: var(--navy); }
.promo .copy { margin-left: auto; }
.ticks { list-style: none; display: grid; gap: 7px; margin: 4px 0 18px; color: var(--ink2); font-size: 15px; }
.ticks li::before { content: "▸ "; color: var(--accent); }

/* about */
.about-me { display: flex; gap: 18px; align-items: center; margin-bottom: 14px; }
.about-me img { width: 84px; height: 84px; border-radius: 12px; image-rendering: pixelated; box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--line); }
.about-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.about-stats div { border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-align: center; background: #fafaf7; }
.about-stats b { display: block; font: 700 22px var(--sans); }
.about-stats span { font: 500 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* footer */
.foot { max-width: 1120px; margin: 40px auto 0; padding: 40px 22px 60px; }
.foot .big { font: 700 clamp(30px, 6vw, 44px)/1 var(--pixel); color: var(--accent); }
.foot .soc { display: flex; gap: 10px; margin: 18px 0; }
.foot .soc a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: #fff; box-shadow: 0 3px 0 rgba(0,0,0,.18); }
.foot .soc a[data-social=instagram] { background: linear-gradient(45deg, #f5a623, #d6249f, #5b4bdb); }
.foot .soc a[data-social=youtube] { background: #e22b2b; }
.foot .soc a[data-social=tiktok] { background: #111; }
.foot .motto { font: 500 12px var(--mono); letter-spacing: .26em; text-transform: uppercase; color: var(--muted); margin: 6px 0 24px; }
.foot .fine { border-top: 1px dashed var(--line); padding-top: 18px; font: 500 11px/1.9 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.foot .fine p { text-transform: none; letter-spacing: 0; font: 13px/1.6 var(--sans); max-width: 620px; margin-top: 8px; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 20px; background: rgba(21, 24, 46, .38); backdrop-filter: blur(3px); }
.modal.open { display: grid; }
.modal-box { width: 100%; max-width: 700px; max-height: 88vh; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 40px 80px -30px rgba(21, 24, 46, .5); }
.modal-box .win-body { padding-top: 18px; }
.modal-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.modal-top h3 { font: 700 22px/1.2 var(--sans); }
.modal-x { border: 1px solid var(--line); background: #fafaf7; border-radius: 8px; width: 32px; height: 32px; cursor: pointer; color: var(--muted); }
#m-desc { color: var(--ink2); margin: 4px 0 12px; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
pre.code { background: #0f1426; color: #d7def5; border-radius: 10px; padding: 16px; font: 13px/1.65 var(--mono); white-space: pre-wrap; word-break: break-word; border: 1px solid #0b0f1d; }

/* ---------- Article pages ---------- */
.article { max-width: 800px; margin: 36px auto 40px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0 48px 44px; position: relative; }
.article::before {
  content: ""; display: block; height: 36px; margin: 0 -48px 34px; border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0;
  background: radial-gradient(circle at 20px 18px, #ff5f57 6px, transparent 6.5px), radial-gradient(circle at 39px 18px, #febc2e 6px, transparent 6.5px),
    radial-gradient(circle at 58px 18px, #28c840 6px, transparent 6.5px), linear-gradient(180deg, var(--bar1), var(--bar2));
}
.article .back { font: 500 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.article .tag { font: 500 11px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.article h1 { font: 700 clamp(30px, 5vw, 44px)/1.12 var(--sans); letter-spacing: -.02em; margin: 12px 0 12px; }
.article .meta { font: 500 12px var(--mono); letter-spacing: .06em; color: var(--muted); margin-bottom: 26px; }
.article h2 { font: 700 26px/1.2 var(--sans); margin: 42px 0 14px; letter-spacing: -.01em; }
.article h3 { font: 600 19px var(--sans); margin: 26px 0 8px; }
.article p, .article li { color: #2c304a; font-size: 17px; line-height: 1.75; }
.article p { margin-bottom: 16px; }
.article ul, .article ol { padding-left: 22px; margin-bottom: 18px; display: grid; gap: 8px; }
.article strong { color: var(--ink); }
.article a[style] { color: var(--accent) !important; }
.article pre.code { margin: 8px 0; font-size: 13.5px; }
.article .copy-row { display: flex; justify-content: flex-end; margin: 8px 0 22px; }
.step-no { font: 700 .8em var(--mono); color: var(--accent); margin-right: 10px; }
.step-no::before { content: "0"; }
.tip { border: 1px dashed #b9bde0; background: #f7f8fe; border-radius: 10px; padding: 14px 18px; margin: 22px 0; }
.tip p { margin: 0; font-size: 16px; }
.inline-woso { margin: 34px 0; padding: 22px; border-radius: 12px; border: 1px solid var(--line); background: linear-gradient(180deg, #fbfbfe, #f1f2fb); }
.inline-woso h3 { margin: 0 0 6px; }
.inline-woso p { font-size: 15px; }
.author { display: flex; gap: 14px; align-items: center; margin-top: 46px; padding-top: 24px; border-top: 1px dashed var(--line); }
.ring img { width: 54px; height: 54px; border-radius: 10px; object-fit: cover; }
.author p { margin: 0; font-size: 15px; }
.shot { margin: 8px 0 26px; }
.shot img { width: 100%; border-radius: 10px; border: 1px solid var(--line); }
.shot figcaption { font: 500 12px var(--mono); color: var(--muted); margin-top: 8px; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 8px 0 26px; }
.gallery img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.gallery figcaption { font: 500 11px var(--mono); color: var(--muted); margin-top: 4px; }
footer:not(.foot) { border-top: 1px solid var(--line); padding: 28px 0; font: 500 12px var(--mono); color: var(--muted); }
footer:not(.foot) .wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.disclose { max-width: 560px; font-family: var(--sans); font-size: 13px; }
.float-cta, .fab { display: none !important; }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .sec, .sec.flip { grid-template-columns: 1fr; gap: 0; }
  .sec.flip .window { order: 0; }
  canvas.ascii { display: none; }
}
@media (max-width: 640px) {
  .nav { position: fixed; inset: 60px 0 auto 0; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); display: none; padding: 6px 0; }
  .nav a { padding: 13px 22px; width: 100%; }
  .menu-open .nav { display: flex; }
  .burger { display: block; }
  .hero { padding-top: 24px; }
  .screen { padding: 16px; aspect-ratio: auto; min-height: 210px; }
  .screen .title { font-size: 30px; }
  .screen .term { position: static; margin-top: 14px; font-size: 10px; max-width: 60%; }
  .screen .avatar { right: 14px; top: 16px; bottom: auto; width: 32%; }
  .app { display: none; }
  .vids { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: repeat(2, 1fr); }
  .win-body { padding: 18px 16px; }
  .article { margin: 0; border-radius: 0; border-left: 0; border-right: 0; padding: 0 16px 30px; }
  .article::before { margin: 0 -16px 24px; border-radius: 0; }
  .titlebar .name { padding-right: 0; }
}
