/* ============================================
   Justin Lutz Portfolio — Dark Astro Theme
   Clean, elegant, fully responsive
   ============================================ */

:root {
  /* Core palette */
  --bg-deep: #05070f;
  --bg-card: #0c101c;
  --bg-elevated: #12182a;
  --bg-nav: rgba(5, 7, 15, 0.85);

  --text-primary: #e8ecf4;
  --text-secondary: #9aa3b8;
  --text-muted: #6b7389;

  --accent: #5b8def;          /* soft celestial blue */
  --accent-glow: rgba(91, 141, 239, 0.35);
  --accent-soft: #7aa2f7;
  --highlight: #c4b5fd;       /* soft purple for variety */

  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(91, 141, 239, 0.4);

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  --nav-height: 72px;
  --max-width: 1200px;
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

ul {
  list-style: none;
}

/* ========== STARFIELD BACKGROUND ========== */
.starfield {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: 
    radial-gradient(ellipse at 20% 30%, rgba(40, 60, 120, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(60, 40, 100, 0.15) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 50%, rgba(20, 30, 60, 0.1) 0%, transparent 60%),
    var(--bg-deep);
  pointer-events: none;
}

.starfield::before,
.starfield::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(1.5px 1.5px at 20px 30px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 40px 70px, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 90px 40px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 130px 80px, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 160px 30px, #fff, transparent),
    radial-gradient(2px 2px at 200px 90px, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 250px 50px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 300px 20px, rgba(255,255,255,0.9), transparent),
    radial-gradient(1px 1px at 350px 70px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 400px 40px, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 450px 90px, #fff, transparent),
    radial-gradient(2px 2px at 500px 60px, rgba(255,255,255,0.5), transparent);
  background-size: 550px 110px;
  background-repeat: repeat;
  opacity: 0.55;
  animation: drift 120s linear infinite;
}

.starfield::after {
  background-size: 700px 140px;
  opacity: 0.35;
  animation-duration: 180s;
  animation-direction: reverse;
}

@keyframes drift {
  from { transform: translateY(0); }
  to   { transform: translateY(-110px); }
}

/* ========== LAYOUT ========== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ========== NAVIGATION ========== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  background: var(--bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), box-shadow var(--transition);
}

.site-header.scrolled {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--highlight));
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  box-shadow: 0 0 16px var(--accent-glow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  padding: 0.5rem 1rem;
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-links a.active {
  color: var(--accent-soft);
}

/* Mobile menu button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: background var(--transition);
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
}

/* ========== HERO ========== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
  width: 100%;
  padding: 3rem 0 5rem;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr minmax(280px, 380px);
    gap: 3rem;
    padding: 4rem 0 6rem;
  }
}

.hero-content {
  max-width: 640px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  background: rgba(91, 141, 239, 0.12);
  border: 1px solid rgba(91, 141, 239, 0.25);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-soft);
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #ffffff 0%, #c5d0e8 60%, #8ba4d9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin-bottom: 2.25rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #4a7ae0);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--accent-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-hover);
}

/* ========== SECTION COMMON ========== */
section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section-header h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 0.6rem;
}

/* ========== FEATURE CARDS ========== */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(91, 141, 239, 0.12);
  display: grid;
  place-items: center;
  margin-bottom: 1.25rem;
  font-size: 1.4rem;
}

.feature-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  line-height: 1.65;
}

.feature-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-soft);
  transition: gap var(--transition);
}

.feature-card:hover .feature-link {
  gap: 0.55rem;
}

/* ========== QUICK STATS / HIGHLIGHTS ========== */
.highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.25rem;
  margin-top: 3rem;
}

.highlight-item {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.highlight-item .number {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-soft);
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.highlight-item .label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ========== FOOTER ========== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
  background: rgba(0, 0, 0, 0.25);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  max-width: 280px;
}

.footer-brand .logo {
  margin-bottom: 0.75rem;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--accent-soft);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-links a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.social-links a:hover {
  background: rgba(91, 141, 239, 0.15);
  border-color: var(--border-hover);
  color: var(--accent-soft);
}

/* ========== CLOUD COVER WIDGET (GOES-19) ========== */
.cloud-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  max-width: 400px;
  width: 100%;
  justify-self: end;
}

.cloud-widget-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--border);
}

.cloud-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.7);
  animation: pulse-live 2s ease-in-out infinite;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

.cloud-widget-frame {
  position: relative;
  background: #000;
  /* No fixed aspect-ratio / object-fit:cover — show the full GIF so the
     baked-in timestamp in the top-left is never cropped */
  line-height: 0;
}

.cloud-widget-frame img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
}

.cloud-widget-caption {
  padding: 0.55rem 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid var(--border);
}

@media (max-width: 899px) {
  .cloud-widget {
    justify-self: center;
    max-width: 360px;
  }
}

/* ========== MOBILE NAV ========== */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 0.25rem;
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    padding: 0.85rem 1rem;
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-grid {
    padding: 2.5rem 0 3.5rem;
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-links {
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1.15rem;
  }

  section {
    padding: 3.5rem 0;
  }
}

/* Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
