/* ==========================================================
   TOKENS
   ========================================================== */
:root {
  --bg: #0e1218;
  --bg-alt: #10151d;
  --panel: #171f2b;
  --panel-2: #1c2531;
  --border: #2a3444;
  --border-soft: #202a38;

  --text: #eceff4;
  --text-dim: #93a0b4;
  --text-faint: #5c6b80;

  --amber: #e8a33d;
  --amber-soft: rgba(232, 163, 61, 0.14);
  --teal: #49d3c0;
  --teal-soft: rgba(73, 211, 192, 0.14);
  --grey-status: #7c8aa0;
  --grey-status-soft: rgba(124, 138, 160, 0.14);
  --red: #ff6b6b;
  --red-soft: rgba(255, 107, 107, 0.14);

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

  --radius: 10px;
  --max-width: 1120px;
}

/* ==========================================================
   RESET / BASE
   ========================================================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

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 { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

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

code {
  font-family: var(--font-mono);
  background: var(--panel-2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* ==========================================================
   HEADER
   ========================================================== */
#site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 18, 24, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  margin-right: auto;
}

.brand-mark {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--amber);
  letter-spacing: 0.02em;
}

.brand-role {
  font-size: 12px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav {
  display: flex;
  gap: 24px;
}

.nav a {
  font-size: 14px;
  color: var(--text-dim);
  transition: color 0.15s ease;
}
.nav a:hover { color: var(--text); }

.availability {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(73, 211, 192, 0.6);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(73, 211, 192, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(73, 211, 192, 0); }
  100% { box-shadow: 0 0 0 0 rgba(73, 211, 192, 0); }
}

@media (max-width: 720px) {
  .nav { display: none; }
  .header-inner { padding: 14px 20px; }
}

/* ==========================================================
   HERO
   ========================================================== */
.hero {
  padding: 88px 0 72px;
  border-bottom: 1px solid var(--border-soft);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: start;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 18px;
  display: block;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
}

.hero-lede {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 46ch;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 20px;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--panel);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn:hover { border-color: var(--amber); transform: translateY(-1px); }

.btn-primary {
  background: var(--amber);
  color: #14100a;
  border-color: var(--amber);
  font-weight: 600;
}
.btn-primary:hover { background: #f0b25a; }

/* --- status console (hero signature element) --- */
.console {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  font-family: var(--font-mono);
  font-size: 13px;
  overflow: hidden;
}

.console-head {
  color: var(--text-faint);
  margin-bottom: 14px;
  letter-spacing: 0.04em;
}

.console-row {
  display: flex;
  align-items: baseline;
  white-space: nowrap;
  overflow: hidden;
  padding: 3px 0;
  color: var(--text-dim);
}

.console-name { color: var(--text); flex-shrink: 0; }
.console-dots { flex: 1; overflow: hidden; color: var(--border); margin: 0 6px; letter-spacing: 2px; }
.console-status { flex-shrink: 0; font-weight: 600; }

.console-cursor .console-name {
  color: var(--amber);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.status-live, .console-status.status-live { color: var(--teal); }
.status-shipped, .console-status.status-shipped { color: var(--amber); }
.status-indev, .console-status.status-indev { color: var(--amber); }
.status-proto, .console-status.status-proto { color: var(--grey-status); }
.status-todo, .console-status.status-todo { color: var(--text-faint); }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
}

/* ==========================================================
   SECTION HEADINGS
   ========================================================== */
.section { padding: 72px 0; border-bottom: 1px solid var(--border-soft); }
.section:last-of-type { border-bottom: none; }

.section-head { margin-bottom: 36px; }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 600;
}

.section-sub { color: var(--text-dim); margin-top: 8px; max-width: 60ch; }

/* ==========================================================
   PROJECT GRID
   ========================================================== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.project-card:hover { border-color: var(--amber); transform: translateY(-3px); }

.card-cover {
  aspect-ratio: 16 / 10;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border-soft);
}
.card-cover img { width: 100%; height: 100%; object-fit: cover; }

.cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--panel-2), var(--bg-alt));
  color: var(--text-faint);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

.card-meta { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
.card-status { font-weight: 600; }
.card-year { color: var(--text-faint); margin-left: auto; }

.status-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.status-dot.status-live { background: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.status-dot.status-shipped { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.status-dot.status-indev { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.status-dot.status-proto { background: var(--grey-status); box-shadow: 0 0 0 3px var(--grey-status-soft); }
.status-dot.status-todo { background: var(--text-faint); box-shadow: 0 0 0 3px var(--panel-2); }

.card-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }
.card-blurb { color: var(--text-dim); font-size: 14px; flex: 1; }

.card-tags, .skill-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  padding: 4px 9px;
  border-radius: 20px;
}

/* ==========================================================
   ABOUT
   ========================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: start;
}

.about-bio { color: var(--text-dim); font-size: 16px; max-width: 58ch; }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.panel-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.skill-group + .skill-group { margin-top: 16px; }
.skill-group-label { font-size: 12px; color: var(--text-dim); margin-bottom: 8px; font-family: var(--font-mono); }

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* ==========================================================
   FOOTER
   ========================================================== */
#site-footer { border-top: 1px solid var(--border-soft); padding: 32px 0 40px; }
.footer-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 28px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.footer-links { display: flex; gap: 18px; font-size: 14px; color: var(--text-dim); }
.footer-links a:hover { color: var(--amber); }
.footer-meta { font-size: 12px; color: var(--text-faint); font-family: var(--font-mono); }

/* ==========================================================
   PROJECT DETAIL PAGE
   ========================================================== */
.detail-wrap { max-width: 840px; margin: 0 auto; padding: 48px 28px 80px; }

.back-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 28px;
}
.back-link:hover { color: var(--amber); }

.detail-cover { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); margin-bottom: 28px; aspect-ratio: 16/8; }
.detail-cover-img { width: 100%; height: 100%; object-fit: cover; font-size: 3rem; }

.detail-title { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 600; margin: 14px 0 6px; }
.detail-role { color: var(--text-dim); margin-bottom: 16px; }
.detail-head .card-tags { margin: 16px 0; }
.detail-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

.detail-body { margin-top: 40px; display: flex; flex-direction: column; gap: 28px; }
.detail-summary { display: flex; flex-direction: column; gap: 14px; color: var(--text-dim); font-size: 16px; }
.detail-summary p { color: var(--text); }

.highlights { display: flex; flex-direction: column; gap: 10px; }
.highlights li { position: relative; padding-left: 20px; color: var(--text-dim); }
.highlights li::before { content: "→"; position: absolute; left: 0; color: var(--amber); }

.gallery { margin-top: 36px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.gallery img { border-radius: 8px; border: 1px solid var(--border); }

.not-found { text-align: center; padding: 60px 0; }
.not-found p { color: var(--text-dim); margin: 16px 0 24px; }
