:root {
  --bg: #051b1e; /* Deep rich turquoise/black */
  --surface: rgba(12, 74, 82, 0.4);
  --surface-2: rgba(15, 99, 110, 0.6);
  --text: #e0f8f8;
  --muted: #8badae;
  --line: rgba(0, 229, 255, 0.1);
  --accent: #00e5ff; /* Bright Turquoise */
  --accent-2: #1de9b6; /* Emerald/Teal */
  --max-width: 1180px;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: 
    radial-gradient(circle at 15% 50%, rgba(0, 229, 255, 0.12), transparent 45%),
    radial-gradient(circle at 85% 30%, rgba(29, 233, 182, 0.1), transparent 45%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

h1, h2, h3, h4, .brand, .eyebrow, .section-label, .tech-pill, .button {
  font-family: "Outfit", sans-serif;
}

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

/* Glassmorphism Utilities */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.4);
}

.glass-nav {
  /* Keep transparent */
}

.glass-pill {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
}

/* Hover Effects */
.hover-lift {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.hover-lift:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 229, 255, 0.05);
}

.hover-glow {
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.hover-glow:hover {
  box-shadow: 0 0 50px rgba(29, 233, 182, 0.15);
  border-color: rgba(29, 233, 182, 0.3);
}

/* Layout */
.page-shell {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
}

.site-header {
  padding: 30px 2% 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.brand:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

.site-logo {
  height: 40px;
  width: auto;
}

.nav {
  background-color: rgba(10, 10, 10, 0.4);
  backdrop-filter: blur(12px);
  height: 3.2rem;
  border-radius: 2rem;
  padding: 0 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0,0,0, 0.4), inset 0 1px 1px rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  position: relative;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 1.2rem;
  transition: color 0.3s ease;
  position: relative;
}

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

.nav a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: var(--accent);
  border-radius: 0 0 3px 3px;
  box-shadow: 0 4px 12px 2px var(--accent);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav a:hover::before {
  width: 24px;
}

/* Language Switcher */
.lang-switcher select {
  appearance: none;
  background: rgba(10,10,10,0.6);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: background 0.2s, border-color 0.2s;
}

.lang-switcher select:hover, .lang-switcher select:focus {
  background: rgba(30,30,30,0.8);
  border-color: rgba(255,255,255,0.15);
}

.lang-switcher select option {
  background: #111;
  color: var(--text);
}

/* Hero Section */
.hero {
  min-height: calc(100vh - 88px);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 72px;
  align-items: center;
  padding: 60px 0;
}

.eyebrow,
.section-label {
  margin: 0 0 22px;
  color: var(--accent-2);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  margin-bottom: 28px;
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h1 span {
  background: linear-gradient(135deg, #fff, var(--muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-text {
  max-width: 640px;
  margin-bottom: 40px;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 1.05rem;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.button-primary {
  background: var(--accent);
  color: #000;
  box-shadow: 0 4px 20px rgba(0, 229, 255, 0.2);
}

.button-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 229, 255, 0.4);
}

.button-secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
}

.button-secondary:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Hero Card */
.hero-card {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  border-radius: 32px;
  perspective: 1000px;
}

.card-grid {
  position: absolute;
  inset: 0;
  opacity: 0.15;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 92%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 92%);
  transition: transform 0.3s ease;
}

.hero-card:hover .card-grid {
  transform: scale(1.05);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.5;
}

.orb-one {
  width: 300px;
  height: 300px;
  top: -80px;
  right: -80px;
  background: rgba(29, 233, 182, 0.3);
  animation: float 8s ease-in-out infinite;
}

.orb-two {
  width: 250px;
  height: 250px;
  left: -80px;
  bottom: -100px;
  background: rgba(0, 229, 255, 0.3);
  animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.1); }
}

.status-pill {
  position: absolute;
  top: 32px;
  left: 32px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-radius: 999px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.4);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00e5ff;
  box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.15);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(0, 229, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 229, 255, 0); }
}

.code-card {
  position: absolute;
  right: 32px;
  bottom: 32px;
  width: min(85%, 380px);
  padding: 28px;
  border-radius: 20px;
  color: #c9d1d9;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.95rem;
  line-height: 1.8;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255,255,255,0.08);
}

.code-card span { color: #ff7b72; }
.code-card em { color: #79c0ff; font-style: normal; }

/* Bento Grid */
.bento-section {
  padding: 100px 0;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.bento-box {
  padding: 40px;
  border-radius: 28px;
  display: flex;
  flex-direction: column;
}

.span-2-md {
  grid-column: span 2;
}

.span-4 {
  grid-column: span 4;
}

.bento-content h2 {
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}

.bento-content p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 16px;
}

.bento-content p:last-child {
  margin-bottom: 0;
}

/* Tech Stack */
.tech-stack-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: flex-start;
  margin-top: 10px;
}

.tech-pill {
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 500;
  color: var(--text);
  font-size: 0.95rem;
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
  cursor: default;
}

.tech-pill:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent);
  color: var(--accent);
}

/* Projects */
.projects {
  padding: 100px 0;
}

.projects .section-heading {
  margin-bottom: 48px;
}

.projects .section-heading h2 {
  font-size: clamp(2.5rem, 4vw, 4rem);
  letter-spacing: -0.04em;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-card {
  min-height: 280px;
  padding: 40px;
  border-radius: 28px;
  display: flex;
  flex-direction: column;
}

.project-number {
  display: inline-block;
  margin-bottom: 32px;
  color: var(--accent-2);
  font-size: 1.5rem;
  font-weight: 800;
  font-family: "Outfit", sans-serif;
}

.project-card h3 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

.project-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

/* PopRush Showcase */
.showcase-section {
  padding: 80px 0 120px;
}

.showcase-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  border-radius: 32px;
  overflow: hidden;
  padding: 80px;
  align-items: center;
  background: linear-gradient(145deg, rgba(30, 30, 30, 0.4), rgba(10, 10, 10, 0.8));
}

.showcase-content h2 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 24px;
  letter-spacing: -0.05em;
  background: linear-gradient(90deg, #fff, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.showcase-content p {
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.8;
  margin-bottom: 40px;
}

.showcase-media {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.floating-image {
  max-width: 110%;
  height: auto;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.8));
  animation: floatImage 8s ease-in-out infinite;
}

@keyframes floatImage {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(-1deg); }
}

/* Blog */
#blog {
  padding: 100px 0;
}

.blog-placeholder {
  border-radius: 28px;
  margin-top: 32px;
}

/* Contact */
.contact-section {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  padding: 100px 0;
  border-top: 1px solid var(--line);
}

.contact-section h2 {
  font-size: clamp(2.5rem, 4vw, 4.5rem);
  letter-spacing: -0.04em;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  color: var(--text);
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  font-family: "Outfit", sans-serif;
  font-weight: 600;
  transition: opacity 0.2s, color 0.2s;
}

.contact-link:hover {
  opacity: 1;
  color: var(--accent);
}

/* Footer */
footer {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

/* Animations */
.animate-on-scroll {
  opacity: 0;
  transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}

.fade-in {
  transform: translateY(0);
}

.fade-in-up {
  transform: translateY(40px);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .span-2-md {
    grid-column: span 1;
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 50px;
  }
  .hero-card {
    min-height: 400px;
  }
  .project-grid {
    grid-template-columns: 1fr;
  }
  .showcase-card {
    grid-template-columns: 1fr;
    padding: 50px 30px;
  }
  .contact-section {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(calc(100% - 32px), var(--max-width));
  }
  .site-header {
    height: 80px;
    padding: 20px 0;
  }
  .nav {
    display: none;
  }
  .hero {
    min-height: auto;
    padding: 40px 0 80px;
  }
  h1 {
    font-size: 3.2rem;
  }
  .hero-card {
    min-height: 350px;
  }
  .code-card {
    right: 20px;
    bottom: 20px;
    width: calc(100% - 40px);
    font-size: 0.8rem;
  }
  .bento-box, .project-card {
    padding: 30px;
  }
  .bento-section, .projects, .showcase-section, #blog, .contact-section {
    padding: 70px 0;
  }
  footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }
}
