/* ============================================================
   styles.css — Rohit Prodhan Personal Site  (Light Theme)
   Sections:
     1.  Tokens
     2.  Reset & base
     3.  Page shell (sidebar + main two-col layout)
     4.  Mobile top bar & drawer
     5.  Sidebar
     6.  Photo component
     7.  Sidebar navigation
     8.  Main content commons
     9.  Section labels & titles
    10.  Buttons & tags
    11.  About section
    12.  Research cards
    13.  Projects list
    14.  Interests grid
    15.  Coursework table
    16.  RL Journey
    17.  Contact & Footer
    18.  Animations & scroll fx
    19.  Responsive
   ============================================================ */


/* ── 1. TOKENS ─────────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg:         #f5f4f0;       /* warm off-white page */
  --sidebar-bg: #ffffff;       /* crisp white sidebar */
  --surface:    #ffffff;
  --surface2:   #f0eeea;

  /* Borders */
  --border:     #e3e1db;
  --border-mid: #ccc9c2;

  /* Text */
  --text:       #1e1e1e;
  --text-mid:   #4a4a4a;
  --muted:      #888480;

  /* Accent — deep teal/navy that reads well on white */
  --accent:     #1a5276;
  --accent-light: #2980b9;
  --accent-gold:  #b5832a;     /* for highlights and tags */
  --green:      #217a4b;

  /* Typography */
  --font-mono:  'IBM Plex Mono', monospace;
  --font-serif: 'DM Serif Display', serif;
  --font-sans:  'DM Sans', sans-serif;

  /* Layout */
  --sidebar-w:  280px;
}


/* ── 2. RESET & BASE ────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

strong { font-weight: 500; color: var(--text); }


/* ── 3. PAGE SHELL ──────────────────────────────────────────── */
.page-shell {
  display: flex;
  min-height: 100vh;
}


/* ── 4. MOBILE TOP BAR & DRAWER ─────────────────────────────── */
.mobile-topbar {
  display: none;   /* shown only on mobile via media query */
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 52px;
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--accent);
}

.nav-hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--muted);
  transition: background 0.2s;
}
.nav-hamburger:hover span { background: var(--accent); }

.mobile-drawer {
  display: none;
  position: fixed;
  top: 52px; left: 0; right: 0;
  z-index: 199;
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--border);
  flex-direction: column;
  padding: 16px 24px 24px;
  gap: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.mobile-drawer a {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-mid);
  letter-spacing: 0.04em;
}
.mobile-drawer a:hover { color: var(--accent); text-decoration: none; }
.mobile-drawer.open { display: flex; }


/* --- 5.0  */
/* ── MOBILE SIDEBAR CARD ────────────────────────────────────── */
.mobile-sidebar-card {
  display: none;  /* shown only on mobile via media query */
  padding: 72px 20px 24px;  /* 72px top = mobile topbar height + breathing room */
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

/* Header: Photo on left, Name/Title on right */
.mobile-card-header {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.mobile-card-photo-wrap {
  display: flex;
  justify-content: flex-start;
  flex-shrink: 0;
}

.mobile-photo-ring {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  padding: 2px;
  background: conic-gradient(
    var(--accent)      0deg,
    var(--accent-gold) 120deg,
    var(--accent-light) 240deg,
    var(--accent)      360deg
  );
  flex-shrink: 0;
}

.mobile-photo-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface2);
  border: 2px solid var(--sidebar-bg);
}

.mobile-photo-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

/* Name & Title on right of photo */
.mobile-card-text {
  flex: 1;
  padding-top: 2px;
}

.mobile-card-name {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.2;
}

.mobile-card-role {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.08em;
  line-height: 1.5;
}

/* Education section */
.mobile-card-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  padding-bottom: 0;
  border-bottom: none;
}

/* Bottom row: Education + Buttons */
.mobile-card-bottom {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-top: 16px;
}

.mobile-card-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.mobile-edu-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-edu-summary p {
  font-size: 12px;
  color: var(--text-mid);
  line-height: 1.5;
}

/* Buttons row - right side, small and compact */
.mobile-card-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.mobile-cv-btn {
  display: block;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  padding: 7px 12px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  transition: background 0.2s;
  font-weight: 500;
  white-space: nowrap;
}
.mobile-cv-btn:hover { background: var(--accent-light); text-decoration: none; }

.mobile-contact-btn {
  display: block;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  padding: 7px 12px;
  border-radius: 4px;
  background: var(--surface2);
  color: var(--text-mid);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  white-space: nowrap;
}
.mobile-contact-btn:hover { 
  background: var(--border-mid);
  color: var(--text);
}

/* Contact Modal */
.mobile-contact-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 300;
  align-items: flex-end;
  animation: slideUp 0.3s ease-out;
}

.mobile-contact-modal.open {
  display: flex;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.mobile-contact-modal-content {
  width: 100%;
  background: var(--sidebar-bg);
  border-radius: 12px 12px 0 0;
  padding: 24px 20px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  position: relative;
}

.mobile-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}
.mobile-modal-close:hover { color: var(--text); }

.mobile-modal-label {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--text);
  margin-bottom: 20px;
}

.mobile-contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 6px;
  background: var(--surface2);
  color: var(--text-mid);
  transition: all 0.2s;
}
.mobile-contact-link:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

.mobile-contact-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.mobile-contact-links a span:last-child {
  font-family: var(--font-mono);
  font-size: 13px;
}


/* ── 5. SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 40px 28px;
  display: flex;
  flex-direction: column;
  gap: 0;

  /* Hide scrollbar visually but allow scroll */
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}

.sidebar-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  color: var(--text-mid);
}

.sidebar-icon {
  font-size: 13px;
  flex-shrink: 0;
  margin-top: 1px;
}

.sidebar-link {
  font-size: 13px;
  color: var(--accent-light);
  word-break: break-all;
}
.sidebar-link:hover { color: var(--accent); }


/* ── 6. PHOTO COMPONENT ─────────────────────────────────────── */
.sidebar-photo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.photo-ring {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  padding: 2.5px;
  background: conic-gradient(
    var(--accent)      0deg,
    var(--accent-gold) 120deg,
    var(--accent-light) 240deg,
    var(--accent)      360deg
  );
  /* animation: spin-ring 10s linear infinite; */
  flex-shrink: 0;
}

@keyframes spin-ring {
  to { transform: rotate(360deg); }
}

.photo-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface2);
  border: 3px solid var(--sidebar-bg);
}

.photo-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface2);
}

.photo-initials {
  font-family: var(--font-serif);
  font-size: 32px;
  color: var(--accent);
  opacity: 0.7;
  line-height: 1;
}


/* ── Name block ─────────── */
.sidebar-name-block {
  text-align: center;
  margin-bottom: 4px;
}

.sidebar-name {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 4px;
}

.sidebar-role {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.08em;
}

.sidebar-inst {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
}


/* ── Education list ─────── */
.edu-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.edu-item:last-child { border-bottom: none; padding-bottom: 0; }

.edu-degree {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.edu-inst {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}


/* ── CV button ──────────── */
.sidebar-cv-btn {
  display: block;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 10px 16px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  transition: background 0.2s;
  margin-bottom: 4px;
}
.sidebar-cv-btn:hover { background: var(--accent-light); text-decoration: none; }


/* ── 7. SIDEBAR NAVIGATION ──────────────────────────────────── */
.sidebar-nav {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.snav-link {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 3px;
  transition: background 0.15s, color 0.15s;
}
.snav-link:hover,
.snav-link.active {
  background: var(--surface2);
  color: var(--accent);
  text-decoration: none;
}


/* ── 8. MAIN CONTENT ────────────────────────────────────────── */
.main-content {
  flex: 1;
  min-width: 0;
  padding: 0 56px;
  max-width: 760px;
}

.content-section {
  padding: 72px 0;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}


/* ── 9. SECTION LABELS & TITLES ─────────────────────────────── */
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent-gold);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3.5vw, 36px);
  color: var(--text);
  margin-bottom: 36px;
  line-height: 1.2;
}


/* ── 10. BUTTONS & TAGS ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  padding: 10px 20px;
  border-radius: 4px;
  transition: all 0.2s;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-light); text-decoration: none; }

.btn-outline {
  border: 1px solid var(--border-mid);
  color: var(--text-mid);
  background: transparent;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 3px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface2);
}


/* ── 11. ABOUT ──────────────────────────────────────────────── */
.about-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 580px;
}

.about-body p {
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.85;
}


/* ── 12. RESEARCH CARDS ─────────────────────────────────────── */
.research-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.research-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.research-card:hover {
  border-color: var(--accent-light);
  box-shadow: 0 4px 20px rgba(26, 82, 118, 0.08);
  transform: translateY(-2px);
}

.card-number {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-gold);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.35;
}

.card-body {
  font-size: 13.5px;
  color: var(--text-mid);
  line-height: 1.8;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}


/* ── 13. PROJECTS LIST ──────────────────────────────────────── */
.project-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.project-item {
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.project-item:last-child { border-bottom: none; }
.project-item:hover { background: var(--surface2); }

.project-meta {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.project-repo {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.project-name {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-light);
  font-weight: 500;
}
.project-name:hover { color: var(--accent); }

.project-desc {
  font-size: 13.5px;
  color: var(--text-mid);
  line-height: 1.8;
  margin-bottom: 14px;
}

.project-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.project-link {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-left: auto;
  transition: color 0.2s;
}
.project-link:hover { color: var(--accent); text-decoration: none; }


/* ── 14. INTERESTS GRID ─────────────────────────────────────── */
.interests-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.interest-block {
  border-left: 2px solid var(--border);
  padding-left: 18px;
  transition: border-color 0.2s;
}
.interest-block:hover { border-color: var(--accent-gold); }

.interest-icon { font-size: 20px; margin-bottom: 8px; }

.interest-name {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.interest-desc {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.75;
}


/* ── 15. COURSEWORK TABLE ───────────────────────────────────── */
.course-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.course-item {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: background 0.15s;
}
.course-item:hover { background: var(--surface2); }
.course-item:nth-child(even) { border-right: none; }
.course-item:nth-last-child(-n+2) { border-bottom: none; }

.course-name {
  font-size: 13px;
  color: var(--text);
}

.course-code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-light);
  flex-shrink: 0;
}


/* ── 16. RL JOURNEY ─────────────────────────────────────────── */
.rl-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.rl-text { display: flex; flex-direction: column; gap: 16px; }

.rl-text p {
  font-size: 14.5px;
  color: var(--text-mid);
  line-height: 1.85;
}

.rl-github-btn { align-self: flex-start; }

.rl-visual {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 24px 28px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.rl-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-mid);
  letter-spacing: 0.02em;
}
.rl-row:last-of-type { border-bottom: none; }

.rl-check        { color: var(--green); }
.rl-active-arrow { color: var(--accent-gold); }
.rl-active-text  { color: var(--accent-gold); }
.rl-pending      { color: var(--border-mid); }

.progress-bar {
  height: 2px;
  background: var(--border);
  border-radius: 1px;
  margin-top: 16px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-gold));
  border-radius: 1px;
  transition: width 1.6s ease;
}

.progress-label {
  font-size: 10px;
  color: var(--muted);
  margin-top: 7px;
  letter-spacing: 0.05em;
}


/* ── 17. CONTACT & FOOTER ───────────────────────────────────── */
.contact-section {
  /* No special treatment needed — inherits content-section */
}

.contact-body {
  font-size: 14.5px;
  color: var(--text-mid);
  max-width: 480px;
  line-height: 1.8;
  margin-bottom: 28px;
}

.contact-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
}

footer p {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}


/* ── 18. ANIMATIONS & SCROLL FX ─────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ── 19. RESPONSIVE ─────────────────────────────────────────── */

/* Narrow desktop — compact sidebar */
@media (max-width: 900px) {
  :root { --sidebar-w: 240px; }
  .main-content { padding: 0 36px; }
  .interests-grid { grid-template-columns: 1fr 1fr; }
}

/* Tablet & mobile — collapse sidebar into top bar + drawer */
@media (max-width: 720px) {
  .sidebar { display: none; }
  .mobile-topbar { display: flex; }
  .mobile-sidebar-card { display: block; }

  .page-shell { flex-direction: column; }

  .main-content {
    padding: 72px 20px 0;   /* 72px = mobile topbar height + breathing room */
    max-width: 100%;
  }

  .content-section { padding: 52px 0; }

  .research-grid    { grid-template-columns: 1fr; }
  .interests-grid   { grid-template-columns: 1fr; gap: 20px; }
  .rl-feature       { grid-template-columns: 1fr; gap: 32px; }

  .course-list      { grid-template-columns: 1fr; }
  .course-item      { border-right: none !important; }
  .course-item:nth-last-child(-n+2) { border-bottom: 1px solid var(--border); }
  .course-item:last-child           { border-bottom: none; }

  .project-link { margin-left: 0; width: 100%; margin-top: 4px; }

  footer { padding: 28px 0 32px; }
}
