/* ========================================
   Adil-Amin ZADNI — Portfolio Styles
   Multidisciplinary Industrial Engineer
   ======================================== */

:root {
  --bg: #0a0e17;
  --bg-elevated: #111827;
  --bg-card: #1f2937;
  --bg-hover: #374151;
  --text: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --accent: #f59e0b;
  --accent-light: #fbbf24;
  --accent-glow: rgba(245, 158, 11, 0.2);
  --accent-subtle: rgba(245, 158, 11, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.3);
  --radius: 16px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --max-width: 1200px;
  --transition: all 0.3s ease;
}

[data-theme="light"] {
  --bg: #f8fafc;
  --bg-elevated: #f1f5f9;
  --bg-card: #e2e8f0;
  --bg-hover: #cbd5e1;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --accent: #d97706;
  --accent-light: #b45309;
  --accent-glow: rgba(217, 119, 6, 0.12);
  --accent-subtle: rgba(217, 119, 6, 0.06);
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.15);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.12);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s, color 0.3s;
}

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--text);
}

img {
  max-width: 100%;
  height: auto;
}

/* ========================================
   Theme Toggle
   ======================================== */

.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  border-color: var(--accent);
  transform: scale(1.05);
}

.theme-icon {
  font-size: 18px;
  position: absolute;
  transition: var(--transition);
}

.theme-icon.light {
  opacity: 0;
  transform: translateY(20px) rotate(-90deg);
}

.theme-icon.dark {
  opacity: 1;
  transform: translateY(0) rotate(0);
}

[data-theme="light"] .theme-icon.light {
  opacity: 1;
  transform: translateY(0) rotate(0);
}

[data-theme="light"] .theme-icon.dark {
  opacity: 0;
  transform: translateY(-20px) rotate(90deg);
}

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

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 14, 23, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

[data-theme="light"] .navbar {
  background: rgba(248, 250, 252, 0.9);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 24px;
}

.nav-menu a {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  position: relative;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s;
}

.nav-menu a:hover {
  color: var(--text);
}

.nav-menu a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
}

/* ========================================
   Hero with Background Image
   ======================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.35);
}

[data-theme="light"] .hero-bg-img {
  filter: brightness(0.55);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10,14,23,0.6) 0%, rgba(10,14,23,0.85) 70%, var(--bg) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 24px;
  backdrop-filter: blur(8px);
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

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

.hero-title {
  font-size: clamp(36px, 7vw, 64px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.1;
  margin-bottom: 20px;
  color: white;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 50%, #ef4444 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(16px, 2.5vw, 22px);
  color: rgba(255,255,255,0.8);
  font-weight: 400;
  margin-bottom: 20px;
}

.hero-desc {
  font-size: 16px;
  color: rgba(255,255,255,0.6);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
  color: white;
}

.btn-secondary {
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.3);
  transform: translateY(-2px);
  color: white;
}

.hero-stats-row {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat-num {
  display: block;
  font-size: 32px;
  font-weight: 800;
  color: var(--accent-light);
  line-height: 1;
}

.hero-stat-label {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ========================================
   Sections
   ======================================== */

.section {
  padding: 100px 24px;
}

.section-dark {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-label {
  display: inline-block;
  padding: 6px 14px;
  background: var(--accent-subtle);
  color: var(--accent-light);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ========================================
   About
   ======================================== */

.about-wrapper {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 64px;
  align-items: start;
}

.about-image {
  width: 400px;
  height: 400px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin: 0 auto;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-content p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.8;
}

.about-content strong {
  color: var(--text);
  font-weight: 600;
}

.about-contact-row {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* ========================================
   Domains Grid
   ======================================== */

.domains-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.domain-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

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

.domain-img {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.domain-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.domain-card:hover .domain-img img {
  transform: scale(1.05);
}

.domain-body {
  padding: 24px;
}

.domain-body h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.domain-body p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.domain-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.6;
  margin-bottom: 14px;
}

.domain-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.domain-tags span {
  font-size: 11px;
  padding: 4px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-secondary);
}

/* ========================================
   Timeline
   ======================================== */

.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-left: 56px;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s, transform 0.5s;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item.timeline-highlight .timeline-content {
  border-color: var(--accent);
  background: var(--accent-subtle);
}

.timeline-marker {
  position: absolute;
  left: 11px;
  top: 4px;
  width: 20px;
  height: 20px;
  background: var(--bg);
  border: 3px solid var(--accent);
  border-radius: 50%;
  transition: var(--transition);
}

.timeline-item:hover .timeline-marker {
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-glow);
}

.timeline-content {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
}

.timeline-content:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.timeline-header h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.timeline-date {
  font-size: 13px;
  color: var(--accent-light);
  font-weight: 600;
  background: var(--accent-subtle);
  padding: 4px 12px;
  border-radius: 100px;
  white-space: nowrap;
}

.timeline-company {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 12px;
}

.timeline-content > p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-tags span {
  font-size: 12px;
  padding: 4px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-secondary);
}

/* ========================================
   Projects
   ======================================== */

.projects-grid {
  display: grid;
  gap: 32px;
}

.project-card-large {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: var(--transition);
}

.project-card-large:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
}

.project-card-large.project-featured {
  border-color: var(--accent);
  background: var(--accent-subtle);
}

.project-gallery {
  border-radius: var(--radius);
  overflow: hidden;
  height: 220px;
}

.project-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-logo-img {
  object-fit: contain !important;
  padding: 20px;
  background: var(--bg-elevated);
}

.project-info h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.project-info p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.project-featured-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-light);
  background: var(--accent-subtle);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 10px;
}

.project-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.project-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.badge {
  padding: 5px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ========================================
   Teaching
   ======================================== */

.teaching-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.teaching-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
  position: relative;
}

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

.teaching-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.teaching-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.teaching-inst {
  font-size: 13px;
  color: var(--accent-light);
  font-weight: 500;
  margin-bottom: 10px;
}

.teaching-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.teaching-year {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--border);
}

/* ========================================
   Skills
   ======================================== */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.skill-category {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
}

.skill-category:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.skill-icon {
  font-size: 28px;
  margin-bottom: 14px;
}

.skill-category h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  padding: 6px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: var(--accent-subtle);
}

/* ========================================
   Contact
   ======================================== */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.contact-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  transition: var(--transition);
}

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

.contact-card.contact-primary {
  border-color: var(--accent);
  background: var(--accent-subtle);
}

.contact-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.contact-card h3 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.contact-card a {
  font-size: 14px;
  color: var(--accent-light);
  font-weight: 500;
  word-break: break-word;
}

.contact-note {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

.contact-cta {
  text-align: center;
  padding: 40px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.contact-cta p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* ========================================
   Footer
   ======================================== */

.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 48px 24px 24px;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.footer-tag {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: 8px;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--text);
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-org {
  margin-top: 4px;
  font-size: 12px;
}

/* ========================================
   Animations
   ======================================== */

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

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

@media (max-width: 960px) {
  .about-wrapper {
    grid-template-columns: 1fr;
  }
  .about-image {
    width: 320px;
    height: 320px;
    margin: 0 auto;
  }
  .project-card-large {
    grid-template-columns: 1fr;
  }
  .project-gallery {
    order: -1;
    height: 200px;
  }
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
  .hero-stats-row {
    gap: 24px;
  }
}

@media (max-width: 640px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 24px;
    gap: 16px;
  }
  .nav-menu.active {
    display: flex;
  }
  .about-image {
    width: 260px;
    height: 260px;
  }
  .nav-toggle {
    display: block;
  }
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
  .about-contact-row {
    flex-direction: column;
    align-items: stretch;
  }
  .about-contact-row .btn {
    width: 100%;
    justify-content: center;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .timeline::before {
    left: 16px;
  }
  .timeline-item {
    padding-left: 48px;
  }
  .timeline-marker {
    left: 7px;
  }
  .timeline-header {
    flex-direction: column;
    gap: 8px;
  }
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  .domains-grid,
  .teaching-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }
}


/* ========================================
   Language Switcher
   ======================================== */

.lang-switcher {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px;
  align-items: center;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 100px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.lang-btn:hover {
  color: var(--text);
}

.lang-btn.active {
  background: var(--accent);
  color: white;
}

/* ========================================
   RTL Overrides
   ======================================== */

[dir="rtl"] .timeline::before {
  left: auto;
  right: 20px;
}

[dir="rtl"] .timeline-item {
  padding-left: 0;
  padding-right: 56px;
}

[dir="rtl"] .timeline-marker {
  left: auto;
  right: 11px;
}

[dir="rtl"] .teaching-year {
  right: auto;
  left: 20px;
}

[dir="rtl"] .footer-tag {
  margin-left: 0;
  margin-right: 8px;
}

[dir="rtl"] .nav-menu a::after {
  left: auto;
  right: 0;
}

@media (max-width: 640px) {
  [dir="rtl"] .timeline::before {
    left: auto;
    right: 16px;
  }
  [dir="rtl"] .timeline-item {
    padding-right: 48px;
  }
  [dir="rtl"] .timeline-marker {
    left: auto;
    right: 7px;
  }
}


/* ========================================
   Research & Development
   ======================================== */

.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

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

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

.research-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.research-body h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}

.research-projects {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}

.research-project p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.research-project p strong {
  color: var(--text);
}

.research-project a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.research-project a:hover {
  text-decoration: underline;
}

.research-detail {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 8px;
  padding-left: 12px;
  border-left: 2px solid var(--accent);
}

.more-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.more-toggle:hover {
  background: var(--accent-subtle);
  border-color: var(--accent);
}

.more-toggle::after {
  content: "▼";
  font-size: 10px;
  transition: transform 0.3s ease;
}

.more-toggle.active::after {
  transform: rotate(180deg);
}

.more-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
  opacity: 0;
}

.more-content.active {
  max-height: 800px;
  opacity: 1;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.more-content p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.7;
}

.research-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.research-tags .badge {
  font-size: 11px;
  padding: 4px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .research-grid {
    grid-template-columns: 1fr;
  }
}
