/* ===================================================
   VIVEK SHARMA PORTFOLIO — "Neural Terminal" Theme
   Fonts: DM Serif Display + IBM Plex Mono + Space Grotesk
   Palette: Obsidian bg · Electric Cyan accent · Amber alt
   =================================================== */

/* ─── CSS Variables ─────────────────────────────── */
:root {
  --bg:          #080c10;
  --bg-2:        #0d1117;
  --bg-3:        #111820;
  --surface:     #131b24;
  --surface-2:   #1a2535;
  --border:      rgba(0, 245, 212, 0.12);
  --border-2:    rgba(0, 245, 212, 0.25);

  --cyan:        #00f5d4;
  --cyan-dim:    rgba(0, 245, 212, 0.15);
  --cyan-glow:   rgba(0, 245, 212, 0.4);
  --amber:       #f5a623;
  --red:         #ff4757;

  --text:        #e2e8f0;
  --text-muted:  #6b7e99;
  --text-dim:    #3d5166;

  --font-display: 'DM Serif Display', Georgia, serif;
  --font-mono:    'IBM Plex Mono', 'Courier New', monospace;
  --font-body:    'Space Grotesk', sans-serif;

  --radius:      8px;
  --radius-lg:   16px;
  --transition:  0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
strong { color: var(--cyan); font-weight: 600; }
button { cursor: none; border: none; background: none; }

/* ─── Custom Cursor ─────────────────────────────── */
.cursor,
.cursor-trail {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: screen;
  transition: transform var(--transition);
}
.cursor {
  width: 10px; height: 10px;
  background: var(--cyan);
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, opacity 0.2s;
}
.cursor.hover { width: 30px; height: 30px; opacity: 0.4; }
.cursor-trail {
  width: 36px; height: 36px;
  border: 1px solid var(--cyan);
  transform: translate(-50%, -50%);
  opacity: 0.3;
  transition: left 0.12s ease-out, top 0.12s ease-out;
}

/* ─── Scanlines ─────────────────────────────────── */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 245, 212, 0.012) 2px,
    rgba(0, 245, 212, 0.012) 4px
  );
}

/* ─── Container ─────────────────────────────────── */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ─── Section Shared ─────────────────────────────── */
.section { padding: 6rem 0; position: relative; }

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--cyan);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 3rem;
  color: var(--text);
}

/* ─── Scroll Animations ──────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── NAVBAR ─────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  transition: background var(--transition), backdrop-filter var(--transition), padding var(--transition);
}
.navbar.scrolled {
  background: rgba(8, 12, 16, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
}
.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.05em;
}
.logo-bracket { color: var(--cyan); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.nav-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  transition: color var(--transition);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--cyan);
  transition: width var(--transition);
}
.nav-link:hover, .nav-link:hover::after { color: var(--cyan); width: 100%; }

.cta-link {
  color: var(--cyan) !important;
  border: 1px solid var(--border-2);
  padding: 0.4rem 1rem;
  border-radius: 4px;
  transition: background var(--transition), color var(--transition) !important;
}
.cta-link:hover { background: var(--cyan-dim); }
.cta-link::after { display: none; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  transition: transform var(--transition), opacity var(--transition);
  border-radius: 2px;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ─── HERO ───────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 6rem 0 4rem;
  overflow: hidden;
}

.neural-canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  opacity: 0.75;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 2rem;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--cyan);
  letter-spacing: 0.1em;
  border: 1px solid var(--border-2);
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  margin-bottom: 2rem;
  background: rgba(0, 245, 212, 0.04);
}
.dot {
  width: 7px; height: 7px;
  background: var(--cyan);
  border-radius: 50%;
  animation: pulse-dot 1.5s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 var(--cyan-glow); }
  50% { box-shadow: 0 0 0 6px transparent; }
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 11vw, 9rem);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin-bottom: 1.2rem;
  color: var(--text);
}
.hero-name em {
  font-style: italic;
  color: var(--cyan);
  text-shadow: 0 0 60px var(--cyan-glow);
}

.hero-role {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}
.role-prefix { color: var(--amber); }

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.8;
  margin-bottom: 2.5rem;
}
.desk-br { display: none; }
@media (min-width: 900px) { .desk-br { display: block; } }

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ─── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  padding: 0.75rem 1.6rem;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: all var(--transition);
  font-weight: 500;
}
.btn-primary {
  background: var(--cyan);
  color: var(--bg);
  border-color: var(--cyan);
}
.btn-primary:hover {
  background: transparent;
  color: var(--cyan);
  box-shadow: 0 0 30px var(--cyan-glow);
}
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-2);
}
.btn-secondary:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: var(--cyan-dim);
}
.btn-ghost {
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-2);
  background: var(--surface);
}

/* Animate-in: hero elements */
.animate-in {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.7s ease forwards;
  animation-delay: var(--delay, 0s);
}
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  z-index: 2;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-dim), transparent);
  animation: scrollDrop 1.5s ease-in-out infinite;
}
@keyframes scrollDrop {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ─── ABOUT ──────────────────────────────────────── */
.about { background: var(--bg-2); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  font-size: 1.02rem;
  line-height: 1.8;
}

.about-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--cyan);
  line-height: 1;
  margin-bottom: 0.25rem;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Terminal card */
.about-terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0, 245, 212, 0.06), 0 20px 60px rgba(0, 0, 0, 0.4);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.t-dot { width: 12px; height: 12px; border-radius: 50%; }
.t-dot.red { background: #ff5f56; }
.t-dot.yellow { background: #ffbd2e; }
.t-dot.green { background: #27c93f; }
.t-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-left: auto;
}
.terminal-body {
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.9;
  max-height: 260px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-2) transparent;
}
.t-prompt { color: var(--cyan); margin-right: 0.5rem; }
.t-out { color: var(--text); padding-left: 1.2rem; margin-bottom: 0.25rem; }
.t-cursor {
  display: inline-block;
  animation: blink 1s step-end infinite;
  color: var(--cyan);
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* Interactive terminal input */
.terminal-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.5rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.terminal-input-row .t-prompt { color: var(--cyan); font-family: var(--font-mono); font-size: 0.85rem; }
.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text);
  caret-color: var(--cyan);
}
.terminal-input::placeholder { color: var(--text-dim); }
.t-line { font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.8; }
.t-out-inline { color: var(--text-muted); padding-left: 0.5rem; }
.t-hint { color: var(--cyan); font-weight: 600; }
.t-error { color: #ff4757; padding-left: 0.5rem; }
.t-success { color: var(--cyan); padding-left: 0.5rem; }
.t-cmd { color: var(--amber); }

/* Copy email badge */
.copy-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--bg);
  background: var(--cyan);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  margin-left: auto;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  letter-spacing: 0.05em;
}
.copy-badge.show { opacity: 1; transform: translateY(0); }

/* ─── SKILLS ─────────────────────────────────────── */
.skills { background: var(--bg); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.5rem;
}

.skill-category {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.skill-category:hover {
  border-color: var(--border-2);
  box-shadow: 0 0 30px rgba(0, 245, 212, 0.07);
}
.skill-cat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.skill-cat-header i { color: var(--cyan); font-size: 1rem; }

.skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.skill-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.35rem 0.8rem;
  border-radius: 4px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text);
  transition: all var(--transition);
}
.skill-tag:hover, .skill-tag.accent {
  border-color: var(--cyan);
  color: var(--cyan);
  background: var(--cyan-dim);
}

/* ─── EXPERIENCE ─────────────────────────────────── */
.experience { background: var(--bg-2); }

.timeline {
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: linear-gradient(to bottom, var(--cyan), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
}
.timeline-item:last-child { margin-bottom: 0; }

.tl-marker {
  position: absolute;
  left: -2.4rem;
  top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 2px solid var(--cyan);
  box-shadow: 0 0 12px var(--cyan-glow);
}
.tl-marker.oss {
  border-color: var(--amber);
  box-shadow: 0 0 12px rgba(245, 166, 35, 0.4);
}

.tl-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  transition: border-color var(--transition);
}
.tl-content:hover { border-color: var(--border-2); }

.tl-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.tl-header h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}
.tl-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--cyan);
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.tl-company {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.tl-points {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.tl-points li {
  font-size: 0.93rem;
  color: var(--text-muted);
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.65;
}
.tl-points li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--cyan);
  font-size: 1rem;
}

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

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 1.5rem;
}

.project-card {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}
.project-card:hover {
  border-color: var(--border-2);
  transform: translateY(-4px);
}
.project-card:hover .card-glow {
  opacity: 1;
}

.card-glow {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.card-inner { padding: 1.75rem; }

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.card-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}
.card-links { display: flex; gap: 0.75rem; }
.card-links a {
  font-size: 1rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.card-links a:hover { color: var(--cyan); }

.card-title {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.card-tags span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.35rem 0.7rem;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 3px;
}

/* ─── CONTACT ────────────────────────────────────── */
.contact {
  background: var(--bg-2);
  text-align: center;
}
.contact-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto 3rem;
  line-height: 1.8;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  max-width: 700px;
  margin: 0 auto;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.8rem 1.4rem;
  border-radius: 8px;
  background: var(--surface);
  transition: all var(--transition);
  letter-spacing: 0.03em;
  cursor: none;
  text-align: left;
  width: auto;
}
.contact-item i { color: var(--cyan); font-size: 1rem; }
.contact-item:hover {
  border-color: var(--border-2);
  color: var(--cyan);
  background: var(--cyan-dim);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 245, 212, 0.1);
}

/* ─── FOOTER ─────────────────────────────────────── */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-logo {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
}
.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.footer-socials { display: flex; gap: 1.25rem; }
.footer-socials a {
  font-size: 1.05rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-socials a:hover { color: var(--cyan); }

/* ─── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .about-card-wrap { order: -1; }
}

@media (max-width: 768px) {
  .section { padding: 4rem 0; }

  .nav-links {
    position: fixed;
    top: 0; right: -100%;
    height: 100vh;
    width: min(280px, 80vw);
    flex-direction: column;
    background: var(--bg-2);
    border-left: 1px solid var(--border);
    justify-content: center;
    gap: 2.5rem;
    transition: right var(--transition);
    z-index: 99;
    padding: 2rem;
  }
  .nav-links.open { right: 0; }
  .nav-link { font-size: 1rem; }
  .hamburger { display: flex; z-index: 101; }

  .hero { padding: 7rem 0 5rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .about-stats { gap: 1.5rem; }

  body { cursor: auto; }
  .cursor, .cursor-trail { display: none; }

  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 1.25rem; }
  .hero-ctas { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .contact-links { flex-direction: column; align-items: stretch; }
}