/* =====================================================================
   brint.dev — personal site
   Dark editorial / quiet-tech. Native CSS only, one accent, CSS-only motion.
   ===================================================================== */

:root {
  /* surfaces */
  --bg:        #0a0a0c;
  --bg-soft:   #0f0f12;
  --surface:   #121216;
  --surface-2: #17171c;
  --line:      rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.055);

  /* ink */
  --ink:       #eceae3;
  --ink-dim:   #a3a29a;
  --ink-mute:  #706f68;

  /* one accent — a luminous citrus lime, plus an analogous shade for atmosphere */
  --accent:    #cbe94f;
  --accent-deep: #7d9a1f;

  --maxw: 1180px;
  --pad: clamp(1.25rem, 5vw, 4rem);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --r-card: 20px;
}

/* ---- reset-ish ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-optical-sizing: auto;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.12rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

/* focus visibility for keyboard users */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: fixed;
  top: -100px; left: var(--pad);
  z-index: 100;
  background: var(--accent);
  color: #0a0a0c;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  font: 500 0.85rem/1 "JetBrains Mono", monospace;
  transition: top 0.25s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* =====================================================================
   Atmosphere: aurora + grain (fixed, non-interactive)
   ===================================================================== */
.aurora {
  position: fixed;
  inset: -20vmax;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(38vmax 38vmax at 72% 8%,  rgba(203, 233, 79, 0.16), transparent 60%),
    radial-gradient(46vmax 46vmax at 12% 22%, rgba(125, 154, 31, 0.13), transparent 62%),
    radial-gradient(50vmax 40vmax at 88% 92%, rgba(203, 233, 79, 0.07), transparent 64%);
  filter: blur(20px);
}
@media (prefers-reduced-motion: no-preference) {
  .aurora { animation: drift 26s var(--ease) infinite alternate; }
}
@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(3%, 2%, 0) scale(1.08); }
}

.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* =====================================================================
   Navigation
   ===================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 68px;
  padding-inline: var(--pad);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  border-bottom: 1px solid var(--line-soft);
}
.wordmark {
  font: 500 1.05rem/1 "JetBrains Mono", monospace;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.wordmark .caret { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3.5vw, 2.2rem);
  font: 500 0.9rem/1 "JetBrains Mono", monospace;
}
.nav-links a { color: var(--ink-dim); transition: color 0.2s var(--ease); }
.nav-links a:hover { color: var(--ink); }
.nav-contact {
  color: var(--ink) !important;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-contact:hover { border-color: var(--accent); background: rgba(203, 233, 79, 0.08); }

/* =====================================================================
   Layout container helper
   ===================================================================== */
.hero, .about, .work, .beyond, .footer {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* =====================================================================
   Hero
   ===================================================================== */
.hero {
  min-height: calc(100dvh - 68px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(3rem, 8vh, 6rem) clamp(2rem, 6vh, 4rem);
}
.eyebrow {
  font: 500 0.8rem/1 "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink-dim);
  margin-bottom: clamp(1.5rem, 4vh, 2.4rem);
}
.name {
  font-weight: 800;
  font-size: clamp(3.5rem, 15vw, 10.5rem);
  letter-spacing: -0.045em;
  line-height: 0.86;
  color: var(--ink);
}
.name .line { display: block; }
.name .line:last-child {
  color: transparent;
  -webkit-text-stroke: 1.3px var(--ink);
  text-stroke: 1.3px var(--ink);
}
.lede {
  margin-top: clamp(1.8rem, 5vh, 2.8rem);
  max-width: 42ch;
  font-size: clamp(1.15rem, 1rem + 0.9vw, 1.6rem);
  line-height: 1.4;
  color: var(--ink-dim);
  font-weight: 400;
}
.lede .hl {
  color: var(--ink);
  font-weight: 600;
}
.lede-link {
  color: var(--accent);
  box-shadow: inset 0 -0.08em 0 rgba(203, 233, 79, 0.35);
  transition: box-shadow 0.25s var(--ease);
}
.lede-link:hover { box-shadow: inset 0 -0.6em 0 rgba(203, 233, 79, 0.22); }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: clamp(2.2rem, 6vh, 3.2rem);
}

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font: 500 0.98rem/1 "JetBrains Mono", monospace;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: transform 0.18s var(--ease), background 0.2s var(--ease),
              border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.btn .arrow { transition: transform 0.2s var(--ease); }
.btn-primary { background: var(--accent); color: #0a0a0c; }
.btn-primary:hover { background: #d8f36a; transform: translateY(-2px); }
.btn-primary:hover .arrow { transform: translate(2px, -2px); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-dim); background: rgba(255,255,255,0.03); transform: translateY(-2px); }
.btn-ghost:active { transform: translateY(0); }

/* =====================================================================
   About
   ===================================================================== */
.about {
  padding-block: clamp(5rem, 14vh, 10rem);
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
  border-top: 1px solid var(--line-soft);
}
.about-lead {
  font-size: clamp(1.8rem, 1.2rem + 2.6vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
}
.about-body {
  margin-top: 1.75rem;
  max-width: 56ch;
  color: var(--ink-dim);
  font-size: clamp(1.02rem, 0.98rem + 0.3vw, 1.15rem);
}
.facts {
  margin: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.fact {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.fact dt {
  font: 500 0.72rem/1 "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  flex-shrink: 0;
}
.fact dd {
  margin: 0;
  text-align: right;
  color: var(--ink);
  font-size: 0.98rem;
}

/* =====================================================================
   Work
   ===================================================================== */
.work {
  padding-block: clamp(3rem, 6vh, 5rem) clamp(4rem, 9vh, 6rem);
}
.work-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: clamp(2rem, 5vh, 3rem);
}
.section-title {
  font-size: clamp(2.2rem, 1.5rem + 3vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
}
.section-note {
  font: 400 0.95rem/1.3 "JetBrains Mono", monospace;
  color: var(--ink-mute);
}

.project {
  /* Kove's own brand palette (from kove/web/src/index.css) — this card is a faithful
     pocket of the product it links to. Scoped to .project so the rest of the page keeps
     brint's citrus lime; only Kove wears Kove's lemon-green "signal". Fonts stay brint's. */
  --k-accent:   #7ffa88;   /* Kove primary */
  --k-card:     #171917;   /* Kove card surface (green-tinted neutral) */
  --k-elevated: #1e211e;   /* Kove popover surface */
  --k-line:     #2a2e2b;   /* Kove border */
  --k-ink-dim:  #8e968f;   /* Kove muted foreground */
  --k-glow:                /* Kove's signature "beacon": a soft green halo */
    0 0 0 1px rgba(127, 250, 136, 0.30),
    0 10px 30px -10px rgba(127, 250, 136, 0.45);

  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  background: var(--k-card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  transition: border-color 0.3s var(--ease);
}
.project:hover { border-color: rgba(127, 250, 136, 0.30); }

.project-body {
  padding: clamp(1.75rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
}
.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  font: 500 0.75rem/1 "JetBrains Mono", monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.project-index { color: var(--ink-mute); }
.project-state {
  color: var(--k-accent);
  border: 1px solid rgba(127, 250, 136, 0.32);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
}
.project-title {
  font-size: clamp(2.6rem, 2rem + 3vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.9;
}
.project-tagline {
  margin-top: 0.6rem;
  font-size: clamp(1.1rem, 1rem + 0.6vw, 1.4rem);
  font-weight: 500;
  color: var(--ink);
}
.project-desc {
  margin-top: 1.1rem;
  color: var(--ink-dim);
  max-width: 46ch;
  font-size: 1rem;
}
.tags {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tags li {
  font: 400 0.78rem/1 "JetBrains Mono", monospace;
  color: var(--k-ink-dim);
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--k-line);
  border-radius: 999px;
  background: var(--k-elevated);
}
.project-link {
  margin-top: auto;
  padding-top: 1.75rem;
  align-self: flex-start;
  font: 500 0.95rem/1 "JetBrains Mono", monospace;
  color: var(--k-accent);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.project-link .arrow { transition: transform 0.2s var(--ease); }
.project:hover .project-link .arrow,
.project-link:hover .arrow { transform: translate(2px, -2px); }

/* ---- project visual panel (typographic, brand gradient — not a fake screenshot) ---- */
.project-visual {
  position: relative;
  min-height: 320px;
  display: block;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 85% 12%, rgba(127, 250, 136, 0.20), transparent 55%),
    radial-gradient(120% 120% at 10% 100%, rgba(127, 250, 136, 0.10), transparent 60%),
    linear-gradient(155deg, #10130f, #0a0b0a 70%);
  border-left: 1px solid var(--line);
}
.visual-inner {
  position: absolute;
  inset: 0;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.visual-mark {
  font-weight: 800;
  font-size: clamp(6rem, 22vw, 13rem);
  line-height: 0.8;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(127, 250, 136, 0.5);
  text-stroke: 1.5px rgba(127, 250, 136, 0.5);
  align-self: flex-end;
}
/* compact "Logged" card — mirrors Kove's real logged-fields UI, on Kove's card surface
   with the "beacon" halo (Kove reserves the glow for the data it captures). */
.visual-log {
  align-self: flex-start;
  max-width: min(100%, 22rem);
  border: 1px solid rgba(127, 250, 136, 0.28);
  background: var(--k-card);
  border-radius: 12px;
  padding: 0.8rem 0.85rem;
  box-shadow: var(--k-glow);
}
.log-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.7rem;
  font: 500 0.8rem/1 "JetBrains Mono", monospace;
  color: var(--k-accent);
}
.log-spark { flex-shrink: 0; }
.log-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.log-pill {
  font: 400 0.76rem/1 "JetBrains Mono", monospace;
  color: var(--k-ink-dim);
  padding: 0.4rem 0.58rem;
  border: 1px solid var(--k-line);
  border-radius: 8px;
  background: var(--k-elevated);
  white-space: nowrap;
}
.log-pill b { color: var(--k-accent); font-weight: 500; }
.visual-convo {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.chat-sent {
  align-self: flex-end;
  max-width: min(85%, 20rem);
  padding: 0.6rem 0.8rem;
  font: 400 0.82rem/1.4 "JetBrains Mono", monospace;
  color: var(--ink);
  background: rgba(127, 250, 136, 0.10);
  border: 1px solid rgba(127, 250, 136, 0.22);
  border-radius: 14px;
  border-bottom-right-radius: 4px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* =====================================================================
   Beyond code — index-style project list (distinct from the feature card)
   ===================================================================== */
.beyond {
  border-top: 1px solid var(--line-soft);
  padding-block: clamp(4rem, 9vh, 6rem) clamp(6rem, 16vh, 10rem);
}
.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.side-item { border-bottom: 1px solid var(--line-soft); }
.side-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.75rem 0;
  transition: padding-left 0.3s var(--ease);
}
.side-link:hover { padding-left: 0.75rem; }
.side-title {
  font-size: clamp(1.4rem, 1rem + 1.6vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.side-desc {
  margin-top: 0.5rem;
  color: var(--ink-dim);
  font-size: 0.98rem;
  max-width: 52ch;
}
.side-meta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font: 500 0.8rem/1 "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  transition: color 0.2s var(--ease);
}
.side-meta .arrow { transition: transform 0.2s var(--ease); }
.side-link:hover .side-meta { color: var(--accent); }
.side-link:hover .side-meta .arrow { transform: translate(2px, -2px); }

/* =====================================================================
   Footer
   ===================================================================== */
.footer {
  padding-block: clamp(2.5rem, 6vh, 4rem);
  border-top: 1px solid var(--line-soft);
}
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-name {
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
}
.footer-links {
  display: flex;
  gap: 1.5rem;
  font: 500 0.9rem/1 "JetBrains Mono", monospace;
}
.footer-links a { color: var(--ink-dim); transition: color 0.2s var(--ease); }
.footer-links a:hover { color: var(--accent); }
.footer-fine {
  margin-top: 1.25rem;
  font: 400 0.8rem/1 "JetBrains Mono", monospace;
  color: var(--ink-mute);
}
.footer-fine .year { margin-left: 0.5rem; }

/* =====================================================================
   Motion — CSS only, gated on reduced-motion + feature support
   ===================================================================== */

/* hero entrance (runs once on load) */
@media (prefers-reduced-motion: no-preference) {
  .hero-anim {
    animation: rise 0.9s var(--ease) backwards;
  }
  .d0 { animation-delay: 0.02s; }
  .d1 { animation-delay: 0.10s; }
  .d2 { animation-delay: 0.20s; }
  .d3 { animation-delay: 0.36s; }
  .d4 { animation-delay: 0.48s; }
}

/* scroll-reveal via native scroll-driven animation (no JS).
   Default = fully visible, so unsupported browsers + reduced-motion show everything. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise 1s var(--ease) both;
      animation-timeline: view();
      animation-range: entry 5% cover 26%;
    }
  }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================================
   Responsive — mobile-first collapse (design verified at 390px)
   ===================================================================== */
@media (max-width: 860px) {
  .about {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .project {
    grid-template-columns: 1fr;
  }
  .project-visual {
    grid-row: 1;
    min-height: auto;
    border-left: none;
    border-bottom: 1px solid var(--line);
  }
  .visual-inner {
    position: relative;
    gap: 1.6rem;
    padding-block: clamp(1.75rem, 6vw, 2.5rem);
  }
  .visual-mark { font-size: clamp(5rem, 26vw, 8rem); }
}

@media (max-width: 540px) {
  .nav-links { gap: 1.1rem; font-size: 0.82rem; }
  .nav-contact { padding: 0.35rem 0.7rem; }
  .hero-cta { gap: 0.7rem; }
  .btn { padding: 0.8rem 1.25rem; font-size: 0.9rem; }
  .fact { gap: 1rem; }
  .fact dd { font-size: 0.9rem; }
  .visual-log { max-width: 100%; }
  .side-link { flex-direction: column; align-items: flex-start; gap: 0.7rem; }
  .side-link:hover { padding-left: 0; }
}

/* very small phones: keep the name from overflowing */
@media (max-width: 380px) {
  .nav-links a:not(.nav-contact) { display: none; }
}
