/* ============================================
   RAHUL WAGHMARE - PREMIUM MINIMALIST THEME
   v2-powerhouse: 100X upgrade
   Single-viewport, 3-column dashboard layout
   
   REVERT: git checkout v1-clean-minimalist
   ============================================ */

/* ============================================
   DESIGN TOKENS
   ============================================ */

:root {
  /* Light mode (default) */
  --bg: #ffffff;
  --bg-subtle: #fafafa;
  --ink: #1a1a1a;
  --muted: #555555;
  --light: #999999;
  --accent: #1a1a1a;
  --border: #ebebeb;
  --hover-bg: rgba(0,0,0,0.03);
  --shadow-soft: 0 1px 3px rgba(0,0,0,0.04);

  /* Layout */
  --nav-width: 200px;
  --rail-width: 200px;
  --transition: 220ms ease;
  --transition-slow: 400ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Typography */
  --font-serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

/* Dark mode */
[data-theme="dark"] {
  --bg: #111111;
  --bg-subtle: #181818;
  --ink: #e8e8e8;
  --muted: #a0a0a0;
  --light: #666666;
  --accent: #e8e8e8;
  --border: #252525;
  --hover-bg: rgba(255,255,255,0.04);
  --shadow-soft: 0 1px 3px rgba(0,0,0,0.3);
}

/* ============================================
   RESET
   ============================================ */

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

/* ============================================
   BASE
   ============================================ */

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--bg);
  font-family: var(--font-sans);
  color: var(--ink);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--transition), color var(--transition);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1 {
  font-family: var(--font-sans);
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

p {
  color: var(--muted);
  margin-bottom: 1rem;
}

a {
  color: var(--ink);
  text-decoration: none;
  transition: opacity var(--transition), color var(--transition);
}

a:hover {
  opacity: 0.7;
}

/* ============================================
   APP SHELL - 3 COLUMN GRID
   ============================================ */

.app-shell {
  display: grid;
  grid-template-columns: var(--nav-width) 1fr var(--rail-width);
  height: 100vh;
  width: 100vw;
}

/* ============================================
   LEFT NAV
   ============================================ */

.left-nav {
  border-right: 1px solid var(--border);
  padding: 2.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color var(--transition);
}

.nav-brand {
  margin-bottom: 2.5rem;
}

.profile-photo {
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  max-width: 56px;
  max-height: 56px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.brand-name {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  display: block;
}

.brand-status {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  color: var(--light);
  margin-top: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: #34c759;
  border-radius: 50%;
  display: inline-block;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.nav-item {
  font-family: var(--font-sans);
  display: block;
  padding: 0.55rem 0.75rem;
  margin-left: -0.75rem;
  color: var(--light);
  font-size: 0.82rem;
  font-weight: 450;
  letter-spacing: 0.01em;
  border-left: 2px solid transparent;
  border-radius: 0 4px 4px 0;
  transition: all var(--transition);
}

.nav-item:hover {
  color: var(--ink);
  background: var(--hover-bg);
  opacity: 1;
}

.nav-item.active {
  color: var(--ink);
  border-left-color: var(--ink);
  background: var(--hover-bg);
}

.nav-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ============================================
   DARK MODE TOGGLE
   ============================================ */

.theme-toggle {
  font-family: var(--font-sans);
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  font-size: 0.72rem;
  color: var(--light);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  letter-spacing: 0.02em;
}

.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.theme-toggle .icon {
  font-size: 0.85rem;
  line-height: 1;
}

/* ============================================
   KEYBOARD SHORTCUT HINT
   ============================================ */

.shortcut-hint {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  color: var(--light);
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2rem 0.45rem;
  transition: all var(--transition);
  background: none;
  letter-spacing: 0.02em;
}

.shortcut-hint:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* ============================================
   CENTER - CONTENT PANEL
   ============================================ */

.content-panel {
  padding: 3rem 3rem;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  overflow-y: auto;
  transition: background var(--transition);
}

.slide {
  display: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
  max-width: 100%;
  width: 100%;
}

.slide.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   CONTENT TYPOGRAPHY
   ============================================ */

/* Hero statement - the opening punch */
.hero-statement {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 1.75rem;
  letter-spacing: -0.01em;
}

/* Proof bar - quiet credibility row */
.proof-bar {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--light);
  padding: 0.85rem 0;
  margin-bottom: 2rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  line-height: 1.8;
  font-weight: 400;
}

.proof-bar span {
  color: var(--muted);
  font-weight: 500;
}

/* Section subtitle */
.section-subtitle {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 2rem;
  letter-spacing: 0.01em;
  line-height: 1.6;
  font-weight: 400;
}

/* Micro title labels */
.micro-title {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--light);
  margin: 2rem 0 0.75rem;
}

.micro-title:first-of-type {
  margin-top: 0;
}

/* Body text */
.body-text {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: 1.5rem;
  font-weight: 400;
}

/* Role statement */
.role-statement {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 1.5rem;
}

/* Pull quote - emphasis block */
.pull-quote {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--ink);
  padding: 1.25rem 0 1.25rem 1.5rem;
  border-left: 2px solid var(--ink);
  margin: 2rem 0;
  line-height: 1.65;
  opacity: 0.85;
}

/* Number callouts - stats strip */
.stats-strip {
  display: flex;
  gap: 2.5rem;
  padding: 1.5rem 0;
  margin: 1.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-family: var(--font-sans);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.stat-label {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--light);
  margin-top: 0.25rem;
}

/* Content divider */
.content-divider {
  height: 1px;
  background: var(--border);
  margin: 2rem 0;
  border: none;
}

/* ============================================
   QUICK LINKS
   ============================================ */

.quick-links {
  display: flex;
  gap: 1.75rem;
  margin-top: 2rem;
}

.external-link {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 450;
  color: var(--ink);
  padding-bottom: 2px;
  position: relative;
}

.external-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--border);
  transition: background var(--transition);
}

.external-link:hover {
  opacity: 1;
}

.external-link:hover::after {
  background: var(--ink);
}

/* ============================================
   ROLE LIST - CAREER ITEMS
   ============================================ */

.role-list {
  margin: 1.25rem 0;
}

.role-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.role-item:first-child {
  padding-top: 0;
}

.role-item:last-child {
  border-bottom: none;
}

.role-title {
  display: block;
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--ink);
  font-size: 0.92rem;
  margin-bottom: 0.2rem;
}

.role-org {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--light);
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
  font-weight: 400;
}

.role-impact {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.65;
  font-weight: 400;
}

/* ============================================
   LIST VIEW (legacy compatibility)
   ============================================ */

.list-view {
  list-style: none;
}

.list-view.scrollable {
  max-height: calc(100vh - 300px);
  overflow-y: auto;
  padding-right: 1rem;
}

.list-row {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.list-row:first-child {
  padding-top: 0;
}

.list-row:last-child {
  border-bottom: none;
}

.list-title {
  display: block;
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--ink);
  font-size: 0.92rem;
  margin-bottom: 0.15rem;
}

.list-meta {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--light);
}

.list-desc {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

/* ============================================
   RIGHT RAIL
   ============================================ */

.right-rail {
  border-left: 1px solid var(--border);
  padding: 2.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color var(--transition);
}

.rail-content {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* Availability badge */
.rail-availability {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #34c759;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.rail-link {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--light);
  transition: color var(--transition);
  padding: 0.15rem 0;
}

.rail-link:hover {
  color: var(--ink);
  opacity: 1;
}

.rail-link.primary {
  color: var(--ink);
  font-size: 0.82rem;
  margin-bottom: 0.25rem;
}

/* CTA button */
.rail-cta {
  font-family: var(--font-sans);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--ink);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  margin-top: 0.5rem;
}

.rail-cta:hover {
  opacity: 0.85;
  color: var(--bg);
  transform: translateY(-1px);
}

.rail-divider {
  height: 1px;
  background: var(--border);
  margin: 0.5rem 0;
}

.rail-footer {
  margin-top: auto;
}

.copyright {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  color: var(--light);
  letter-spacing: 0.02em;
}

/* ============================================
   KEYBOARD SHORTCUTS OVERLAY
   ============================================ */

.shortcuts-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}

.shortcuts-overlay.visible {
  display: flex;
  opacity: 1;
}

.shortcuts-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem 2.5rem;
  max-width: 380px;
  width: 90%;
  box-shadow: 0 16px 48px rgba(0,0,0,0.15);
}

.shortcuts-title {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 1.25rem;
}

.shortcut-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
}

.shortcut-label {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--muted);
}

.shortcut-key {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--light);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.15rem 0.45rem;
  letter-spacing: 0.02em;
  min-width: 24px;
  text-align: center;
}

/* ============================================
   MOBILE TOGGLE
   ============================================ */

.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 1.25rem;
  left: 1.25rem;
  z-index: 1000;
  width: 40px;
  height: 40px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

.mobile-menu-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  transition: all var(--transition);
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */

@media (max-width: 1100px) {
  :root {
    --nav-width: 180px;
    --rail-width: 170px;
  }

  .content-panel {
    padding: 2.5rem;
  }

  .left-nav,
  .right-rail {
    padding: 2rem 1.25rem;
  }

  .stats-strip {
    gap: 1.5rem;
    flex-wrap: wrap;
  }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */

@media (max-width: 768px) {
  html, body {
    overflow-y: auto;
  }

  .app-shell {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .left-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100%;
    z-index: 999;
    background: var(--bg);
    transform: translateX(-100%);
    transition: transform var(--transition);
  }

  .left-nav.open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,0.08);
  }

  .content-panel {
    padding: 4.5rem 1.5rem 3rem;
    height: auto;
    overflow: visible;
  }

  .slide {
    max-width: 100%;
  }

  .right-rail {
    position: fixed;
    top: 0;
    right: 0;
    width: 240px;
    height: 100%;
    z-index: 998;
    background: var(--bg);
    transform: translateX(100%);
    transition: transform var(--transition);
  }

  .right-rail.open {
    transform: translateX(0);
    box-shadow: -4px 0 20px rgba(0,0,0,0.08);
  }

  .hero-statement {
    font-size: 1.15rem;
  }

  .stats-strip {
    gap: 1.5rem;
    flex-wrap: wrap;
  }

  .proof-bar {
    font-size: 0.65rem;
  }

  .shortcuts-overlay {
    display: none !important;
  }
}

/* ============================================
   PRINT STYLESHEET
   ============================================ */

@media print {
  * {
    color: #000 !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  .app-shell {
    display: block;
    height: auto;
  }

  .left-nav,
  .right-rail,
  .mobile-menu-toggle,
  .theme-toggle,
  .shortcut-hint,
  .shortcuts-overlay,
  .quick-links,
  .nav-footer {
    display: none !important;
  }

  .content-panel {
    padding: 0;
    overflow: visible;
    height: auto;
  }

  .slide {
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
    max-width: 100%;
    page-break-inside: avoid;
    margin-bottom: 2rem;
  }

  .slide::after {
    content: "";
    display: block;
    border-bottom: 1px solid #ccc;
    margin-top: 2rem;
  }

  h1 {
    font-size: 1.3rem;
    page-break-after: avoid;
  }

  .hero-statement {
    font-size: 1.1rem;
  }

  .body-text {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .proof-bar {
    border: none;
    padding: 0.5rem 0;
  }

  .stats-strip {
    border: none;
  }

  .pull-quote {
    border-left-color: #000;
  }

  .rail-cta {
    display: none !important;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.75rem;
    color: #666 !important;
  }

  .external-link::after {
    content: " ↗" !important;
    position: static;
    background: none;
    height: auto;
    width: auto;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111111;
    --bg-subtle: #181818;
    --ink: #e8e8e8;
    --muted: #a0a0a0;
    --light: #666666;
    --accent: #e8e8e8;
    --border: #252525;
    --hover-bg: rgba(255,255,255,0.04);
    --shadow-soft: 0 1px 3px rgba(0,0,0,0.3);
  }
}

a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* ============================================
   SCROLLBAR - MINIMAL
   ============================================ */

.content-panel::-webkit-scrollbar,
.list-view.scrollable::-webkit-scrollbar {
  width: 4px;
}

.content-panel::-webkit-scrollbar-track,
.list-view.scrollable::-webkit-scrollbar-track {
  background: transparent;
}

.content-panel::-webkit-scrollbar-thumb,
.list-view.scrollable::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.content-panel::-webkit-scrollbar-thumb:hover,
.list-view.scrollable::-webkit-scrollbar-thumb:hover {
  background: var(--light);
}