@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,600;1,400&family=IBM+Plex+Serif:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ==========================================================================
   ГУРВИЧ ИОСИФ НАУМОВИЧ (gurvich.in)
   Стиль: Modern Academic & Prevention Intelligence Typography System
   ========================================================================== */

:root {
  --paper: #fafaf9;
  --paper-card: #ffffff;
  --sidebar-bg: #f5f5f4;
  --ink: #1c1917;
  --ink-body: #292524;
  --ink-muted: #78716c;
  --rule: #e7e5e4;
  --rule-light: #f5f5f4;
  
  /* Prevention Intelligence Signature Palette */
  --accent: #0f766e;          /* Deep academic emerald/teal */
  --accent-hover: #115e59;
  --accent-soft: #f0fdf4;     /* Mint/soft green wash */
  --accent-border: #a7f3d0;   /* Light emerald border */
  --accent-subtle: #ccfbf1;
  --accent-gold: #d97706;     /* Warm academic gold */
  
  /* Typography Variables matching prevention-ai.ru */
  --serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

body {
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--ink-body);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================
   Typography & Links
   ========================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

a:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent);
}

/* ==========================================
   Layout Container
   ========================================== */

.wrapper {
  max-width: 1060px;
  margin: 40px auto 60px auto;
  background-color: var(--paper-card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: 0 20px 40px -15px rgba(28, 25, 23, 0.05), 0 1px 3px rgba(28, 25, 23, 0.02);
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ==========================================
   Header Section
   ========================================== */

header {
  background-color: #ffffff;
  padding: 36px 48px;
  border-bottom: 1px solid var(--rule);
  position: relative;
}

.header-meta {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-meta::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent);
}

header h1 {
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

header h1 a {
  color: var(--ink);
  border-bottom: none;
}

header h1 a:hover {
  color: var(--accent);
}

.header-subtitle {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 6px;
  letter-spacing: 0.02em;
}

/* ==========================================
   Page Grid Structure
   ========================================== */

.page-container {
  display: grid;
  grid-template-columns: 240px 1fr;
  flex: 1;
}

/* ==========================================
   Sidebar Navigation
   ========================================== */

aside {
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--rule);
  padding: 36px 20px 36px 24px;
}

aside ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

aside li a {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 6px;
  border-bottom: none;
  transition: all 0.2s ease;
}

aside li a:hover {
  color: var(--accent);
  background-color: var(--accent-soft);
  padding-left: 18px;
}

aside li.active a {
  color: var(--accent);
  background-color: var(--accent-soft);
  font-weight: 600;
  border-left: 3px solid var(--accent);
  padding-left: 14px;
}

/* ==========================================
   Main Content Area
   ========================================== */

main {
  padding: 40px 50px;
  background-color: var(--paper-card);
}

main h2.title {
  font-size: 28px;
  color: var(--ink);
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Academic Bio Card & Text */
.entry p {
  margin-bottom: 1.5em;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  font-size: 15.5px;
  color: var(--ink-body);
}

.bio-card {
  float: right;
  width: 240px;
  margin: 0 0 24px 28px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(28, 25, 23, 0.04);
}

.bio-card img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
  margin-bottom: 10px;
}

.bio-card-caption {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.bio-card-dates {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 4px;
  letter-spacing: 0.04em;
}

/* Academic quote / pullout box */
.academic-quote {
  background-color: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 18px 24px;
  margin: 24px 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  line-height: 1.6;
  color: #134e4a;
}

/* ==========================================
   Publications Page Styling
   ========================================== */

.pub-nav {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pub-nav a {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pub-nav a::before {
  content: "§";
  color: var(--accent);
  font-family: var(--serif);
  font-size: 14px;
}

.pub-section-title {
  font-family: var(--serif);
  font-size: 21px;
  color: var(--accent);
  margin: 36px 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--accent-border);
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.pub-section-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 16px;
  background-color: var(--accent);
  border-radius: 2px;
}

.pub-item {
  margin-bottom: 14px;
  padding: 12px 16px;
  border-radius: 6px;
  background-color: transparent;
  transition: all 0.2s ease;
  line-height: 1.65;
  font-size: 14.5px;
}

.pub-item:hover {
  background-color: var(--paper);
}

/* Document type badges */
.badge-doc, .badge-pdf, .badge-rtf {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  display: inline-block;
  margin-left: 6px;
  border-bottom: none !important;
}

.badge-pdf {
  background-color: #fee2e2;
  color: #991b1b;
}

.badge-doc {
  background-color: #e0f2fe;
  color: #0369a1;
}

.badge-rtf {
  background-color: #fef3c7;
  color: #92400e;
}

/* ==========================================
   Courses Page Styling
   ========================================== */

.courses-list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.course-item {
  background-color: var(--paper);
  border: 1px solid var(--rule);
  padding: 18px 22px;
  border-radius: 8px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.course-item:hover {
  border-color: var(--accent-border);
  background-color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -6px rgba(15, 118, 110, 0.1);
}

.course-item a {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  display: block;
  border-bottom: none;
}

.course-item:hover a {
  color: var(--accent);
}

/* ==========================================
   Students Page Styling
   ========================================== */

.students-section {
  margin-bottom: 36px;
}

.students-section h3 {
  font-size: 20px;
  color: var(--accent);
  margin-bottom: 18px;
  border-bottom: 1px solid var(--accent-border);
  padding-bottom: 8px;
}

.student-item {
  margin-bottom: 18px;
  padding: 14px 18px;
  background-color: var(--paper);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  font-size: 15px;
}

.student-item strong, .student-item > a {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.student-links {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 12.5px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.student-links a {
  color: var(--accent);
}

/* ==========================================
   Photo Gallery Styling
   ========================================== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.gallery-item {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.25s ease;
}

.gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(28, 25, 23, 0.08);
  border-color: var(--accent-border);
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.gallery-caption {
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.4;
}

/* ==========================================
   Footer & Academic Citation Notes
   ========================================== */

footer {
  background-color: #ffffff;
  border-top: 1px solid var(--rule);
  padding: 24px 48px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==========================================
   Responsive Adaptations
   ========================================== */

@media (max-width: 820px) {
  .wrapper {
    margin: 10px;
    border-radius: 8px;
  }

  .page-container {
    grid-template-columns: 1fr;
  }

  aside {
    border-right: none;
    border-bottom: 1px solid var(--rule);
    padding: 16px 20px;
  }

  aside ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  aside li.active a {
    border-left: none;
    border-bottom: 2px solid var(--accent);
  }

  header, main, footer {
    padding: 24px 20px;
  }

  .bio-card {
    float: none;
    width: 100%;
    max-width: 280px;
    margin: 0 auto 24px auto;
  }
}
