/* =========================================================
   Vishnu Sreekala Kumar — Powered by Precision
   Design System: Light Theme / High Readability
   ========================================================= */

:root {
  /* --- Light Palette --- */
  --bg: #F4F7F9;              /* Light, modern off-white to reduce glare */
  --bg-panel: #FFFFFF;        /* Pure white for cards to stand out */
  --bg-alt: #E2E8F0;          /* Subtle grey for hover states/secondary backgrounds */
  --line: #CBD5E1;            /* Soft grid and border lines */
  --line-heavy: #94A3B8;      /* Stronger borders for contrast */
  
  --text: #1E293B;            /* Deep slate for high contrast primary text */
  --text-muted: #475569;      /* Medium slate for secondary text */
  
  --accent: #D98F4E;          /* Copper accent matching your SVG logo */
  --accent-hover: #b8753a;
  --accent-cyan: #2563EB;     /* Readable deep blue (replacing bright cyan) */

  /* --- Typography --- */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --container-width: 1100px;
}

/* ================= RESET & BASE ================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px; /* Large base font to ensure high readability */
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0 0 0.5em 0;
  color: var(--text);
}

p { margin: 0 0 1.2em 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ================= BACKGROUND EFFECTS ================= */
.grid-backdrop {
  position: fixed; inset: 0; z-index: -2;
  background-image: 
    linear-gradient(to right, rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}
.vignette {
  position: fixed; inset: 0; z-index: -1;
  background: radial-gradient(circle at center, transparent 30%, rgba(244, 247, 249, 0.9) 100%);
}

/* ================= NAVIGATION ================= */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: all 0.3s ease;
}
.site-nav.scrolled {
  padding: 12px 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.nav-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}

.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.95rem; /* Scaled up to avoid minute fonts */
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent-cyan); }
.nav-cta {
  background: var(--text);
  color: #fff !important;
  padding: 8px 18px;
  border-radius: 6px;
}
.nav-cta:hover { background: var(--accent-cyan); }

.nav-toggle { display: none; flex-direction: column; gap: 6px; width: 32px; }
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--text); transition: 0.3s; }

/* ================= HERO SECTION ================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 120px 24px 60px;
  max-width: var(--container-width);
  margin: 0 auto;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
  width: 100%;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.5rem;
}
.pulse-dot {
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(217, 143, 78, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(217, 143, 78, 0); }
  100% { box-shadow: 0 0 0 0 rgba(217, 143, 78, 0); }
}

.hero-title {
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.hero-tagline {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 2.5rem;
}

.hero-actions { display: flex; gap: 16px; margin-bottom: 3rem; flex-wrap: wrap; }
.btn {
  display: inline-flex; justify-content: center; align-items: center;
  padding: 14px 28px;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(217, 143, 78, 0.2); }
.btn-ghost { border: 2px solid var(--line-heavy); color: var(--text); background: var(--bg-panel); }
.btn-ghost:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); transform: translateY(-2px); }

.hero-meta {
  display: flex;
  gap: 40px;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.meta-item { display: flex; flex-direction: column; gap: 4px; }
.meta-label { font-family: var(--font-mono); font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.meta-value { font-weight: 500; display: flex; align-items: center; gap: 8px; }
.status-dot { width: 8px; height: 8px; background: #10B981; border-radius: 50%; }

/* Hero Circuit SVG Styles for Light Mode */
.circuit-svg { width: 100%; height: auto; max-width: 480px; }
.circuit-grid path { stroke: var(--line); stroke-width: 1; }
.circuit-traces path { stroke: var(--line-heavy); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.circuit-nodes circle { fill: var(--bg-panel); stroke: var(--accent-cyan); stroke-width: 2.5; }
.node-major { stroke: var(--accent) !important; fill: var(--bg-panel) !important; }
.node-core { fill: var(--accent) !important; stroke: var(--accent) !important; }
.signal-pulse { fill: var(--accent-cyan); }
.signal-pulse-alt { fill: var(--accent); }

.scroll-cue {
  position: absolute; bottom: 30px; left: 24px;
  display: flex; align-items: center; gap: 16px;
  font-family: var(--font-mono); font-size: 0.85rem; font-weight: 600; color: var(--text-muted);
}
.scroll-line { width: 60px; height: 2px; background: var(--line-heavy); position: relative; overflow: hidden; }
.scroll-line::after {
  content: ''; position: absolute; top: 0; left: 0; width: 40%; height: 100%;
  background: var(--text); animation: scroll-pan 2s infinite ease-in-out;
}
@keyframes scroll-pan {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}

/* ================= GLOBAL SECTION STYLES ================= */
.section { padding: 120px 24px; position: relative; }
.section-contact { background: var(--bg-panel); border-top: 1px solid var(--line); }
.section-inner { max-width: var(--container-width); margin: 0 auto; position: relative; }

.corner-mark {
  position: absolute; font-family: var(--font-mono); font-size: 1.2rem; color: var(--line-heavy);
}
.corner-tl { top: -20px; left: -20px; }
.corner-tr { top: -20px; right: -20px; }

.sec-label {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-bottom: 1rem;
}

.sec-title { font-size: 3rem; margin-bottom: 2rem; }
.sec-sub { font-size: 1.2rem; color: var(--text-muted); max-width: 700px; margin-bottom: 3rem; font-style: italic; }

/* Reveal Animation */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ================= ABOUT ================= */
/* Update the grid to make the image column 300px and the text column take the rest */
.about-grid { 
  display: grid; 
  grid-template-columns: 300px 1fr; 
  gap: 50px; 
  align-items: start;
}

/* Style and restrict the image size */
.profile-photo img {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--line);
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

/* Ensure it still stacks nicely on mobile phones */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
  .profile-photo img {
    max-width: 250px;
    margin: 0 auto;
    display: block;
  }
}
.about-text { font-size: 1.3rem; color: var(--text-muted); }
/* Display stats horizontally in 3 equal columns */
.stat-rail { 
  display: grid; 
  grid-template-columns: repeat(3, 1fr); 
  gap: 32px; 
  background: var(--bg-panel); 
  padding: 40px; 
  border-radius: 12px; 
  border: 1px solid var(--line); 
  box-shadow: 0 4px 12px rgba(0,0,0,0.02); 
  grid-column: 1 / -1; /* This forces it to span the full width */
  margin-top: 20px;    /* Adds a little breathing room above the box */
}
.stat { display: flex; flex-direction: column; gap: 8px; }
.stat-num { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--accent); line-height: 1; }
.stat-label { font-family: var(--font-mono); font-size: 0.95rem; font-weight: 600; color: var(--text-muted); }

/* ================= JOURNEY (TIMELINE) ================= */
.timeline { position: relative; padding-left: 32px; }
.timeline-line {
  position: absolute; top: 0; bottom: 0; left: 0; width: 3px;
  background: linear-gradient(to bottom, var(--accent) 0%, var(--line) 15%, var(--line) 100%);
}
.tl-item { position: relative; padding-bottom: 48px; }
.tl-node {
  position: absolute; left: -47px; top: 0;
  width: 32px; height: 32px;
  background: var(--bg-panel); border: 2px solid var(--accent); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 0.85rem; font-weight: 600; color: var(--accent);
}
.tl-content h3 { font-size: 1.4rem; margin-bottom: 0.5rem; }
.tl-content p { color: var(--text-muted); max-width: 650px; }

/* ================= CAREER & ACADEMICS ================= */
.career-list { display: grid; gap: 24px; }
.career-card, .academic-card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
  transition: transform 0.2s, box-shadow 0.2s;
}
.career-card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0,0,0,0.04); border-color: var(--accent-cyan); }

.career-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.career-tag { font-family: var(--font-mono); font-size: 0.85rem; font-weight: 600; background: rgba(37, 99, 235, 0.1); color: var(--accent-cyan); padding: 6px 12px; border-radius: 4px; }
.career-tag-past { background: var(--bg-alt); color: var(--text-muted); }
.career-dates { font-family: var(--font-mono); font-size: 0.95rem; font-weight: 600; color: var(--text-muted); }

.career-card h3 { font-size: 1.6rem; margin-bottom: 4px; }
.career-loc { font-family: var(--font-mono); font-size: 0.95rem; color: var(--text-muted); margin-bottom: 16px; }
.career-desc { color: var(--text-muted); max-width: 800px; }

.career-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.career-chips span {
  font-family: var(--font-mono); font-size: 0.9rem;
  background: var(--bg); border: 1px solid var(--line);
  padding: 6px 16px; border-radius: 999px; color: var(--text-muted);
}

.academic-card { display: flex; gap: 40px; }
.academic-years { font-family: var(--font-mono); font-size: 1.1rem; font-weight: 600; color: var(--accent); flex-shrink: 0; }

/* ================= PROJECTS ================= */
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.project-card {
  background: var(--bg-panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 32px; display: flex; flex-direction: column; align-items: flex-start;
  box-shadow: 0 4px 6px rgba(0,0,0,0.02); transition: all 0.2s;
}
.project-card:hover { border-color: var(--accent-cyan); box-shadow: 0 12px 24px rgba(0,0,0,0.04); transform: translateY(-4px); }

.project-tag { font-family: var(--font-mono); font-size: 0.85rem; font-weight: 600; color: var(--accent-cyan); margin-bottom: 16px; }
.project-card h3 { font-size: 1.4rem; margin-bottom: 12px; }
.project-card p { color: var(--text-muted); flex-grow: 1; }
.project-link { font-family: var(--font-mono); font-size: 1rem; font-weight: 600; color: var(--accent); margin-top: 24px; }

.project-empty {
  grid-column: 1 / -1;
  border: 2px dashed var(--line-heavy); border-radius: 12px;
  padding: 60px 24px; text-align: center; color: var(--text-muted);
}
.empty-icon { margin-bottom: 16px; color: var(--line-heavy); }

/* ================= CONTACT ================= */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.contact-card {
  display: flex; flex-direction: column; text-align: left;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 32px; transition: all 0.2s; position: relative;
}
a.contact-card:hover, button.contact-card:hover {
  border-color: var(--accent-cyan); background: var(--bg-panel); box-shadow: 0 8px 24px rgba(0,0,0,0.04); transform: translateY(-2px);
}
.contact-icon { color: var(--accent); margin-bottom: 24px; }
.contact-label { font-family: var(--font-mono); font-size: 0.9rem; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.contact-value { font-size: 1.25rem; font-weight: 600; color: var(--text); margin-bottom: 16px; }
.contact-hint { font-family: var(--font-mono); font-size: 0.9rem; color: var(--accent-cyan); font-weight: 500; }

/* ================= FOOTER ================= */
.site-footer { background: var(--text); color: var(--line); padding: 40px 24px; }
.footer-inner { max-width: var(--container-width); margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; font-family: var(--font-mono); font-size: 0.95rem; }
.footer-brand { color: #fff; font-weight: 600; }

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { display: none; }
  .about-grid, .academic-card { flex-direction: column; grid-template-columns: 1fr; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-panel); border-bottom: 1px solid var(--line);
    flex-direction: column; padding: 24px; gap: 24px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: clip-path 0.3s ease;
  }
  .nav-links.open { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
  .nav-toggle { display: flex; }
  
  .corner-mark { display: none; } /* Hide structural marks on mobile */
  .section { padding: 80px 24px; }
  .stat-rail {
    grid-template-columns: 1fr; /* Stacks them vertically on small screens */
  }
}