/* ============================================================
   rosslogan.net — Phase 1 stylesheet
   Lightweight, framework-free, responsive.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --bg: #0b0f14;
  --bg-alt: #0f141b;
  --surface: #141b24;
  --surface-2: #1a232e;
  --border: #263140;
  --text: #e7edf3;
  --text-muted: #9aa8b8;
  --accent: #4fd1c5;
  --accent-2: #6ea8fe;
  --danger: #ff6b6b;
  --warn: #ffc857;
  --ok: #4ade80;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --maxw: 1120px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(1200px 700px at 80% -10%, #12202b 0%, transparent 60%), var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }

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

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

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: #04231f; 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;
  padding: .72rem 1.2rem; border-radius: 999px;
  font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #052a26; }
.btn-primary:hover { background: #63e0d3; }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- 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: 9px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #05201d; 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: .94rem; font-weight: 500; transition: color .2s ease; }
.nav-menu a:hover { color: var(--text); }
.nav-cta {
  color: var(--accent) !important;
  border: 1px solid var(--border); padding: .45rem 1rem; border-radius: 999px;
}
.nav-cta:hover { border-color: var(--accent); }

.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 clamp(2rem, 5vw, 4rem); }
.hero-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.5rem; align-items: center; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .14em;
  font-size: .78rem; font-weight: 600; color: var(--accent);
  margin: 0 0 .75rem;
}
.hero h1 { margin-bottom: 1rem; }
.accent { color: var(--accent); }
.lede { color: var(--text-muted); font-size: 1.08rem; max-width: 56ch; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin: 1.5rem 0 2rem; }

.hero-stats { display: flex; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.6rem; color: var(--text); }
.hero-stats span { color: var(--text-muted); font-size: .82rem; }

/* Terminal card */
.hero-card { justify-self: end; width: 100%; max-width: 380px; }
.terminal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.terminal-bar {
  display: flex; align-items: center; gap: .4rem;
  padding: .6rem .8rem; background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.tdot { width: 11px; height: 11px; border-radius: 50%; }
.tdot.red { background: #ff5f56; } .tdot.yellow { background: #ffbd2e; } .tdot.green { background: #27c93f; }
.terminal-title { margin-left: .5rem; font-size: .78rem; color: var(--text-muted); font-family: var(--mono); }
.terminal-body { margin: 0; padding: 1.1rem; font-family: var(--mono); font-size: .85rem; line-height: 1.7; overflow-x: auto; }
.t-key { color: var(--accent-2); }
.t-ok { color: var(--ok); }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 62ch; margin-bottom: 2.25rem; }
.section-head .eyebrow { margin-bottom: .5rem; }
.section-sub { color: var(--text-muted); }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2.5rem; color: var(--text-muted); }
.about-grid p { margin: 0; }

/* ---------- Certifications ---------- */
.cert-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem;
}
.cert-card {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
  transition: border-color .2s ease, transform .2s ease;
}
.cert-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.cert-badge {
  flex: 0 0 auto; display: grid; place-items: center;
  min-width: 64px; height: 64px; padding: .3rem;
  border-radius: 12px; font-family: var(--mono); font-weight: 700; font-size: .95rem;
  background: linear-gradient(135deg, rgba(79, 209, 197, .16), rgba(110, 168, 254, .16));
  border: 1px solid var(--border); color: var(--accent); text-align: center; line-height: 1.15;
}
.cert-body h3 { margin-bottom: .25rem; font-size: 1.02rem; }
.cert-body p { margin: 0; color: var(--text-muted); font-size: .9rem; }

/* ---------- Portfolio ---------- */
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.card:hover { border-color: var(--accent-2); transform: translateY(-3px); box-shadow: var(--shadow); }
.card-media { height: 132px; position: relative; }
.card-media::after {
  content: attr(data-site); position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 2rem; font-weight: 700;
  color: rgba(255, 255, 255, .16); letter-spacing: .1em; text-transform: uppercase;
}
.card-media[data-site="01"] { background: linear-gradient(135deg, #14343a, #0f2230); }
.card-media[data-site="02"] { background: linear-gradient(135deg, #1a2740, #131a2c); }
.card-media[data-site="03"] { background: linear-gradient(135deg, #2a1f34, #171426); }
.card-media[data-site="04"] { background: linear-gradient(135deg, #10302a, #0d1f1c); }
.card-body { padding: 1.1rem 1.2rem 1.3rem; }
.card-body h3 { font-size: 1rem; margin-bottom: .35rem; }
.card-body p { color: var(--text-muted); font-size: .9rem; margin: 0 0 .8rem; }
.tag {
  display: inline-block; font-size: .74rem; font-weight: 600;
  padding: .25rem .6rem; border-radius: 999px;
  color: var(--accent); background: rgba(79, 209, 197, .1); border: 1px solid var(--border);
}

/* ---------- Dashboard ---------- */
.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; }

/* ---------- Contact ---------- */
.contact-inner { text-align: center; max-width: 46ch; }
.contact-inner p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 1.75rem 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; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { justify-self: start; max-width: 100%; }
  .cert-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }

  .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-alt); 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 { border: 0; padding: .8rem 0; }
}

@media (max-width: 520px) {
  .hero-stats { gap: 1.25rem; flex-wrap: wrap; }
  .hero-stats strong { font-size: 1.35rem; }
}

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

/* ---------- Dashboard page ---------- */
.btn-sm { 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-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; }

.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: none !important; }
}
