/* === ЗМІННІ === */
:root {
  --bg-color: #ffffff;
  --text-color: #1a1a1a;
  --accent-color: #007bff;
  --card-bg: #f1f1f1;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --shadow-soft: 0 4px 10px var(--shadow-color);
  --shadow-side: 2px 0 8px var(--shadow-color);
}

body.dark {
  --bg-color: #121212;
  --text-color: #f1f1f1;
  --card-bg: #1e1e1e;
  --shadow-color: rgba(255, 255, 255, 0.1);
}

/* === БАЗОВІ СТИЛІ === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
  overflow-x: hidden;
  padding-bottom: 10px;
}

h1, h2 {
  margin-bottom: 0.5em;
}

main {
  margin-left: 220px;
  padding: 2rem;
}

section {
  margin-bottom: 3rem;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* === БУРГЕР МЕНЮ === */
#hamburger {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  font-size: 2rem;
  background: none;
  border: none;
  color: var(--text-color);
  z-index: 1100;
}

/* === САЙДБАР === */
.fixed-intro {
  position: fixed;
  top: 0;
  left: 0;
  width: 200px;
  height: 100%;
  background: var(--card-bg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-side);
  transition: transform 0.3s ease-in-out;
  z-index: 1000;
}

/* === НАВІГАЦІЯ === */
.nav-list {
  list-style: none;
  margin-top: 1rem;
  margin-bottom: 48px;
}

.nav-list li {
  margin: 0.8rem 0;
}

.nav-list a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: bold;
  transition: color 0.2s;
}

.nav-list a:hover {
  color: var(--accent-color);
}

/* === ПЕРЕМИКАЧ ТЕМИ === */
#theme-toggle {
  position: fixed;
  top: 15px;
  right: 20px;
  z-index: 9999;
  background: var(--card-bg);
  color: var(--text-color);
  border: none;
  border-radius: 50%;
  padding: 0.5rem;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: background 0.3s, color 0.3s, transform 0.2s;
}

#theme-toggle:hover {
  transform: scale(1.1);
}

/* === СОЦІАЛЬНІ ЛІНКИ === */
.social-links {
  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
  background: var(--card-bg);
  padding: 0.5rem 1rem;
  display: flex;
  gap: 0.5rem;
  z-index: 1001;
  flex-wrap: wrap;
}

.social-links a {
  font-size: 1.5rem;
  color: var(--text-color);
  transition: transform 0.3s, color 0.3s;
}

.social-links a:hover {
  transform: scale(1.2);
  color: var(--accent-color);
}

/* === СЕКЦІЯ SKILLS === */
.skills-icons {
  font-size: 48px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}

.skills-icons > * {
  width: 48px;
  height: 48px;
  fill: #333;
  color: #333;
  transition: transform 0.3s ease, fill 0.3s ease;
}

.skills-icons > *:hover {
  transform: scale(1.2);
  fill: var(--accent-color);
  color: var(--accent-color);
}

/* === КАРТКИ ПРОЄКТІВ === */
.project-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.project-card {
  background: var(--card-bg);
  padding: 1rem;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s, box-shadow 0.3s;
  height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px var(--shadow-color);
}

.project-card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.project-card h3 {
  margin: 0.5rem 0;
}

.project-card a {
  color: var(--accent-color);
  font-weight: bold;
  text-decoration: none;
}

.project-card a:hover {
  color: #0056b3;
}

/* === ФОРМА === */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
}

input, textarea {
  padding: 0.8rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: var(--card-bg);
  color: var(--text-color);
}

button[type="submit"] {
  background: var(--accent-color);
  color: white;
  padding: 0.8rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

button[type="submit"]:hover {
  background: #0056b3;
}

/* === БЛОГ / FAQ / ВІДГУКИ === */
.blog-post,
.faq-item,
.testimonial-card {
  background-color: var(--card-bg);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 1.5rem;
}

.blog-post h3,
.faq-item h3 {
  font-size: 1.5rem;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.blog-post p,
.faq-item p {
  font-size: 1rem;
}

.blog-post a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: bold;
}

.blog-post a:hover {
  color: #0056b3;
}

.testimonial-card:hover {
  transform: translateY(-5px);
}

.testimonial-card p {
  font-style: italic;
}

.testimonial-card h4 {
  text-align: right;
  font-weight: bold;
}

/* === ЕФЕКТ GLOW === */
.glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 30%, transparent 70%);
  filter: blur(20px);
  z-index: -1;
  pointer-events: none;
}

/* === МОБІЛЬНА АДАПТАЦІЯ === */
@media (max-width: 768px) {
  .fixed-intro {
    transform: translateX(-100%);
    width: 220px;
  }

  .fixed-intro.active {
    transform: translateX(0);
  }

  main {
    margin-left: 0;
    padding: 1rem;
    margin-top: 100px;
  }

  #hamburger {
    display: block;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  form {
    max-width: 100%;
    padding: 1rem;
  }

  .social-links {
    justify-content: center;
    margin-top: 2rem;
    position: static;
  }

  .skills-icons {
    justify-content: center;
    gap: 12px;
  }

  .skills-icons > * {
    font-size: 28px;
    width: 28px;
    height: 28px;
  }

  .project-card {
    height: auto;
  }

  .project-card img {
    height: 150px;
  }
}

/* Десктопна адаптація соцлінків */
@media (min-width: 768px) {
  .social-links {
    background-color: unset;
    position: fixed;
    bottom: 20px;
    flex-direction: row;
  }
}
