/* ========================================
   SKILLS PAGE - Vakhim Krean 2025
   Refined layout, mobile menu, and section styling
======================================== */

:root {
  --bg-start: #0a0a1a;
  --bg-end: #1a1a2e;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-strong: rgba(16, 20, 44, 0.72);
  --surface-soft: rgba(255, 255, 255, 0.08);
  --line: rgba(0, 221, 235, 0.2);
  --line-strong: rgba(0, 221, 235, 0.35);
  --text: #e0e0ff;
  --muted: rgba(224, 224, 255, 0.78);
  --accent: #00ddeb;
  --accent-2: #ff6bd6;
  --accent-3: #00ffaa;
  --shadow: 0 25px 60px rgba(0, 0, 0, 0.34);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(0, 221, 235, 0.12), transparent 30%),
    radial-gradient(circle at top right, rgba(255, 107, 214, 0.14), transparent 26%),
    linear-gradient(135deg, var(--bg-start), var(--bg-end));
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.6s ease, color 0.6s ease;
}

body.light {
  --surface: rgba(255, 255, 255, 0.7);
  --surface-strong: rgba(255, 255, 255, 0.88);
  --surface-soft: rgba(255, 255, 255, 0.9);
  --line: rgba(0, 156, 184, 0.16);
  --line-strong: rgba(0, 156, 184, 0.28);
  --text: #1a1a2e;
  --muted: rgba(26, 26, 46, 0.76);
  --shadow: 0 22px 50px rgba(82, 103, 148, 0.18);
  background:
    radial-gradient(circle at top left, rgba(0, 221, 235, 0.12), transparent 30%),
    radial-gradient(circle at top right, rgba(255, 107, 214, 0.16), transparent 26%),
    linear-gradient(135deg, #f8faff, #e6ecff);
}

body > br {
  display: none;
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 26rem;
  height: 26rem;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.22;
  pointer-events: none;
  z-index: -1;
}

body::before {
  top: -10rem;
  left: -8rem;
  background: rgba(0, 221, 235, 0.45);
}

body::after {
  right: -10rem;
  bottom: 10rem;
  background: rgba(255, 107, 214, 0.4);
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1.3rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(16px);
  background: rgba(10, 10, 26, 0.75);
  border-bottom: 1px solid var(--line);
  transition: all 0.4s ease;
}

.navbar.scrolled {
  padding: 0.9rem 5%;
  background: rgba(10, 10, 26, 0.95);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

body.light .navbar {
  background: rgba(248, 250, 255, 0.78);
}

body.light .navbar.scrolled {
  background: rgba(248, 250, 255, 0.96);
}

.logo {
  font-size: 1.9rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: logoPulse 3s infinite ease-in-out;
}

@keyframes logoPulse {
  0%,
  100% {
    text-shadow: 0 0 12px rgba(0, 221, 235, 0.5);
  }
  50% {
    text-shadow: 0 0 25px rgba(0, 221, 235, 0.9), 0 0 35px rgba(0, 255, 170, 0.7);
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  margin-right: 20px;
  list-style: none;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--accent);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 999px;
  transform: translateX(-50%);
  transition: width 0.4s ease, left 0.4s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
  left: 0;
  transform: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 32px;
  height: 24px;
  margin-right: 4.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1002;
}

.hamburger .bar {
  width: 100%;
  height: 4px;
  background: var(--accent);
  border-radius: 10px;
  transition: all 0.35s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.hamburger.active .bar:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}

.hamburger.active .bar:nth-child(2) {
  opacity: 0;
  transform: translateX(20px);
}

.hamburger.active .bar:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

body.menu-open::before {
  content: "";
  position: fixed;
  inset: 0;
  width: auto;
  height: auto;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.7);
  filter: none;
  opacity: 1;
  z-index: 1000;
}

.theme-btn {
  position: fixed;
  top: 10px;
  right: 20px;
  z-index: 1001;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
}

.theme-btn:hover {
  transform: scale(1.12);
  box-shadow: 0 0 22px rgba(0, 221, 235, 0.6);
}

body.light .theme-btn {
  background: rgba(255, 255, 255, 0.86);
}

.theme-btn .icon {
  width: 26px;
  height: 26px;
  position: absolute;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.theme-btn .sun {
  transform: translateY(0);
  opacity: 1;
}

.theme-btn .moon {
  transform: translateY(60px);
  opacity: 0;
}

body.light .theme-btn .sun {
  transform: translateY(-60px);
  opacity: 0;
}

body.light .theme-btn .moon {
  transform: translateY(0);
  opacity: 1;
}

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 6.5rem 5% 2rem;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto 5% 10% auto;
  width: 180px;
  height: 180px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08)) padding-box,
    linear-gradient(135deg, rgba(0, 221, 235, 0.5), rgba(255, 107, 214, 0.24)) border-box;
  border: 1px solid transparent;
  border-radius: 28px;
  transform: rotate(18deg);
  opacity: 0.35;
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 4rem;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  align-items: center;
}

.hero-content {
  animation: fadeLeft 1s ease-out;
}

.hero-content h1 {
  font-size: clamp(2.8rem, 5vw, 4.3rem);
  line-height: 1.05;
  margin-bottom: 1.2rem;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.desc {
  font-size: 1.12rem;
  line-height: 1.9;
  max-width: 620px;
  color: var(--muted);
}

.desc strong {
  color: var(--text);
}

.hero-image {
  text-align: center;
  animation: fadeRight 1s ease-out;
}

.hexagon {
  width: 340px;
  height: 340px;
  position: relative;
  overflow: visible;
  margin: 0 auto;
  transition: all 0.6s ease;
  animation: float 7s ease-in-out infinite;
}

.hexagon::before {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: linear-gradient(135deg, #22d9ff 0%, #9bbcff 48%, #ef8ce9 100%);
  box-shadow:
    0 0 22px rgba(0, 221, 235, 0.65),
    0 0 50px rgba(0, 221, 235, 0.35);
}

.hexagon::after {
  content: "";
  position: absolute;
  inset: 10px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.16), transparent 58%),
    rgba(8, 11, 28, 0.2);
  backdrop-filter: blur(2px);
  z-index: 0;
}

.hexagon .avatar {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 88%;
  height: 112%;
  object-fit: contain;
  object-position: center bottom;
  display: block;
  transform: translateX(-50%);
  transition: all 0.7s ease;
  z-index: 1;
}

.hexagon .avatar-base {
  clip-path: polygon(50% 1%, 98% 25%, 98% 75%, 50% 99%, 2% 75%, 2% 25%);
  z-index: 1;
}

.hexagon .avatar-top {
  clip-path: inset(0 0 54% 0);
  z-index: 3;
  pointer-events: none;
}

.hero-image:hover .hexagon {
  transform: translateY(-12px) scale(1.04);
}

.hero-image:hover .hexagon::before {
  box-shadow:
    0 0 30px rgba(0, 221, 235, 0.8),
    0 0 65px rgba(0, 221, 235, 0.45);
}

.hero-image:hover .hexagon .avatar {
  transform: translateX(-50%) scale(1.06);
  filter: brightness(1.08) contrast(1.08);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}

section {
  position: relative;
  padding: 6rem 0;
}

h2 {
  font-size: clamp(2rem, 3vw, 2.5rem);
  text-align: center;
  margin-bottom: 2.8rem;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tech,
.stats {
  background: linear-gradient(180deg, rgba(16, 20, 44, 0.56), rgba(8, 11, 28, 0.3));
  backdrop-filter: blur(12px);
}

body.light .tech,
body.light .stats {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.28));
}

.list {
  display: grid;
  gap: 1.3rem;
}

.skill {
  padding: 1.3rem 1.4rem;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.skill.visible {
  opacity: 1;
  transform: translateY(0);
}

.skill:hover {
  border-color: rgba(0, 221, 235, 0.45);
  box-shadow: 0 24px 54px rgba(0, 221, 235, 0.16);
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.label {
  font-size: 1rem;
  font-weight: 500;
}

.perc {
  flex-shrink: 0;
  font-weight: 700;
  color: var(--accent);
}

.bar {
  height: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.prog {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 20px rgba(0, 221, 235, 0.45);
  transition: width 1.8s cubic-bezier(0.65, 0, 0.35, 1);
}

.prog::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  animation: shimmer 2.8s linear infinite;
}

@keyframes shimmer {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

.soft .grid,
.stats .grid {
  display: grid;
  gap: 1.7rem;
}

.soft .grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stats .grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.box,
.stat {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.box::before,
.stat::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 221, 235, 0.14), transparent 48%, rgba(255, 107, 214, 0.1));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.box {
  padding: 1.9rem 1.5rem;
  text-align: center;
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    background 0.3s ease;
}

.box.visible {
  opacity: 1;
  transform: translateY(0);
}

.box:hover {
  background: rgba(0, 221, 235, 0.12);
  border-color: rgba(0, 221, 235, 0.42);
  box-shadow: 0 26px 55px rgba(0, 221, 235, 0.24);
}

.box:hover::before,
.stat:hover::before {
  opacity: 1;
}

.box span {
  position: relative;
  display: block;
  margin-bottom: 0.65rem;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--accent);
  z-index: 1;
}

.box p {
  position: relative;
  color: var(--muted);
  font-size: 0.97rem;
  z-index: 1;
}

.stat {
  padding: 2.1rem 1.5rem;
  text-align: center;
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.stat.visible {
  opacity: 1;
  transform: translateY(0);
}

.stat:hover {
  border-color: rgba(255, 107, 214, 0.35);
  box-shadow: 0 28px 58px rgba(255, 107, 214, 0.14);
}

.stat h3 {
  position: relative;
  font-size: clamp(2.8rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.9rem;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  z-index: 1;
}

.stat p {
  position: relative;
  color: var(--muted);
  font-size: 1.02rem;
  z-index: 1;
}

.footer {
  padding: 4rem 5% 2rem;
  background: rgba(10, 10, 26, 0.95);
  border-top: 1px solid rgba(0, 221, 235, 0.2);
  backdrop-filter: blur(12px);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 300px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #00ddeb, transparent);
  transform: translateX(-50%);
  animation: footerGlow 4s infinite ease-in-out;
}

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

.copyright {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.copyright strong {
  background: linear-gradient(90deg, #00ddeb, #00ffaa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.kh {
  background: linear-gradient(90deg, #ff6bd6, #ff8c42);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  font-style: italic;
}

.time {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-bottom: 1.5rem;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.5px;
}

.time strong {
  color: #00ddeb;
}

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

.footer .social-link {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(0, 221, 235, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s;
  position: relative;
  overflow: hidden;
}

.footer .social-link::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, #00ddeb, transparent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.footer .social-link:hover::before {
  width: 200px;
  height: 200px;
}

.footer .social-link .icon {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
  transition: all 0.4s;
  position: relative;
  z-index: 1;
}

.footer .social-link:hover .icon {
  filter: brightness(0) invert(0);
  transform: scale(1.2) rotate(15deg);
}

.footer .social-link:hover {
  border-color: #00ddeb;
  box-shadow: 0 0 25px rgba(0, 221, 235, 0.5);
  transform: translateY(-5px);
}

body.light .footer {
  background: rgba(248, 250, 255, 0.95);
  border-top: 1px solid rgba(0, 221, 235, 0.15);
}

body.light .footer .social-link {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 221, 235, 0.2);
}

body.light .footer .social-link .icon {
  filter: brightness(0) invert(0);
}

body.light .footer .social-link:hover .icon {
  filter: brightness(0) invert(1);
}

@keyframes fadeLeft {
  from {
    opacity: 0;
    transform: translateX(-60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeRight {
  from {
    opacity: 0;
    transform: translateX(60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 992px) {
  .hero {
    padding-top: 7rem;
    padding-bottom: 3rem;
  }

  .hero::before {
    width: 140px;
    height: 140px;
    right: 8%;
    bottom: 12%;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-image {
    order: -1;
    margin-bottom: 1rem;
  }

  .desc {
    margin: 0 auto;
  }

  .hexagon {
    width: 280px;
    height: 280px;
  }

  .hexagon .avatar {
    bottom: 0;
    width: 88%;
    height: 110%;
    object-position: center bottom;
  }
}

@media (max-width: 868px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(300px, 82vw);
    height: 100vh;
    background: rgba(10, 10, 26, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3.5rem;
    padding: 2rem;
    box-shadow: -15px 0 40px rgba(0, 0, 0, 0.6);
    transition: right 0.5s cubic-bezier(0.77, 0, 0.18, 1);
    z-index: 1001;
  }

  body.light .nav-links {
    background: rgba(248, 250, 255, 0.98);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links a {
    font-size: 1.6rem;
    font-weight: 600;
  }

  .nav-links a::after {
    display: none;
  }
}

@media (max-width: 600px) {
  .hero {
    padding-top: 6.5rem;
    padding-bottom: 2rem;
  }

  .hero::before {
    display: none;
  }

  .hexagon {
    width: 220px;
    height: 220px;
  }

  .hexagon .avatar {
    bottom: 0;
    width: 90%;
    height: 108%;
    object-position: center bottom;
  }

  .row {
    flex-direction: column;
    align-items: flex-start;
  }

  .perc {
    align-self: flex-end;
  }

  .box,
  .stat,
  .skill {
    padding-left: 1.2rem;
    padding-right: 1.2rem;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 1rem 5%;
  }

  .logo {
    font-size: 1.6rem;
  }

  .hamburger {
    margin-right: 72px;
  }

  section {
    padding: 4.8rem 0;
  }

  .social {
    gap: 1rem;
  }
}
