/* ============================================
   Apollo Digital Foundry — Styles
   Dark & Techy Foundry Aesthetic
   ============================================ */

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

:root {
  --bg-deep: #0a0a0f;
  --bg-card: #111118;
  --bg-card-hover: #16161f;
  --bg-nav: rgba(10, 10, 15, 0.85);
  --accent: #ff6b35;
  --accent-glow: rgba(255, 107, 53, 0.15);
  --accent-glow-strong: rgba(255, 107, 53, 0.3);
  --text-primary: #e8e8ed;
  --text-secondary: #8a8a9a;
  --text-muted: #4a4a58;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 107, 53, 0.2);
  --radius: 16px;
  --radius-sm: 8px;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}


/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.logo-svg {
  flex-shrink: 0;
}

.logo-text {
  font-family: 'Helvetica Neue', 'Helvetica', Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

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

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}


/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 70%);
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  animation: pulse-glow 6s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.4; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.7; transform: translateX(-50%) scale(1.1); }
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 700px;
  z-index: 1;
}

.hero-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

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

.hero-sub {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.7;
}


/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
  background: #e85a28;
  box-shadow: 0 0 30px var(--accent-glow-strong);
  transform: translateY(-2px);
}


/* --- Sections --- */
.section {
  padding: 120px 0;
}

.section-alt {
  background: linear-gradient(180deg, var(--bg-deep) 0%, #0d0d14 50%, var(--bg-deep) 100%);
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.section-sub {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 56px;
  max-width: 480px;
}


/* --- Projects Grid --- */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.project-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: all 0.35s ease;
  overflow: hidden;
}

.project-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px var(--accent-glow);
}

.project-card.featured {
  grid-column: 1 / -1;
}

.project-card.featured .project-card-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.project-card-inner {
  padding: 32px;
}

.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.project-icon {
  flex-shrink: 0;
}

.app-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
}

.project-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
}

.project-name {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.project-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  letter-spacing: 0.02em;
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

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

.project-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: dot-pulse 2s ease-in-out infinite;
}

.muted-dot {
  background: var(--text-muted);
  animation: none;
}

@keyframes dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Placeholder cards */
.project-card.placeholder {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.04);
  background: transparent;
}

.project-card.placeholder:hover {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.01);
  box-shadow: none;
  transform: none;
}

.muted-text {
  color: var(--text-muted) !important;
}

.project-icon.muted {
  color: var(--text-muted);
}


/* --- About Section --- */
.about-content {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 20px;
}

.about-text strong {
  color: var(--text-primary);
}

.about-values {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.value-item {
  padding: 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: all 0.3s ease;
}

.value-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.value-icon {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: var(--accent);
}

.value-item h4 {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

.value-item p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}


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

.footer-content {
  text-align: center;
}

.footer-main {
  margin-bottom: 80px;
}

.footer-text {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 32px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 32px;
}

.footer-main .btn {
  font-size: 0.8rem;
}

.footer-info {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

.footer-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-info-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.copyright {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

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


/* --- Legal / Privacy Page --- */
.legal-page {
  padding: 120px 0 80px;
}

.legal-updated {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 48px;
}

.legal-content {
  max-width: 720px;
}

.legal-section {
  margin-bottom: 40px;
}

.legal-section h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.legal-section h3 {
  font-size: 1rem;
  font-weight: 500;
  margin-top: 20px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.legal-section p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 12px;
}

.legal-section ul {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-left: 20px;
  margin-bottom: 12px;
}

.legal-link {
  color: var(--accent) !important;
  transition: opacity 0.2s ease;
}

.legal-link:hover {
  opacity: 0.8;
}

.footer-simple {
  padding: 0 0 40px;
}


/* --- Scroll Reveal Animation --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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


/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-nav);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    padding: 32px 0;
    gap: 24px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .hero {
    padding: 100px 24px 60px;
    min-height: 90vh;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-sub {
    font-size: 1rem;
  }

  .section {
    padding: 80px 0;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-card.featured {
    grid-column: 1;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-info {
    flex-direction: column;
    gap: 20px;
    align-items: center;
  }

  .footer-info-item {
    align-items: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .footer {
    padding: 80px 0 32px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.8rem;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .project-card-inner {
    padding: 24px;
  }

  .logo-text {
    font-size: 0.75rem;
  }
}
