/* ============================================================
   rosslogan.net — stylesheet
   Content-first, framework-free, responsive.
   Covers: public homepage + private metrics dashboard.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --bg: #0b0f14;
  --surface: #161c24;
  --surface-2: #1a222c;
  --border: #243040;
  --text: #e6edf3;
  --text-muted: #9aa7b4;
  --accent: #2dd4bf;
  --accent-hover: #5eead4;
  --danger: #ff6b6b;
  --warn: #ffc857;
  --ok: #4ade80;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --maxw: 72rem;
  --measure: 70ch;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: radial-gradient(1100px 620px at 82% -12%, #12202b 0%, transparent 58%), var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Graphics never blow up: explicit width/height plus a backstop. */
img, svg, pre { max-width: 100%; }
img { height: auto; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1rem; max-width: var(--measure); }

code { font-family: var(--mono); font-size: .9em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

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

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: var(--bg); padding: .6rem 1rem;
  z-index: 100; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 44px; padding: .65rem 1.1rem; border-radius: var(--radius-sm);
  font: inherit; font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer;
  transition: color .12s ease, background .12s ease, border-color .12s ease;
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn-ghost:hover { border-color: var(--accent-hover); color: var(--accent-hover); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 15, 20, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; }
.brand-mark {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, #3aa8c9 100%);
  color: #04201d; font-family: var(--mono); font-size: .85rem; font-weight: 800;
}
.brand-text { letter-spacing: -0.02em; }
.brand-text .dot { color: var(--accent); }

.nav-menu { display: flex; align-items: center; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav-menu a { color: var(--text-muted); font-size: .92rem; font-weight: 500; transition: color .12s ease; }
.nav-menu a:hover { color: var(--text); }
.nav-cta {
  color: var(--accent) !important;
  border: 1px solid var(--accent); padding: .4rem 1rem; border-radius: var(--radius-sm);
}
.nav-cta:hover { border-color: var(--accent-hover); color: var(--accent-hover) !important; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(3rem, 8vw, 6rem) 0; }
.eyebrow {
  font-family: var(--mono);
  text-transform: uppercase; letter-spacing: .08em;
  font-size: .8rem; font-weight: 600; color: var(--accent);
  margin: 0 0 .7rem; max-width: none;
}
.hero h1 { max-width: 26ch; margin-bottom: .9rem; }
.lede { color: var(--text-muted); max-width: var(--measure); }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin: 1.6rem 0 0; }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.home .section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; border-top: 1px solid var(--border); }
.section-head { max-width: var(--measure); margin-bottom: 1.5rem; }
.section-head .eyebrow { margin-bottom: .45rem; }
.section-head h2 { margin-bottom: .4rem; }
.section-sub { color: var(--text-muted); font-size: .95rem; margin: 0; }

/* ---------- What I do ---------- */
.domains { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.domain h3 { display: flex; align-items: center; gap: .55rem; margin-bottom: .4rem; }
.domain-icon { width: 18px; height: 18px; color: var(--accent); flex: 0 0 auto; }
.domain p { color: var(--text-muted); font-size: .95rem; margin: 0; }

/* ---------- Case studies ---------- */
.cases { display: grid; grid-template-columns: 1fr; }
.case { max-width: var(--measure); padding: 1.25rem 0; border-bottom: 1px solid var(--border); }
.case:first-child { padding-top: 0; }
.case:last-child { border-bottom: 0; padding-bottom: 0; }
.case h3 { margin-bottom: .75rem; }
.case-meta { margin: 0; display: grid; gap: .55rem; }
.case-meta > div { display: grid; grid-template-columns: 1fr; gap: .1rem; }
.case-meta dt {
  font-family: var(--mono);
  font-size: .75rem; text-transform: uppercase; letter-spacing: .06em;
  font-weight: 600; color: var(--accent);
}
.case-meta dd { margin: 0; font-size: .95rem; color: var(--text-muted); }

/* ---------- Credentials ---------- */
.certs { margin: 0; max-width: var(--measure); }
.certrow {
  display: grid; grid-template-columns: 1fr; gap: .1rem;
  padding: .7rem 0; border-bottom: 1px solid var(--border); align-items: baseline;
}
.certrow:first-child { border-top: 1px solid var(--border); }
.certrow dt {
  font-family: var(--mono);
  font-size: .75rem; text-transform: uppercase; letter-spacing: .06em;
  font-weight: 600; color: var(--text-muted);
}
.certrow dd { margin: 0; font-size: .95rem; color: var(--text); }
.certrow-lapsed dd { color: var(--text-muted); }
.edu-line { display: block; }
.edu-line + .edu-line { margin-top: .3rem; }

/* ---------- Experience ---------- */
.timeline { list-style: none; margin: 0; padding: 0; max-width: var(--measure); }
.timeline-item {
  position: relative; padding: 0 0 1.5rem 1.5rem;
  border-left: 1px solid var(--border);
}
.timeline-item:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline-item::before {
  content: ""; position: absolute; left: -5px; top: .35rem;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
}
.timeline-item h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.timeline-item .when {
  font-family: var(--mono); font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted);
  margin-left: .45rem;
}
.timeline-item p { color: var(--text-muted); font-size: .95rem; margin: 0; }

/* ---------- Contact ---------- */
.contact-inner { max-width: var(--measure); }
.contact-inner p { color: var(--text-muted); margin-bottom: .4rem; }
.contact-links { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.4rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 1.5rem 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--text-muted); font-size: .85rem; }
.footer-inner p { margin: 0; max-width: none; }
.footer-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-nav a { color: var(--text-muted); transition: color .12s ease; }
.footer-nav a:hover { color: var(--accent); }

/* ---------- Homepage responsive ---------- */
@media (min-width: 768px) {
  .domains { grid-template-columns: 1fr 1fr; gap: 1.5rem 2rem; }
  .case-meta > div { grid-template-columns: 6rem 1fr; gap: .25rem 1rem; }
  .certrow { grid-template-columns: 9rem 1fr; gap: .25rem 1.25rem; }
}

@media (max-width: 899px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute; top: 64px; right: 0; left: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: .5rem 1.25rem 1rem;
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu li { border-bottom: 1px solid var(--border); }
  .nav-menu li:last-child { border-bottom: 0; }
  .nav-menu a { display: block; padding: .8rem 0; }
  .nav-cta { display: inline-block; border: 0; padding: .8rem 0; }
}

/* ============================================================
   Dashboard (private) — unchanged surface
   ============================================================ */

.cta-inner { text-align: center; max-width: 52ch; margin: 0 auto; }
.cta-inner .eyebrow { margin-bottom: .5rem; }
.cta-inner p { color: var(--text-muted); max-width: none; }
.cta-inner code { color: var(--text); background: var(--surface-2); padding: .1rem .4rem; border-radius: 6px; }
.cta-inner .btn { margin-top: .75rem; }

.btn-sm { min-height: 0; padding: .5rem .95rem; font-size: .85rem; }

.dash-nav { gap: 1rem; }
.badge-private {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .74rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--warn); padding: .25rem .65rem; border-radius: 999px;
  background: rgba(255, 200, 87, .1); border: 1px solid var(--border);
}
.badge-private::before { content: "\1F512"; font-size: .8rem; }

.dash-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2rem;
}
.dash-title { font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: .35rem; }
.dash-meta { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; text-align: right; }
.dash-meta-line { color: var(--text-muted); font-size: .85rem; }
.dash-meta-line time, .dash-meta-line strong { color: var(--text); }
.dash-meta .btn { margin-top: .4rem; }

.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.dash-stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
  display: flex; flex-direction: column; gap: .4rem;
}
.dash-label { color: var(--text-muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; }
.dash-value { font-family: var(--mono); font-size: 1.75rem; font-weight: 700; color: var(--accent); }
.dash-note { margin-top: 1.25rem; color: var(--text-muted); font-size: .85rem; }
.dash-note code { color: var(--text); background: var(--surface-2); padding: .1rem .4rem; border-radius: 6px; }
.dash-banner {
  margin-top: 1rem; padding: .7rem 1rem; border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--text); font-size: .88rem;
}

.dash-panel {
  margin-top: 1.75rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
}
.dash-panel-title { font-size: 1.05rem; margin-bottom: 1rem; }
.dash-panel-sub { color: var(--text-muted); font-size: .85rem; margin: -.55rem 0 1rem; }
.dash-panel-sub code { color: var(--text); background: var(--surface-2); padding: .1rem .4rem; border-radius: 6px; }

/* Pipeline health badges */
.status-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .2rem .6rem; border-radius: 999px;
  font-size: .78rem; font-weight: 600; letter-spacing: .02em;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-muted);
  white-space: nowrap;
}
.status-badge::before {
  content: ""; width: .5rem; height: .5rem; border-radius: 50%;
  background: currentColor; opacity: .9;
}
.status-success { color: var(--ok); border-color: rgba(74, 222, 128, .4); background: rgba(74, 222, 128, .1); }
.status-failure { color: var(--danger); border-color: rgba(255, 107, 107, .4); background: rgba(255, 107, 107, .1); }
.status-running { color: var(--warn); border-color: rgba(255, 200, 87, .4); background: rgba(255, 200, 87, .1); }
.status-unknown { color: var(--text-muted); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dash-table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 560px; }
.dash-table th, .dash-table td { padding: .7rem .85rem; text-align: left; border-bottom: 1px solid var(--border); }
.dash-table thead th {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-muted); font-weight: 600; white-space: nowrap;
}
.dash-table tbody tr:last-child td { border-bottom: 0; }
.dash-table tbody tr:hover { background: rgba(255, 255, 255, .02); }
.dash-table .num { text-align: right; font-family: var(--mono); white-space: nowrap; }
.dash-table .mono { font-family: var(--mono); color: var(--text-muted); font-size: .82rem; }
.table-empty { text-align: center; color: var(--text-muted); padding: 1.5rem; }

@media (max-width: 640px) {
  .dash-head { align-items: flex-start; }
  .dash-meta { align-items: flex-start; text-align: left; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition-duration: 0s !important; }
}
