/* ============================================
   SAMRIDHI GUPTA — PORTFOLIO DESIGN SYSTEM
   Rose Gold × Deep Black
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,700;1,400;1,700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* --- Design Tokens --- */
:root {
  /* Colors */
  --bg-primary: #0A0A0A;
  --bg-secondary: #111111;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --text-primary: #F2F2F2;
  --text-secondary: #CCCCCC;
  --text-muted: #888888;
  --text-dim: #555555;
  --accent: #E8A0BF;
  --accent-warm: #D4A0A0;
  --accent-light: #F0C4D8;
  --accent-glow: rgba(232, 160, 191, 0.15);
  --accent-glow-strong: rgba(232, 160, 191, 0.3);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);

  /* Typography */
  --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-accent: 'Playfair Display', Georgia, serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --space-2xl: 8rem;

  /* Effects */
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.6s cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --max-width: 1200px;
  --nav-height: 60px;
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
  min-height: 100vh;
}

/* Global ambient rose-gold glow — top-left, every page, identical atmosphere */
body::after {
  content: '';
  position: fixed;
  top: -15%;
  left: -8%;
  width: 55vw;
  height: 65vh;
  background: radial-gradient(ellipse at 20% 25%,
    rgba(232, 160, 191, 0.055) 0%,
    rgba(232, 160, 191, 0.015) 45%,
    transparent 68%);
  pointer-events: none;
  z-index: 0;
  transform: translate3d(0, 0, 0);
}

main, footer { position: relative; z-index: 1; }

/* Film Grain Overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Selection */
::selection {
  background: var(--accent);
  color: var(--bg-primary);
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
  cursor: none;
}

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

/* Lists */
ul, ol {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.1;
}

.text-accent {
  font-family: var(--font-accent);
  font-style: italic;
}

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

.text-dim {
  color: var(--text-dim);
}

/* --- Glassmorphism Navbar --- */
.navbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: calc(100% - 40px);
  max-width: var(--max-width);
  padding: 0 20px;
  transition: background 0.4s ease, border 0.4s ease,
              border-radius 0.4s ease, padding 0.4s ease,
              top 0.4s ease, backdrop-filter 0.4s ease;
}

/* Frosted pill when scrolled — JS adds .scrolled class */
.navbar.scrolled {
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50px;
  padding: 8px 24px;
  top: 12px;
}

.nav-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: none;
  transition: var(--transition-fast);
  position: relative;
}

.nav-brand:hover {
  opacity: 0.75;
}

/* Tiny "↩ home" hint that appears on hover (non-home pages) */
.nav-brand::after {
  content: '↩ home';
  position: absolute;
  bottom: -18px;
  left: 0;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  white-space: nowrap;
}

.nav-brand:hover::after {
  opacity: 0.7;
  transform: translateY(0);
}

.nav-brand-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.nav-brand-title {
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.nav-center {
  display: flex;
  align-items: center;
  gap: 6px;
  /* Solid enough to be always visible, backdrop-filter adds blur on top */
  background: rgba(22, 22, 22, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  padding: 10px 8px;
  position: relative;
  /* Soft halo */
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.04);
}

/* Very subtle halo — nearly invisible, just adds depth */
.nav-center::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 100px;
  background: radial-gradient(ellipse at center,
    rgba(255, 255, 255, 0.04) 0%,
    transparent 65%);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-secondary);
  padding: 8px 20px;
  border-radius: 50px;
  transition: var(--transition-fast);
  cursor: none;
  position: relative;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.nav-socials {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-social-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: var(--transition-fast);
  cursor: none;
}

.nav-social-link:hover {
  color: var(--text-primary);
}

.nav-social-link svg {
  width: 18px;
  height: 18px;
}

.nav-social-link .arrow {
  font-size: 0.75rem;
  transform: rotate(-45deg);
  display: inline-block;
}

/* --- Section Container --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

.section {
  padding: var(--space-2xl) 0;
}

/* --- Scroll Animations --- */
/* animate-on-scroll — GSAP handles opacity/transform for elements it targets.
   CSS class still used as a selector hook; visibility set by JS.            */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Project full cards on projects page — always visible (GSAP animates from) */
.project-full-card.animate-on-scroll {
  opacity: 1;
  transform: none;
}

/* Staggered children */
.stagger-children .animate-on-scroll:nth-child(1) { transition-delay: 0.05s; }
.stagger-children .animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.stagger-children .animate-on-scroll:nth-child(3) { transition-delay: 0.15s; }
.stagger-children .animate-on-scroll:nth-child(4) { transition-delay: 0.2s; }
.stagger-children .animate-on-scroll:nth-child(5) { transition-delay: 0.25s; }
.stagger-children .animate-on-scroll:nth-child(6) { transition-delay: 0.3s; }
.stagger-children .animate-on-scroll:nth-child(7) { transition-delay: 0.35s; }
.stagger-children .animate-on-scroll:nth-child(8) { transition-delay: 0.4s; }
.stagger-children .animate-on-scroll:nth-child(9) { transition-delay: 0.45s; }
.stagger-children .animate-on-scroll:nth-child(10) { transition-delay: 0.5s; }

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

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-column h4 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.footer-column a {
  display: block;
  font-size: 0.9rem;
  color: var(--text-dim);
  padding: 4px 0;
  transition: var(--transition-fast);
  cursor: none;
}

.footer-column a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: var(--space-xl);
}

.footer-name {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1;
}

.footer-tagline {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.footer-copyright {
  font-size: 0.75rem;
  color: var(--text-dim);
}

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

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ─── PERFORMANCE: Reduce on low-end / mobile ─ */
@media (max-width: 768px), (prefers-reduced-motion: reduce) {
  /* Disable backdrop-filter on mobile — very GPU heavy */
  .nav-center,
  .navbar.scrolled {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  /* Disable film grain on mobile */
  body::before {
    display: none;
  }

  /* Simplify cursor glow */
  .cursor-dot {
    box-shadow: 0 0 6px 2px rgba(232, 160, 191, 0.7);
  }
}
