﻿:root {
  color-scheme: light dark;
  --brand-blue: #3d4dff;
  --brand-purple: #6b21a8;
  --brand-accent: #0ea5e9;
  --brand-deep: #0a0f1f;
  --radius-lg: 24px;
  --shadow-strong: 0 30px 120px rgba(0, 11, 32, 0.55);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Space Grotesk', 'General Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  margin: 0;
  background: #f8fafc;
  color: #0f172a;
}

html.dark body {
  background: #020617;
  color: #e2e8f0;
}

.noise-bg {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 120px 120px;
  opacity: 0.2;
  pointer-events: none;
  z-index: 0;
}

.orb {
  position: fixed;
  width: 420px;
  height: 420px;
  filter: blur(60px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
  animation: float 14s ease-in-out infinite;
}

.orb-blue {
  top: -60px;
  right: -20px;
  background: radial-gradient(circle, rgba(61, 77, 255, 0.55), transparent 70%);
}

.orb-purple {
  bottom: -120px;
  left: -80px;
  background: radial-gradient(circle, rgba(107, 33, 168, 0.45), transparent 70%);
  animation-duration: 18s;
}

.hero-photo {
  position: relative;
  border-radius: clamp(20px, 2vw, 32px);
  overflow: hidden;
  border: 4px solid rgba(62, 80, 255, 0.4);
  box-shadow: var(--shadow-strong);
  background: linear-gradient(145deg, #001e4d, #3356ff);
}

.hero-photo::after {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: clamp(16px, 2vw, 28px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  pointer-events: none;
}

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

.profile-ring {
  position: absolute;
  inset: 12px;
  border-radius: clamp(16px, 2vw, 28px);
  border: 2px solid rgba(14, 165, 233, 0.3);
  animation: pulse 4s infinite;
}

[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), filter 0.9s ease;
  filter: blur(10px);
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

[data-animate="fade-left"] {
  transform: translateX(40px);
}

[data-animate="fade-right"] {
  transform: translateX(-40px);
}

[data-animate="scale-up"] {
  transform: scale(0.92);
}

.glass-panel {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(15, 23, 42, 0.35));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-strong);
}

.dark .glass-panel {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(2, 6, 23, 0.9));
}

.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.65);
  box-shadow: 0 25px 45px rgba(2, 6, 23, 0.45);
}

html:not(.dark) .project-card {
  background: rgba(248, 250, 252, 0.85);
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(61, 77, 255, 0.08), rgba(14, 165, 233, 0.08));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.project-card:hover::before {
  opacity: 1;
}

.project-media {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow-strong);
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-card:hover .project-media img {
  transform: scale(1.05);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  color: #22d3ee;
  background: rgba(34, 211, 238, 0.1);
  animation: pulse 3s infinite;
}

.theme-toggle svg {
  transition: transform 0.4s ease;
}

.theme-toggle:hover svg {
  transform: rotate(15deg) scale(1.05);
}

.contact-card ul {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
}

.contact-card li + li {
  margin-top: 0.6rem;
}

.contact-status {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #22d3ee;
}

.contact-status.error {
  color: #f87171;
}

.site-footer {
  background: rgba(2, 6, 23, 0.9);
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  padding: 3rem 0;
}

.footer-grid h4 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  color: #94a3b8;
}

.site-footer a {
  color: #e2e8f0;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--brand-accent);
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.9rem;
  color: #94a3b8;
}

@keyframes float {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(15px, -20px, 0) scale(1.05); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes pulse {
  0% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.02); }
  100% { opacity: 0.6; transform: scale(1); }
}

@media (max-width: 640px) {
  .hero-photo::after {
    inset: 6px;
  }
  .profile-ring {
    inset: 6px;
  }
}
