:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --bg-dark: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.7);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(56, 189, 248, 0.1) 0%, transparent 40%);
  min-height: 100vh;
}

h1,
h2,
h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.glass {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--glass-shadow);
}

/* Hero Section */
.hero {
  margin-top: 2rem;
  padding: 4rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.bg-mesh {
  position: absolute;
  width: 300px;
  height: 300px;
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
}

.bg-mesh.left {
  left: -100px;
  top: 50%;
  transform: translateY(-50%);
}

.bg-mesh.right {
  right: -100px;
  top: 50%;
  transform: translateY(-50%);
}

.bg-mesh::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(rgba(99, 102, 241, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.5) 1px, transparent 1px);
  background-size: 20px 20px;
  mask-image: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
  animation: mesh-rotate 20s linear infinite;
}

.bg-mesh::after {
  content: '';
  position: absolute;
  top: 10%;
  left: 10%;
  width: 80%;
  height: 80%;
  background:
    linear-gradient(rgba(56, 189, 248, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.3) 1px, transparent 1px);
  background-size: 15px 15px;
  mask-image: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  animation: mesh-rotate-reverse 15s linear infinite;
}

@keyframes mesh-rotate {
  from {
    transform: rotate(0deg) scale(1);
  }

  50% {
    transform: rotate(180deg) scale(1.2);
  }

  to {
    transform: rotate(360deg) scale(1);
  }
}

@keyframes mesh-rotate-reverse {
  from {
    transform: rotate(360deg) scale(1.2);
  }

  50% {
    transform: rotate(180deg) scale(1);
  }

  to {
    transform: rotate(0deg) scale(1.2);
  }
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, transparent 30%, var(--bg-dark) 100%);
  z-index: 1;
}



.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  position: relative;
  z-index: 2;
  /* Above meshes */
}

.avatar-container {
  position: relative;
  width: 140px;
  height: 140px;
}

.profile-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 4px solid var(--primary);
  padding: 2px;
}



.header-content h1 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: var(--accent);
  font-weight: 500;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.lang-switch {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
  z-index: 100;
}

.lang-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

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

.lang-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.1);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

.social-links a {
  color: var(--text-muted);
  font-size: 1.5rem;
  transition: var(--transition);
}

.social-links a:hover {
  color: var(--primary);
  transform: translateY(-3px);
}



/* Buttons */
.cta-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.btn {
  padding: 0.8rem 1.5rem;
  border-radius: 14px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Sections */
.section {
  margin-top: 1.5rem;
  padding: 2rem;
}

.section h2 {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.section h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--glass-border);
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 15px;
  /* Important: No gap so items touch each other for line continuity */
}

.timeline-item {
  position: relative;
  padding-left: 2rem;
  padding-bottom: 1.0rem;
  /* Use padding instead of gap for continuous line */
  transition: var(--transition);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

/* The vertical line */
.timeline-item::after {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  /* Start exactly at the center of the dot */
  width: 2px;
  height: calc(100% + 1.5rem);
  /* Reach the next item's dot center */
  background: var(--glass-border);
  transition: var(--transition);
  z-index: 1;
}

.timeline-item:last-child::after {
  display: none;
  /* Last item doesn't need a line going down */
}

.timeline-item:hover::after {
  background: var(--primary);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #1e293b;
  /* Match var(--bg-card) solid color */
  border: 2px solid var(--glass-border);
  transition: var(--transition);
  z-index: 2;
}

.timeline-item:hover::before {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary);
}

.cert-icon {
  position: absolute;
  left: -45px;
  top: 0;
  width: 30px;
  height: 30px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.9rem;
}

/* Clean up certifications list - remove timeline line and dots */
#certifications-list .timeline-item {
  padding-left: 0;
  margin-left: 45px;
  border-left: none;
}

#certifications-list .timeline-item::before,
#certifications-list .timeline-item::after {
  display: none;
}

#certifications-list .cert-icon {
  left: -45px;
}

.timeline-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.timeline-item .period {
  font-size: 0.85rem;
  color: var(--accent);
  display: block;
  margin-bottom: 0.5rem;
}

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

.impact-list {
  list-style: none;
  margin-top: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.impact-list li {
  font-size: 0.85rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(56, 189, 248, 0.05);
  padding: 4px 12px;
  border-radius: 8px;
  width: fit-content;
}

.impact-list li i {
  font-size: 0.75rem;
  opacity: 0.8;
}

/* Private Grid */
.private-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.private-card {
  background: rgba(255, 255, 255, 0.03);
  padding: 1.2rem;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  overflow: hidden;
}

.private-card h3 {
  font-size: 1rem;
  margin-bottom: 0.8rem;
  color: var(--accent);
}

.private-card ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.private-card li {
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 12px;
  border-radius: 20px;
  color: var(--text-muted);
  word-break: break-word;
  max-width: 100%;
}

/* Contact Grid */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-item i {
  width: 40px;
  height: 40px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.1rem;
}

.contact-item span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.contact-item p {
  font-weight: 500;
}

/* Footer */
.footer {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.legal-links {
  margin-top: 1rem;
}

.legal-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
  margin: 0 0.3rem;
}

.legal-links a:hover {
  color: var(--primary);
}

/* Animations */
.fade-in {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 768px) {
  .private-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}