/* General Styles */
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1c1c1e;
  background-color: #fefefe;
  line-height: 1.6;
}

section {
  padding: 60px 20px;
  text-align: center;
}

h1, h2 {
  font-weight: 700;
  margin-bottom: 20px;
}

p {
  max-width: 700px;
  margin: 0 auto 20px;
}


.subtitle {
  color: #64748B;
  font-family: 'Raleway', sans-serif;
  font-weight: 300;
  letter-spacing: 6px;
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 33px;
  display: block;
}



.menutitle {
  color: #64748B;
  font-family: 'Raleway', sans-serif;
  font-weight: 300;
  letter-spacing: 6px;
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 15px;
  display: block;
}


/* === Верхня навігація === */
.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  background: #ffffffcc;
  backdrop-filter: blur(10px);
  z-index: 999;
  border-bottom: 1px solid #e5e7eb;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-weight: 600;
  font-size: 1.2rem;
}

.navbar nav a {
  margin-left: 20px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color .25s;
}

.navbar nav a:hover {
  color: #0077ff;
}


/* Hero */
.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 80px 20px;
  background: linear-gradient(180deg, #F8F9FA, #ECEFF1); 
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  width: 100%;
  gap: 40px;
}

.hero-left {
  flex: 1;
  display: flex;
  justify-content: center;
}

.hero-right {
  flex: 2;
  text-align: left;
}

.profile-photo {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* Text Styling */
.hero-right h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #333;
}

.tagline {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #555;
  margin-bottom: 30px;
}



/* Social Buttons */
.social-buttons {
  display: flex;
  gap: 15px;
}

.social-btn {
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
  color: #fff;
  transition: all 0.3s ease;
}

.social-btn.linkedin {
  background-color: #0077b5;
}

.social-btn.github {
  background-color: #333;
}

.social-btn.facebook {
  background-color: #1877f2;
}

.social-btn:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}




/* Responsive Design */
@media (max-width: 768px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }

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

  .hero-left {
    margin-bottom: 30px;
  }

  .profile-photo {
    width: 250px;
    height: 250px;
  }

  .social-buttons {
    justify-content: center;
  }
}


.tagline {
  font-size: 1.2rem;
  color: #555;
}

/* Animation container */
.hero-animation {
  width: 200px;
  height: 200px;
  margin-top: 20px;
}





/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.skill-card {
  background: #ffffff;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, background-color 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.skill-card:hover {
  transform: translateY(-5px);
}

.skill-title {
  font-weight: 500;
  color: #333;
  transition: color 0.3s ease, font-weight 0.3s ease;
}

/* Активний стан */
.skill-card.active {
  background-color: #f0f8ff;
}

.skill-card.active .skill-title {
  font-weight: 700;
  color: #1e88e5;
}

/* Текст опису */
.skill-description {
  max-height: 0;
  overflow: hidden;
  color: #555;
  font-size: 0.9rem;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
  opacity: 0;
}

.skill-card.active .skill-description {
  max-height: 150px; /* контрольована висота */
  opacity: 1;
  margin-top: 10px;
}





/* Certificates */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.cert-card {
  background: #ffffff;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
}

.cert-card:hover {
  transform: translateY(-5px);
}


/* Work Experience  - сертифікати*/
.exp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.exp-card {
  perspective: 1000px;
  height: auto;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 15px;
}

/* 🟣 Додаємо основну тінь */
.exp-card {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

/* ✨ Ефект при наведенні — картка “піднімається” */
.exp-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.exp-inner {
  position: relative;
  width: 100%;
  height: 120px;
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
  cursor: pointer;
}

.exp-card.flipped .exp-inner {
  transform: rotateY(180deg);
}

.exp-front,
.exp-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  padding: 15px;
  box-sizing: border-box;
  text-align: center;
}

/* === Налаштування передньої сторони === */
.exp-front {
  /* 🔹 Загальні параметри для всіх передніх сторін */
  background: linear-gradient(135deg,  #F8F9FA, #ECEFF1);
  color: var(--front-text-color, #000000);     /* можна змінювати */
  font-size: var(--front-font-size, 1rem);   /*  можна змінювати */
}


/* === Зворотна сторона === */
.exp-back {
  background: #f3f3f3;
  transform: rotateY(180deg);
  color: #ffffff;
  text-align: center;
  line-height: 1.4;
  font-size: 0.9rem;
}

/* 🔸 Індивідуальні градієнти + приклади власних кольорів і розмірів BACK */
.exp-card.infoblox .exp-back {
  background: linear-gradient(135deg, #0090C1, #8CC63F);
  --back-text-color: #ffffff;
  --back-font-size: 1rem;
}

.exp-card.cisco .exp-back {
  background: linear-gradient(135deg, #00B0F0, #0072C6);
  --back-text-color: #ffffff;
  --back-font-size: 1.1rem;
}

.exp-card.mikrotik .exp-back {
  background: linear-gradient(135deg, #C92A3E, #781F2E);
  --back-text-color: #fff5f5;
  --back-font-size: 0.95rem;
}

.exp-card.linux .exp-back {
  background: linear-gradient(135deg, #1E293B, #475569);
  --back-text-color: #fff5f5;
  --back-font-size: 0.95rem;
}

.exp-card.sep .exp-back {
  background: linear-gradient(135deg, #a18509, #e2b900);
  --back-text-color: #fff5f5;
  --back-font-size: 0.95rem;
}




/* Базові стилі для посилань */
.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 10px;
  padding: 10px 20px;
  text-decoration: none;
  color: #1c1c1e;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: linear-gradient(180deg, #F8F9FA, #ECEFF1);
  transition: background 0.3s ease, color 0.3s ease;
  font-weight: 500;
}

/* Іконки трохи більші */
.social-links i {
  font-size: 18px;
}

/* Instagram — початковий колір */
.social-links a.instagram {
  color: #000000;
  border-color: #000000;
}

.social-links a.linkedin {
  color: #000000;
  border-color: #000000;
}

.social-links a.mail {
  color: #000000;
  border-color: #000000;
  cursor: pointer;
}

/* Ефект при наведенні */
.social-links a.instagram:hover {
  background: #e1306c;
  border-color: #e1306c;
  color: #ffffff;
}

.social-links a.linkedin:hover {
  background: #0077b5;
  border-color: #0077b5;
  color: #ffffff;
}

.social-links a.mail:hover {
  background: #D14836;
  border-color: #D14836;
  color: #ffffff;
}

/* === Popup Overlay === */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* === Popup Box === */
.popup {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 20px 30px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  text-align: center;
  max-width: 320px;
  width: 90%;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.popup h3 {
  margin-bottom: 20px;
  font-size: 20px;
  color: #333;
}

.popup button {
  display: inline-block;
  margin: 5px;
  padding: 10px 18px;
  font-size: 15px;
  border:  1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.popup button.primary {
  background: #ffffff;
  border-color: #000000;
  color: #000000;
}

.popup button.primary:hover {
  background: #D14836;
  border-color: #D14836;
  color: #ffffff;
}

.popup button.secondary {
  background: #ffffff;
  border-color: #000000;
  color: #000000;
}

.popup button.secondary:hover {
  background: #374151;
  border-color: #374151;
  color: #ffffff;
}

.popup-close {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 20px;
  cursor: pointer;
  color: #666;
}

.popup-close:hover {
  color: #000;
}

/* === Popup Buttons Layout === */
.popup-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: nowrap;
}

.popup-buttons button {
  white-space: nowrap;
}


section#opportunities {
  background-color: #e1e0e0;
}


.opportunities-section {
  width: 100%;
  padding: 60px 0;      /* прибираємо бічні відступи */
}

/* Внутрішній контейнер з центруванням */
.opportunities-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.opportunities-section h2 {
  text-align: center;
  font-size: 2em;
  margin-bottom: 40px;
  color: #111;
  letter-spacing: 0.5px;
}

.opportunities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 30px 40px;
}

.skill {
  background: #F7FAFC;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px 25px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.skill:hover {
  background: linear-gradient(180deg, #ffffff, #f6f7f9);
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.skill h3 {
  font-size: 1.1em;
  margin-bottom: 10px;
  color: #222;
}

.skill p {
  font-size: 0.95em;
  line-height: 1.6;
  color: #555;
  margin: 0;
}

@media (max-width: 768px) {
  .opportunities-section {
    padding: 40px 15px;
  }

  .opportunities-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .skill {
    padding: 18px;
  }
}




/* Contact */
.contact p a {
  color: #007aff;
  text-decoration: none;
}

footer {
  padding: 20px;
  background: #E9ECEF;
  text-align: center;
  font-size: 0.9rem;
  color: #888;
}




/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* === BACKGROUND COLORS FOR SECTIONS === */
.hero {
  background: linear-gradient(180deg, #F8F9FA, #ECEFF1);
}

.opportunities-section {
  background: #F7FAFC;
}

.experience {
  background: #F0F4F8;
}

footer {
  background: #E9ECEF;
}


/* === Copy Toast === */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 2000;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-10px);
}


/* === MOBILE HERO FIX === */
@media (max-width: 768px) {

  .hero {
    padding: 60px 20px;
  }

  .hero-content {
    flex-direction: column;
    align-items: center;   /* ВАЖЛИВО */
    text-align: center;
  }

  .hero-right {
    text-align: center;
    width: 100%;
  }

  .hero-left {
    justify-content: center;
    width: 100%;
  }

  .hero-animation {
    margin: 30px auto 0 auto;
    display: block;
  }

}