/* ==========================================================================
   PROFESSOR IBROXIM XABIBULLAYEV - PORTFOLIO STYLES
   Design: Modern Clean Academic / Light & Elegant / Fully Responsive
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Primary Palette - Soft Light Academic (Default) */
  --bg-primary: #f8fafc;
  --bg-secondary: rgba(241, 245, 249, 0.7);
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.88);
  --border-glass: rgba(226, 232, 240, 0.8);
  --border-card: #e2e8f0;
  --border-accent: rgba(37, 99, 235, 0.2);
  --border-gold: rgba(217, 119, 6, 0.35);
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  
  --accent-blue: #2563eb;
  --accent-blue-dark: #1d4ed8;
  --accent-blue-light: #eff6ff;
  --accent-blue-gradient: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #3b82f6 100%);
  
  --accent-gold: #b45309;
  --accent-gold-light: #fef3c7;
  --accent-gold-gradient: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  
  --accent-emerald: #059669;
  
  --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.1);
  --shadow-card: 0 4px 20px rgba(15, 23, 42, 0.06);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-full: 9999px;
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-primary: #0b1120;
  --bg-secondary: rgba(17, 24, 39, 0.7);
  --bg-card: rgba(30, 41, 59, 0.9);
  --bg-card-hover: #24324a;
  --bg-glass: rgba(17, 24, 39, 0.85);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(59, 130, 246, 0.3);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --accent-blue-light: rgba(37, 99, 235, 0.15);
  --accent-gold-light: rgba(217, 119, 6, 0.15);
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.55);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Reset & Basics */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  background-image: radial-gradient(rgba(37, 99, 235, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Full-Page Continuous Background Canvas */
.global-science-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.95;
}

/* Subtle Ambient Background */
.bg-glow-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.15;
  pointer-events: none;
}

.glow-orb-1 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, #3b82f6 0%, #93c5fd 80%);
  top: -120px;
  left: -100px;
}

.glow-orb-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #f59e0b 0%, #fed7aa 80%);
  top: 35%;
  right: -150px;
}

/* Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  transition: var(--transition);
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* Logo brand - Clean text without icon logo */
.logo-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-decoration: none;
  color: var(--text-main);
}

.logo-text h1 {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text-main);
  line-height: 1.2;
}

.logo-text span {
  font-size: 0.8rem;
  color: var(--accent-blue);
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-item a {
  display: inline-block;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-item a:hover, .nav-item a.active {
  color: var(--accent-blue);
  background: var(--accent-blue-light);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
  background: var(--bg-card);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: var(--shadow-xs);
}

.btn-icon:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.lang-selector {
  position: relative;
}

.lang-btn {
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  box-shadow: var(--shadow-xs);
}

.lang-btn:hover {
  border-color: var(--accent-blue);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  min-width: 130px;
  display: none;
  flex-direction: column;
  z-index: 120;
}

.lang-menu.show {
  display: flex;
}

.lang-option {
  padding: 8px 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  text-align: left;
  font-size: 0.86rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.lang-option:hover, .lang-option.active {
  background: var(--accent-blue-light);
  color: var(--accent-blue);
}





/* Hero & Section Background Canvases */
.hero-section {
  padding: 60px 0 40px;
  position: relative;
  overflow: hidden;
}

.science-bg-canvas, .section-bg-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.95;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}

.hero-badge-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--accent-blue-light);
  border: 1px solid var(--border-accent);
  color: var(--accent-blue-dark);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.18;
  margin-bottom: 12px;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent-blue);
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 1.02rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 28px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 35px;
}

.btn-primary {
  padding: 13px 26px;
  background: var(--accent-blue);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.96rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
  text-decoration: none;
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--accent-blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
  padding: 13px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.96rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  transform: translateY(-2px);
}

/* Stats Counter Row */
.stats-banner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-card);
}

.stat-box {
  text-align: center;
  position: relative;
}

.stat-box:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 15%;
  height: 70%;
  width: 1px;
  background: var(--border-glass);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--accent-blue);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Hero Portrait - Clean Natural Frame without Squeezing */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.professor-card-frame {
  position: relative;
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius-xl);
  padding: 8px;
  background: #ffffff;
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

[data-theme="dark"] .professor-card-frame {
  background: #1e293b;
}

.professor-card-inner {
  background: var(--bg-secondary);
  border-radius: calc(var(--radius-xl) - 4px);
  overflow: hidden;
  position: relative;
}

.professor-img-wrap {
  width: 100%;
  position: relative;
  background: #f1f5f9;
  overflow: hidden;
  display: block;
}

.professor-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.professor-card-frame:hover .professor-img {
  transform: scale(1.02);
}

.professor-card-info {
  padding: 16px 14px;
  text-align: center;
  background: var(--bg-card);
  border-top: 1px solid var(--border-glass);
}

.prof-name-card {
  font-size: 1.18rem;
  font-weight: 800;
  margin-bottom: 3px;
  color: var(--text-main);
}

.prof-role-card {
  font-size: 0.82rem;
  color: var(--accent-blue);
  font-weight: 700;
}

/* Sections Common */
.section {
  padding: 80px 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 45px;
}

.section-tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  background: var(--accent-blue-light);
  border: 1px solid var(--border-accent);
  color: var(--accent-blue-dark);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.3rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
}

/* ==========================================================================
   THEMATIC SCIENTIFIC ANIMATIONS & INTERACTIVE STYLING
   ========================================================================== */

/* 1. Timeline Scientific Milestones Pulse */
.timeline-wrap {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
}

.timeline-wrap::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #cbd5e1;
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 16px 36px;
}

.timeline-item.left {
  left: 0;
  text-align: right;
}

.timeline-item.right {
  left: 50%;
  text-align: left;
}

.timeline-dot {
  position: absolute;
  top: 26px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-blue);
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 2px var(--accent-blue);
  z-index: 5;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item.left .timeline-dot {
  right: -8px;
}

.timeline-item.right .timeline-dot {
  left: -8px;
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.3);
  box-shadow: 0 0 16px rgba(37, 99, 235, 0.6), 0 0 0 3px var(--accent-blue);
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}

.timeline-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.timeline-card:hover::after {
  opacity: 1;
}

/* 2. Scientific School Thematic Badges & Micro-Visuals */
.school-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.school-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
  pointer-events: none;
  transition: transform 0.5s ease;
}

.school-card:hover::before {
  transform: scale(2);
}

.science-mini-canvas {
  width: 100%;
  height: 60px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  margin-top: 14px;
  display: block;
  border: 1px solid var(--border-glass);
}

/* 3. Textbooks 3D Academic Book Tilt & Sheen */
.textbook-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  perspective: 800px;
}

.textbook-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--accent-blue);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.12), var(--shadow-md);
}

.textbook-cover {
  width: 100%;
  height: 220px;
  background: #f8fafc;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border-bottom: 1px solid var(--border-glass);
}

.textbook-cover::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.75s ease;
}

.textbook-card:hover .textbook-cover::after {
  left: 140%;
}

/* 4. Patents & DGU Software Circuit Animation */
.patent-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  gap: 14px;
  align-items: center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.patent-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent-blue), #10b981);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.patent-card:hover {
  transform: translateY(-4px) translateX(4px);
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.08), var(--shadow-md);
}

.patent-card:hover::before {
  opacity: 1;
}

/* 5. Diplomas Interactive High-Res Shimmer */
.diplom-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
}

.diplom-card:hover {
  transform: translateY(-7px);
  border-color: rgba(217, 119, 6, 0.4);
  box-shadow: 0 12px 28px rgba(217, 119, 6, 0.12), var(--shadow-md);
}

/* 6. Scientific Works Table Animated Highlights */
.works-table tr {
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.works-table tr:hover {
  background-color: var(--accent-blue-light) !important;
}

.works-table tr:hover .work-title-cell {
  color: var(--accent-blue);
}

/* Toast Notification for Interactive Feedback */
.academic-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2000;
  animation: toastSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes toastSlideUp {
  0% { transform: translateY(30px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.timeline-year {
  display: inline-block;
  padding: 3px 10px;
  background: var(--accent-blue-light);
  color: var(--accent-blue-dark);
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.timeline-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-main);
}

.timeline-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* School Cards */
.school-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.school-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  position: relative;
}

.school-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-md);
}

.school-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--accent-blue-light);
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.school-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-main);
}

.school-card p {
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.65;
}

.school-card ul {
  list-style: none;
  margin-top: 14px;
}

.school-card ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.school-card ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-blue);
  font-weight: bold;
}

/* Diplomas Grid */
.diploms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 22px;
}

.diplom-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.diplom-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-md);
}

.diplom-preview-wrap {
  width: 100%;
  height: 230px;
  background: #f8fafc;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border-bottom: 1px solid var(--border-glass);
}

[data-theme="dark"] .diplom-preview-wrap {
  background: #0f172a;
}

.diplom-preview-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: transform 0.3s ease;
}

.diplom-preview-wrap:hover .diplom-preview-img {
  transform: scale(1.04);
}

.preview-overlay-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
}

.diplom-preview-wrap:hover .preview-overlay-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.diplom-info {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.diplom-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-main);
}

.diplom-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.diplom-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.btn-sm-view {
  flex: 1;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  transition: var(--transition);
}

.btn-sm-view:hover {
  background: var(--accent-blue-light);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

/* Filter Bar */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
}

.filter-btn {
  padding: 7px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

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

.search-box-wrap {
  max-width: 480px;
  margin: 0 auto 24px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 12px 18px 12px 44px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 0.92rem;
  outline: none;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.search-icon-pos {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

/* Textbooks Grid */
.textbooks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

.textbook-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.textbook-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-md);
}

.textbook-cover {
  width: 100%;
  height: 220px;
  background: #f8fafc;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border-bottom: 1px solid var(--border-glass);
}

[data-theme="dark"] .textbook-cover {
  background: #0f172a;
}

.textbook-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.3s ease;
}

.textbook-cover:hover img {
  transform: scale(1.04);
}

.book-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
}

.textbook-info {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.textbook-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.4;
  color: var(--text-main);
}

.textbook-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

/* Patents Grid */
.patents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
}

.patent-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  gap: 14px;
  align-items: center;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: var(--shadow-card);
}

.patent-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-md);
}

.patent-thumb {
  width: 65px;
  height: 85px;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border-glass);
}

.patent-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.patent-info {
  flex: 1;
}

.patent-badge {
  display: inline-block;
  padding: 2px 7px;
  background: var(--accent-blue-light);
  color: var(--accent-blue-dark);
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 4px;
  margin-bottom: 4px;
}

.patent-title {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-main);
}

/* Works Registry Table */
.works-registry-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.works-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}

.works-stats-info {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.works-stats-info strong {
  color: var(--accent-blue);
}

.works-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
}

.works-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.works-table th {
  background: var(--bg-secondary);
  padding: 12px 16px;
  font-weight: 700;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-glass);
  white-space: nowrap;
}

.works-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-glass);
  color: var(--text-muted);
  vertical-align: top;
}

.works-table tr:hover td {
  background: var(--bg-secondary);
  color: var(--text-main);
}

.work-title-cell {
  color: var(--text-main);
  font-weight: 600;
}

.work-tag-cell {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--accent-blue-light);
  color: var(--accent-blue-dark);
  font-size: 0.72rem;
  font-weight: 700;
}

/* Pagination */
.pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
}

.page-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.86rem;
  transition: var(--transition);
}

.page-btn:hover, .page-btn.active {
  background: var(--accent-blue);
  color: #ffffff;
  border-color: var(--accent-blue);
}

/* Modal Lightbox */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-container {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-glass);
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.modal-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: none;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: #e2e8f0;
}

.modal-body {
  padding: 24px;
  text-align: center;
}

.modal-img-wrap {
  max-height: 60vh;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-img-wrap img {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
}

/* Footer */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-glass);
  padding: 50px 0 25px;
  margin-top: 50px;
  position: relative;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 30px;
}

.footer-brand h2 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-main);
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.88rem;
  max-width: 380px;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-main);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.86rem;
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: var(--accent-blue);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-glass);
  color: var(--text-dim);
  font-size: 0.82rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-badge-wrap, .hero-cta-group {
    justify-content: center;
  }
  .hero-visual {
    margin-top: 20px;
  }
  .qr-studio-grid {
    grid-template-columns: 1fr;
  }
  .school-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .stats-banner {
    grid-template-columns: repeat(2, 1fr);
  }
  .timeline-wrap::before {
    left: 18px;
  }
  .timeline-item {
    width: 100%;
    padding-left: 48px;
    padding-right: 12px;
    text-align: left !important;
  }
  .timeline-item.right {
    left: 0;
  }
  .timeline-dot {
    left: 10px !important;
    right: auto !important;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
