/* ═══════════════════════════════════════════════════════════
   RAJA KUMAR JHA — PORTFOLIO CSS
   Theme: Dark Data Science — Deep Navy · Teal Accent · Amber Pop
   Fonts: Syne (display) · DM Sans (body) · Space Mono (code)
═══════════════════════════════════════════════════════════ */

:root {
  --bg:        #080e1a;
  --bg-alt:    #0c1525;
  --bg-card:   #101d30;
  --bg-card2:  #0f1e33;
  --border:    rgba(56, 189, 248, 0.12);
  --border-h:  rgba(56, 189, 248, 0.35);

  --teal:      #38bdf8;
  --teal-dim:  rgba(56, 189, 248, 0.15);
  --amber:     #fbbf24;
  --amber-dim: rgba(251, 191, 36, 0.12);
  --green:     #34d399;
  --red:       #f87171;

  --text-1:    #e8f4fd;
  --text-2:    #8fb3d4;
  --text-3:    #4a7a9b;

  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'Space Mono', monospace;

  --radius:    12px;
  --radius-lg: 20px;
  --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; scroll-padding-top: 80px; }

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

.mono { font-family: var(--font-mono); }
a { text-decoration: none; color: inherit; transition: color var(--transition); }
img { max-width: 100%; }

/* ── Noise Overlay ─────────────────────────────────────── */
.noise-overlay {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' 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");
  opacity: 0.4;
}

/* ── Navbar ─────────────────────────────────────────────── */
#mainNav {
  background: rgba(8, 14, 26, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  transition: background var(--transition);
  z-index: 999;
}
#mainNav.scrolled { background: rgba(8, 14, 26, 0.97); }

.navbar-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text-1);
  letter-spacing: 0.05em;
}
.brand-bracket { color: var(--teal); }

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-2) !important;
  letter-spacing: 0.05em;
  padding: 6px 14px !important;
  border-radius: 6px;
  transition: all var(--transition);
}
.nav-link:hover { color: var(--teal) !important; background: var(--teal-dim); }

.btn-resume {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--amber) !important;
  border: 1px solid var(--amber);
  padding: 6px 16px !important;
  border-radius: 6px;
  transition: all var(--transition);
}
.btn-resume:hover { background: var(--amber-dim); }

/* Hamburger */
.navbar-toggler { border: none; background: none; padding: 4px; }
.navbar-toggler:focus { box-shadow: none; }
.toggler-icon {
  display: block; width: 22px; height: 2px;
  background: var(--text-2); margin: 5px 0;
  transition: all var(--transition);
}

/* ── Flash Messages ─────────────────────────────────────── */
.flash-container {
  position: fixed; top: 80px; right: 20px; z-index: 9999; max-width: 420px;
}
.flash-msg {
  padding: 14px 20px; border-radius: var(--radius); margin-bottom: 10px;
  font-family: var(--font-mono); font-size: 0.8rem;
  animation: slideIn 0.3s ease;
}
.flash-success { background: rgba(52, 211, 153, 0.15); border: 1px solid var(--green); color: var(--green); }
.flash-error   { background: rgba(248, 113, 113, 0.15); border: 1px solid var(--red); color: var(--red); }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── Animations ─────────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

@keyframes fadeUp {
  to { opacity: 1; transform: none; }
}

/* scroll-triggered .fade-up that haven't animated yet */
.fade-up:not(.animated) { animation: none; }
.fade-up.animated { animation: fadeUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards; }

/* ── Section Base ───────────────────────────────────────── */
.section-block   { padding: 100px 0; position: relative; }
.section-alt     { background: var(--bg-alt); }

.section-header  { margin-bottom: 56px; }
.section-number  { font-size: 0.75rem; color: var(--teal); letter-spacing: 0.15em; display: block; margin-bottom: 8px; }
.section-title   { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; color: var(--text-1); }
.section-sub     { color: var(--text-2); margin-top: 10px; font-size: 1rem; }

/* ── Hero ───────────────────────────────────────────────── */
.hero-section {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 120px 0 80px;
  position: relative;
}

.hero-container { position: relative; z-index: 1; }

.hero-hello {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--teal);
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
  color: var(--text-1);
}

.hero-tagline {
  font-size: 1.05rem;
  color: var(--text-2);
  margin-bottom: 14px;
  line-height: 1.7;
  max-width: 520px;
}
.iit-tag { color: var(--amber); font-weight: 600; }

.hero-desc {
  color: var(--text-3);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 36px;
  max-width: 500px;
}

.btn-primary-custom {
  background: var(--teal); color: var(--bg);
  font-family: var(--font-mono); font-size: 0.85rem;
  font-weight: 700; padding: 13px 26px; border-radius: 8px;
  transition: all var(--transition); letter-spacing: 0.04em;
  border: none; display: inline-block;
}
.btn-primary-custom:hover { background: #7dd3fc; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(56,189,248,0.25); color: var(--bg); }

.btn-ghost-custom {
  background: transparent; color: var(--text-2);
  font-family: var(--font-mono); font-size: 0.85rem;
  padding: 13px 26px; border-radius: 8px;
  border: 1px solid var(--border);
  transition: all var(--transition); letter-spacing: 0.04em;
  display: inline-block;
}
.btn-ghost-custom:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-dim); }

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 36px; }

.hero-socials {
  display: flex; gap: 20px; align-items: center;
}
.hero-socials a {
  color: var(--text-3); font-size: 1.25rem;
  transition: color var(--transition), transform var(--transition);
  display: flex; align-items: center;
}
.hero-socials a:hover { color: var(--teal); transform: translateY(-2px); }

/* Hero info card */
.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.hero-card-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}
.hero-card-row.last { border-bottom: none; }
.hc-label { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-3); letter-spacing: 0.06em; }
.hc-val   { font-size: 0.88rem; color: var(--text-1); font-weight: 500; text-align: right; }
.hc-val.accent { color: var(--teal); font-family: var(--font-mono); font-weight: 700; }
.open-badge {
  display: flex; align-items: center; gap: 7px;
  color: var(--green); font-size: 0.82rem;
}
.badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.75); }
}

/* ── About ──────────────────────────────────────────────── */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start;
}
.about-para { color: var(--text-2); font-size: 1.05rem; line-height: 1.9; margin-bottom: 32px; }

.about-meta { display: flex; flex-direction: column; gap: 14px; }
.meta-row   { display: flex; align-items: center; gap: 12px; color: var(--text-2); font-size: 0.9rem; }
.meta-row i { color: var(--teal); font-size: 1rem; width: 20px; }

.about-card-inner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative; overflow: hidden;
}
.about-card-inner::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--teal), var(--amber));
}
.card-label { font-size: 0.7rem; color: var(--teal); letter-spacing: 0.12em; margin-bottom: 14px; display: block; }

.course-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.course-list li { color: var(--text-2); font-size: 0.9rem; display: flex; align-items: center; gap: 12px; }
.course-code { color: var(--amber); font-size: 0.75rem; min-width: 70px; }

.focus-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.ftag {
  background: var(--teal-dim); border: 1px solid var(--border);
  color: var(--teal); font-size: 0.75rem; padding: 4px 12px; border-radius: 100px;
  font-family: var(--font-mono);
}

/* ── Skills ─────────────────────────────────────────────── */
.skills-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px;
}
.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all var(--transition);
}
.skill-card:hover { border-color: var(--border-h); transform: translateY(-3px); }

.skill-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.skill-icon { font-size: 1.4rem; }
.skill-info { flex: 1; }
.skill-name { display: block; color: var(--text-1); font-weight: 500; font-size: 0.95rem; }
.skill-category { font-size: 0.68rem; color: var(--text-3); letter-spacing: 0.1em; }
.skill-pct { font-size: 0.75rem; color: var(--teal); }

.skill-bar-track {
  height: 4px; background: rgba(56,189,248,0.1); border-radius: 2px; overflow: hidden;
}
.skill-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--amber));
  border-radius: 2px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Projects ───────────────────────────────────────────── */
.projects-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex; flex-direction: column;
  transition: all var(--transition);
  position: relative; overflow: hidden;
}
.project-card::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(56,189,248,0.04), transparent 60%);
  pointer-events: none;
}
.project-card:hover { border-color: var(--border-h); transform: translateY(-4px); box-shadow: 0 20px 60px rgba(0,0,0,0.4); }

.project-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.project-icon { font-size: 2rem; }

.project-status {
  font-family: var(--font-mono); font-size: 0.68rem;
  padding: 4px 10px; border-radius: 100px; letter-spacing: 0.08em;
}
.status-live        { background: rgba(52,211,153,0.15); color: var(--green); border: 1px solid rgba(52,211,153,0.3); }
.status-in-progress { background: rgba(251,191,36,0.12); color: var(--amber); border: 1px solid rgba(251,191,36,0.3); }
.status-completed   { background: var(--teal-dim); color: var(--teal); border: 1px solid var(--border); }

.project-title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; margin-bottom: 10px; }
.project-desc  { color: var(--text-2); font-size: 0.9rem; line-height: 1.7; flex: 1; margin-bottom: 20px; }

.project-tags  { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.ptag {
  background: rgba(56,189,248,0.07); border: 1px solid var(--border);
  color: var(--text-3); font-size: 0.7rem; padding: 3px 10px; border-radius: 4px;
  font-family: var(--font-mono);
}

.project-footer { border-top: 1px solid var(--border); padding-top: 16px; }
.project-link { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-2); transition: color var(--transition); }
.project-link:hover { color: var(--teal); }

/* ── Achievements ───────────────────────────────────────── */
.achievements-list { display: flex; flex-direction: column; gap: 24px; }
.achievement-item {
  display: flex; gap: 24px; align-items: flex-start;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  transition: all var(--transition);
}
.achievement-item:hover { border-color: var(--border-h); }

.ach-icon { font-size: 2.2rem; flex-shrink: 0; }
.ach-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 6px; flex-wrap: wrap; }
.ach-title  { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; }
.ach-date   { font-size: 0.72rem; color: var(--teal); white-space: nowrap; }
.ach-org    { font-size: 0.78rem; color: var(--amber); letter-spacing: 0.05em; margin-bottom: 10px; }
.ach-desc   { color: var(--text-2); font-size: 0.9rem; line-height: 1.7; }

/* ── Contact ────────────────────────────────────────────── */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1.5fr; gap: 56px; align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 24px; }
.contact-detail { display: flex; gap: 16px; align-items: flex-start; }
.contact-detail > i { font-size: 1.2rem; color: var(--teal); margin-top: 2px; flex-shrink: 0; }
.cd-label  { display: block; font-size: 0.65rem; color: var(--text-3); letter-spacing: 0.12em; margin-bottom: 2px; }
.cd-value  { color: var(--text-2); font-size: 0.9rem; transition: color var(--transition); }
a.cd-value:hover { color: var(--teal); }

.contact-form-wrap {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px;
  position: relative; overflow: hidden;
}
.contact-form-wrap::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--teal), var(--amber));
}

.form-group    { margin-bottom: 22px; }
.form-label    { font-size: 0.7rem; color: var(--teal); letter-spacing: 0.1em; margin-bottom: 8px; display: block; }
.custom-input  {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-1) !important;
  border-radius: 8px !important;
  padding: 12px 16px !important;
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: all var(--transition);
  width: 100%;
}
.custom-input:focus {
  background: rgba(56,189,248,0.04) !important;
  border-color: var(--teal) !important;
  box-shadow: 0 0 0 3px rgba(56,189,248,0.1) !important;
  outline: none !important;
}
.custom-input::placeholder { color: var(--text-3) !important; }

.btn-send {
  background: linear-gradient(135deg, var(--teal), #0ea5e9);
  color: var(--bg); font-family: var(--font-mono); font-size: 0.85rem;
  font-weight: 700; padding: 14px 28px; border-radius: 8px;
  border: none; width: 100%; transition: all var(--transition);
  letter-spacing: 0.04em;
}
.btn-send:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(56,189,248,0.3); }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 32px; flex-wrap: wrap; gap: 24px; }
.footer-brand .navbar-brand { font-family: var(--font-display); font-size: 1.2rem; font-weight: 800; }
.footer-sub  { color: var(--text-3); font-size: 0.85rem; margin-top: 8px; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { font-size: 1.4rem; color: var(--text-3); transition: color var(--transition); }
.footer-links a:hover { color: var(--teal); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 20px; display: flex; gap: 12px; align-items: center; color: var(--text-3); font-size: 0.75rem; }
.footer-dot { color: var(--teal); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 991px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-wrap: wrap; }
}
@media (max-width: 767px) {
  .section-block { padding: 70px 0; }
  .hero-name { font-size: clamp(2.8rem, 14vw, 4rem); }
  .hero-cta  { flex-direction: column; }
  .hero-cta .btn-primary-custom,
  .hero-cta .btn-ghost-custom { text-align: center; }
  .achievement-item { flex-direction: column; gap: 16px; }
  .stat-item { padding: 16px 20px; }
}
