/* ==========================================================================
   Dr. Suraj Shrestha — Neurology Clinic
   Design tokens: deep clinical green + warm white, EEG-line motif
   ========================================================================== */

:root {
  --bg: #FAFAF8;
  --bg-alt: #F0F5F1;
  --green-deep: #0F3B27;
  --green-mid: #1F5C3F;
  --green-accent: #6FA287;
  --green-line: #D8E3DB;
  --text: #16211B;
  --text-muted: #52655A;
  --white: #FFFFFF;

  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;

  --max-width: 1180px;
  --radius: 6px;

  --grad-hero: radial-gradient(80% 120% at 85% 15%, rgba(111, 162, 135, 0.22), transparent 60%),
               linear-gradient(165deg, #FAFAF8 0%, #EFF6F1 55%, #E4EFE8 100%);
  --grad-deep: linear-gradient(135deg, #0F3B27 0%, #1B4B33 55%, #143F2A 100%);
  --grad-accent-line: linear-gradient(90deg, var(--green-mid), var(--green-accent));
  --shadow-soft: 0 14px 34px -20px rgba(15, 59, 39, 0.28);
  --shadow-lift: 0 20px 44px -18px rgba(15, 59, 39, 0.4);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { 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);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--green-deep);
  margin: 0 0 0.4em;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 4.4vw, 3.6rem); font-weight: 500; }
h2 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; max-width: 62ch; color: var(--text); }

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

.muted { color: var(--text-muted); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease), border-color 0.25s ease, color 0.25s ease;
}

.btn-primary {
  background: var(--grad-deep);
  background-size: 160% 160%;
  background-position: 0% 50%;
  color: var(--white);
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover {
  background-position: 100% 50%;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--green-deep);
  border-color: var(--green-line);
}
.btn-ghost:hover {
  border-color: var(--green-deep);
  background: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -18px rgba(15, 59, 39, 0.3);
}
.btn-ghost:active { transform: translateY(0); }

/* ---------------- Header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--green-line);
}

.site-header::before {
  content: "";
  display: block;
  height: 3px;
  background: var(--grad-accent-line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 82px;
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--green-deep);
  font-weight: 600;
}

.brand-role {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--green-deep);
  margin: 5px 0;
}

.main-nav ul {
  display: flex;
  gap: 34px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  font-size: 0.94rem;
  color: var(--text);
  position: relative;
  padding: 4px 0;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--grad-accent-line);
  transition: width 0.3s var(--ease);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

.main-nav a:hover { color: var(--green-deep); }
.main-nav a.active { color: var(--green-deep); font-weight: 500; }

.brand { transition: opacity 0.2s ease; }
.brand:hover { opacity: 0.75; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.header-nav-wrap {
  display: flex;
  align-items: center;
  gap: 40px;
}

/* ---------------- Hero ---------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 80px;
  background: var(--grad-hero);
  border-bottom: 1px solid var(--green-line);
}

.hero .container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 560px) 1fr;
  gap: 40px;
  align-items: center;
}

.hero-eyebrow {
  font-size: 0.85rem;
  color: var(--green-mid);
  margin-bottom: 14px;
  font-weight: 500;
}

.hero h1 { margin-bottom: 20px; }
.hero h1 em { font-style: italic; color: var(--green-mid); }

.hero-sub {
  font-size: 1.08rem;
  color: var(--text-muted);
  margin-bottom: 30px;
}

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

.hero-facts {
  display: flex;
  gap: 32px;
  border-top: 1px solid var(--green-line);
  padding-top: 22px;
}

.hero-fact strong {
  display: block;
  font-family: var(--font-display);
  color: var(--green-deep);
  font-size: 1.05rem;
}
.hero-fact span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.hero-graphic {
  position: relative;
  height: 420px;
}

.eeg-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eeg-path {
  stroke: var(--green-mid);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 2400;
  stroke-dashoffset: 2400;
  animation: eeg-draw 2.6s ease-out forwards 0.3s;
}

.eeg-path-faint {
  stroke: var(--green-accent);
  opacity: 0.45;
}

@keyframes eeg-draw {
  to { stroke-dashoffset: 0; }
}

.hero-graphic-card {
  position: absolute;
  bottom: 18px;
  left: 18px;
  right: 18px;
  background: var(--white);
  border: 1px solid var(--green-line);
  border-top: 2px solid transparent;
  border-image: var(--grad-accent-line) 1;
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-soft);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.hero-graphic-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.hero-graphic-card .label {
  font-size: 0.72rem;
  text-transform: none;
  color: var(--text-muted);
}
.hero-graphic-card .value {
  font-family: var(--font-display);
  color: var(--green-deep);
  font-size: 1rem;
}

/* ---------------- Focus strip ---------------- */

.focus-strip {
  border-bottom: 1px solid var(--green-line);
  background: var(--white);
}

.focus-strip .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.focus-item {
  position: relative;
  padding: 30px 26px 28px;
  border-left: 1px solid var(--green-line);
  overflow: hidden;
  transition: background 0.3s var(--ease);
}
.focus-item:first-child { border-left: none; }

.focus-item::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad-accent-line);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.focus-item:hover::before { transform: scaleX(1); }
.focus-item:hover { background: var(--bg-alt); }

.focus-item .num {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--green-accent);
  display: block;
  margin-bottom: 8px;
}

.focus-item h3 { font-size: 1.02rem; margin-bottom: 6px; }
.focus-item p { font-size: 0.88rem; color: var(--text-muted); margin: 0; }

/* ---------------- Section shell ---------------- */

.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 46px;
  border-bottom: 1px solid var(--green-line);
  padding-bottom: 24px;
}

.section-head .kicker {
  color: var(--green-mid);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 8px;
  display: block;
}

.section-head p { margin: 0; }

/* ---------------- Timeline (education) ---------------- */

.timeline { list-style: none; margin: 0; padding: 0; }

.timeline li {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 28px;
  padding: 26px 24px;
  margin: 0 -24px;
  border-top: 1px solid var(--green-line);
  border-radius: var(--radius);
  transition: background 0.3s var(--ease), padding-left 0.3s var(--ease);
}
.timeline li:last-child { border-bottom: 1px solid var(--green-line); }
.timeline li:hover {
  background: var(--bg-alt);
}

.timeline .period {
  font-family: var(--font-display);
  color: var(--green-mid);
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.timeline li:hover .period { color: var(--green-deep); }

.timeline h3 { margin-bottom: 4px; }
.timeline .place { color: var(--text-muted); font-size: 0.92rem; margin: 0; }

/* ---------------- Skills / services grid ---------------- */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--green-line);
  border: 1px solid var(--green-line);
}

.grid-card {
  position: relative;
  background: var(--white);
  padding: 30px 28px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), z-index 0s;
}

.grid-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  z-index: 2;
}

.grid-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 34px; height: 2px;
  background: var(--grad-accent-line);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.grid-card:hover::before { transform: scaleX(1); }

.grid-card h3 { margin-bottom: 8px; font-size: 1.05rem; transition: color 0.3s ease; }
.grid-card:hover h3 { color: var(--green-mid); }
.grid-card p { font-size: 0.9rem; color: var(--text-muted); margin: 0; }

/* ---------------- Two column content ---------------- */

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: start;
}

.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li {
  padding: 14px 4px;
  border-top: 1px solid var(--green-line);
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: padding-left 0.3s var(--ease), background 0.3s var(--ease);
}
.list-plain li:last-child { border-bottom: 1px solid var(--green-line); }
.list-plain li strong { color: var(--text); font-weight: 500; }
.list-plain li:hover { padding-left: 12px; background: var(--bg-alt); }

/* ---------------- CTA band ---------------- */

.cta-band {
  position: relative;
  background: var(--grad-deep);
  color: var(--white);
  padding: 70px 0;
  overflow: hidden;
}

.cta-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 140% at 90% 0%, rgba(111, 162, 135, 0.28), transparent 65%);
  pointer-events: none;
}

.cta-band .container { position: relative; z-index: 1; }
.cta-band .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--white); margin-bottom: 6px; }
.cta-band p { color: rgba(255,255,255,0.72); margin: 0; }
.cta-band .btn-primary { background: var(--white); color: var(--green-deep); }
.cta-band .btn-primary:hover { background: var(--bg-alt); }
.cta-band .btn-ghost { border-color: rgba(255,255,255,0.4); color: var(--white); }
.cta-band .btn-ghost:hover { border-color: var(--white); }

/* ---------------- Doctor page ---------------- */

.doctor-hero {
  padding: 70px 0 60px;
  border-bottom: 1px solid var(--green-line);
  background: var(--bg-alt);
}

.doctor-hero .container {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 50px;
  align-items: center;
}

.doctor-photo {
  aspect-ratio: 4/5;
  background: var(--white);
  border: 1px solid var(--green-line);
  border-top: 3px solid transparent;
  border-image: var(--grad-accent-line) 1;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

.tag-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 22px; }
.tag {
  border: 1px solid var(--green-line);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.8rem;
  color: var(--green-mid);
  background: var(--white);
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.tag:hover {
  background: var(--grad-deep);
  color: var(--white);
  border-color: transparent;
}

.pub-list { list-style: none; margin: 0; padding: 0; }
.pub-list li {
  padding: 16px 4px;
  border-top: 1px solid var(--green-line);
  font-size: 0.93rem;
  transition: padding-left 0.3s var(--ease), background 0.3s var(--ease);
}
.pub-list li:last-child { border-bottom: 1px solid var(--green-line); }
.pub-list li:hover { padding-left: 12px; background: var(--bg-alt); }

.ref-card {
  border: 1px solid var(--green-line);
  border-radius: var(--radius);
  padding: 20px 22px;
  background: var(--white);
  margin-bottom: 14px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s ease;
}

.ref-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
  border-color: var(--green-accent);
}
.ref-card .name { font-family: var(--font-display); color: var(--green-deep); margin-bottom: 2px; }
.ref-card .role { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 6px; }
.ref-card .email { font-size: 0.85rem; color: var(--green-mid); }

/* ---------------- Gallery placeholders ---------------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery-slot {
  aspect-ratio: 4/3;
  background: var(--bg-alt);
  border: 1px dashed var(--green-line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease);
}

.gallery-slot:hover {
  background: var(--white);
  border-color: var(--green-accent);
  transform: translateY(-3px);
}

/* ---------------- Footer ---------------- */

.site-footer {
  background: var(--green-deep);
  color: rgba(255,255,255,0.85);
  padding-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 50px;
  padding-bottom: 46px;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}

.footer-grid h4 {
  color: var(--white);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}

.site-footer .brand-name { color: var(--white); }
.site-footer .brand-role { color: rgba(255,255,255,0.6); }

.footer-grid p, .footer-grid a { color: rgba(255,255,255,0.7); font-size: 0.9rem; transition: color 0.25s ease; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a:hover { color: var(--green-accent); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding: 22px 0;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------------- Placeholder notice (contact/appointment pending) ---------------- */

.pending-notice {
  border: 1px dashed var(--green-line);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  background: var(--white);
}
.pending-notice p { margin: 0 auto; }

/* ---------------- Responsive ---------------- */

@media (max-width: 960px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-graphic { height: 280px; }
  .focus-strip .container { grid-template-columns: repeat(2, 1fr); }
  .focus-item:nth-child(3) { border-left: none; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .doctor-hero .container { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 680px) {
  .container { padding: 0 20px; }
  .nav-toggle { display: block; }
  .header-nav-wrap {
    position: absolute;
    top: 82px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--green-line);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    gap: 20px;
    display: none;
  }
  .header-nav-wrap.open { display: flex; }
  .main-nav ul { flex-direction: column; gap: 14px; }
  .focus-strip .container { grid-template-columns: 1fr; }
  .focus-item { border-left: none !important; border-top: 1px solid var(--green-line); }
  .focus-item:first-child { border-top: none; }
  .grid-3 { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline li { grid-template-columns: 1fr; gap: 6px; margin: 0 -20px; padding: 20px; }
  .cta-band .container { flex-direction: column; align-items: flex-start; }
}