/* ═══════════════════════════════════════════
   SANDESH PORTFOLIO — STYLE
   Aesthetic: Dark editorial, monospace accents
   ═══════════════════════════════════════════ */

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

:root {
  --bg:          #0a0a0b;
  --bg-card:     #111113;
  --bg-elevated: #18181b;
  --border:      #27272a;
  --border-light:#3f3f46;
  --text:        #fafafa;
  --text-muted:  #a1a1aa;
  --text-dim:    #71717a;
  --accent:      #22d3ee;
  --accent-2:    #a78bfa;
  --accent-3:    #34d399;
  --font-body:   'Sora', -apple-system, sans-serif;
  --font-mono:   'Space Mono', 'Courier New', monospace;
  --container:   1100px;
  --gap:         clamp(1.5rem, 4vw, 3rem);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  font-size: 15px;
}

::selection { background: var(--accent); color: var(--bg); }

/* Noise texture overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gap);
}

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

/* ─── Typography ─── */
h1, h2, h3 { line-height: 1.15; font-weight: 700; }
h2 { font-size: clamp(2rem, 5vw, 3rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.35rem); }
em { font-style: normal; background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ─── Buttons ─── */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s cubic-bezier(.4,0,.2,1);
  cursor: pointer;
  letter-spacing: 0.02em;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover {
  background: #67e8f9;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(34, 211, 238, 0.25);
}
.btn-outline {
  border: 1px solid var(--border-light);
  color: var(--text);
  background: transparent;
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ─── Section Labels ─── */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.section-title {
  margin-bottom: 3rem;
  color: var(--text);
}
.subsection-title {
  font-size: 1.4rem;
  margin-top: 4rem;
  margin-bottom: 2rem;
  color: var(--text-muted);
  font-weight: 600;
}


/* ═══════════════════════════
   NAVIGATION
   ═══════════════════════════ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(10, 10, 11, 0.75);
  border-bottom: 1px solid rgba(39, 39, 42, 0.4);
  transition: all 0.3s;
}
nav.scrolled {
  padding: 0.75rem 3rem;
  background: rgba(10, 10, 11, 0.92);
}
.nav-logo {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.03em;
}
.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--accent);
  padding: 0.5rem 1.2rem;
  border-radius: 4px;
  transition: all 0.3s;
}
.nav-cta:hover {
  background: var(--accent);
  color: var(--bg);
}
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: all 0.3s;
}


/* ═══════════════════════════
   HERO
   ═══════════════════════════ */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 8rem var(--gap) 4rem;
}

/* Subtle grid background */
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(34,211,238,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34,211,238,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 30%, transparent 100%);
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-3);
  border: 1px solid rgba(52, 211, 153, 0.3);
  padding: 0.45rem 1.2rem;
  border-radius: 100px;
  margin-bottom: 2.5rem;
  animation: fadeInDown 0.8s ease-out;
}
.pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-3);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero-title {
  font-size: clamp(3rem, 10vw, 6.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}
.hero-line { display: block; animation: fadeInUp 0.8s ease-out both; }
.hero-line:nth-child(2) { animation-delay: 0.15s; }
.hero-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--text-muted);
  max-width: 550px;
  margin: 0 auto 2.5rem;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-bottom: 2.5rem;
  animation: fadeInUp 0.8s ease-out 0.45s both;
}
.stat { text-align: center; }
.stat-num {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  font-family: var(--font-mono);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3rem;
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.hero-socials {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  animation: fadeInUp 0.8s ease-out 0.75s both;
}
.hero-socials a {
  color: var(--text-dim);
  transition: color 0.3s, transform 0.3s;
}
.hero-socials a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: fadeIn 1s ease-out 1.2s both;
}
.hero-scroll span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}


/* ═══════════════════════════
   ABOUT
   ═══════════════════════════ */
#about {
  padding: 8rem 0;
  border-top: 1px solid var(--border);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.about-text h2 {
  margin-bottom: 1.5rem;
}
.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.skill-group {
  margin-bottom: 1.5rem;
}
.skill-group h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.6rem;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.tags span {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: all 0.3s;
}
.tags span:hover {
  color: var(--accent);
  border-color: var(--accent);
}


/* ═══════════════════════════
   EXPERIENCE
   ═══════════════════════════ */
#experience {
  padding: 8rem 0;
  border-top: 1px solid var(--border);
}

.timeline {
  position: relative;
  padding-left: 2.5rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), var(--border), transparent);
}
.timeline-item {
  position: relative;
  margin-bottom: 3rem;
}
.timeline-dot {
  position: absolute;
  left: -2.5rem;
  top: 0.3rem;
  width: 9px;
  height: 9px;
  background: var(--accent);
  border-radius: 50%;
  transform: translateX(-4px);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.4);
}
.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}
.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem 2rem;
  transition: border-color 0.3s, transform 0.3s;
}
.timeline-card:hover {
  border-color: var(--border-light);
  transform: translateX(4px);
}
.timeline-role {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.timeline-company {
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0.8rem;
}
.timeline-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.timeline-tags span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.25rem 0.6rem;
  color: var(--accent);
  background: rgba(34, 211, 238, 0.08);
  border-radius: 3px;
}

/* Education */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.edu-card {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: border-color 0.3s;
}
.edu-card:hover { border-color: var(--border-light); }
.edu-icon { font-size: 1.5rem; flex-shrink: 0; margin-top: 0.1rem; }
.edu-degree { font-weight: 700; font-size: 1rem; margin-bottom: 0.2rem; }
.edu-school { font-size: 0.85rem; color: var(--accent); margin-bottom: 0.3rem; }
.edu-meta { font-size: 0.78rem; color: var(--text-dim); font-family: var(--font-mono); }


/* ═══════════════════════════
   PROJECTS
   ═══════════════════════════ */
#projects {
  padding: 8rem 0;
  border-top: 1px solid var(--border);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
}
.project-card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
}

/* Featured projects span full width */
.project-card.featured {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.project-card.featured:nth-child(even) {
  direction: rtl;
}
.project-card.featured:nth-child(even) > * {
  direction: ltr;
}

.project-img {
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 250px;
}
.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.project-card:hover .project-img img {
  transform: scale(1.04);
}

.project-info {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.project-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.6rem;
}
.project-info h3 {
  margin-bottom: 0.8rem;
}
.project-info p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  line-height: 1.65;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
}
.project-tags span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.25rem 0.6rem;
  color: var(--accent-2);
  background: rgba(167, 139, 250, 0.08);
  border-radius: 3px;
}
.project-links {
  display: flex;
  gap: 1.2rem;
}
.project-links a {
  font-size: 0.8rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}
.project-links a:hover { color: var(--accent); }


/* ═══════════════════════════
   TESTIMONIALS
   ═══════════════════════════ */
#testimonials {
  padding: 8rem 0;
  border-top: 1px solid var(--border);
}
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
  transition: border-color 0.3s, transform 0.3s;
}
.testimonial-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}
.testimonial-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}
.testimonial-card footer {
  display: flex;
  flex-direction: column;
}
.testimonial-card strong {
  font-size: 0.9rem;
  color: var(--text);
}
.testimonial-card footer span {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}


/* ═══════════════════════════
   CONTACT
   ═══════════════════════════ */
#contact {
  padding: 8rem 0;
  border-top: 1px solid var(--border);
}
.contact-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}
.contact-content h2 {
  margin-bottom: 1rem;
}
.contact-content > p {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-size: 0.95rem;
}
.contact-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 2rem;
}
.contact-phone {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.3s;
}
.contact-phone:hover { color: var(--text); }
.contact-socials {
  display: flex;
  gap: 2rem;
  justify-content: center;
}
.contact-socials a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.3s;
}
.contact-socials a:hover { color: var(--accent); }


/* ═══════════════════════════
   FOOTER
   ═══════════════════════════ */
#footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-text {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}


/* ═══════════════════════════
   ANIMATIONS
   ═══════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(1.5); }
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 1; }
}

/* Scroll reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}


/* ═══════════════════════════
   RESPONSIVE
   ═══════════════════════════ */
@media (max-width: 900px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: block; }

  /* Mobile menu */
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    justify-content: center;
    align-items: center;
    gap: 2rem;
    z-index: 101;
  }
  .nav-links.open a {
    font-size: 1.2rem;
    color: var(--text);
  }

  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .edu-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-card.featured {
    grid-column: span 1;
    grid-template-columns: 1fr;
  }
  .project-card.featured:nth-child(even) { direction: ltr; }
  .testimonials-grid { grid-template-columns: 1fr; }

  .hero-stats { gap: 1.5rem; }
  .hero-title { font-size: clamp(2.5rem, 12vw, 4.5rem); }
  .hero-actions { flex-direction: column; align-items: center; }
}

@media (max-width: 600px) {
  body { font-size: 14px; }
  #hero { padding: 6rem 1.5rem 3rem; }
  .hero-stats { flex-direction: column; gap: 1rem; }
  .stat-num { font-size: 1.4rem; }
  .timeline { padding-left: 1.5rem; }
  .timeline-dot { left: -1.5rem; }
  .timeline-card { padding: 1.2rem; }
  .project-info { padding: 1.5rem; }
  .testimonial-card { padding: 1.5rem; }
}