/* ═══════════════════════════════════════════════════════════
   SATYAM KUMAR JHA — PORTFOLIO
   style.css
   ═══════════════════════════════════════════════════════════ */

/* ── CSS VARIABLES ─────────────────────────────────────────── */
:root {
  --bg:           #0a0a0a;
  --surface:      #111111;
  --surface2:     #181818;
  --accent:       #e8ff47;
  --accent2:      #ff4747;
  --text:         #f0f0f0;
  --muted:        #888;
  --border:       #222;
  --font-display: 'Syne', sans-serif;
  --font-mono:    'Space Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  overflow-x: hidden;
  cursor: none;
}

/* ── NOISE OVERLAY ──────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9997;
  opacity: 0.4;
}

/* ── CUSTOM CURSOR ──────────────────────────────────────────── */
.cursor {
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.15s ease;
  mix-blend-mode: difference;
}

.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  transition: all 0.25s ease;
  opacity: 0.5;
  mix-blend-mode: difference;
}

/* ── NAV ────────────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}

nav.scrolled {
  border-color: var(--border);
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.nav-logo span {
  color: var(--accent);
}

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

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}

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

/* ── HERO ───────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  padding: 120px 48px 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 6px 14px;
  border-radius: 2px;
  margin-bottom: 40px;
  width: fit-content;
  animation: fadeUp 0.8s ease forwards;
  opacity: 0;
}

.hero-tag .dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: blink 1.4s infinite;
}

h1.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 9rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.04em;
  animation: fadeUp 0.8s 0.15s ease forwards;
  opacity: 0;
}

h1.hero-name .line2 {
  color: var(--accent);
}

h1.hero-name .outline {
  -webkit-text-stroke: 1px var(--text);
  color: transparent;
}

.hero-sub {
  margin-top: 40px;
  max-width: 520px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.8;
  animation: fadeUp 0.8s 0.3s ease forwards;
  opacity: 0;
}

.hero-cta {
  margin-top: 48px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeUp 0.8s 0.45s ease forwards;
  opacity: 0;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  padding: 14px 32px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: none;
  transition: transform 0.2s, box-shadow 0.2s;
  display: inline-block;
}

.btn-primary:hover {
  transform: translate(-3px, -3px);
  box-shadow: 5px 5px 0 var(--accent2);
}

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 32px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: none;
  transition: border-color 0.2s, color 0.2s;
  display: inline-block;
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-stats {
  position: absolute;
  right: 48px;
  bottom: 80px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: fadeUp 0.8s 0.6s ease forwards;
  opacity: 0;
}

.stat-item {
  text-align: right;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text);
  display: block;
  line-height: 1;
}

.stat-label {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  animation: fadeUp 0.8s 0.7s ease forwards;
  opacity: 0;
}

.scroll-line {
  width: 40px;
  height: 1px;
  background: var(--muted);
  animation: lineExpand 1.5s 1s ease forwards;
  transform-origin: left;
  transform: scaleX(0);
}

/* ── MARQUEE ────────────────────────────────────────────────── */
.marquee-wrap {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  background: var(--surface);
}

.marquee-track {
  display: flex;
  gap: 0;
  animation: marquee 18s linear infinite;
  white-space: nowrap;
}

.marquee-item {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 40px;
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.marquee-item::after {
  content: '✦';
  color: var(--accent);
}

/* ── SECTIONS COMMON ────────────────────────────────────────── */
section {
  padding: 100px 48px;
}

.section-label {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-label::before {
  content: '//';
}

h2.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 60px;
}

/* ── ABOUT ──────────────────────────────────────────────────── */
#about {
  background: var(--surface);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-grid-3 {
  grid-template-columns: 1fr 280px 1fr;
  gap: 60px;
}

/* Photo Frame */
.about-photo {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 8px;
}

.photo-frame {
  position: relative;
  width: 260px;
  flex-shrink: 0;
}

.profile-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: top center;
  display: block;
  filter: grayscale(20%) contrast(1.05);
  border: 1px solid var(--border);
  transition: filter 0.4s ease;
}

.photo-frame:hover .profile-img {
  filter: grayscale(0%) contrast(1.1);
}

/* Accent corner brackets */
.photo-frame::before,
.photo-frame::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--accent);
  border-style: solid;
  z-index: 2;
  transition: width 0.3s ease, height 0.3s ease;
}

.photo-frame::before {
  top: -6px;
  left: -6px;
  border-width: 2px 0 0 2px;
}

.photo-frame::after {
  bottom: 24px;
  right: -6px;
  border-width: 0 2px 2px 0;
}

.photo-frame:hover::before,
.photo-frame:hover::after {
  width: 32px;
  height: 32px;
}

/* Glow behind photo */
.photo-frame .photo-glow {
  position: absolute;
  inset: 0;
  background: var(--accent);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s, transform 0.3s;
  transform: translate(8px, 8px);
}

.photo-frame:hover .photo-glow {
  opacity: 0.08;
}

.photo-tag {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--accent);
  color: #000;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 5px 12px;
  text-align: center;
}

.about-text p {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.9;
  margin-bottom: 20px;
}

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

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.skill-tag {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border: 1px solid var(--border);
  color: var(--muted);
  transition: all 0.2s;
}

.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.about-details {
  display: flex;
  flex-direction: column;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
}

.detail-row .label {
  color: var(--muted);
}

.detail-row .value {
  color: var(--text);
  text-align: right;
}

.detail-row .value.accent {
  color: var(--accent);
}

.link-accent {
  color: var(--accent);
  text-decoration: none;
}

.link-accent:hover {
  text-decoration: underline;
}

/* ── PROJECTS ───────────────────────────────────────────────── */
#projects {
  background: var(--bg);
}

.projects-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 40px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 40px;
  align-items: start;
  transition: border-color 0.3s, transform 0.3s;
  position: relative;
  overflow: hidden;
  cursor: none;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 0;
  opacity: 0.04;
}

.project-card:hover::before {
  transform: scaleY(1);
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateX(6px);
}

.project-card > * {
  position: relative;
  z-index: 1;
}

.project-num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: var(--border);
  line-height: 1;
  transition: color 0.3s;
}

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

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

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

.ptag {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 2px;
}

.ptag.highlight {
  border-color: var(--accent);
  color: var(--accent);
}

.project-case {
  font-size: 0.8rem;
  line-height: 1.85;
  color: var(--muted);
  max-width: 680px;
}

.project-case p strong {
  color: var(--text);
}

.case-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.case-block .case-label {
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.case-block p {
  font-size: 0.75rem;
  line-height: 1.7;
  color: var(--muted);
}

.project-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

.proj-link {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
  white-space: nowrap;
}

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

.proj-link svg {
  width: 12px;
  height: 12px;
}

/* ── EDUCATION ──────────────────────────────────────────────── */
#education {
  background: var(--surface);
}

.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2px;
}

.edu-card {
  background: var(--surface2);
  padding: 36px;
  border: 1px solid var(--border);
  transition: border-color 0.3s;
}

.edu-card:hover {
  border-color: var(--accent);
}

.edu-year {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.edu-degree {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}

.edu-inst {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ── CONTACT ────────────────────────────────────────────────── */
#contact {
  background: var(--bg);
}

.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-big {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.contact-big span {
  color: var(--accent);
}

.contact-note {
  margin-top: 24px;
  font-size: 0.8rem;
  line-height: 1.9;
  color: var(--muted);
  max-width: 400px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 40px;
}

.contact-link-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: color 0.2s;
  cursor: none;
}

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

.clr-label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.clr-arrow {
  font-size: 1.2rem;
}

/* ── FOOTER ─────────────────────────────────────────────────── */
footer {
  padding: 40px 48px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

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

/* ── SCROLL REVEAL ──────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ── ANIMATIONS ─────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes lineExpand {
  to { transform: scaleX(1); }
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  nav {
    padding: 16px 24px;
  }

  .nav-links {
    gap: 20px;
  }

  section {
    padding: 70px 24px;
  }

  #hero {
    padding: 100px 24px 100px;
  }

  .hero-stats {
    display: none;
  }

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

  .about-photo {
    order: -1;
  }

  .photo-frame {
    width: 200px;
  }

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

  .contact-wrap {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .project-card {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .project-num {
    font-size: 2rem;
  }

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

  footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .hero-scroll {
    display: none;
  }
}
