/* ---------------------------------------------------------
   gsonego.com — design system
   Palette: near-black + single warm accent. No neon, no glow.
--------------------------------------------------------- */

:root {
  --bg: #12141a;
  --bg-elevated: #181b22;
  --bg-elevated-2: #1e222b;
  --text: #e9e8e4;
  --text-muted: #a6a9b4;
  --text-faint: #6d7180;
  --border: #262a33;
  --border-soft: #1e222b;
  --accent: #c9973f;
  --accent-strong: #e0ac4f;
  --accent-soft: rgba(201, 151, 63, 0.14);
  --accent-text-on: #14120a;
  --danger: #d9695f;
  --success: #6fae7f;

  --font-heading: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Consolas", monospace;

  --max-width: 1100px;
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;

  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 8px 24px rgba(0, 0, 0, 0.35);
}

:root[data-theme="light"] {
  --bg: #f7f5f1;
  --bg-elevated: #ffffff;
  --bg-elevated-2: #f0ede7;
  --text: #1b1c20;
  --text-muted: #52545c;
  --text-faint: #86899;
  --border: #e3e0d9;
  --border-soft: #ece9e2;
  --accent-text-on: #14120a;
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* ---------- Reset ---------- */
* , *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: -0.01em;
}
p { margin: 0 0 1em; color: var(--text-muted); }
button { font: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--accent);
  color: var(--accent-text-on);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top 0.15s ease;
  z-index: 200;
}
.skip-link:focus { top: 12px; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(18, 20, 26, 0.82);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
:root[data-theme="light"] .site-header { background: rgba(247, 245, 241, 0.85); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}
.nav-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.nav-brand .dot { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-links a {
  font-size: 0.94rem;
  color: var(--text-muted);
  transition: color 0.15s ease;
}
.nav-links a:hover,
.nav-links a:focus-visible { color: var(--text); }
.nav-links a.current { color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 0; width: 100%; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 110px 0 90px;
  border-bottom: 1px solid var(--border-soft);
}
.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}
.hero-content { flex: 1 1 480px; }
.hero-photo-wrap { flex: 0 0 auto; }
.hero-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  box-shadow: var(--shadow-card);
}
@media (max-width: 760px) {
  .hero-photo { width: 140px; height: 140px; }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
}
.hero-eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  max-width: 18ch;
}
.hero .role {
  color: var(--accent);
  font-weight: 500;
}
.hero-pitch {
  font-size: 1.1rem;
  max-width: 62ch;
  margin-top: 18px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.94rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: var(--accent-text-on);
}
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Sections ---------- */
.section {
  padding: 84px 0;
  border-bottom: 1px solid var(--border-soft);
}
.section:last-of-type { border-bottom: none; }
.section-head {
  margin-bottom: 44px;
  max-width: 62ch;
}
.section-kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
  display: block;
}
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
}
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; } }

.interests-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.interests-list li {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.langs { margin-top: 22px; }
.langs h3 { font-size: 0.95rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; font-family: var(--font-body); font-weight: 600; }

/* ---------- Experience ---------- */
.exp-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 30px;
  box-shadow: var(--shadow-card);
}
.exp-card h3 { font-size: 1.15rem; margin-bottom: 2px; }
.exp-card .exp-meta {
  color: var(--text-faint);
  font-size: 0.88rem;
  margin-bottom: 16px;
  font-family: var(--font-mono);
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}
.tag {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border: 1px solid rgba(201, 151, 63, 0.35);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-family: var(--font-mono);
}

/* ---------- Projects ---------- */
.project-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  background: linear-gradient(155deg, var(--bg-elevated), var(--bg-elevated-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-card);
  margin-bottom: 36px;
}
@media (max-width: 760px) { .project-featured { grid-template-columns: 1fr; } }
.project-featured .badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  border: 1px solid rgba(201,151,63,0.4);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.project-featured h3 { font-size: 1.6rem; }
.project-visual {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at 30% 20%, rgba(201,151,63,0.18), transparent 55%),
    var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 2.4rem;
  letter-spacing: 0.05em;
  overflow: hidden;
}
.project-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.project-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.project-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.project-card h4 { font-size: 1rem; margin: 0; font-family: var(--font-mono); }
.project-card p { font-size: 0.9rem; margin: 0; }
.project-card .placeholder { color: var(--text-faint); font-style: italic; }
.project-card .card-link { margin-top: auto; font-size: 0.85rem; color: var(--accent); font-weight: 600; }

/* ---------- Tools teaser (home) ---------- */
.tools-teaser {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.tools-teaser h2 { margin-bottom: 8px; }
.tools-teaser p { margin-bottom: 0; max-width: 52ch; }

/* ---------- Contact ---------- */
.contact-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.contact-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  flex: 1 1 220px;
  transition: border-color 0.15s ease;
}
.contact-card:hover { border-color: var(--accent); }
.contact-card .icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-card .label { font-size: 0.78rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.05em; }
.contact-card .value { font-weight: 600; word-break: break-word; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 32px 0;
  color: var(--text-faint);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.site-footer a { color: var(--text-faint); }
.site-footer a:hover { color: var(--accent); }

/* ---------- Tools hub & tool pages ---------- */
.tools-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}
.tool-hub-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.tool-hub-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.tool-hub-card .icon { color: var(--accent); font-family: var(--font-mono); font-size: 1.5rem; }
.tool-hub-card h3 { font-size: 1.05rem; margin: 0; }
.tool-hub-card p { font-size: 0.88rem; margin: 0; }

.tool-page-head { margin-bottom: 36px; }
.tool-back { font-size: 0.85rem; color: var(--text-muted); display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; }
.tool-back:hover { color: var(--accent); }

.tool-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-card);
}
.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
@media (max-width: 760px) { .tool-grid { grid-template-columns: 1fr; } }

.field-group { margin-bottom: 18px; }
.field-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.field-row { display: flex; gap: 16px; flex-wrap: wrap; }
.field-checkbox { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--text-muted); }
.field-checkbox input { accent-color: var(--accent); width: 16px; height: 16px; }

input[type="text"], input[type="number"], select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.92rem;
}
input[type="text"]:focus, input[type="number"]:focus, select:focus {
  border-color: var(--accent);
}

.result-box {
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 18px;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.result-value {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--accent-strong);
  word-break: break-all;
}
.result-list { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.result-list .result-row {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-mono); font-size: 0.95rem;
  background: var(--bg); border: 1px solid var(--border-soft);
  padding: 10px 14px; border-radius: var(--radius-sm);
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.8rem;
  cursor: pointer;
  flex-shrink: 0;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.copy-btn.copied { border-color: var(--success); color: var(--success); }

.validity-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}
.validity-badge.valid { background: rgba(111,174,127,0.15); color: var(--success); }
.validity-badge.invalid { background: rgba(217,105,95,0.15); color: var(--danger); }

.disclaimer {
  margin-top: 20px;
  font-size: 0.82rem;
  color: var(--text-faint);
  border-left: 3px solid var(--accent);
  padding: 10px 16px;
  background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.tool-explainer h3 { font-size: 1rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.05em; font-family: var(--font-body); }
