/* ==========================================================================
   MAIN STYLE ENTRYPOINT
   ========================================================================== */

/* Imports */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=Fira+Code:wght@400;500&display=swap');
@import url('./variables.css?v=1.0.21');
@import url('./components.css?v=1.0.21');

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

/* The [hidden] attribute must always win over author display rules
   (e.g. a flex container that is toggled hidden/visible from JS). */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
}

/* Sections Structure */
section {
  padding: var(--space-3xl) 0;
  position: relative;
}

/* One continuous surface for every section. A subtle hairline marks where
   each new section starts — no alternating color blocks.
   Drawn as a full-viewport-width pseudo-element so the divider is identical
   whether or not the section itself is width-constrained by `.container`. */
section + section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 1px;
  background: var(--border-glass);
  pointer-events: none;
}

/* The fixed navbar already reserves 70px via main's margin-top, so the hero
   only needs a small extra gap — not a full section's worth. */
#about {
  padding-top: var(--space-xl);
}

/* Container
   Only horizontal padding — using the shorthand here would zero out the
   vertical padding of any <section> that also carries `.container`. */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
  position: relative;
  z-index: 1;
}

/* Section Header Typography */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--space-2xl) auto;
}

.section-tagline {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-accent);
  letter-spacing: 1.5px;
  margin-bottom: var(--space-xs);
  display: block;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.section-title span {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Utilities */
.text-center { text-align: center; }
.text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Layout Utilities */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Cursor pointer utility for buttons */
a, button {
  cursor: pointer;
}

/* ==========================================================================
   SCROLL REVEAL
   One shared enter transition (fade + rise) applied across every section so
   the page reads as a continuous flow. Toggled by js/reveal.js.
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity var(--transition-slow),
    transform var(--transition-slow);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Gentle stagger for items inside the same grid/timeline. */
.reveal[data-reveal-delay="1"] { transition-delay: 0.08s; }
.reveal[data-reveal-delay="2"] { transition-delay: 0.16s; }
.reveal[data-reveal-delay="3"] { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Tighter vertical rhythm on small screens. */
@media (max-width: 768px) {
  section {
    padding: var(--space-2xl) 0;
  }

  #about {
    padding-top: var(--space-md);
  }

  .glass-card {
    padding: var(--space-lg);
  }
}

/* Keep the fixed-width reCAPTCHA widget within narrow contact cards. */
@media (max-width: 480px) {
  .g-recaptcha {
    transform: scale(0.85);
    transform-origin: 0 0;
  }
}
