/* =========================================================
   SANTOSH MAJHI — PORTFOLIO CMS  |  Revamped Design System
   Palette: Deep Navy / Circuit Cyan / Amber / Slate
   Type: Space Grotesk (display) + Inter (body)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --bg:        #050D1A;
  --bg-2:      #091627;
  --bg-card:   #0B1D33;
  --bg-card-2: #0E2340;
  --cyan:      #00D4FF;
  --cyan-dim:  #007A99;
  --amber:     #F59E0B;
  --amber-dim: #78490A;
  --text:      #E8F4FD;
  --text-muted:#7A9BB8;
  --text-dim:  #3A5A78;
  --border:    rgba(0, 212, 255, 0.12);
  --border-2:  rgba(0, 212, 255, 0.25);
  --glow:      0 0 30px rgba(0, 212, 255, 0.15);
  --shadow:    0 20px 60px rgba(0, 0, 0, 0.5);
  --r:         14px;
  --r-sm:      8px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* ── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4, .brand, .spec-label {
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 700; line-height: 1.06; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; }
h4 { font-size: 0.9rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }

.eyebrow {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}

/* ── Nav ────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 7%;
  background: rgba(5, 13, 26, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 7px 13px;
  border-radius: var(--r-sm);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); background: rgba(0,212,255,0.07); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--r);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--cyan);
  color: var(--bg);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,212,255,0.35); }

.btn.ghost {
  background: transparent;
  color: var(--cyan);
  border: 1.5px solid var(--border-2);
}
.btn.ghost:hover { background: rgba(0,212,255,0.07); box-shadow: none; }

.btn.small { padding: 8px 16px; font-size: 0.82rem; }
.btn.amber { background: var(--amber); color: #0a0500; }
.btn.amber:hover { box-shadow: 0 8px 24px rgba(245,158,11,0.35); }

/* ── Circuit Hero Background ───────────────────────────── */
.hero {
  position: relative;
  min-height: 88vh;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  padding: 100px 7% 80px;
  align-items: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 30%, rgba(0,212,255,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 10% 80%, rgba(245,158,11,0.04) 0%, transparent 60%);
  pointer-events: none;
}

/* SVG circuit grid injected via JS */
.circuit-bg {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  pointer-events: none;
}

.hero-content { position: relative; z-index: 2; }
.hero-content .eyebrow { margin-bottom: 18px; }
.hero-content h1 { margin-bottom: 16px; }
.hero-content h1 em {
  font-style: normal;
  color: var(--cyan);
}
.hero-content .subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }

.hero-stats {
  display: flex;
  gap: 32px;
}
.stat { }
.stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Hero Card ──────────────────────────────────────────── */
.hero-card {
  position: relative;
  z-index: 2;
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--glow), var(--shadow);
}

.hero-card h3 {
  color: var(--cyan);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 20px;
  font-weight: 600;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.spec-row:last-child { border-bottom: none; }
.spec-row .spec-label { color: var(--text-muted); font-size: 0.8rem; }
.spec-row .spec-value { color: var(--text); font-weight: 500; }
.spec-row .spec-value .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  margin-right: 7px;
  vertical-align: middle;
}

/* ── Section Layout ─────────────────────────────────────── */
section { padding: 72px 7%; }
section.page { padding: 80px 7%; }

.section-head {
  margin-bottom: 48px;
}
.section-head h2 { margin-top: 10px; }

/* Spec line divider — engineering drawing callout motif */
.spec-line {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
}
.spec-line::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan-dim), transparent);
}

/* ── Grid / Cards ───────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; }

.card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 26px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}
.card:hover { border-color: var(--border-2); transform: translateY(-4px); box-shadow: var(--glow); }
.card:hover::before { opacity: 1; }

.card-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 14px;
}
.card .card-tag.amber-tag {
  color: var(--amber);
  background: rgba(245,158,11,0.08);
  border-color: rgba(245,158,11,0.2);
}

.card h3 { margin-bottom: 10px; }
.card p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; }
.card .tech { margin-top: 14px; font-size: 0.78rem; color: var(--cyan); font-weight: 500; }

/* ── Skills ─────────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.skill-item { }
.skill-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.88rem;
  font-weight: 500;
}
.skill-pct { font-size: 0.78rem; color: var(--text-muted); }
.bar {
  height: 5px;
  background: var(--bg-card-2);
  border-radius: 999px;
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), #00A8CC);
  border-radius: 999px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Timeline ───────────────────────────────────────────── */
.timeline { display: grid; gap: 16px; }

.timeline-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 28px 28px 28px 36px;
  position: relative;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--cyan), transparent);
  border-radius: 4px 0 0 4px;
}

.timeline-item h3 { margin-bottom: 4px; }
.timeline-meta {
  font-size: 0.82rem;
  color: var(--cyan);
  margin-bottom: 4px;
  font-weight: 500;
}
.timeline-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.timeline-item ul { display: grid; gap: 6px; }
.timeline-item li {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
  line-height: 1.55;
}
.timeline-item li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--cyan);
  font-size: 0.7rem;
  top: 3px;
}

/* ── Language Bars ──────────────────────────────────────── */
.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.lang-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 16px 18px;
}
.lang-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.88rem;
}
.lang-level { font-size: 0.75rem; color: var(--text-muted); }
.lang-dots {
  display: flex;
  gap: 5px;
}
.lang-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--bg-card-2);
  border: 1px solid var(--border-2);
}
.lang-dot.filled { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 6px var(--cyan); }

/* ── Tags ───────────────────────────────────────────────── */
.tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  margin: 4px;
  transition: border-color 0.2s, color 0.2s;
}
.tag:hover { border-color: var(--cyan); color: var(--cyan); }

/* ── Gallery ─────────────────────────────────────────────── */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.gallery-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.gallery-card:hover { transform: translateY(-4px); box-shadow: var(--glow); }
.gallery-card img { width: 100%; height: 200px; object-fit: cover; }
.placeholder {
  width: 100%;
  height: 200px;
  background: var(--bg-card-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

/* ── Form ───────────────────────────────────────────────── */
.form { max-width: 680px; }
.form p { margin-bottom: 16px; }
.form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form input,
.form textarea,
.form select {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.2s;
  outline: none;
}
.form input:focus,
.form textarea:focus { border-color: var(--cyan); }
.form textarea { resize: vertical; min-height: 130px; }

/* ── Resume Frame ────────────────────────────────────────── */
.resume-frame {
  width: 100%;
  height: 82vh;
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  margin-top: 24px;
  background: var(--bg-card);
}

/* ── Article / Blog Detail ──────────────────────────────── */
.article {
  max-width: 820px;
}
.article h2 { margin: 32px 0 12px; }
.article p { color: var(--text-muted); margin-bottom: 18px; line-height: 1.75; }
.article ul, .article ol { padding-left: 24px; margin-bottom: 18px; }
.article li { margin-bottom: 8px; color: var(--text-muted); }

/* ── Messages ───────────────────────────────────────────── */
.messages {
  padding: 14px 7%;
  background: rgba(0,212,255,0.08);
  border-bottom: 1px solid var(--border-2);
}
.messages p { font-size: 0.88rem; color: var(--cyan); }

/* ── Footer ─────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 7%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1rem;
}
.footer-links { display: flex; gap: 20px; }
.footer-links a {
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--cyan); }
.footer-copy { font-size: 0.78rem; color: var(--text-dim); }

/* ── Cert Cards ─────────────────────────────────────────── */
.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.cert-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.cert-card h3 { font-size: 0.9rem; margin-bottom: 4px; }
.cert-card p { font-size: 0.78rem; color: var(--text-muted); }

/* ── Scroll-reveal ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 70px 6% 60px;
    min-height: auto;
  }
  .hero-card { display: none; }
  section, section.page { padding: 56px 6%; }
  footer { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}

@media (max-width: 600px) {
  .nav { flex-direction: column; gap: 12px; padding: 14px 6%; }
  .nav-links { flex-wrap: wrap; justify-content: center; }
  h1 { font-size: 2.2rem; }
  .hero-stats { gap: 20px; }
  .grid, .grid-2 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, .reveal { transition: none !important; animation: none !important; }
}
