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

:root {
  --bg-dark: #0d0f14;
  --panel-dark: #181a20;
  --accent-neon: #00e5ff;
  --accent-highlight: #8aff80;
  --text-light: #e1e3e8;
  --text-faded: #838997;
  --gradient-main: linear-gradient(135deg, #0d0f14, #1f2228);
  --gradient-accent: linear-gradient(45deg, #00e5ff, #8aff80);
  --font-sans: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-code: 'Source Code Pro', monospace;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--gradient-main);
  color: var(--text-light);
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  background: var(--panel-dark);
  padding: 1.5rem 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

header h1 {
  font-family: var(--font-code);
  font-size: 2rem;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  color: transparent;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.25rem;
  margin-top: 1rem;
}

nav a {
  color: var(--text-faded);
  text-decoration: none;
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.2s ease;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-neon);
  transition: width 0.3s ease;
}

nav a:hover,
nav a:focus {
  color: var(--accent-neon);
}

nav a:hover::after,
nav a:focus::after {
  width: 100%;
}

main {
  flex: 1;
  max-width: 900px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: var(--panel-dark);
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

section h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
  padding-bottom: 0.25rem;
  color: var(--accent-neon);
}

section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40%;
  height: 3px;
  background: var(--gradient-accent);
  border-radius: 2px;
}

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

ul {
  margin-left: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-faded);
}

li + li {
  margin-top: 0.5rem;
}

article {
  background: #21242e;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border-radius: 6px;
  border-left: 4px solid var(--accent-highlight);
  transition: background 0.3s ease, transform 0.2s ease;
}

article:hover {
  background: #2a2e3b;
  transform: translateY(-3px);
}

a {
  color: var(--accent-neon);
  text-decoration: underline;
  transition: color 0.2s ease;
}

a:hover,
a:focus {
  color: var(--accent-highlight);
}

.about-me__photo {
  width: 120px;
  height: 120px;
  overflow: hidden;
  border-radius: 45%;
  margin: 0 auto 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.about-me__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

iframe {
  width: 100%;
  border: none;
  margin: 1rem 0;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

footer {
  background: var(--panel-dark);
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

footer a {
  color: var(--accent-neon);
}

footer a:hover,
footer a:focus {
  color: var(--accent-highlight);
}

:focus-visible {
  outline: 2px dashed var(--accent-highlight);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  header,
  main,
  footer {
    padding: 1rem;
  }
  nav ul {
    flex-direction: column;
    gap: 0.75rem;
  }
  header h1 {
    font-size: 1.5rem;
  }
  section h2 {
    font-size: 1.5rem;
  }
}

.bg-circles {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.bg-circles .circle {
  --delay: calc(var(--i) * 1s);

  position: absolute;
  width: var(--size);
  height: var(--size);
  top: var(--y);
  left: var(--x);

  background: radial-gradient(
    circle at center,
    var(--color) 0%,
    transparent 80%
  );
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.7;

  animation: float var(--duration) ease-in-out infinite alternate-reverse;
  animation-delay: var(--delay);
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }
  20% {
    transform: translate(100px, -120px) scale(1.2);
  }
  40% {
    transform: translate(-140px, 80px) scale(0.8);
  }
  60% {
    transform: translate(160px, 140px) scale(1.1);
  }
  80% {
    transform: translate(-180px, -160px) scale(0.9);
  }
  100% {
    transform: translate(0, 0) scale(1);
  }
}

@media (max-width: 640px) {
  .bg-circles .circle {
    filter: blur(50px);
  }
  .bg-circles .circle:nth-child(n + 4) {
    display: none;
  }
}
