:root {
  --bg: #f4f6fb;
  --bg-2: #e9edf6;
  --panel: #ffffff;
  --panel-2: #f0f3fa;
  --line: #d3dae9;
  --text: #0b1220;
  --muted: #55627d;
  --a1: #e0560c;
  --a2: #0a8f8a;
  --a1-soft: rgba(224, 86, 12, .14);
  --a2-soft: rgba(10, 143, 138, .14);
  --art-bg-1: #eef2fb;
  --art-bg-2: #dde5f5;
  --shadow: 0 18px 40px -22px rgba(11, 18, 32, .35);
  --font-head: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Public Sans", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070b14;
    --bg-2: #0b1120;
    --panel: #0f1626;
    --panel-2: #131c31;
    --line: #202c48;
    --text: #e8edf7;
    --muted: #93a1bd;
    --a1: #ff7a2f;
    --a2: #2ee6d6;
    --a1-soft: rgba(255, 122, 47, .16);
    --a2-soft: rgba(46, 230, 214, .14);
    --art-bg-1: #101a30;
    --art-bg-2: #0a1020;
    --shadow: 0 24px 50px -24px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #070b14; --bg-2: #0b1120; --panel: #0f1626; --panel-2: #131c31; --line: #202c48;
  --text: #e8edf7; --muted: #93a1bd; --a1: #ff7a2f; --a2: #2ee6d6;
  --a1-soft: rgba(255, 122, 47, .16); --a2-soft: rgba(46, 230, 214, .14);
  --art-bg-1: #101a30; --art-bg-2: #0a1020; --shadow: 0 24px 50px -24px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 84px); }
body {
  margin: 0; min-height: 100%;
  background: radial-gradient(900px 520px at 88% -6%, rgba(255, 122, 47, .13), transparent 60%), radial-gradient(900px 640px at -4% 8%, rgba(59, 108, 255, .14), transparent 60%), var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  background: var(--bg); z-index: 60;
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--a2); outline-offset: 3px; border-radius: 6px; }

/* header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.bar { max-width: 1240px; margin: 0 auto; padding: 14px 28px; display: flex; align-items: center; gap: 36px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; letter-spacing: .01em; }
.brand img { height: 34px; width: auto; display: block; }
.foot .brand img { height: 30px; }
.nav { display: flex; gap: 6px; margin-left: auto; align-items: center; }
.nav a { padding: 8px 14px; border-radius: 999px; font-size: .94rem; color: var(--muted); transition: color .15s, background .15s; }
.nav a:hover { color: var(--text); background: var(--panel-2); }
.nav a.cta { background: var(--a1); color: #fff; font-weight: 600; margin-left: 8px; }
.nav a.cta:hover { filter: brightness(1.08); background: var(--a1); }

/* hero */
.hero { max-width: 1240px; margin: 0 auto; padding: 72px 28px 36px; position: relative; }
.hero h1 { font-family: var(--font-head); font-weight: 700; font-size: clamp(2.4rem, 5.4vw, 4.2rem); line-height: 1.04; letter-spacing: -.025em; margin: 0 0 18px; max-width: 14ch; }
.hero p { font-size: 1.15rem; color: var(--muted); max-width: 56ch; margin: 0; }
.hero-art { position: absolute; right: 28px; top: 40px; width: min(440px, 40vw); height: auto; aspect-ratio: 420 / 220; border-radius: 22px; border: 1px solid #27406e; background: #050a16; overflow: hidden; box-shadow: 0 30px 70px -30px rgba(59, 108, 255, .55); pointer-events: none; --line: #27406e; --muted: #8fa6d4; --a1: #ff7a2f; --a2: #2ee6d6; }
@media (min-width: 861px) { .hero > h1, .hero > p { margin-right: calc(min(440px, 40vw) + 32px); } }
@media (max-width: 860px) { .hero-art { display: none; } .hero { padding-top: 48px; } }

/* filters */
.filters { max-width: 1240px; margin: 0 auto; padding: 14px 28px 8px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.chip {
  font: inherit; font-size: .92rem; color: var(--muted); background: transparent;
  border: 1px solid var(--line); padding: 8px 16px; border-radius: 999px; cursor: pointer;
  transition: all .15s;
}
.chip:hover { color: var(--text); border-color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip.ai[aria-pressed="true"] { background: var(--a1); border-color: var(--a1); color: #fff; }
.hint { margin-left: auto; font-size: .88rem; color: var(--muted); }

/* grid */
.grid { max-width: 1240px; margin: 0 auto; padding: 18px 28px 80px; display: grid; gap: 26px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }

/* both faces share one grid cell, so a tile grows to fit whichever face is taller */
.tile { perspective: 1400px; min-height: 400px; outline: none; border-radius: 18px; position: relative; }
.tile[hidden] { display: none; }
.inner { position: relative; display: grid; width: 100%; height: 100%; min-height: 400px; transform-style: preserve-3d; transition: transform .75s cubic-bezier(.2, .7, .2, 1); border-radius: 18px; }
@media (hover: hover) { .tile:hover .inner { transform: rotateY(180deg); } }
.tile:focus-within .inner, .tile.flipped .inner { transform: rotateY(180deg); }
.face {
  position: relative; grid-area: 1 / 1; border-radius: 18px; overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.front .art { flex: 0 0 232px; background: #050a16; border-bottom: 1px solid var(--line); position: relative; --line: #27406e; --muted: #8fa6d4; --a1: #ff7a2f; --a2: #2ee6d6; --text: #e8edf7; --panel: #0b1428; }
.front .art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(5, 10, 22, .55)); pointer-events: none; }
.tile:hover .front .art svg { filter: saturate(1.15); }
.art svg { width: 100%; height: 100%; display: block; }
.front .meta { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.front h3 { font-family: var(--font-head); font-weight: 600; font-size: 1.16rem; line-height: 1.25; letter-spacing: -.01em; margin: 0; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font-size: .8rem; font-weight: 500; color: var(--muted); padding: 3px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); }
.tag.ai { color: var(--a1); border-color: color-mix(in srgb, var(--a1) 45%, transparent); background: var(--a1-soft); font-weight: 600; }
.draft { position: absolute; top: 14px; left: 14px; z-index: 2; font-size: .78rem; font-weight: 600; padding: 4px 11px; border-radius: 999px; background: #b42318; color: #fff; }

.back { transform: rotateY(180deg); padding: 24px 24px 22px; gap: 12px; background:
  linear-gradient(180deg, var(--a2-soft), transparent 42%), var(--panel); }
.back h3 { font-family: var(--font-head); font-weight: 600; font-size: 1.04rem; line-height: 1.3; margin: 0; }
.back p { margin: 0; font-size: .95rem; color: var(--text); opacity: .92; }
.stat { display: inline-block; align-self: flex-start; font-family: var(--font-head); font-weight: 600; font-size: .9rem; color: var(--a2); background: var(--a2-soft); padding: 5px 12px; border-radius: 10px; }
.back-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.related { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.techinfo { flex: none; background: var(--a1); color: #fff; font-weight: 600; font-size: .85rem; padding: 7px 14px; border-radius: 999px; white-space: nowrap; transition: filter .15s, transform .15s; }
.techinfo:hover { filter: brightness(1.1); transform: translateY(-1px); }
.related span.lbl { font-size: .82rem; color: var(--muted); }
.related .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rchip { font: inherit; font-size: .8rem; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; cursor: pointer; transition: border-color .15s, color .15s; }
.rchip:hover { border-color: var(--a1); color: var(--a1); }

/* related highlight while hovering a tile */
.tile.rel-hl .face.front, .tile.rel-hl .face.back { border-color: var(--a1); box-shadow: 0 0 0 1px var(--a1), 0 18px 44px -18px var(--a1); }
.tile.pulse .face { animation: pulse 1.1s ease-out 1; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--a1); } 100% { box-shadow: 0 0 0 18px transparent; } }

/* contact + footer */
.contact { max-width: 1240px; margin: 0 auto 60px; padding: 0 28px; }
.contact-in { border: 1px solid var(--line); border-radius: 22px; padding: 40px; background: linear-gradient(120deg, var(--a1-soft), transparent 55%), var(--panel); display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.contact-in h2 { font-family: var(--font-head); font-size: 1.6rem; margin: 0 0 6px; letter-spacing: -.01em; }
.contact-in p { margin: 0; color: var(--muted); max-width: 58ch; }
.btn { margin-left: auto; background: var(--a1); color: #fff; padding: 13px 24px; border-radius: 999px; font-weight: 600; }
.btn:hover { filter: brightness(1.08); }

footer { border-top: 1px solid var(--line); background: var(--bg-2); }
.foot { max-width: 1240px; margin: 0 auto; padding: 48px 28px 28px; display: grid; gap: 32px; grid-template-columns: 1.4fr repeat(4, 1fr); }
.foot h4 { font-family: var(--font-head); font-size: .95rem; margin: 0 0 12px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot li a { color: var(--muted); font-size: .92rem; }
.foot li a:hover { color: var(--text); }
.foot .about { color: var(--muted); font-size: .92rem; max-width: 34ch; margin-top: 14px; }
.legal { max-width: 1240px; margin: 0 auto; padding: 0 28px 36px; color: var(--muted); font-size: .85rem; }
@media (max-width: 860px) { .foot { grid-template-columns: 1fr 1fr; } .nav a:not(.cta) { display: none; } .hint { display: none; } }

@media (prefers-reduced-motion: reduce) { .inner { transition-duration: .01s; } .tile.pulse .face { animation: none; } }

/* inner pages */
.page { max-width: 860px; margin: 0 auto; padding: 64px 28px 72px; }
.page .eyebrow { font-size: .85rem; font-weight: 600; color: var(--a2); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 10px; }
.page h1 { font-family: var(--font-head); font-weight: 700; font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 18px; }
.page .lede { font-size: 1.15rem; color: var(--muted); margin: 0 0 40px; max-width: 60ch; }
.page h2 { font-family: var(--font-head); font-size: 1.35rem; letter-spacing: -.01em; margin: 44px 0 12px; scroll-margin-top: 96px; }
.page h3 { font-family: var(--font-head); font-size: 1.05rem; margin: 26px 0 8px; }
.page p, .page li { color: var(--text); opacity: .92; }
.page ul { padding-left: 1.2em; }
.page a:not(.btn) { color: var(--a2); text-decoration: underline; text-underline-offset: 3px; }
.page .updated { color: var(--muted); font-size: .9rem; }
.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); margin: 18px 0; }
.card { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); padding: 20px 22px; }
.card h3 { margin-top: 0; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }
.person .ph { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--a1), var(--a2)); color: #fff; display: grid; place-items: center; font-family: var(--font-head); font-weight: 600; font-size: 1.3rem; margin-bottom: 14px; }
.person .role { color: var(--a2); font-weight: 600; margin: -4px 0 10px; }
.person p + p { margin-top: 10px; }
.template-note { border: 1px dashed var(--a1); background: var(--a1-soft); border-radius: 12px; padding: 12px 16px; font-size: .92rem; margin: 0 0 32px; }
.nav a[aria-current="page"] { color: var(--text); background: var(--panel-2); }
.cards.team { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 22px; }
.cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 600px) { .cards.two { grid-template-columns: 1fr; } }
