/* ------------------------------------------------------
   ROOT VARIABLES — LIGHT & DARK THEMES
------------------------------------------------------ */

:root {
  --bg: #f5f5f7;
  --text: #111;
  --card-bg: #ffffffcc;
  --accent: #7a5cff;

  --shadow-light: rgba(255,255,255,0.9);
  --shadow-dark: rgba(0,0,0,0.15);

  --glass-bg: rgba(255, 255, 255, 0.35);
  --blur: blur(20px);
}

body.dark {
  --bg: #141414;
  --text: #f0f0f0;
  --card-bg: #1f1f1fdd;
  --accent: #b79aff;

  --shadow-light: rgba(255,255,255,0.05);
  --shadow-dark: rgba(0,0,0,0.5);

  --glass-bg: rgba(40, 40, 40, 0.45);
}

/* ------------------------------------------------------
   BASE STYLES
------------------------------------------------------ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  transition: 0.35s;
}

/* ------------------------------------------------------
   HEADER
------------------------------------------------------ */

.header {
  padding: 25px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 12;
  backdrop-filter: blur(18px);
  background: rgba(255,255,255,0.05);
}

.logo {
  font-size: 32px;
  font-weight: 800;
}

.logo span {
  color: var(--accent);
}

.nav a {
  margin-left: 95px;
  color: var(--text);
  text-decoration: none;
  transition: 0.25s;
  font-weight: 500;
}

.nav a:hover {
  color: var(--accent);
}

.header-buttons {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Theme toggle */
.theme-btn {
  background: var(--card-bg);
  border: none;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 21px;
  cursor: pointer;
  box-shadow: 4px 4px 12px var(--shadow-dark),
              -4px -4px 12px var(--shadow-light);
}

/* Burger */
.burger {
  display: none;
  background: var(--card-bg);
  border: none;
  padding: 8px 14px;
  font-size: 22px;
  border-radius: 10px;
  cursor: pointer;
}

/* ------------------------------------------------------
   MOBILE MENU PANEL
------------------------------------------------------ */

.menu-panel {
  position: fixed;
  right: -300px;
  top: 0;
  height: 100%;
  width: 260px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  padding: 40px 20px;
  box-shadow: -4px 0 20px rgba(0,0,0,0.2);
  transition: 0.35s;
  z-index: 40;
}

.menu-panel a {
  color: var(--text);
  margin: 12px 0;
  font-size: 18px;
  text-decoration: none;
}

.menu-panel.open {
  right: 0;
}

.close-menu {
  align-self: flex-end;
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
  margin-bottom: 30px;
}

/* ------------------------------------------------------
   HERO SECTION
------------------------------------------------------ */

.hero {
  position: relative;
  padding: 40px 120px;
  /* ------------------------------------------------------
  overflow: hidden;
  ------------------------------------------------------ */
}

/* Background blur circles */
.hero-gradient::before,
.hero-gradient::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(140px);
}

.hero-gradient::before {
  width: 400px;
  height: 400px;
  background: #ff9bff;
  top: -80px;
  left: -80px;
}

.hero-gradient::after {
  width: 450px;
  height: 450px;
  background: #6dbaff;
  right: -120px;
  bottom: -60px;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.hero-text {
  max-width: 550px;
}

.hero-text h2 {
  font-size: 46px;
  line-height: 1.3;
  margin-bottom: 15px;
}

.hero-text span {
  color: var(--accent);
}

.hero-text p {
  font-size: 22px;
  opacity: 0.9;
}

.cv-btn {
  margin-right: 10px;
  display: inline-flex;
  margin-top: 25px;
  padding: 14px 30px;
  background: var(--accent) ;
  color: white;
  text-decoration: none;
  font-weight: 600;
  border-radius: 14px;
  transition: 0.25s;
}

.btn {
  display: inline-flex;
  margin-top: 25px;
  padding: 14px 30px;
  background: #d17ffa; 
  color: white;
  text-decoration: none;
  font-weight: 600;
  border-radius: 14px;
  transition: 0.25s;
}

.btn:hover {
  transform: translateY(-3px);
  opacity: 0.9;
}

.hero-photo-wrapper {
  position: relative;
  width: 470px;
}

.hero-photo {
  width: 100%;
  z-index: 3;
  position: relative;
  object-fit: contain;
  pointer-events: none;
}

/* Glow under the photo to hide cut bottom edge */
.photo-glow {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 330px;
  height: 90px;
  background: radial-gradient(circle, rgba(255,255,255,0.8), transparent);
  filter: blur(50px);
  z-index: 1;
}

/* ------------------------------------------------------
   ABOUT
------------------------------------------------------ */

.about {
  padding: 90px 60px;
  text-align: center;
}

.section-title {
  font-size: 34px;
  margin-bottom: 22px;
}

.about-text {
  max-width: 700px;
  margin: 0 auto;
  font-size: 19px;
  opacity: 0.9;
}

/* ------------------------------------------------------
   SERVICES
------------------------------------------------------ */

.services {
  padding: 90px 60px;
  text-align: center;
}

.services-grid {
  display: flex;
  gap: 30px;
  justify-content: center;
}

.service-card {
  width: 30%;
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  padding: 32px;
  border-radius: 20px;
  text-align: center;
  transition: 0.3s;
  box-shadow: 10px 10px 25px var(--shadow-dark),
              -10px -10px 25px var(--shadow-light);
}

.service-card:hover {
  transform: translateY(-8px);
}

.icon {
  font-size: 42px;
  margin-bottom: 14px;
}

/* ------------------------------------------------------
   PORTFOLIO GRID
------------------------------------------------------ */



.portfolio {
  padding: 90px 50px;
  text-align: center;
}

.portfolio-grid {
  display: grid;
  gap: 26px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.work-card {
  height: 220px;
  overflow: hidden;
  border-radius: 18px;
  position: relative;
  cursor: pointer;
  box-shadow: 6px 6px 18px var(--shadow-dark),
              -6px -6px 18px var(--shadow-light);
}

.work-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;   /* 🔥 ключове */
  object-position: center;
  display: block;
  transition: 0.4s;
 } 


.work-card:hover img {
  transform: scale(1.1);
}

/* ------------------------------------------------------
   LIGHTBOX
------------------------------------------------------ */

.lightbox {
  position: fixed;
  inset: 0;
  backdrop-filter: blur(10px);
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 14px;
  box-shadow: 0 0 20px rgba(255,255,255,0.15);
}

#lightboxClose {
  position: absolute;
  top: 40px;
  right: 50px;
  font-size: 36px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

/* ------------------------------------------------------
   CONTACTS
------------------------------------------------------ */

.contacts {
  text-align: center;
  padding: 100px 20px;
  background: var(--glass-bg);
  backdrop-filter: var(--blur);
  border-radius: 20px;
  margin: 40px;
  box-shadow: 
    10px 10px 30px var(--shadow-dark),
    -10px -10px 30px var(--shadow-light);
}

/* Заголовок */
.contacts h2 {
  font-size: 40px;
  margin-bottom: 40px;
  letter-spacing: 1px;
}

/* Email */
.email {
  display: inline-block;
  font-size: 22px;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 50px;
  position: relative;
  transition: 0.3s;
}

.email::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transform: translateX(-50%);
  transition: 0.3s;
}

.email:hover::after {
  width: 100%;
}

/* Соцмережі */
.socials {
  display: flex;
  justify-content: center;
  gap: 40px;
}

.socials a {
  font-size: 18px;
  text-decoration: none;
  color: var(--accent);
  position: relative;
  transition: 0.3s;
}

/* Glow через accent */
.socials a:hover {
  text-shadow: 0 0 10px var(--accent);
}

/* Підкреслення */
.socials a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: 0.3s;
}

.socials a:hover::after {
  width: 100%;
}

/* Footer */
.copyright {
  margin-top: 80px;
  font-size: 14px;
  color: var(--text);
  opacity: 0.6;
}

/* Footer */
.copyright {
  margin-top: 80px;
  font-size: 14px;
  color: #777;
}

/* ------------------------------------------------------
   FOOTER
------------------------------------------------------ */

.footer {
  text-align: center;
  padding: 40px;
  opacity: 0.7;
}

/* ------------------------------------------------------
   TILT EFFECT (3D hover)
------------------------------------------------------ */

.tilt {
  transform-style: preserve-3d;
  transform: perspective(600px);
  transition: 0.2s ease;
}

/* ------------------------------------------------------
   RESPONSIVE
------------------------------------------------------ */


@media (max-width: 1100px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }

  .hero-photo-wrapper {
    width: 340px;
  }

  .services-grid {
    flex-direction: column;
  }

  .service-card {
    width: 100%;
  }
}


/* ------------------------------------------------------
@media (max-width: 1180px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }

  .hero-photo-wrapper {
    width: 400px;
  }

  .services-grid {
    flex-direction: column;
  }

  .service-card {
    width: 100%;
  }

.header {
  padding: 25px 40px;
  
}
.nav a {
  margin-left: 26px;
  color: var(--text);
  text-decoration: none;
  transition: 0.25s;
  font-weight: 500;
}

.header-buttons {
  display: flex;
  align-items: center;
  gap: 14px;
}

  .hero {
    padding: 50px 50px;
  }

  .hero-text h2 {
   font-size: 42px;
   line-height: 1.3;
   margin-bottom: 12px;
   }
}
------------------------------------------------------ */

@media (max-width: 700px) {
  .header {
    padding: 25px 30px;
  }

  .nav {
    display: none;
  }

  .burger {
    display: block;
  }

  .hero {
    padding: 70px 30px;
  }

  .hero-text h2 {
   font-size: 42px;
   line-height: 1.3;
   margin-bottom: 12px;
   }

  .about,
  .services,
  .portfolio,
  .contacts {
    padding: 70px 30px;
  }

  .section-title {
    font-size: 28px;
  }
}