:root {
  --bg:        #0f1117;
  --surface:   #1a222c;
  --border:    #2a3444;
  --accent:    #7c3aed;
  --accent-hi: #a78bfa;
  --text:      #e2e8f0;
  --muted:     #94a3b8;
  --font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

#intro {
  position: relative;
  height: 100vh;
  height: 100dvh;
  display: grid;
  place-items: center;
  background: var(--bg);
  overflow: hidden;
}

#intro::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 50%, rgba(124, 58, 237, 0.18) 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 80% 30%, rgba(124, 58, 237, 0.12) 0%, transparent 70%);
  animation: glow-shift 12s ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes glow-shift {
  0%   { opacity: 1; transform: scale(1) translateX(0); }
  100% { opacity: 0.7; transform: scale(1.08) translateX(2%); }
}

.intro-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem 1.5rem 6rem;
  animation: fade-in 0.8s ease both;
}

@keyframes fade-in {
  from { opacity: 0.01; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #intro::before { animation: none; }
  .intro-content { animation: none; }
  .scroll-chevron { animation: none; }
  .tech-badge:hover { transform: none; }
}

.intro-content h1 {
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.intro-desc {
  font-size: clamp(1rem, 2vw, 1.35rem);
  color: var(--muted);
  margin-top: 0.75rem;
  font-weight: 400;
}

.intro-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.intro-icons a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  transition: border-color 0.2s, color 0.2s;
}

.intro-icons a:hover,
.intro-icons a:focus-visible {
  border-color: var(--accent);
  color: var(--text);
  outline: none;
}

.intro-icons svg {
  fill: currentColor;
  flex-shrink: 0;
}

.scroll-chevron {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 0.5rem;
  animation: bounce 1.8s ease-in-out infinite;
  transition: color 0.2s;
  z-index: 1;
}

.scroll-chevron:hover,
.scroll-chevron:focus-visible {
  color: var(--accent-hi);
  outline: none;
}

.scroll-chevron svg {
  width: 40px;
  height: 40px;
  display: block;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(10px); }
}

#tech {
  background: var(--bg);
  padding: 6rem 1.5rem;
  border-top: 1px solid transparent;
  background-image: linear-gradient(var(--bg), var(--bg)),
                    linear-gradient(90deg, transparent, var(--accent), transparent);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

.tech-inner {
  max-width: 960px;
  margin: 0 auto;
}

#tech h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 600;
  color: var(--text);
  text-align: center;
  margin-bottom: 3rem;
  letter-spacing: -0.01em;
}

#tech h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin: 0.6rem auto 0;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1.25rem;
}

.tech-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  cursor: default;
}

.tech-badge:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 4px 24px rgba(124, 58, 237, 0.15);
  transform: translateY(-2px);
}

.tech-badge img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: invert(40%) sepia(80%) saturate(600%) hue-rotate(220deg) brightness(1.1);
}

.tech-badge span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  letter-spacing: 0.01em;
}

footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--muted);
  font-size: 0.82rem;
}

:focus-visible {
  outline: 2px solid var(--accent-hi);
  outline-offset: 3px;
}

@media (max-width: 550px) {
  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
