/* ==========================================================================
   Justin M. Smith — personal site
   ========================================================================== */

:root {
  --bg: #0f1115;
  --bg-alt: #151822;
  --surface: #1b1f2b;
  --surface-hover: #232838;
  --text: #eef1f7;
  --text-muted: #9aa3b5;
  --accent: #ff8a3d;
  --accent-2: #34d1bf;
  --accent-soft: rgba(255, 138, 61, 0.15);
  --border: rgba(255, 255, 255, 0.08);
  --radius: 14px;
  --font-head: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --max-width: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #12151c;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  font-weight: 600;
  z-index: 200;
}
.skip-link:focus { left: 0; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0; }

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

.muted { color: var(--text-muted); font-weight: 400; }

/* ---------------- Header / Nav ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 17, 21, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
}
.nav-logo .dot { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  background: var(--accent);
  color: #12151c !important;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600 !important;
}
.nav-cta:hover { background: #ffa561; color: #12151c !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------- Hero ---------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 120px 0 100px;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 20% 20%, #1a1e2b 0%, var(--bg) 60%);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  animation: float 12s ease-in-out infinite;
}
.blob-1 {
  width: 420px; height: 420px;
  background: var(--accent);
  top: -120px; right: -80px;
}
.blob-2 {
  width: 340px; height: 340px;
  background: var(--accent-2);
  bottom: -140px; left: -100px;
  animation-delay: -6s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -30px) scale(1.08); }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}

.hero-inner { max-width: 760px; }

.hero-eyebrow {
  color: var(--accent-2);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin: 0 0 18px;
}

.hero-title {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  margin-bottom: 20px;
}
.hero-title .accent {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-tagline {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 0 34px;
}

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

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--accent);
  color: #12151c;
}
.btn-primary:hover { background: #ffa561; }

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent-2); color: var(--accent-2); }

/* ---------------- Sections ---------------- */

.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }

.section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 44px;
}

.tag-number {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
}

/* ---------------- About ---------------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: start;
}

.about-text {
  font-size: 1.08rem;
  color: var(--text-muted);
}

.about-cards { display: grid; gap: 20px; }

.mini-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.mini-card h3 { font-size: 1rem; margin-bottom: 12px; }
.mini-card ul { margin: 0; padding-left: 18px; color: var(--text-muted); }
.mini-card li { margin-bottom: 6px; }

.pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}
.pill-progress {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---------------- Skills ---------------- */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.skill-card:hover {
  transform: translateY(-4px);
  background: var(--surface-hover);
  border-color: var(--accent-2);
}
.skill-icon { font-size: 1.4rem; line-height: 1; }
.skill-card p { margin: 0; font-size: 0.95rem; color: var(--text-muted); }

/* ---------------- Experience / Timeline ---------------- */

.timeline {
  position: relative;
  padding-left: 28px;
  border-left: 2px solid var(--border);
  display: grid;
  gap: 36px;
}

.timeline-item { position: relative; }

.timeline-marker {
  position: absolute;
  left: -34px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.timeline-date {
  color: var(--accent-2);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 6px;
}

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
}
.timeline-card h3 { font-size: 1.15rem; margin-bottom: 14px; }
.timeline-card ul { margin: 0; padding-left: 20px; color: var(--text-muted); }
.timeline-card li { margin-bottom: 6px; }

/* ---------------- Hobbies ---------------- */

.hobbies-intro {
  color: var(--text-muted);
  max-width: 600px;
  margin: -20px 0 48px;
  font-size: 1.05rem;
}

.hobby-block { margin-bottom: 64px; }
.hobby-block:last-child { margin-bottom: 0; }

.hobby-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.hobby-emoji {
  font-size: 1.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hobby-header h3 { font-size: 1.4rem; }

.hobby-block > p {
  color: var(--text-muted);
  max-width: 700px;
  margin-bottom: 26px;
  font-size: 1.02rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.gallery-item {
  position: relative;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
  background: var(--surface);
}
.gallery-item-wide { grid-column: span 2; grid-row: span 2; aspect-ratio: 4 / 3; }

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.06); }

.gallery-item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 12px;
  font-size: 0.78rem;
  color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
}

/* ---------------- Contact ---------------- */

.contact-intro { color: var(--text-muted); max-width: 560px; margin: -20px 0 40px; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
}

.contact-icon { font-size: 1.6rem; display: block; margin-bottom: 10px; }
.contact-label { color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 14px; }

.reveal-btn {
  background: var(--accent-soft);
  color: var(--accent);
  border: none;
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.2s ease;
}
.reveal-btn:hover { background: var(--accent); color: #12151c; }

.reveal-value {
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--accent-2);
}
.reveal-value.static { color: var(--text); font-weight: 500; }

.references-note { color: var(--text-muted); font-size: 0.9rem; text-align: center; }

/* ---------------- Footer ---------------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
}
.footer-inner { color: var(--text-muted); font-size: 0.85rem; text-align: center; }

/* ---------------- Responsive ---------------- */

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery-item-wide { grid-column: span 2; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 20px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links li { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav-links li:last-child { border-bottom: none; padding-top: 16px; }
  .nav-cta { display: inline-block; }
  .hero { padding: 90px 0 70px; }
  .section { padding: 64px 0; }
}

@media (max-width: 520px) {
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery-item-wide { grid-column: span 2; }
  .hero-actions { flex-direction: column; }
  .btn { text-align: center; }
}
