/* just4nt.dev — site styles. No inline styles anywhere, so the CSP can stay strict. */

/* 1. COLORS: edit these to retheme the whole page */
:root {
  --bg: #fbfcfe; --ink: #1d2433; --mute: #5a6475; --line: #e6eaf0;
  --accent: #3a6ff7; --accent-ink: #2b5ad6; --card: #ffffff;
  color-scheme: light;
}

/* 2. BASE */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html.lock, html:has(dialog.viewer[open]) { overflow: hidden; }
body {
  margin: 0; color: var(--ink);
  background: radial-gradient(1200px 500px at 50% -120px, #eaf1ff, transparent), var(--bg);
  font: 17px/1.65 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 10; background: #fff; color: var(--ink); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
.ic { width: 1.15em; height: 1.15em; flex: none; }

/* 3. PROFILE HEADER */
main { max-width: 720px; margin: 0 auto; padding: 96px 24px 64px; text-align: center; }
.avatar {
  width: 112px; height: 112px; margin: 0 auto 24px; display: grid; place-items: center; border-radius: 50%;
  background: linear-gradient(135deg, #dfe8ff, #f3f6ff); border: 1px solid #d6e0fa;
  box-shadow: 0 10px 30px -12px rgba(58, 111, 247, .35);
  color: #2f57c8; font-size: 38px; font-weight: 600; line-height: 1;
}
h1 { margin: 0 0 10px; font-size: 44px; line-height: 1.1; font-weight: 700; letter-spacing: -.02em; }
.lead { margin: 0 auto 6px; max-width: 520px; color: var(--mute); font-size: 19px; }
.loc { margin: 0 0 28px; color: var(--mute); font-size: 15px; }
.links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); text-decoration: none; font-size: 15px; font-weight: 500;
  transition: color .2s, border-color .2s, transform .2s;
}
.btn:hover { color: var(--accent-ink); border-color: var(--accent); transform: translateY(-1px); }

/* 4. PROJECTS */
section { margin-top: 88px; }
h2, h3 { margin: 0; font-weight: 600; text-transform: uppercase; }
h2 { margin-bottom: 36px; font-size: 13px; letter-spacing: .16em; color: var(--accent-ink); }
h3 { margin: 40px 0 18px; font-size: 12px; letter-spacing: .14em; color: var(--mute); }
h2 + p + h3 { margin-top: 0; }
.hint { margin: -24px 0 36px; color: var(--mute); font-size: 14px; }
/* 2-column grid. An odd last tile is centered, never left-aligned. */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; text-align: left; align-items: stretch; }
.grid > :last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 9px); }
.card {
  position: relative; width: 100%; display: flex; flex-direction: column; justify-content: flex-start;
  padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  font: inherit; color: inherit; text-align: left; cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.shelved .card { background: #fdfdfe; }
.card:hover { border-color: #c9d6fb; box-shadow: 0 14px 30px -18px rgba(29, 36, 51, .3); }
.card .ct { display: block; margin: 0 28px 6px 0; font-size: 18px; font-weight: 600; }
.card .cp { display: block; margin: 0 0 12px; color: var(--mute); font-size: 15px; line-height: 1.55; }
.card .meta { display: block; margin-top: auto; color: var(--mute); font-size: 13px; }
.arrow { position: absolute; top: 24px; right: 20px; width: 16px; height: 16px; color: var(--mute); }
.card:hover .arrow { color: var(--accent); }

/* 4b. PROJECT PANEL (native <dialog>, about 2/3 of the window).
   Each project gets its own colours from a .t-SLUG class below. */
dialog.viewer {
  width: min(66vw, 1280px); height: 66vh; max-width: none; max-height: none;
  padding: 0; border: 0; border-radius: 22px; overflow: hidden;
  background: var(--pbg, #0f172a); color: var(--pink, #fff);
  box-shadow: 0 40px 120px -30px rgba(15, 23, 42, .55);
}
dialog.viewer[open] { display: grid; grid-template-rows: auto 1fr; animation: grow .32s cubic-bezier(.2, .8, .2, 1); }
dialog.viewer::backdrop { background: rgba(240, 244, 250, .72); backdrop-filter: blur(6px); animation: fade .32s ease; }
@keyframes grow { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } }
.vh { display: flex; gap: 20px; align-items: flex-start; padding: 22px 26px 16px; }
.vh > div { flex: 1; min-width: 0; }
.vh h2 { margin: 0 0 4px; color: var(--pink); font-size: 22px; letter-spacing: -.01em; text-transform: none; }
.vh p { margin: 0; color: var(--pmute); font-size: 15px; line-height: 1.55; max-width: 72ch; }
.vmeta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 10px; font-size: 13px; color: var(--pmute); }
.vmeta a { color: var(--pacc); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.vclose {
  flex: none; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--pink) 30%, transparent); border-radius: 50%;
  background: color-mix(in srgb, var(--pink) 10%, transparent); color: var(--pink);
}
.vclose:hover { background: color-mix(in srgb, var(--pink) 20%, transparent); }
.viewer :focus-visible { outline-color: var(--pacc); }
.vimg { min-height: 0; padding: 0 26px 26px; display: grid; grid-template-rows: minmax(0, 1fr); }
.vimg img { min-height: 0; width: 100%; height: 100%; object-fit: contain; object-position: top center; border-radius: 12px; background: rgba(0, 0, 0, .12); }

/* Per-project panel colours (taken from each product's own palette) */
.t-webindexer { --pbg: linear-gradient(160deg, #0b1b2e, #07111e 70%); --pink: #e6eef8; --pmute: #b6c6da; --pacc: #7dd3fc; }
.t-mac-updater { --pbg: linear-gradient(160deg, #1f2937, #0d1117 60%, #0b3b2e); --pink: #e6edf3; --pmute: #a8b3bf; --pacc: #3fb950; }
.t-reflection-health { --pbg: linear-gradient(135deg, #0f172a, #1e293b); --pink: #f8fafc; --pmute: #cbd5e1; --pacc: #38bdf8; }
.t-vmp { --pbg: linear-gradient(160deg, #151c26, #0f141b 70%); --pink: #dbe4ee; --pmute: #a9b8c9; --pacc: #3d9bff; }
/* weatherman: its dashboard's own palette (gray-900 / gray-800, blue-400) */
.t-weatherman { --pbg: linear-gradient(160deg, #1f2937, #111827 70%); --pink: #f3f4f6; --pmute: #c0c6cf; --pacc: #60a5fa; }
.t-gold-arbitrage { --pbg: radial-gradient(900px 500px at 80% 0, #3b2f0b, transparent), #0c0a07; --pink: #f5ecd7; --pmute: #cdbd96; --pacc: #f2c94c; }
.t-guard-suite { --pbg: linear-gradient(160deg, #1a1d24, #0f1115 70%); --pink: #e8eaed; --pmute: #b0b6bd; --pacc: #7c9cff; }
.t-hf-report { --pbg: linear-gradient(135deg, #ffd21e, #ff9d00); --pink: #1f2328; --pmute: #3d3420; --pacc: #6b3600; }

/* 5. FOOTER */
footer { margin-top: 88px; padding: 48px 24px 64px; border-top: 1px solid var(--line); text-align: center; color: var(--mute); font-size: 14px; }
footer a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; }
footer a:hover { color: var(--accent-ink); }

/* 404 page */
.nf { min-height: 70vh; display: grid; place-content: center; }
.nf .btn { margin: 24px auto 0; }

/* 6. MOBILE (phones) */
@media (max-width: 640px) {
  main { padding-top: 64px; }
  h1 { font-size: 34px; }
  .links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .btn { flex-direction: column; justify-content: center; gap: 6px; padding: 12px 6px; border-radius: 14px; font-size: 13px; }
  .grid { grid-template-columns: 1fr; }
  .grid > :last-child:nth-child(odd) { width: 100%; }
  dialog.viewer { width: calc(100vw - 20px); height: fit-content; max-height: calc(100dvh - 20px); border-radius: 18px; }
  dialog.viewer[open] { grid-template-rows: auto auto; overflow-y: auto; }
  .vh { padding: 18px 18px 12px; }
  .vh h2 { font-size: 19px; }
  .vh p { font-size: 14px; }
  .vimg { padding: 0 14px 16px; }
  .vimg img { height: auto; }
}
@media (max-width: 359px) {
  main { padding-left: 16px; padding-right: 16px; }
  .btn { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; animation: none !important; }
  .btn:hover { transform: none; }
}
