/* ============================================
   Praveen V — Portfolio
   Design: Mark-suit HUD console — gunmetal, repulsor red & gold
   ============================================ */

:root {
  --bg: #0b0705;
  --bg-panel: #170d0a;
  --bg-panel-alt: #1f1310;
  --bg-elevated: #291712;
  --line: #4a2118;
  --line-soft: #2a1611;
  --text: #f5ece2;
  --text-dim: #c7a99a;
  --text-faint: #8a6a5c;
  --accent-gold: #ffc247;
  --accent-gold-bright: #ffd873;
  --accent-red: #ff3b30;
  --accent-red-deep: #b3141c;
  --accent-amber: #ff9d2e;

  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Orbitron', var(--font-mono);

  --radius: 10px;
  --wrap: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 28px;
}

h1, h2, h3 { font-family: var(--font-display); margin: 0; letter-spacing: 0.01em; }

a { color: inherit; text-decoration: none; }

ul { margin: 0; padding: 0; list-style: none; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--accent-gold); color: #1a0f00; padding: 10px 16px; z-index: 999;
}
.skip-link:focus { left: 12px; top: 12px; }

/* faint hex/HUD grid backdrop + repulsor glow */
.grid-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px),
    radial-gradient(ellipse 60% 45% at 78% 8%, rgba(255,59,48,0.16), transparent 60%),
    radial-gradient(ellipse 50% 40% at 15% 92%, rgba(255,194,71,0.10), transparent 60%);
  background-size: 42px 42px, 42px 42px, 100% 100%, 100% 100%;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 85%);
  opacity: 0.6;
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 7, 5, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
  display: flex; align-items: center; gap: 8px; color: var(--text);
}
.brand-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff2d0, var(--accent-gold) 45%, var(--accent-red) 100%);
  box-shadow: 0 0 10px var(--accent-red), 0 0 3px var(--accent-gold-bright);
  flex-shrink: 0;
}
.brand-accent { color: var(--accent-red); }
.brand-caret { color: var(--accent-gold); animation: blink 1.1s steps(1) infinite; }

.nav { display: flex; gap: 28px; }
.nav a {
  font-family: var(--font-mono); font-size: 13px; color: var(--text-dim);
  transition: color 0.15s ease;
}
.nav a:hover, .nav a:focus-visible { color: var(--accent-gold); }

.nav-cta { font-family: var(--font-mono); font-size: 13px; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav { position: fixed; top: 64px; left: 0; right: 0; background: var(--bg-panel);
    border-bottom: 1px solid var(--line); flex-direction: column; padding: 16px 28px;
    gap: 16px; transform: translateY(-130%); transition: transform 0.25s ease; }
  .nav.open { transform: translateY(0); }
  .nav-cta { display: none; }
  .nav-toggle {
    display: flex; flex-direction: column; gap: 5px; background: none; border: 0;
    cursor: pointer; padding: 8px;
  }
  .nav-toggle span { width: 20px; height: 2px; background: var(--text); display: block; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 14px; font-weight: 600;
  padding: 11px 20px; border-radius: 6px; border: 1px solid transparent;
  cursor: pointer; transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold-bright), var(--accent-gold) 55%, var(--accent-amber));
  color: #1a0f00;
  box-shadow: 0 8px 22px -10px rgba(255, 157, 46, 0.65);
}
.btn-primary:hover { box-shadow: 0 10px 26px -8px rgba(255, 194, 71, 0.85); }
.btn-outline { border-color: var(--line); color: var(--text); }
.btn-outline:hover { border-color: var(--accent-red); color: var(--accent-red); box-shadow: 0 0 0 1px rgba(255,59,48,0.25); }
.btn-ghost { border-color: var(--line); color: var(--text-dim); font-size: 13px; padding: 8px 14px; }
.btn-ghost:hover { border-color: var(--accent-gold); color: var(--accent-gold); }

/* ---------- Hero ---------- */
.hero { position: relative; z-index: 1; padding: 88px 0 80px; }
.hero-inner {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center;
}
.eyebrow {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--accent-gold);
  display: flex; align-items: center; gap: 8px; margin: 0 0 18px; text-transform: lowercase;
}
.pulse-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff2d0, var(--accent-red) 70%);
  animation: pulse 1.8s ease-in-out infinite;
}
.hero h1 {
  font-size: clamp(38px, 5.6vw, 56px); font-weight: 800; line-height: 1.05;
  margin-bottom: 14px;
  background: linear-gradient(100deg, var(--text) 30%, var(--accent-gold-bright) 55%, var(--text) 78%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-role {
  font-family: var(--font-mono); font-size: 19px; color: var(--accent-red); font-weight: 600;
  margin: 0 0 18px;
}
.hero-role-sub { color: var(--text-faint); font-weight: 400; font-size: 15px; }
.hero-desc { color: var(--text-dim); font-size: 16.5px; max-width: 46ch; margin: 0 0 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Console */
.console {
  position: relative;
  background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 30px 70px -30px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,194,71,0.05);
}
.console::before {
  content: ''; position: absolute; top: -60px; right: -60px; width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,194,71,0.35), rgba(255,59,48,0.16) 55%, transparent 72%);
  pointer-events: none;
}
.console-head {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  background: var(--bg-panel-alt); border-bottom: 1px solid var(--line);
}
.console-dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-red { background: var(--accent-red); box-shadow: 0 0 6px rgba(255,59,48,0.7); }
.dot-amber { background: var(--accent-amber); box-shadow: 0 0 6px rgba(255,157,46,0.6); }
.dot-green { background: var(--accent-gold); box-shadow: 0 0 6px rgba(255,194,71,0.7); }
.console-title { margin-left: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }
.console-body { position: relative; z-index: 1; padding: 22px 20px 24px; font-family: var(--font-mono); font-size: 13.5px; }
.console-line { margin: 0 0 14px; color: var(--text-dim); }
.prompt { color: var(--accent-gold); margin-right: 8px; }
.console-checks li {
  padding: 5px 0; color: var(--text-dim);
  opacity: 0; transform: translateX(-6px);
}
.console-checks.animate li { animation: reveal 0.4s ease forwards; }
.console-checks li:nth-child(1) { animation-delay: 0.15s; }
.console-checks li:nth-child(2) { animation-delay: 0.5s; }
.console-checks li:nth-child(3) { animation-delay: 0.85s; }
.console-checks li:nth-child(4) { animation-delay: 1.2s; }
.console-checks li:nth-child(5) { animation-delay: 1.55s; }
.console-checks li:nth-child(6) { animation-delay: 1.9s; }
.tick { color: var(--accent-gold); font-weight: 700; margin-right: 8px; }
.tick-ready { color: var(--accent-red); }
.cursor { color: var(--accent-gold); animation: blink 1s steps(1) infinite; }

@keyframes reveal { to { opacity: 1; transform: translateX(0); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255,59,48,0.5);} 50% { opacity: 0.6; } }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
}

/* ---------- Sections ---------- */
.section { position: relative; z-index: 1; padding: 84px 0; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(23,13,10,0.55) 8%, rgba(23,13,10,0.55) 92%, transparent); }
.section-label {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--accent-gold);
  letter-spacing: 0.06em; margin: 0 0 10px;
}
.section-title { font-size: clamp(26px, 3.4vw, 36px); font-weight: 700; margin: 0 0 12px; max-width: 22ch; }
.section-sub { color: var(--text-dim); max-width: 60ch; margin: 0 0 40px; font-size: 16px; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: start; }
.about-text { color: var(--text-dim); font-size: 17px; max-width: 56ch; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stat-card {
  background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 6px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.stat-card:hover { border-color: var(--accent-red); box-shadow: 0 0 0 1px rgba(255,59,48,0.2); }
.stat-num { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--accent-gold); }
.stat-unit { font-size: 13px; color: var(--text-faint); margin-left: 4px; font-family: var(--font-mono); }
.stat-label { color: var(--text-dim); font-size: 13.5px; }

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* Skills panels */
.panel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.panel {
  background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.panel:hover { border-color: var(--accent-gold); transform: translateY(-2px); box-shadow: 0 12px 30px -18px rgba(255,194,71,0.4); }
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.panel-icon { font-size: 17px; }
.panel h3 { font-size: 14px; font-weight: 700; font-family: var(--font-mono); letter-spacing: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim);
  background: var(--bg-elevated); border: 1px solid var(--line); border-radius: 5px;
  padding: 4px 9px;
}

@media (max-width: 860px) { .panel-grid { grid-template-columns: 1fr; } }
@media (max-width: 1080px) and (min-width: 861px) { .panel-grid { grid-template-columns: repeat(2, 1fr); } }

/* Projects */
.project-list { display: flex; flex-direction: column; gap: 28px; }
.project-card {
  display: grid; grid-template-columns: 340px 1fr; gap: 36px; align-items: center;
  background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.project-card:hover { border-color: var(--accent-red); box-shadow: 0 14px 34px -20px rgba(255,59,48,0.35); }
.project-card.reverse { grid-template-columns: 1fr 340px; }
.project-card.reverse .project-diagram { order: 2; }
.project-diagram {
  background: #0a0503; border: 1px solid var(--line); border-radius: 8px; padding: 10px;
}
.diagram-svg { width: 100%; height: auto; display: block; }
.d-vpc { fill: none; stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 4 3; }
.d-vpc-alt { stroke: var(--line); }
.d-label { font-family: var(--font-mono); font-size: 9px; fill: var(--text-faint); }
.d-box { stroke: none; }
.d-box-blue { fill: rgba(255,59,48,0.16); stroke: var(--accent-red); stroke-width: 1; }
.d-box-cyan { fill: rgba(255,194,71,0.16); stroke: var(--accent-gold); stroke-width: 1; }
.d-box-amber { fill: rgba(255,157,46,0.18); stroke: var(--accent-amber); stroke-width: 1; }
.d-box-ghost { fill: var(--bg-elevated); stroke: var(--line); stroke-width: 1; }
.d-box-text { font-family: var(--font-mono); font-size: 10px; fill: var(--text); font-weight: 600; }
.d-box-text-sm { font-family: var(--font-mono); font-size: 8.5px; fill: var(--text-dim); }
.d-line { stroke: var(--text-faint); stroke-width: 1.2; }

.project-body h3 { font-size: 18px; font-weight: 700; margin-bottom: 14px; line-height: 1.35; font-family: var(--font-mono); letter-spacing: 0; }
.project-body ul { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.project-body li {
  color: var(--text-dim); font-size: 14.5px; padding-left: 18px; position: relative;
}
.project-body li::before {
  content: '›'; position: absolute; left: 0; color: var(--accent-gold); font-weight: 700;
}
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; }
.tag {
  font-family: var(--font-mono); font-size: 11px; color: var(--accent-gold-bright);
  border: 1px solid rgba(255,194,71,0.4); border-radius: 5px; padding: 3px 9px;
}

@media (max-width: 860px) {
  .project-card, .project-card.reverse { grid-template-columns: 1fr; }
  .project-card.reverse .project-diagram { order: 0; }
}

/* Timeline */
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px;
  background: linear-gradient(var(--accent-red), var(--line) 15%, var(--line) 85%, var(--accent-gold));
}
.tl-item { position: relative; padding-bottom: 44px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-node {
  position: absolute; left: -32px; top: 4px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent-red);
  box-shadow: 0 0 8px rgba(255,59,48,0.55);
}
.tl-date { font-family: var(--font-mono); font-size: 12.5px; color: var(--accent-gold); margin: 0 0 6px; }
.tl-content h3 { font-size: 17px; font-weight: 700; display: inline; margin-right: 10px; font-family: var(--font-mono); letter-spacing: 0; }
.tl-org { color: var(--text-dim); font-size: 14px; margin: 4px 0 14px; }
.tl-content ul { display: flex; flex-direction: column; gap: 8px; }
.tl-content li {
  color: var(--text-dim); font-size: 14.5px; padding-left: 18px; position: relative;
}
.tl-content li::before {
  content: '›'; position: absolute; left: 0; color: var(--accent-gold); font-weight: 700;
}
.badge {
  font-family: var(--font-mono); font-size: 10.5px; vertical-align: middle;
  color: var(--accent-red); border: 1px solid rgba(255,59,48,0.4); border-radius: 5px;
  padding: 2px 8px; display: inline-block; background: rgba(255,59,48,0.08);
}

/* Certifications */
.cert-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.cert-card {
  background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.cert-card:hover { border-color: var(--accent-gold); transform: translateY(-2px); box-shadow: 0 12px 30px -18px rgba(255,194,71,0.4); }
.cert-icon { font-size: 22px; display: block; margin-bottom: 12px; }
.cert-card h3 { font-size: 13.5px; font-weight: 700; line-height: 1.35; margin-bottom: 8px; font-family: var(--font-mono); letter-spacing: 0; }
.cert-card p { color: var(--text-faint); font-family: var(--font-mono); font-size: 12px; margin: 0; }

.edu-card {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-panel-alt); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 26px;
}
.edu-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; font-family: var(--font-mono); letter-spacing: 0; }
.edu-card p { color: var(--text-dim); font-size: 14px; margin: 0; }
.edu-year { font-family: var(--font-mono); color: var(--accent-gold); font-size: 15px; }

@media (max-width: 860px) {
  .cert-grid { grid-template-columns: 1fr 1fr; }
  .edu-card { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* Contact */
.section-cta { text-align: center; }
.contact-inner { display: flex; flex-direction: column; align-items: center; }
.section-cta .section-label,
.section-cta .section-title,
.section-cta .section-sub { text-align: center; max-width: 60ch; }
.section-cta .section-title { max-width: 26ch; }
.contact-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; width: 100%; margin-top: 12px;
}
.contact-card {
  background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 8px; text-align: left;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.contact-card:not(.contact-card-static):hover { border-color: var(--accent-red); transform: translateY(-2px); box-shadow: 0 12px 30px -18px rgba(255,59,48,0.4); }
.contact-label { font-family: var(--font-mono); font-size: 11px; color: var(--accent-gold); text-transform: lowercase; }
.contact-value { font-size: 14px; color: var(--text); word-break: break-word; }

@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .contact-grid { grid-template-columns: 1fr; } }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 26px 0; position: relative; z-index: 1; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.footer p { color: var(--text-faint); font-size: 13px; margin: 0; }
.back-top { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-dim); }
.back-top:hover { color: var(--accent-gold); }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

:focus-visible { outline: 2px solid var(--accent-gold); outline-offset: 3px; }
