/* ==========================================================================
   Sudeep Sajjan — Minimalist Editorial Resume & Portfolio Stylesheet
   Strict Monochrome (Black, White & Grayscale Only)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Typography & Global Variables
   -------------------------------------------------------------------------- */
:root {
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Color Palette - Strictly Monochrome */
  --bg-page: #ffffff;
  --bg-subtle: #f9f9f9;
  --bg-hover: #f1f1f1;
  --text-main: #111111;
  --text-muted: #555555;
  --text-light: #777777;
  --border-color: #e5e5e5;
  --border-dark: #111111;

  /* Layout Spacing */
  --sidebar-width: 320px;
  --max-content-width: 760px;
  --gap-section: 64px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-page);
  color: var(--text-main);
}

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-page);
  color: var(--text-main);
}

/* Accessible focus states */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--text-main);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   2. Layout Architecture (Asymmetric 2-Column Grid)
   -------------------------------------------------------------------------- */
.layout-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  min-height: 100vh;
}

/* Sidebar Header */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  border-right: 1px solid var(--border-color);
  padding: 48px 36px;
}

.sidebar-sticky {
  position: sticky;
  top: 48px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.site-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.site-subtitle {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  margin-top: 6px;
}

.site-tagline {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

.bio-summary {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

/* Navigation Links */
.site-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nav-item {
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-light);
  display: inline-block;
  transition: color 0.2s ease, transform 0.2s ease;
  position: relative;
}

.nav-item:hover, .nav-item.active {
  color: var(--text-main);
  font-weight: 600;
}

.nav-item.active::before {
  content: "— ";
  color: var(--text-main);
}

/* Sidebar Contact Details */
.sidebar-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.825rem;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.contact-meta-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.meta-label {
  color: var(--text-light);
  text-transform: uppercase;
  font-size: 0.725rem;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.meta-value {
  color: var(--text-main);
  font-weight: 500;
}

.meta-link {
  color: var(--text-main);
  text-decoration: none;
  border-bottom: 1px solid var(--border-color);
  transition: border-color 0.2s ease;
}

.meta-link:hover {
  border-color: var(--text-main);
}

.btn-print {
  background: transparent;
  border: 1px solid var(--text-main);
  color: var(--text-main);
  padding: 8px 14px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  text-align: center;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-print:hover {
  background-color: var(--text-main);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   3. Main Content Area
   -------------------------------------------------------------------------- */
.main-content {
  flex-grow: 1;
  max-width: var(--max-content-width);
  padding: 48px 48px;
}

.content-section {
  margin-bottom: var(--gap-section);
  padding-bottom: var(--gap-section);
  border-bottom: 1px solid var(--border-color);
}

.content-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 24px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.section-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: -16px;
  margin-bottom: 24px;
}

.prose p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.prose strong {
  color: var(--text-main);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   4. Entry Lists (Experience, Projects, Education)
   -------------------------------------------------------------------------- */
.entry-list {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.entry-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.entry-role {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.entry-org {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
}

.entry-subtext {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 2px;
}

.entry-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 0.825rem;
  flex-shrink: 0;
}

.entry-date {
  font-weight: 600;
  color: var(--text-main);
}

.entry-location {
  color: var(--text-light);
}

.entry-bullets {
  list-style: none;
  margin-top: 4px;
}

.entry-bullets li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
  font-size: 0.925rem;
  color: var(--text-muted);
}

.entry-bullets li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--text-light);
}

.entry-bullets li strong {
  color: var(--text-main);
}

.project-summary {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Monochromatic Tag Pills */
.entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tag {
  font-size: 0.775rem;
  font-weight: 500;
  padding: 3px 10px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-subtle);
  color: var(--text-muted);
  border-radius: 2px;
}

.text-link {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  border-bottom: 1px solid var(--text-main);
  padding-bottom: 2px;
  margin-top: 8px;
  transition: opacity 0.2s ease;
}

.text-link:hover {
  opacity: 0.6;
}

.subsection-divider {
  border-top: 1px dashed var(--border-color);
  padding-top: 24px;
  margin-top: 8px;
}

.subsection-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

/* --------------------------------------------------------------------------
   5. Articles / Writing Section
   -------------------------------------------------------------------------- */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 6px 14px;
  font-family: var(--font-sans);
  font-size: 0.825rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover, .filter-btn.active {
  background-color: var(--text-main);
  color: #ffffff;
  border-color: var(--text-main);
}

.articles-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.article-row {
  padding: 16px 20px;
  border: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.article-row:hover {
  background-color: var(--bg-subtle);
  border-color: var(--border-dark);
}

.article-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.article-row-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.article-row-excerpt {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.article-row-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 0.775rem;
  color: var(--text-light);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   6. Skills & Competencies Grid
   -------------------------------------------------------------------------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.skill-category {
  padding: 20px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-subtle);
}

.skill-category-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

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

.skill-list li {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  position: relative;
  padding-left: 14px;
}

.skill-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--text-main);
}

/* --------------------------------------------------------------------------
   7. Contact Section & Drawer Overlay
   -------------------------------------------------------------------------- */
.contact-panel {
  border: 1px solid var(--border-color);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.contact-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.row-label {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.row-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
  text-decoration: none;
}

.link-underline {
  border-bottom: 1px solid var(--text-main);
}

.btn-copy {
  background: transparent;
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-copy:hover {
  background-color: var(--text-main);
  color: #ffffff;
}

.site-footer {
  padding-top: 32px;
  font-size: 0.8rem;
  color: var(--text-light);
  border-top: 1px solid var(--border-color);
}

/* Article Reader Drawer */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.drawer-panel {
  width: 100%;
  max-width: 680px;
  height: 100%;
  background-color: var(--bg-page);
  padding: 48px 40px;
  overflow-y: auto;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.drawer-overlay.active .drawer-panel {
  transform: translateX(0);
}

.drawer-close-btn {
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 32px;
  color: var(--text-muted);
}

.drawer-close-btn:hover {
  color: var(--text-main);
}

.drawer-body h2 {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.25;
}

.drawer-body .drawer-meta {
  font-size: 0.825rem;
  color: var(--text-light);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.drawer-body p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}

.drawer-body h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  margin: 24px 0 12px;
  color: var(--text-main);
}

.drawer-body ul {
  padding-left: 20px;
  margin-bottom: 16px;
  color: var(--text-muted);
}

.drawer-body li {
  margin-bottom: 8px;
}

/* Toast */
.toast-box {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: var(--text-main);
  color: #ffffff;
  padding: 10px 18px;
  font-size: 0.825rem;
  font-weight: 500;
  border-radius: 2px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.2s ease;
  pointer-events: none;
  z-index: 1100;
}

.toast-box.show {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   8. Responsive Media Queries
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .layout-wrapper {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 32px 24px;
  }

  .sidebar-sticky {
    position: static;
  }

  .main-content {
    max-width: 100%;
    padding: 32px 24px;
  }

  .entry-header {
    flex-direction: column;
    gap: 4px;
  }

  .entry-meta {
    align-items: flex-start;
  }

  .article-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .article-row-meta {
    align-items: flex-start;
  }

  .drawer-panel {
    padding: 32px 24px;
  }
}

/* Print Rules */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt;
  }

  .sidebar-footer, .filter-bar, .drawer-overlay, .toast-box, .btn-copy {
    display: none !important;
  }

  .layout-wrapper {
    display: block !important;
  }

  .sidebar {
    width: 100% !important;
    border: none !important;
    padding: 0 0 16pt 0 !important;
  }

  .main-content {
    padding: 0 !important;
  }

  .content-section {
    margin-bottom: 16pt !important;
    padding-bottom: 16pt !important;
  }
}
