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

:root {
  /* Core palette */
  --bg-root: #0a0b0f;
  --bg-alt: #10131a;
  --bg-elevated: #161b25;
  --glass-bg: rgba(20, 24, 33, 0.72);
  --glass-border: rgba(255, 255, 255, 0.06);
  --card-bg: linear-gradient(145deg, #131823 0%, #0f1117 100%);
  --card-border: rgba(255, 255, 255, 0.08);

  /* Accent gradient */
  --accent-1: #6366f1;
  --accent-2: #8b5cf6;
  --accent-3: #06b6d4;
  --accent-4: #10b981;
  --accent-gradient: linear-gradient(
    135deg,
    var(--accent-2) 0%,
    var(--accent-1) 35%,
    var(--accent-3) 70%,
    var(--accent-4) 100%
  );
  --accent-radial:
    radial-gradient(circle at 30% 30%, rgba(99, 102, 241, 0.35), transparent 70%),
    radial-gradient(circle at 70% 70%, rgba(6, 182, 212, 0.25), transparent 70%);

  /* Text colors */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --text-invert: #0f172a;

  /* Effects */
  --border-color: var(--card-border);
  --shadow-sm: 0 2px 4px -2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px -6px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.6);
  --backdrop-blur: saturate(180%) blur(18px);

  /* Typography */
  --font-sans:
    'Inter', 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto',
    'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Space Grotesk', var(--font-sans);

  font-family: var(--font-sans);
  line-height: 1.55;
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-root);
  -webkit-font-smoothing: antialiased;
}

body {
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg-root);
}
#root {
  min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.15;
  font-family: var(--font-display);
}

h1 {
  font-size: clamp(3rem, 6vw, 4.75rem);
  letter-spacing: -0.03em;
}
h2 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  letter-spacing: -0.02em;
}
h3 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
}

p {
  font-size: 1.05rem;
}

a {
  color: var(--accent-2);
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}
a:hover {
  color: var(--accent-3);
}

button {
  --btn-bg: linear-gradient(135deg, #1e2531, #12161f 60%);
  --btn-border: rgba(255, 255, 255, 0.08);
  --btn-radius: 14px;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--text-primary);
  padding: 1rem 1.75rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
  border-radius: var(--btn-radius);
  cursor: pointer;
  position: relative;
  isolation: isolate;
  transition:
    background 0.4s ease,
    transform 0.35s ease,
    box-shadow 0.4s ease,
    border-color 0.4s ease;
  box-shadow: var(--shadow-sm);
}
button::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.7),
    rgba(99, 102, 241, 0.4),
    rgba(6, 182, 212, 0.45)
  );
  -webkit-mask:
    linear-gradient(#fff, #fff) content-box,
    linear-gradient(#fff, #fff);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
}
button:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(139, 92, 246, 0.5);
}
button:hover::before {
  opacity: 1;
}
button:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

/* Selection */
::selection {
  background: rgba(99, 102, 241, 0.35);
  color: var(--text-primary);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 12px;
}
::-webkit-scrollbar-track {
  background: #0e1116;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #1f2632, #12161f);
  border: 2px solid #0e1116;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #262f3d, #1a202a);
}

/* Utilities */
.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  color: transparent;
}
.text-muted {
  color: var(--text-muted);
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}
.app {
  min-height: 100vh;
  width: 100%;
  background: var(--bg-root);
  position: relative;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 0.9rem 0;
  background: linear-gradient(140deg, rgba(13, 16, 23, 0.85) 0%, rgba(19, 23, 32, 0.65) 60%);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 28px -6px rgba(0, 0, 0, 0.55);
  transition:
    background 0.4s ease,
    border-color 0.4s ease,
    transform 0.4s ease;
}

.navbar.scrolled {
  background: linear-gradient(140deg, rgba(15, 19, 27, 0.92) 0%, rgba(24, 28, 38, 0.85) 70%);
  border-color: rgba(255, 255, 255, 0.09);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2.25rem;
}

.nav-brand {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  font-family: var(--font-display);
  background: linear-gradient(90deg, #fff, #cbd5e1);
  -webkit-background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.25rem;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  padding: 0.25rem 0.15rem;
  transition: color 0.4s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 0;
  background: var(--accent-gradient);
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2.25rem;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 8.5rem 2.25rem 4.5rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 30%, rgba(99, 102, 241, 0.12), transparent 65%),
    radial-gradient(circle at 70% 65%, rgba(6, 182, 212, 0.1), transparent 70%),
    linear-gradient(180deg, #0a0b0f 0%, #10131a 50%, #0e1116 100%);
  scroll-margin-top: 84px;
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero::before {
  background: var(--accent-radial);
  mix-blend-mode: screen;
  opacity: 0.35;
}

.hero::after {
  background: linear-gradient(
    180deg,
    rgba(10, 11, 15, 0) 0%,
    rgba(10, 11, 15, 0.8) 85%,
    #0a0b0f 100%
  );
}

.hero-content {
  text-align: center;
  z-index: 2;
  max-width: 980px;
}

.hero-title {
  margin-bottom: 1.6rem;
  font-weight: 800;
  line-height: 1.05;
  animation: fadeUp 0.85s ease-out both;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.1vw, 1.6rem);
  color: var(--text-secondary);
  margin: 0 auto 2.75rem;
  font-weight: 400;
  line-height: 1.55;
  max-width: 760px;
  animation: fadeUp 0.85s ease-out 0.15s both;
}

.hero-cta {
  animation: fadeUp 0.85s ease-out 0.3s both;
}

.hero-cta button {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero-visual {
  position: absolute;
  inset: 0;
  max-width: 1600px;
  margin: 0 auto;
  z-index: 1;
  pointer-events: none;
}

/* Floating gradient glass cards (decor) */
.floating-card {
  position: absolute;
  border-radius: 32px;
  background: linear-gradient(
    140deg,
    rgba(99, 102, 241, 0.12) 0%,
    rgba(139, 92, 246, 0.12) 50%,
    rgba(6, 182, 212, 0.12) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: float 10s ease-in-out infinite;
  box-shadow: 0 8px 40px -10px rgba(0, 0, 0, 0.65);
}

.card-1 {
  width: 460px;
  height: 300px;
  top: 12%;
  left: 6%;
  animation-delay: 0s;
}

.card-2 {
  width: 420px;
  height: 260px;
  top: 55%;
  right: 10%;
  animation-delay: 3.2s;
}

.card-3 {
  width: 360px;
  height: 220px;
  bottom: 14%;
  left: 12%;
  animation-delay: 6.4s;
}

/* Image support for floating cards */
.floating-card.has-image {
  background: #0b0e14; /* fallback behind image */
  overflow: hidden;
}

.floating-card.has-image .card-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
  filter: contrast(1.05) saturate(1.05);
}

/* optional subtle overlay for readability if image is bright */
.floating-card.has-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.05));
  pointer-events: none;
}

/* Sections */
.section {
  padding: 6.5rem 0;
  position: relative;
  scroll-margin-top: 84px;
}

.section-title {
  text-align: center;
  margin-bottom: 4.2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 6px;
  background: var(--accent-gradient);
  margin: 1.6rem auto 0;
  border-radius: 4px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 8px 24px -6px rgba(99, 102, 241, 0.45);
}

/* About Section */
.about-section {
  background: linear-gradient(180deg, #10131a 0%, #161b25 100%);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4.5rem;
  max-width: 1180px;
  margin: 0 auto;
}

.about-text p {
  margin-bottom: 1.4rem;
  color: var(--text-secondary);
  line-height: 1.65;
  font-size: 1.05rem;
}

.skills h3 {
  margin-bottom: 1.8rem;
  color: var(--text-primary);
  font-weight: 600;
  font-family: var(--font-display);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.skill-tag {
  padding: 0.65rem 1.15rem;
  background: linear-gradient(145deg, #131823, #0f1117);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.05em;
  position: relative;
  overflow: hidden;
  transition:
    color 0.35s ease,
    border-color 0.35s ease,
    background 0.35s ease,
    transform 0.35s ease;
}

.skill-tag::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.45s ease;
  mix-blend-mode: overlay;
}

.skill-tag:hover {
  color: var(--text-primary);
  border-color: rgba(139, 92, 246, 0.5);
  transform: translateY(-3px);
}

.skill-tag:hover::after {
  opacity: 0.4;
}

/* Work Section */
.work-section {
  background: linear-gradient(180deg, #161b25 0%, #10131a 100%);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.75rem;
  max-width: 1400px;
  margin: 0 auto;
}

.portfolio-item {
  background: var(--card-bg);
  border-radius: 22px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-md);
  transition:
    transform 0.55s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.55s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.55s ease;
}

.portfolio-item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.55),
    rgba(139, 92, 246, 0.4),
    rgba(6, 182, 212, 0.5)
  );
  -webkit-mask:
    linear-gradient(#fff, #fff) content-box,
    linear-gradient(#fff, #fff);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.55s ease;
}

.portfolio-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(139, 92, 246, 0.5);
}

.portfolio-item:hover::before {
  opacity: 0.85;
}

.portfolio-image {
  height: 240px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(6, 182, 212, 0.15) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.portfolio-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08), transparent 70%);
  opacity: 0;
  transition: opacity 0.55s ease;
}

.portfolio-item:hover .portfolio-image::after {
  opacity: 1;
}

.video-placeholder,
.audio-placeholder {
  color: var(--accent-2);
  opacity: 0.75;
  transition:
    transform 0.55s ease,
    opacity 0.55s ease;
  z-index: 1;
}

.portfolio-item:hover .video-placeholder,
.portfolio-item:hover .audio-placeholder {
  transform: scale(1.15);
  opacity: 1;
}

.portfolio-info {
  padding: 1.85rem 1.85rem 2.15rem;
  position: relative;
}

.portfolio-info h3 {
  margin-bottom: 0.65rem;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

.portfolio-info p {
  color: var(--text-secondary);
  line-height: 1.55;
  font-size: 0.9rem;
}

/* Contact Section */
.contact-section {
  background: linear-gradient(180deg, #10131a 0%, #161b25 100%);
}

.contact-content {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

.contact-text {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 3.2rem;
  line-height: 1.65;
  font-weight: 400;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  align-items: center;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.65rem;
  background: linear-gradient(145deg, #131823, #0f1117);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
  min-width: 320px;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.45s ease,
    color 0.45s ease,
    border-color 0.45s ease,
    box-shadow 0.45s ease;
}

.contact-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.5),
    rgba(139, 92, 246, 0.3),
    rgba(6, 182, 212, 0.4)
  );
  opacity: 0;
  transition: opacity 0.55s ease;
  mix-blend-mode: overlay;
}

.contact-link:hover {
  color: var(--text-primary);
  transform: translateX(10px);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: var(--shadow-md);
}

.contact-link:hover::before {
  opacity: 0.6;
}

.contact-link svg {
  flex-shrink: 0;
  transition:
    transform 0.45s ease,
    color 0.45s ease;
}

.contact-link:hover svg {
  transform: scale(1.15);
  color: var(--text-primary);
}

/* Footer */
.footer {
  background: #0d1016;
  padding: 2.75rem 0;
  text-align: center;
  border-top: 1px solid var(--glass-border);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.15), transparent 70%);
  opacity: 0.4;
  pointer-events: none;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-30px) rotate(2deg);
  }
  66% {
    transform: translateY(-15px) rotate(-2deg);
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .nav-links {
    gap: 1.6rem;
  }

  .hero {
    padding: 7.5rem 1.75rem 4rem;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 3.75rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    gap: 1.15rem;
  }

  .nav-links a {
    font-size: 0.7rem;
  }

  .hero-title {
    font-size: clamp(2.65rem, 8vw, 3.25rem);
  }

  .hero-subtitle {
    font-size: clamp(1rem, 3.8vw, 1.25rem);
  }

  .floating-card {
    display: none;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 2.2rem;
  }

  .section {
    padding: 4.75rem 0;
  }

  .contact-link {
    min-width: 100%;
  }
}

@media (max-width: 520px) {
  .navbar .container {
    padding: 0 1.15rem;
  }

  .nav-brand {
    font-size: 1.05rem;
  }

  .nav-links {
    gap: 0.85rem;
  }

  .hero {
    padding: 6.5rem 1.15rem 3.75rem;
  }

  .section {
    padding: 3.75rem 0;
  }

  .section-title {
    margin-bottom: 2.85rem;
  }

  button {
    padding: 0.85rem 1.5rem;
    font-size: 0.85rem;
  }
}
