/* ============================================================
   Jonathan Moore — Portfolio
   Systems status readout aesthetic. Dark only.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --bg: #0B0E14;
  --surface: #131822;
  --border: #232B38;
  --text: #E7E9EC;
  --text-muted: #8A93A3;
  --accent: #32de84;
  --accent-blue: #20B2AA;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --topbar-h: 48px;
  --radius: 8px;
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 16px);
}

body {
  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: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

::selection {
  background: var(--accent);
  color: var(--bg);
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Top bar ---------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-h);
  background: rgba(11, 14, 20, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  font-family: var(--font-mono);
  font-size: 13px;
}

.topbar__inner {
  max-width: 1080px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.topbar__brand {
  color: var(--text);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.topbar__brand:hover {
  text-decoration: none;
  color: var(--accent);
}

.topbar__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topbar__nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar__nav a {
  color: var(--text-muted);
  font-size: 13px;
}

.topbar__nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.topbar__nav a.is-active {
  color: var(--accent);
}

/* ---------- Status dot ---------- */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: status-pulse 2s ease-in-out infinite;
}

.status-dot--amber {
  background: var(--accent);
}

.status-dot--blue {
  background: var(--accent-blue);
}

@keyframes status-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--topbar-h) + 96px) 0 88px;
  overflow: hidden;
}

.hero-img {
  position: absolute;
  right: 0;
  top: -25%;
  height: 800px;
  opacity: .25;
}

svg {
  width: 40px;
  height: 100%;
  opacity: .5;
  transition: linear .1s;
}

svg:hover {
  opacity: 1;
}

.hero__glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 720px;
  height: 480px;
  background: radial-gradient(
    ellipse at center,
    rgb(50, 222, 132, .07) 0%,
    rgba(50, 222, 132, 0) 70%
  );
  pointer-events: none;
}

.hero__inner {
  position: relative;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.hero__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero__role {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  color: var(--accent);
  margin-top: 8px;
}

.hero__body {
  max-width: 620px;
  color: var(--text-muted);
  margin-top: 20px;
  font-size: 1.05rem;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  padding: 12px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn--primary {
  background: var(--accent);
  color: var(--bg);
  font-weight: 500;
}

.btn--primary:hover {
  background: var(--accent-blue);
}

.btn--ghost {
  border-color: var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Sections ---------- */
.section {
  padding: 72px 0;
  border-top: 1px solid var(--border);
}

.section .eyebrow {
  margin-bottom: 32px;
}

/* ---------- Process list (signature element) ---------- */
.process-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.process-track {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.process-track__header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.process-track__name {
  color: var(--text);
  font-weight: 500;
}

.process-track__meta {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 12px;
}

.process-track__list {
  list-style: none;
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.process-track__list li {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding-left: 18px;
  position: relative;
}

.process-track__list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--border);
}

/* ---------- Work cards ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.work-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.work-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text);
}

.work-card__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
}

.work-card__desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  flex-grow: 1;
}

.work-card__link {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
}

/* ---------- Skills ---------- */
.skills-grid {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skill-chip {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 14px;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.skill-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Timeline ---------- */
.timeline {
  list-style: none;
  display: grid;
  gap: 0;
}

.timeline__item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.timeline__item:first-child {
  border-top: 1px solid var(--border);
}

.timeline__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
}

.timeline__meta {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ---------- Contact ---------- */
.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
}

.contact__item {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
}

.contact__item:hover {
  color: var(--accent);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.footer__inner a {
  color: var(--text-muted);
}

.footer__inner a:hover {
  color: var(--accent);
}

/* ---------- Scroll reveal (added by JS) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .work-grid {
    grid-template-columns: 1fr;
  }
  .hero-img {
    display: none;
  }
  .topbar__nav {
    display: none;
  }
}

@media (max-width: 640px) {
  .topbar__nav a:not(.topbar__contact) {
    display: none;
  }

  .process-list {
    grid-template-columns: 1fr;
  }

  .timeline__item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .timeline__meta {
    white-space: normal;
  }

  .section {
    padding: 56px 0;
  }

  .hero {
    padding: calc(var(--topbar-h) + 64px) 0 64px;
  }
  .btn--primary, .btn--ghost {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 360px) {
  .container {
    padding: 0 16px;
  }

  .hero__ctas .btn {
    width: 100%;
    text-align: center;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .status-dot {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}