/* ===== Reset & Base ===== */
* {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
}
body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: #0f172a;
  background: #fff;
  line-height: 1.55;
}

/* ===== Layout Containers ===== */
.container {
  width: min(96vw, 1600px);    /* Nearly edge-to-edge */
  margin: 0 auto;
  padding: 32px 2vw;           /* Subtle breathing room */
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid #e2e8f0;
  z-index: 10;
  
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 2vw;
}
.brand {
  display: flex;
  align-items: center;
  gap: 6px;
}
.logo {
  width: 50px;
  height: 50px;
}
header .brand .name {
  color: #0a1a3b !important;
}

.brand .name {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.5rem;   /* 🔥 Increase name size */
  line-height: 1.5;     /* Optional: tighten spacing */
  color: #0a1a3b !important;
}
.brand .tagline {
  color: #475569;
  font-size: 0.95rem;
}
.nav a {
  color: #0a1a3b;
  text-decoration: none;
  margin-left: 18px;
  font-weight: 600;
}
.nav a:hover {
  text-decoration: underline;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  border-bottom: 1px solid #e2e8f0;
}
.hero .container {
  padding: 60px 2vw 80px;
}
.hero-flex {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: center;
}
.hero-title {
  font-family: Merriweather, Georgia, serif;
  font-size: clamp(1.8rem, 1.6rem + 1.5vw, 2rem);
  line-height: 1.2;
  margin: 0 0 16px;
}
.hero-subtitle {
  color: #334155;
  max-width: 900px;
  margin-bottom: 20px;
  font-size: 1.05rem;
}
.hero-cta .btn {
  margin-right: 14px;
}
.hero-photo img {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1/1;
  border-radius: 999px;
  border: 6px solid #e2e8f0;
  display: block;
  margin-left: auto;
}
.hero-gradient {
  position: absolute;
  inset: auto -10% -20% -10%;
  height: 260px;
  background: radial-gradient(1200px 260px at 50% 0%, rgba(56,189,248,0.25), transparent 60%);
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid #0a1a3b;
  transition: transform 0.08s ease, background 0.2s ease, color 0.2s ease;
}
.btn.primary {
  background: #001f3f;
  color: #fff;
}
.btn.ghost {
  color: #0a1a3b;

  background: transparent;
}
.btn:hover {
  transform: translateY(-1px);
}

/* ===== Sections ===== */
section {
  padding: 2px 0;
}
h2 {
  font-family: Merriweather, Georgia, serif;
  font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem);
  margin: 0 0 12px;
}
.section-intro {
  color: #475569;
  font-size:1.2rem;
}

/* ===== Mind Map ===== */
.map-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
  margin-top: 1.5rem;
}

#mindmap-canvas {
  width: 100%;
  height: clamp(500px, 65vh, 680px);  /* 👈 balanced responsive height */
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  cursor: default;
}


#details-panel {
  background: #f9fafb;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

#details-title {
  margin-top: 0;
  font-weight: 600;
}

#details-links a {
  display: block;
  margin-top: 4px;
  color: #0284c7;
  text-decoration: none;
}

#details-links a:hover {
  text-decoration: underline;
}

.vis-network {
  outline: none !important;
}

/* ===== Mind Map Node Emphasis ===== */



/* highlight root node background */
.vis-network .vis-node[title*="Anandit"] {
  background: #e0f2fe !important;
  border-color: #0284c7 !important;
}

@media (max-width: 980px) {
  .hero-flex {
    grid-template-columns: 1fr;
  }
  .hero-photo img {
    margin: 0 auto;
  }
  .map-layout {
    grid-template-columns: 1fr;
  }
  #details-panel {
    position: static;
  }
}

/* ===== Horizontal Timeline ===== */
.timeline-strip {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 20px 0;
  scroll-snap-type: x mandatory;
  border: none;
}
.timeline-card {
  flex: 0 0 340px;
  scroll-snap-align: center;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  background: #fff;
}
.timeline-role {
  font-weight: 700;
  margin: 0 0 6px;
}
.timeline-period {
  color: #475569;
  font-size: 0.95rem;
  margin-bottom: 6px;
}
.timeline-summary {
  margin: 0;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.45;
}
.timeline-responsibilities {
  margin-top: 8px;
  padding-left: 18px;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.45;
}

.timeline-responsibilities li {
  margin-bottom: 4px;
}

/* ===== Skills, Projects, Awards ===== */
.skills-grid,
.projects-section .grid,
.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.skill-card,
.card,
.award-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  background: #fff;
}
.skill-card h3,
.card h3,
.award-card h4 {
  margin: 0 0 8px;
}
.skill-card ul {
  margin: 0;
  padding-left: 18px;
}
.skill-card li {
  margin: 4px 0;
}
.card:hover {
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.06);
  transform: translateY(-2px);
  transition: all 0.2s ease;
}

/* ===== Contact ===== */
.contact-section .contact-actions .btn {
  margin-right: 12px;
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid #e2e8f0;
  color: #475569;
  font-size: 0.95rem;
}
.site-footer .container {
  padding: 20px 2vw;
}

/* ===== Modal ===== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
}
.modal.show {
  display: block;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.5);
}
.modal-content {
  position: relative;
  max-width: 560px;
  margin: 10vh auto;
  background: #fff;
  border-radius: 12px;
  padding: 18px 22px;
}
.modal-close {
  position: absolute;
  right: 10px;
  top: 8px;
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
}
.modal .row {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}
.modal label {
  font-weight: 600;
  margin-bottom: 6px;
}
.modal input,
.modal textarea {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}
.modal textarea {
  resize: vertical;
}
.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.muted {
  color: #64748b;
  font-size: 0.9rem;
}

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .hero-flex {
    grid-template-columns: 1fr;
  }
  .hero-photo img {
    margin: 0 auto;
  }
  .map-layout {
    grid-template-columns: 1fr;
  }
  #details-panel {
    position: static;
  }
}
/* ===== Awards & Publications (Split Layout) ===== */

/* Awards */
.awards-section {
  background: #fff;
}
.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.award-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  background: #fff;
  transition: box-shadow 0.2s ease, transform 0.08s ease;
}
.award-card:hover {
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.06);
  transform: translateY(-2px);
}
.award-card h4 {
  margin: 0 0 8px;
  color: #0f172a;
  font-weight: 700;
}
.award-card p {
  margin: 0;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.45;
}

/* Publications */
.publications-section {
  background: #f8fafc;
}
.publications-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.publications-list li {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 18px;
  line-height: 1.5;
  color: #334155;
  transition: box-shadow 0.2s ease, transform 0.08s ease;
}

.publications-list li:hover {
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.05);
  transform: translateY(-1px);
}

.publications-list li em {
  font-style: italic;
  color: #0f172a;
  font-size: 1.05rem;
  display: block;
  margin-bottom: 3px;
}

.publications-list li strong {
  color: #0f172a;
  font-weight: 700;
}

.publications-list li em {
  color: #475569;
  font-style: italic;
}
/* ===== Mind Map Node Text Wrapping ===== */
.vis-network .vis-label {
  white-space: normal !important;   /* allow wrapping */
  text-align: center !important;
  max-width: 10px;                 /* controls box width */
  line-height: 1.35;
}

/* ============================================================
   🌐 FULL MOBILE OPTIMISATION (GLOBAL BREAKPOINTS)
   ============================================================ */

@media (max-width: 880px) {

  /* ===== Header ===== */
  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 3vw;
    gap: 10px;
  }

  .brand {
    width: 100%;
    justify-content: flex-start;
    gap: 10px;
  }

  .logo {
    width: 42px;
    height: 42px;
  }

  .brand .name {
    font-size: 1.25rem;
    line-height: 1.3;
  }

  .brand .tagline {
    font-size: 0.85rem;
  }

  /* Navigation collapses into multi-line cleanly */
  .nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
  }

  .nav a {
    margin: 0;
    font-size: 0.9rem;
  }


  /* ===== Hero Section ===== */
  .hero .container {
    padding: 40px 2vw 40px;
  }

  .hero-flex {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 24px;
  }

  .hero-title {
    font-size: 1.65rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
    margin: 0 auto;
    max-width: 90%;
  }

  .hero-cta {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .hero-cta .btn {
    margin-right: 0;
    width: 100%;
    text-align: center;
    padding: 12px 18px;
  }

  .hero-photo img {
    margin: 0 auto;
    width: 65%;
    max-width: 280px;
  }


  /* ===== Buttons ===== */
  .btn {
    font-size: 0.95rem;
    padding: 10px 16px;
  }


  /* ===== Sections ===== */
  section {
    padding: 40px 0;
  }

  h2 {
    text-align: center;
    font-size: 1.4rem;
  }

  .section-intro {
    font-size: 1rem;
    text-align: center;
  }


  /* ===== Mind Map Layout ===== */
  .map-layout {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  #mindmap-canvas {
    height: 420px !important;
    border-radius: 14px;
  }

  #details-panel {
    padding: 16px;
    font-size: 0.95rem;
  }


  /* ===== Timeline ===== */
  .timeline-strip {
    padding: 10px 0 14px;
    gap: 14px;
  }

  .timeline-card {
    flex: 0 0 280px;
    padding: 14px;
  }

  .timeline-summary,
  .timeline-responsibilities,
  .timeline-period {
    font-size: 0.9rem;
  }


  /* ===== Skills / Awards / Publications Grids ===== */
  .skills-grid,
  .projects-section .grid,
  .awards-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
  }

  .skill-card,
  .award-card,
  .card {
    padding: 14px;
  }

  .publications-list li {
    padding: 12px 14px;
    font-size: 0.9rem;
  }

  .publications-list li em {
    font-size: 1rem;
  }


  /* ===== Contact Section ===== */
  .contact-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .contact-actions .btn {
    width: 100%;
  }


  /* ===== Footer ===== */
  .site-footer .container {
    text-align: center;
    font-size: 0.9rem;
  }
}



/* ============================================================
   📱 SMALL DEVICES (450px and below)
   ============================================================ */
@media (max-width: 450px) {

  /* Header */
  .logo {
    width: 36px;
    height: 36px;
  }

  .brand .name {
    font-size: 1.1rem;
  }

  .brand .tagline {
    font-size: 0.8rem;
  }

  .nav a {
    font-size: 0.85rem;
  }


  /* Hero */
  .hero-title {
    font-size: 1.4rem;
  }

  .hero-subtitle {
    font-size: 0.88rem;
  }

  .hero-photo img {
    max-width: 220px;
  }


  /* Mindmap */
  #mindmap-canvas {
    height: 360px !important;
  }


  /* Timeline */
  .timeline-card {
    flex: 0 0 250px;
  }


  /* Skills / Awards */
  .skills-grid,
  .awards-grid {
    grid-template-columns: 1fr;
  }
}
/* ============================================================
   MOBILE HAMBURGER NAVIGATION (Non-destructive)
   ============================================================ */

@media (max-width: 880px) {

  /* Hide desktop nav by default on mobile */
  .nav {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 14px 0;
    animation: menuSlide 0.25s ease;
  }

  /* When opened */
  .nav.nav-open {
    display: flex;
  }

  /* Mobile link styles */
  .nav a {
    padding: 10px 20px;
    font-size: 1rem;
    border-radius: 6px;
    margin: 0;
  }

  .nav a:hover {
    background: #f1f5f9;
  }


  /* ===== Hamburger Button ===== */
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 20;
  }

  .hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: #0a1a3b;
    border-radius: 3px;
    transition: all 0.25s ease;
  }

  /* Animate into X */
  .hamburger.open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }

  .hamburger.open span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }


  /* Animation for sliding menu */
  @keyframes menuSlide {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* Header positioning adjusted */
  .site-header .container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  /* Align brand + hamburger */
  .brand {
    flex: 1;
  }
}

/* Show normal nav on desktop */
@media (min-width: 881px) {
  .hamburger { display: none; }
}
/* ============================================================
   📱 MOBILE MINDMAP LIST (REQUIRED FOR MOBILE VERSION)
   ============================================================ */

/* Hidden by default (desktop uses vis-network) */
#mindmap-mobile {
  display: none;
}

/* MOBILE VIEW = vertical mindmap list */
@media (max-width: 600px) {

  /* Hide the desktop canvas */
  #mindmap-canvas {
    display: none !important;
  }

  /* Show the mobile list */
  #mindmap-mobile {
    display: block !important;
    width: 100%;
    background: #ffffff;
    padding: 16px;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 16px;
  }

  /* Each mobile node (list item) */
  #mindmap-mobile .mm-item {
    padding: 14px 12px;
    margin-bottom: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
  }

  #mindmap-mobile .mm-item:hover {
    background: #e0f2fe;
    border-color: #0284c7;
  }

  /* Make details panel more readable on mobile */
  #details-panel {
    font-size: 1rem;
    padding: 18px;
  }
}

/* ============================================================
   EXTRA POLISH FOR VERY SMALL DEVICES (<450px)
   ============================================================ */
@media (max-width: 450px) {
  #mindmap-mobile .mm-item {
    font-size: 0.95rem;
    padding: 12px 10px;
  }

  #details-panel {
    font-size: 0.92rem;
    padding: 16px;
  }
}
