/* ============================================
   GROWING CIRCUIT PORTFOLIO — Core Styles
   Design: Cyber-organic digital grid blueprint theme
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500;600&family=Architects+Daughter&display=swap');

/* ── Design Tokens ── */
:root {
  /* Background */
  --bg-primary: #030712;
  --bg-secondary: #0b0f19;
  --bg-forest: #0c1424; /* cyber navy */

  /* Circuit */
  --circuit-line: rgba(255, 255, 255, 0.05);
  --circuit-glow: rgba(56, 189, 248, 0.4);

  /* Section Accents */
  --cricket: #4ade80;
  --electronics: #fbbf24;
  --coding: #818cf8;
  --web-biz: #c084fc;
  --future: #f472b6;

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-dim: #64748b;

  /* Glassmorphism */
  --glass-bg: rgba(15, 23, 42, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.05);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  opacity: 0;
  transition: opacity 1s ease;
}

body.loaded {
  opacity: 1;
}

/* Dynamic layered background gradient */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(56, 189, 248, 0.02) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 30%, rgba(129, 140, 248, 0.02) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(192, 132, 252, 0.02) 0%, transparent 50%),
    linear-gradient(180deg,
      var(--bg-primary) 0%,
      var(--bg-secondary) 40%,
      var(--bg-forest) 80%,
      var(--bg-primary) 100%);
  z-index: -1;
  pointer-events: none;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.8rem); }
h4 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }

p {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: var(--text-secondary);
  max-width: 55ch;
}

/* ── Ambient Glow Overlay ── */
#ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.5s ease, background 2s ease;
}

#ambient-glow.active {
  opacity: 1;
}

#ambient-glow.glow-cricket {
  background: radial-gradient(ellipse at 30% 50%, rgba(74, 222, 128, 0.05) 0%, transparent 60%);
}
#ambient-glow.glow-electronics {
  background: radial-gradient(ellipse at 70% 50%, rgba(251, 191, 36, 0.05) 0%, transparent 60%);
}
#ambient-glow.glow-coding {
  background: radial-gradient(ellipse at 30% 50%, rgba(129, 140, 248, 0.05) 0%, transparent 60%);
}
#ambient-glow.glow-web-biz {
  background: radial-gradient(ellipse at 70% 50%, rgba(192, 132, 252, 0.05) 0%, transparent 60%);
}
#ambient-glow.glow-future {
  background: radial-gradient(ellipse at 50% 50%, rgba(244, 114, 182, 0.05) 0%, transparent 60%);
}

/* ── Particles Canvas ── */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── Section Layout ── */
.story-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 2;
  padding: 6rem 4vw;
  padding-left: 25vw; /* 25% of the screen width for left circuit timeline */
}

/* ── Hero Section ── */
.hero-section {
  justify-content: flex-start;
  text-align: left;
  min-height: 100vh;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.power-emoji {
  font-size: 4rem;
  display: block;
  filter: drop-shadow(0 0 15px rgba(56, 189, 248, 0.4));
}

.intro-text {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 300;
  color: var(--text-secondary);
  font-style: italic;
  opacity: 0.8;
}

.hero-name {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 42ch;
  text-align: center;
}

.hero-divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #38bdf8, transparent);
  border: none;
  margin: 0.5rem 0;
}

/* ── Card Positioning ── */
.story-section .card-left,
.story-section .card-right {
  margin-left: 0;
  margin-right: auto;
}

/* ── Glassmorphic Story Cards ── */
.story-card {
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2.5rem;
  max-width: 70vw;
  width: 100%;
  position: relative;
  overflow: hidden;
  opacity: 0;
}

/* Subtle top highlight for depth */
.story-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-highlight), transparent);
}

/* Card entrance slide-up */
.card-left,
.card-right,
.center-card {
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* When section is visible, reveal cards */
.story-section.visible .card-left,
.story-section.visible .card-right,
.story-section.visible .center-card {
  opacity: 1;
  transform: translateY(0);
}

/* ── Card Accent Colors ── */
.story-card[data-accent="cricket"] {
  border-top: 2px solid var(--cricket);
  box-shadow: 0 4px 60px rgba(34, 197, 94, 0.06), 0 0 0 0.5px rgba(34, 197, 94, 0.1);
}
.story-card[data-accent="electronics"] {
  border-top: 2px solid var(--electronics);
  box-shadow: 0 4px 60px rgba(245, 158, 11, 0.06), 0 0 0 0.5px rgba(245, 158, 11, 0.1);
}
.story-card[data-accent="coding"] {
  border-top: 2px solid var(--coding);
  box-shadow: 0 4px 60px rgba(59, 130, 246, 0.06), 0 0 0 0.5px rgba(59, 130, 246, 0.1);
}
.story-card[data-accent="web-biz"] {
  border-top: 2px solid var(--web-biz);
  box-shadow: 0 4px 60px rgba(168, 85, 247, 0.06), 0 0 0 0.5px rgba(168, 85, 247, 0.1);
}
.story-card[data-accent="future"] {
  border-top: 2px solid var(--future);
  box-shadow: 0 4px 60px rgba(236, 72, 153, 0.06), 0 0 0 0.5px rgba(236, 72, 153, 0.1);
}

/* ── Section Icon ── */
.section-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  display: block;
}

/* ── Card Title ── */
.card-title {
  margin-bottom: 1rem;
}

.card-subtitle {
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 0.6rem;
  opacity: 0.5;
}

/* ── Story Text ── */
.story-text {
  margin-bottom: 1.5rem;
}

.story-text p {
  margin-bottom: 0.8rem;
}

.story-text .highlight {
  color: var(--text-primary);
  font-weight: 500;
}

/* ── Photo Placeholder ── */
.photo-placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  border: 2px dashed rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.015);
  margin: 1.5rem 0;
  transition: border-color 0.4s ease, background 0.4s ease;
  cursor: default;
  overflow: hidden;
}

.photo-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.photo-placeholder:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
}

.photo-placeholder-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.25;
}

.photo-placeholder-text {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: center;
  opacity: 0.7;
}

.profile-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  aspect-ratio: 1;
  margin: 0;
}

/* ── Project Mini Cards ── */
.project-mini-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: background 0.3s ease;
}

.project-mini-card:hover {
  background: rgba(255, 255, 255, 0.04);
}

.project-mini-card h4 {
  margin-bottom: 0.6rem;
  font-size: 1.1rem;
}

.project-mini-card p {
  font-size: 0.92rem;
}

.project-mini-card .photo-placeholder {
  margin-bottom: 0;
}

/* ── Future Section ── */
.future-section {
  text-align: center;
  justify-content: center;
}

.future-card {
  max-width: 580px;
  margin: 0 auto;
}

.goals-list {
  list-style: none;
  text-align: left;
  margin: 1.5rem 0;
  padding: 0;
}

.goals-list li {
  padding: 0.6rem 0;
  padding-left: 2rem;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.goals-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--future);
  font-weight: 600;
}

/* ── Social Links ── */
.social-links {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.3rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* ── Scroll Indicator ── */
#scroll-indicator {
  position: fixed;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

#scroll-indicator.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(20px);
  pointer-events: none;
}

.scroll-text {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
}

.scroll-mouse {
  width: 22px;
  height: 34px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  position: relative;
}

.scroll-mouse::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 8px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 2px;
}

/* ── Footer Note ── */
.footer-note {
  text-align: center;
  padding: 2rem;
  font-size: 0.78rem;
  color: var(--text-dim);
  opacity: 0.5;
  position: relative;
  z-index: 2;
}

/* ── Placeholder markers for easy content replacement ── */
.placeholder-content {
  border-left: 3px solid rgba(255, 255, 255, 0.1);
  padding-left: 1rem;
  font-style: italic;
  opacity: 0.6;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
  .story-section {
    padding: 5rem 2rem;
    padding-left: 25vw;
  }

  .story-card {
    max-width: 70vw;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .story-section {
    padding: 4rem 1.2rem;
    padding-left: 1.2rem; /* no left offset on mobile — stack cards normally */
    min-height: auto;
    min-height: 100vh;
  }

  .story-card {
    max-width: 100%;
    padding: 2rem 1.5rem;
    border-radius: 20px;
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    background: rgba(15, 23, 42, 0.85);
  }

  .story-section .card-left,
  .story-section .card-right,
  .story-section .center-card {
    margin-left: 0;
    margin-right: 0;
  }

  .section-icon {
    font-size: 2rem;
  }

  .profile-photo {
    width: 130px;
    height: 130px;
  }

  .social-links {
    gap: 0.5rem;
  }

  .social-link {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .story-section {
    padding: 3rem 1rem;
  }

  .story-card {
    padding: 1.5rem 1.2rem;
    border-radius: 16px;
  }

  .project-mini-card {
    padding: 1.2rem;
  }

  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.6rem; }

  .hero-tagline {
    font-size: 0.95rem;
  }
}

/* ============================================
   WABI-SABI SCRAPBOOK & HUMAN DETAILS
   Scribbles, tapes, rotated polaroids & TODOs
   ============================================ */

/* ✏️ Handwritten Annotations */
.handwritten-note {
  font-family: 'Architects Daughter', cursive;
  font-size: 0.9rem;
  color: #a8a29e; /* soft warm grey */
  background: rgba(254, 240, 138, 0.08); /* faint yellow highlight */
  border-left: 2px solid rgba(254, 240, 138, 0.4);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  margin: 1rem 0;
  display: inline-block;
  transform: rotate(-1deg);
  line-height: 1.4;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.15);
}

.handwritten-note.accent-blue {
  color: #bae6fd;
  background: rgba(186, 230, 253, 0.08);
  border-left-color: rgba(186, 230, 253, 0.4);
  transform: rotate(1.2deg);
}

.handwritten-note.accent-pink {
  color: #fbcfe8;
  background: rgba(251, 207, 232, 0.08);
  border-left-color: rgba(251, 207, 232, 0.4);
  transform: rotate(-1.5deg);
}

/* 🖼️ Tilted Polaroid Photos */
.polaroid-photo {
  background: #f8fafc !important; /* solid white polaroid backing */
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  border-bottom-width: 24px !important; /* wider bottom margin for handwritten captions */
  border-radius: 4px !important;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25) !important;
  transform: rotate(-1.5deg);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  position: relative;
}

.polaroid-photo:hover {
  transform: rotate(1deg) scale(1.02);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.35) !important;
}

.polaroid-photo-alt {
  transform: rotate(2deg);
}

.polaroid-photo-alt:hover {
  transform: rotate(-0.5deg) scale(1.02);
}

.polaroid-caption {
  font-family: 'Architects Daughter', cursive;
  color: #475569 !important;
  font-size: 0.8rem;
  text-align: center;
  position: absolute;
  bottom: -22px;
  left: 0;
  right: 0;
  width: 100%;
}

/* 🎗️ Scotch Tape Highlight */
.tape-effect {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%) rotate(-4deg);
  width: 75px;
  height: 22px;
  background: rgba(254, 240, 138, 0.3); /* semi-translucent yellow tape */
  backdrop-filter: blur(1px);
  border-left: 1px dashed rgba(255, 255, 255, 0.4);
  border-right: 1px dashed rgba(255, 255, 255, 0.4);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  pointer-events: none;
  z-index: 100;
}

.tape-effect-left {
  left: 20%;
  transform: rotate(-15deg);
}

.tape-effect-right {
  left: 80%;
  transform: rotate(15deg);
}

/* ✏️ Imperfect Sketch Border */
.story-card {
  /* slightly irregular border radius to feel hand-cut */
  border-radius: 28px 24px 30px 26px !important;
}

/* 🐛 Fun Code Notes */
.code-doodle-comment {
  font-family: 'Architects Daughter', cursive;
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.5rem;
  display: block;
}
