@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/outfit-latin.woff2") format("woff2");
}

:root {
  --bg: #0c0b0a;
  --bg-elev: #151210;
  --bg-card: #1a1613;
  --ink: #f3ebe0;
  --cream: #e8dcc8;
  --muted: #a3978a;
  --ember: #e85a1a;
  --ember-hot: #ff7a35;
  --ember-soft: rgba(232, 90, 26, 0.14);
  --ember-glow: rgba(232, 90, 26, 0.28);
  --line: rgba(232, 220, 200, 0.1);
  --radius: 1rem;
  --max: 68rem;
  --prose: 42rem;
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Menlo, Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background:
    radial-gradient(1100px 560px at 80% -10%, var(--ember-soft), transparent 58%),
    radial-gradient(800px 480px at -10% 40%, rgba(232, 220, 200, 0.03), transparent 52%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--cream); text-decoration-color: rgba(232, 90, 26, 0.6); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { color: var(--ember-hot); }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: 1rem; top: -4rem; background: var(--ember); color: #fff; padding: 0.5rem 0.85rem; border-radius: 0.4rem; z-index: 100; }
.skip:focus { top: 1rem; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: rgba(12, 11, 10, 0.82); border-bottom: 1px solid var(--line); }
.top-inner { max-width: var(--max); margin: 0 auto; padding: 0.7rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 0.65rem; font-weight: 600; letter-spacing: 0.02em; text-decoration: none; color: var(--cream); }
.logo img { width: 2.1rem; height: 2.1rem; border-radius: 999px; box-shadow: 0 0 0 1px var(--line), 0 0 18px rgba(232, 90, 26, 0.18); }
.logo span small { display: block; font-size: 0.72rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ember); line-height: 1.1; }
.logo span { line-height: 1.2; }
.nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; }
.nav a { text-decoration: none; color: var(--muted); font-size: 0.95rem; font-weight: 500; padding: 0.25rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--cream); }
.nav a[aria-current="page"] { color: var(--cream); border-bottom-color: var(--ember); }

/* Layout */
main { flex: 1; width: 100%; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }
.prose { max-width: var(--prose); }
section { padding: 2.5rem 0; }

.eyebrow { margin: 0 0 0.6rem; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ember); }
h1, h2, h3 { color: var(--cream); line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; }
h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); margin: 0 0 1rem; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); margin: 2.25rem 0 0.85rem; }
h3 { font-size: 1.2rem; margin: 1.75rem 0 0.5rem; }
p { margin: 0 0 1.1rem; }
.lede { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--muted); font-weight: 300; max-width: 40rem; }
.muted { color: var(--muted); }
ul, ol { padding-left: 1.3rem; margin: 0 0 1.2rem; }
li { margin: 0.3rem 0; }
li::marker { color: var(--ember); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

code { font-family: var(--mono); font-size: 0.88em; background: rgba(232, 220, 200, 0.07); border: 1px solid var(--line); padding: 0.1em 0.35em; border-radius: 0.3rem; }
pre { font-family: var(--mono); font-size: 0.88rem; line-height: 1.55; background: #110f0d; border: 1px solid var(--line); border-left: 3px solid var(--ember); border-radius: 0.6rem; padding: 1rem 1.15rem; overflow-x: auto; margin: 0 0 1.4rem; }
pre code { background: none; border: 0; padding: 0; font-size: inherit; }
blockquote { margin: 0 0 1.3rem; padding: 0.4rem 1.1rem; border-left: 3px solid var(--ember); color: var(--muted); background: rgba(232, 90, 26, 0.05); border-radius: 0 0.5rem 0.5rem 0; }

/* Page head */
.page-head { padding: 3.5rem 0 1rem; }
.page-head .lede { margin-bottom: 0; }

/* Hero */
.hero { padding: 3.5rem 0 2rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 3rem; align-items: center; }
.hero-mark { justify-self: center; width: min(100%, 24rem); aspect-ratio: 1; border-radius: 50%; padding: 0.4rem; background: radial-gradient(circle at 50% 45%, var(--ember-glow), transparent 62%), linear-gradient(160deg, rgba(232, 90, 26, 0.22), transparent 60%); box-shadow: 0 0 0 1px var(--line), 0 28px 90px rgba(0, 0, 0, 0.55), 0 0 60px rgba(232, 90, 26, 0.14); }
.hero-mark img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; background: #1a1612; }
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.25rem 0 1.75rem; padding: 0; list-style: none; }
.tags li { margin: 0; font-size: 0.85rem; color: var(--cream); border: 1px solid var(--line); background: rgba(232, 220, 200, 0.04); padding: 0.25rem 0.75rem; border-radius: 999px; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.75rem 1.3rem; border-radius: 999px; background: var(--ember); color: #fff; font-weight: 600; font-size: 0.95rem; text-decoration: none; border: 1px solid transparent; transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease; }
.btn:hover { background: var(--ember-hot); color: #fff; transform: translateY(-1px); box-shadow: 0 8px 28px rgba(232, 90, 26, 0.28); }
.btn.ghost { background: transparent; color: var(--cream); border-color: rgba(232, 220, 200, 0.22); }
.btn.ghost:hover { border-color: var(--ember); color: var(--ember-hot); box-shadow: none; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr)); gap: 1.1rem; }
.card { background: linear-gradient(180deg, rgba(232, 220, 200, 0.035), rgba(232, 220, 200, 0.015)); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.35rem 1.4rem; transition: border-color 0.15s ease, transform 0.15s ease; }
.card:hover { border-color: rgba(232, 90, 26, 0.45); }
.card h3 { margin-top: 0; font-size: 1.12rem; }
.card h3 a { text-decoration: none; }
.card p { color: var(--muted); font-size: 0.98rem; margin-bottom: 0.6rem; }
.card .meta { font-size: 0.82rem; color: var(--ember); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; margin-bottom: 0.45rem; }
.more { font-weight: 600; font-size: 0.95rem; text-decoration: none; color: var(--ember-hot); }
.more:hover { text-decoration: underline; }

.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.section-head h2 { margin: 0; }

/* Projects */
.project { border-top: 1px solid var(--line); padding: 2rem 0 0.5rem; scroll-margin-top: 5rem; }
.project:first-of-type { border-top: 0; }
.project h2 { margin-top: 0; }
.stack { font-size: 0.88rem; color: var(--muted); margin-bottom: 1rem; }
.stack strong { color: var(--ember); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; font-size: 0.78rem; margin-right: 0.4rem; }
.toc { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 1.5rem 0 0; }
.toc li { margin: 0; }
.toc a { display: inline-block; font-size: 0.88rem; text-decoration: none; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0.25rem 0.8rem; }
.toc a:hover { color: var(--cream); border-color: var(--ember); }

/* Blog */
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { margin: 0; padding: 1.4rem 0; border-top: 1px solid var(--line); }
.post-list li:first-child { border-top: 0; }
.post-list h2 { font-size: 1.35rem; margin: 0.15rem 0 0.4rem; }
.post-list h2 a { text-decoration: none; }
.post-list p { color: var(--muted); margin: 0; }
time, .date { color: var(--ember); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em; }
.post-meta { color: var(--muted); font-size: 0.92rem; margin: -0.25rem 0 0; }
.post-meta time { font-size: inherit; }
.post-foot { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }

/* Contact */
.contact-card { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.contact-card img { width: 6.5rem; height: 6.5rem; border-radius: 999px; box-shadow: 0 0 0 1px var(--line), 0 0 30px rgba(232, 90, 26, 0.18); }
.email { font-size: clamp(1.15rem, 3vw, 1.5rem); font-weight: 600; word-break: break-all; }

/* Footer */
.foot { border-top: 1px solid var(--line); margin-top: 3rem; padding: 2rem 0 2.5rem; color: var(--muted); font-size: 0.92rem; }
.foot-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; align-items: flex-start; }
.foot p { margin: 0 0 0.35rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; }
.foot nav a { color: var(--muted); text-decoration: none; }
.foot nav a:hover { color: var(--cream); }
.accent { color: var(--ember); }

/* 404 */
.notfound { text-align: center; padding: 5rem 0 3rem; }
.notfound .hero-mark { width: 11rem; margin: 0 auto 2rem; }
.notfound .actions { justify-content: center; }

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-mark { width: min(70%, 17rem); order: -1; }
  .top-inner { padding: 0.6rem 1.1rem; }
  .wrap { padding: 0 1.1rem; }
  .hero, .page-head { padding-top: 2.25rem; }
}
@media (max-width: 520px) {
  .nav { gap: 0.15rem 0.85rem; width: 100%; }
  .nav a { font-size: 0.92rem; }
  body { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .card { transition: none; }
}
@media print {
  .top, .foot, .skip { display: none; }
  body { background: #fff; color: #000; }
}

/* Hosting inquiry form */
.hosting-points { margin-bottom: 0.5rem; }
.hosting-points .card p:last-child { margin-bottom: 0; }
.inquiry fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem 0.4rem; margin: 0 0 1.25rem; background: rgba(232, 220, 200, 0.02); }
.inquiry legend { padding: 0 0.4rem; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ember); }
.inquiry label, .inquiry .label { display: block; font-size: 0.92rem; font-weight: 500; color: var(--cream); margin: 0 0 0.9rem; }
.inquiry .row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.inquiry .row3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.inquiry input[type=text], .inquiry input[type=email], .inquiry input[type=tel], .inquiry input[type=number], .inquiry input[type=date], .inquiry select, .inquiry textarea { display: block; width: 100%; margin-top: 0.3rem; font: inherit; font-size: 1rem; color: var(--ink); background: #110f0d; border: 1px solid rgba(232, 220, 200, 0.16); border-radius: 0.55rem; padding: 0.55rem 0.7rem; }
.inquiry textarea { resize: vertical; min-height: 5.5rem; }
.inquiry input:focus, .inquiry select:focus, .inquiry textarea:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px var(--ember-soft); }
.inquiry .radio-group { margin: 0 0 0.9rem; }
.inquiry .radio-group .label { margin-bottom: 0.45rem; }
.inquiry label.inline { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0 1.2rem 0 0; font-weight: 400; }
.inquiry input[type=radio] { accent-color: var(--ember); }
.inquiry .req { color: var(--ember-hot); }
.inquiry .opt { color: var(--muted); font-weight: 400; font-size: 0.8rem; }
.inquiry button.btn { cursor: pointer; font-family: inherit; }
.inquiry .form-note { font-size: 0.88rem; margin-top: 1rem; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 620px) { .inquiry .row, .inquiry .row3 { grid-template-columns: 1fr; } }

/* Lab & AI */
.lab-head .lede { max-width: 46rem; }
.stats { list-style: none; padding: 0; margin: 2rem 0 0.5rem; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.75rem; }
.stats li { margin: 0; padding: 1rem 0.9rem; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, rgba(232, 90, 26, 0.10), rgba(232, 90, 26, 0.02)); box-shadow: inset 0 1px 0 rgba(255, 122, 53, 0.12); }
.stats strong { display: block; font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; color: var(--cream); text-shadow: 0 0 24px rgba(232, 90, 26, 0.35); }
.stats span { display: block; margin-top: 0.3rem; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ember); font-weight: 600; }
.lab-section { scroll-margin-top: 5rem; }
.lab-section .section-head p { font-size: 0.92rem; }
.spec h3 { font-size: 1.2rem; margin-bottom: 0.75rem; }
.spec dl { margin: 0; display: grid; gap: 0.35rem; }
.spec dl div { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); padding-top: 0.35rem; font-size: 0.95rem; }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; color: var(--cream); font-weight: 600; text-align: right; }
.spec-hot { border-color: rgba(232, 90, 26, 0.45); box-shadow: 0 0 40px rgba(232, 90, 26, 0.12); }
.ai-panel { border: 1px solid rgba(232, 90, 26, 0.35); border-radius: calc(var(--radius) * 1.4); padding: clamp(1.4rem, 3vw, 2.4rem); background: radial-gradient(700px 320px at 90% 0%, var(--ember-glow), transparent 60%), linear-gradient(180deg, #17120f, #110e0c); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); }
.ai-panel h2 { margin-top: 0; font-size: clamp(1.9rem, 4vw, 2.6rem); }
.ai-panel .lede { margin-bottom: 1.5rem; }
.two-col { grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 0 2.5rem; }
.two-col h2 { margin-top: 0; }
.svc { margin-top: 0.5rem; }
.cta-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-top: 1.5rem; border-color: rgba(232, 90, 26, 0.4); }
.cta-card p:last-child { margin-bottom: 0; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 480px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ai-panel .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 720px) { .ai-panel .grid { grid-template-columns: 1fr; } }
.gpu-total { background: linear-gradient(180deg, rgba(232, 90, 26, 0.12), rgba(232, 90, 26, 0.03)); }
