:root {
  --bg-1: #030303;
  --bg-2: #0a0a0a;
  --ink-1: #ffffff;
  --ink-2: #a1a1aa;
  --ink-3: #52525b;
  --accent-1: #818cf8; /* Soft Indigo */
  --accent-2: #f472b6; /* Soft Pink */
  --accent-3: #2dd4bf; /* Teal */
  --accent-gradient: linear-gradient(135deg, #818cf8, #c084fc, #f472b6);
  
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-bg-hover: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-border-hover: rgba(255, 255, 255, 0.15);
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 80px -20px rgba(129, 140, 248, 0.15);
  
  --radius-sm: 12px;
  --radius-md: 24px;
  --radius-lg: 32px;
  
  --font-sans: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --font-serif: "Fraunces", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink-1);
  background-color: var(--bg-1);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Atmospheric Background */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: 
    radial-gradient(circle at 15% 50%, rgba(129, 140, 248, 0.08), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(244, 114, 182, 0.08), transparent 25%);
  pointer-events: none;
  z-index: -1;
  filter: blur(60px);
}

/* Noise Texture */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

/* Layout */
.page {
  padding: 0 24px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 0 80px;
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  margin-bottom: 40px;
  position: relative;
  z-index: 10;
}

.brand {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.02em;
  background: var(--ink-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-image: linear-gradient(to right, #fff, #999);
}

.lang {
  display: inline-flex;
  padding: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 99px;
  border: 1px solid var(--card-border);
  backdrop-filter: blur(10px);
}

.lang a {
  padding: 6px 16px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}

.lang a:hover {
  color: var(--ink-1);
}

.lang a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink-1);
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* Typography & Global */
h1, h2, h3 {
  margin: 0;
  font-family: var(--font-serif);
}

p {
  color: var(--ink-2);
}

.section {
  margin-bottom: 80px;
}

.section h2 {
  font-size: 32px;
  margin-bottom: 32px;
  letter-spacing: -0.03em;
}

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
  min-height: 50vh;
  margin-bottom: 80px;
  position: relative;
}

.hero-content {
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-1);
  margin-bottom: 24px;
  padding: 6px 14px;
  background: rgba(129, 140, 248, 0.1);
  border-radius: 100px;
  border: 1px solid rgba(129, 140, 248, 0.2);
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent-1);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent-1);
}

.hero h1 {
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  background: linear-gradient(to bottom right, #fff 30%, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mobile-break {
  display: none;
}

.hero .lead {
  font-size: 17px;
  line-height: 1.6;
  max-width: 500px;
  margin-bottom: 40px;
  font-weight: 300;
}

.cta .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  background: var(--ink-1);
  color: var(--bg-1);
  font-weight: 600;
  font-size: 16px;
  border-radius: 99px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cta .button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
}

/* Hero Visual (Right Side) */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.blob {
  position: absolute;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.4), rgba(244, 114, 182, 0.1), transparent 60%);
  filter: blur(40px);
  z-index: 0;
  animation: blobPulse 8s infinite alternate ease-in-out;
}

@keyframes blobPulse {
  0% { transform: scale(0.9) translate(0, 0); }
  100% { transform: scale(1.1) translate(20px, -20px); }
}

.phone-frame {
  position: relative;
  width: 240px;
  height: 480px;
  background: #050505;
  border-radius: 36px;
  box-shadow: 
    0 0 0 4px #1a1a1a,
    0 0 0 6px #333,
    0 20px 50px -10px rgba(0,0,0,0.8);
  z-index: 1;
  overflow: hidden;
  transform: rotate(-6deg) translateY(20px);
  transition: transform 0.5s ease;
}

.hero-visual:hover .phone-frame {
  transform: rotate(0deg) translateY(0);
}

.screen {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #111 0%, #000 100%);
  position: relative;
  overflow: hidden;
}

.screen::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 30px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.05), transparent);
  z-index: 2;
}

/* Abstract UI in phone */
.screen-content {
  position: absolute;
  inset: 16px;
  top: 50px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.screen-content::before {
  content: "";
  height: 100px;
  width: 100%;
  background: var(--accent-gradient);
  border-radius: 16px;
  opacity: 0.8;
}

.screen-content::after {
  content: "";
  height: 50px;
  width: 100%;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  box-shadow: 0 8px 0 rgba(255,255,255,0.05);
}

/* Features Strip */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 80px;
  padding: 32px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
}

.tile {
  padding: 12px;
}

.tile strong {
  display: block;
  font-size: 16px;
  color: var(--ink-1);
  margin-bottom: 6px;
  font-family: var(--font-serif);
}

.tile span {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.5;
}

/* Projects Grid Refined */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); /* Wider cards */
  gap: 24px;
}

.card {
  display: flex;
  flex-direction: row; /* Horizontal layout */
  align-items: flex-start;
  gap: 24px;
  padding: 32px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  background: var(--card-bg-hover);
  border-color: var(--card-border-hover);
  box-shadow: var(--shadow-glow);
}

.app-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, #333, #111);
  flex-shrink: 0;
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
}

.tuner-icon {
  background: linear-gradient(135deg, #f472b6, #db2777);
}
.tuner-icon::after {
  content: "♪";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: white;
}

.metro-icon {
  background: linear-gradient(135deg, #818cf8, #4f46e5);
}
.metro-icon::after {
  content: "⏱";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
}

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--ink-1);
  font-family: var(--font-serif);
}

.card-meta {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-2);
  margin-bottom: 12px;
  font-weight: 600;
  opacity: 0.8;
}

.card .lead {
  font-size: 15px;
  margin-bottom: 20px;
  flex-grow: 1;
}

.card-cta {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255,255,255,0.1);
  border-radius: 99px;
  transition: background 0.2s;
}

.card:hover .card-cta {
  background: var(--ink-1);
  color: var(--bg-1);
}

/* Footer */
.footer {
  border-top: 1px solid var(--card-border);
  padding-top: 64px;
  text-align: center;
  color: var(--ink-3);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Animations */
.stack > * {
  animation: fadeUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.stack > *:nth-child(1) { animation-delay: 100ms; }
.stack > *:nth-child(2) { animation-delay: 200ms; }
.stack > *:nth-child(3) { animation-delay: 300ms; }

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

/* Mobile Responsive */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .mobile-break {
    display: block;
  }

  .hero-visual {
    display: none; /* Hide complex visual on mobile to save space */
  }
  
  .features {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .card {
    flex-direction: column;
    text-align: left;
    gap: 24px;
  }
  
  .card-cta {
    width: 100%;
    justify-content: center;
  }
}
