/* ============================================================
   sudhirshrestha.com — personal academic site
   ============================================================ */

:root {
  --color-primary:      #1B3A5C;
  --color-primary-dark: #142c47;
  --color-primary-light:#4A7FA5;
  --color-accent:       #C8960C;
  --color-accent-dark:  #a87a09;
  --color-bg:           #F7F7F5;
  --color-text:         #1A1A2E;
  --color-text-muted:   #6B7280;
  --color-surface:      #FFFFFF;
  --color-border:       #d5d9e0;

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.07);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.09);
  --container: 1100px;
  --nav-h:     68px;
  --ease: 0.18s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-accent); }
img { max-width: 100%; display: block; }
h1,h2,h3,h4 { line-height: 1.25; font-weight: 700; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section { padding: 4.5rem 0; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  transition: all var(--ease);
  cursor: pointer;
  border: none;
}
.btn-primary  { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-dark); color: #fff; }
.btn-outline  { background: transparent; border: 2px solid rgba(255,255,255,0.7); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,0.15); }
.btn-teal     { background: var(--color-primary); color: #fff; }
.btn-teal:hover { background: var(--color-primary-dark); color: #fff; }

/* NAV */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid transparent;
  transition: border-color var(--ease), box-shadow var(--ease);
  height: var(--nav-h);
}
.nav.scrolled { border-color: var(--color-border); box-shadow: var(--shadow-sm); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); }
.nav-logo { display: flex; align-items: center; }
.nav-logo img { height: 52px; width: auto; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { font-size: 0.9rem; font-weight: 500; color: var(--color-text); transition: color var(--ease); }
.nav-links a:hover { color: var(--color-primary); }
.nav-hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--color-text); border-radius: 2px; transition: all var(--ease); }
.nav-mobile { display: none; flex-direction: column; background: var(--color-surface); border-top: 1px solid var(--color-border); padding: 0.75rem 1.5rem 1rem; }
.nav-mobile a { padding: 0.5rem 0; font-size: 0.95rem; font-weight: 500; color: var(--color-text); border-bottom: 1px solid var(--color-border); }
.nav-mobile.open { display: flex; }

/* HERO */
.hero {
  position: relative;
  background: var(--color-primary);
  overflow: hidden;
}
.hero-content {
  position: relative; z-index: 2;
  color: #fff;
  padding: 4rem 0;
  display: flex;
  align-items: center;
  gap: 3rem;
}
.hero-text { flex: 1; }
.hero-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}
.hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 0.5rem; }
.hero-title { font-size: 1rem; color: rgba(255,255,255,0.82); margin-bottom: 0.25rem; }
.hero-inst  { font-size: 0.9rem; color: rgba(255,255,255,0.65); margin-bottom: 1.75rem; }
.hero-ctas  { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-avatar {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 3px solid rgba(255,255,255,0.25);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  letter-spacing: -1px;
}
.hero-accent-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-primary-light) 100%);
}

/* Section headers */
.section-header { margin-bottom: 2.5rem; }
.section-header h2 { font-size: 1.7rem; color: var(--color-primary); }
.section-header p  { color: var(--color-text-muted); margin-top: 0.4rem; }
.sub-heading { font-size: 1.1rem; color: var(--color-primary); margin: 2rem 0 1rem; font-weight: 600; }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  align-items: start;
}
.about-bio p { color: var(--color-text-muted); margin-bottom: 1rem; line-height: 1.8; }
.about-meta { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1.5rem; }
.about-meta h3 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-muted); margin-bottom: 1rem; }
.edu-item { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--color-border); }
.edu-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.edu-degree { font-weight: 600; font-size: 0.9rem; color: var(--color-text); }
.edu-inst   { font-size: 0.85rem; color: var(--color-text-muted); }
.edu-year   { font-size: 0.8rem; color: var(--color-accent); font-weight: 600; }

/* Research area cards */
.areas-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.area-card {
  padding: 2rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  transition: all var(--ease);
  display: block;
  color: inherit;
}
.area-card:hover { border-color: var(--color-primary); box-shadow: var(--shadow-md); transform: translateY(-2px); color: inherit; }
.area-icon {
  width: 48px; height: 48px;
  background: rgba(27,58,92,0.08);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
}
.area-icon svg { width: 24px; height: 24px; stroke: var(--color-primary); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.area-card h3 { color: var(--color-primary); margin-bottom: 0.5rem; font-size: 1.05rem; }
.area-card p  { color: var(--color-text-muted); font-size: 0.875rem; }

/* Impact tiles */
.impact-section { background: var(--color-primary); color: #fff; }
.impact-section .section-header h2 { color: #fff; }
.impact-section .section-header p  { color: rgba(255,255,255,0.7); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.25rem;
}
.stat-tile {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.25rem;
  text-align: center;
}
.stat-number { display: block; font-size: 2.2rem; font-weight: 700; color: var(--color-accent); }
.stat-label  { display: block; font-size: 0.8rem; color: rgba(255,255,255,0.75); margin-top: 0.4rem; line-height: 1.4; }

/* Publications */
.pub-group { margin-bottom: 3rem; }
.pub-group-title { font-size: 1.1rem; color: var(--color-primary); margin-bottom: 1.25rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--color-accent); display: inline-block; }
.pub-item { padding: 1.1rem 0; border-bottom: 1px solid var(--color-border); }
.pub-item:last-child { border-bottom: none; }
.pub-title   { font-weight: 600; font-size: 0.95rem; color: var(--color-text); margin-bottom: 0.3rem; }
.pub-meta    { font-size: 0.85rem; color: var(--color-primary-light); margin-bottom: 0.2rem; }
.pub-authors { font-size: 0.82rem; color: var(--color-text-muted); }

/* Positions table */
.positions-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.positions-table tr { border-bottom: 1px solid var(--color-border); }
.positions-table tr:last-child { border-bottom: none; }
.positions-table td { padding: 0.85rem 1rem 0.85rem 0; vertical-align: top; }
.pos-years { white-space: nowrap; color: var(--color-accent); font-weight: 600; min-width: 120px; }
.pos-role  { color: var(--color-text); font-weight: 500; padding-right: 1.5rem; }
.pos-inst  { color: var(--color-text-muted); }

/* Graduate Research Direction table */
.thesis-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.thesis-table tr { border-bottom: 1px solid var(--color-border); }
.thesis-table tr:last-child { border-bottom: none; }
.thesis-table td { padding: 0.8rem 1rem 0.8rem 0; vertical-align: middle; }
.thesis-year    { white-space: nowrap; color: var(--color-accent); font-weight: 600; min-width: 56px; }
.thesis-student { font-weight: 500; color: var(--color-text); }
.thesis-title   { font-size: 0.85rem; color: var(--color-text-muted); margin-top: 0.1rem; }

/* Research bullet list */
.research-list { list-style: none; padding: 0; margin: 0; }
.research-list li { padding: 0.6rem 0; border-bottom: 1px solid var(--color-border); font-size: 0.9rem; color: var(--color-text-muted); line-height: 1.6; }
.research-list li:last-child { border-bottom: none; }
.research-list li strong { color: var(--color-primary); }

/* Page hero (inner pages) */
.page-hero { background: var(--color-primary); color: #fff; padding: 4rem 0 3rem; }
.page-hero h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.page-hero p  { color: rgba(255,255,255,0.78); max-width: 600px; }

/* ISL callout */
.isl-callout {
  background: linear-gradient(135deg, rgba(27,58,92,0.06), rgba(74,127,165,0.08));
  border: 1px solid rgba(27,58,92,0.15);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: 1.5rem 2rem;
  margin-top: 2rem;
}
.isl-callout h3 { color: var(--color-primary); margin-bottom: 0.5rem; }
.isl-callout p  { color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 0.75rem; }

/* Footer */
.footer { background: var(--color-primary); color: rgba(255,255,255,0.8); padding: 3rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 3rem; margin-bottom: 2rem; }
.footer-logo { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.footer-logo img { height: 40px; width: auto; }
.footer-name { font-weight: 600; font-size: 0.95rem; color: #fff; }
.footer-tagline { font-size: 0.85rem; margin-bottom: 0.75rem; }
.footer-addr { font-size: 0.82rem; line-height: 1.7; }
.footer-addr a { color: rgba(255,255,255,0.75); }
.footer-addr a:hover { color: #fff; }
.footer-nav { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-nav h4 { color: #fff; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.25rem; }
.footer-nav a  { font-size: 0.85rem; color: rgba(255,255,255,0.7); }
.footer-nav a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 1.25rem; display: flex; justify-content: space-between; font-size: 0.78rem; color: rgba(255,255,255,0.45); flex-wrap: wrap; gap: 0.5rem; }

/* Mobile */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .about-grid { grid-template-columns: 1fr; }
  .areas-grid { grid-template-columns: 1fr; }
  .hero-content { flex-direction: column; gap: 1.5rem; padding: 2.5rem 1.5rem; }
  .hero-avatar { width: 120px; height: 120px; font-size: 2.5rem; align-self: flex-start; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .positions-table, .positions-table tbody, .positions-table tr, .positions-table td { display: block; }
  .pos-years { padding-bottom: 0; }
  .pos-inst  { padding-bottom: 0.85rem; }
  .thesis-table, .thesis-table tbody, .thesis-table tr, .thesis-table td { display: block; }
  .thesis-year { padding-bottom: 0; }
}

@media (max-width: 520px) {
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { text-align: center; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
