/* ============ Base / tokens ============ */
:root {
  --bg: #07070d;
  --bg-soft: #0d0d18;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8e9f0;
  --text-dim: #9aa0b4;
  --text-muted: #6b7088;

  --cyan: #4dd0ff;
  --purple: #8b5cf6;
  --pink: #ec4899;
  --grad: linear-gradient(90deg, var(--cyan), var(--purple) 55%, var(--pink));

  --radius: 18px;
  --radius-lg: 28px;
  --max-w: 1140px;

  --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 60px rgba(139, 92, 246, 0.25);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: var(--text); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--cyan); }

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

/* ============ Background glow ============ */
.bg-glow {
  position: fixed;
  inset: -20% -10% auto -10%;
  height: 70vh;
  background:
    radial-gradient(60% 50% at 30% 20%, rgba(77, 208, 255, 0.18), transparent 70%),
    radial-gradient(50% 50% at 70% 10%, rgba(139, 92, 246, 0.22), transparent 70%),
    radial-gradient(40% 40% at 50% 40%, rgba(236, 72, 153, 0.12), transparent 70%);
  pointer-events: none;
  z-index: 0;
  filter: blur(20px);
}

/* ============ Nav ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 48px);
  backdrop-filter: blur(16px);
  background: rgba(7, 7, 13, 0.6);
  border-bottom: 1px solid var(--border);
}

.nav-brand { display: flex; align-items: center; }
.nav-logo { height: 32px; width: auto; }

.nav-links {
  display: flex;
  gap: clamp(16px, 3vw, 32px);
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
}
.nav-links a:hover { color: var(--text); }

/* Hamburger toggle (hidden on desktop) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ Layout helpers ============ */
main { position: relative; z-index: 1; }

.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(60px, 10vw, 120px) clamp(20px, 5vw, 48px);
}

.section-head {
  text-align: center;
  margin-bottom: clamp(36px, 6vw, 64px);
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}

.section-sub {
  color: var(--text-dim);
  margin: 0;
  font-size: 16px;
}

/* ============ Hero ============ */
.hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(60px, 12vw, 140px) clamp(20px, 5vw, 48px) clamp(40px, 8vw, 80px);
  text-align: center;
}

.hero-logo {
  width: clamp(220px, 36vw, 360px);
  height: auto;
  margin: 0 auto 28px;
  filter: drop-shadow(0 0 40px rgba(139, 92, 246, 0.35));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero-title {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 20px;
  max-width: 900px;
  margin-inline: auto;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(16px, 1.8vw, 19px);
  color: var(--text-dim);
  max-width: 620px;
  margin: 0 auto 36px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============ Buttons ============ */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.btn-sm {
  padding: 9px 18px;
  font-size: 14px;
}

.btn-primary {
  background: var(--grad);
  color: #0a0a14;
  box-shadow: 0 8px 30px rgba(77, 208, 255, 0.25);
}
.btn-primary:hover {
  transform: translateY(-1px);
  color: #0a0a14;
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--surface-hover);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text);
}

/* ============ Cards ============ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(20px, 3vw, 28px);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-4px);
  background: var(--surface-hover);
}

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

.card-icon {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a2e, #0d0d18);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder state when icon image fails to load */
.card-icon img.placeholder {
  width: auto;
  height: auto;
  object-fit: contain;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--text-dim);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.card-body { display: flex; flex-direction: column; gap: 10px; }

.card-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.card-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

.card-tagline {
  font-size: 15px;
  color: var(--text-dim);
  margin: 0;
  font-style: italic;
}

.card-desc {
  font-size: 14.5px;
  color: var(--text-dim);
  margin: 6px 0 0;
  line-height: 1.6;
}

.card-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

/* ============ Badges ============ */
.badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge-live {
  background: rgba(74, 222, 128, 0.12);
  color: #6ee7a3;
  border-color: rgba(74, 222, 128, 0.3);
}
.badge-dev {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.3);
}
.badge-beta {
  background: rgba(77, 208, 255, 0.12);
  color: #6fd6ff;
  border-color: rgba(77, 208, 255, 0.32);
}
.badge-internal {
  background: rgba(139, 92, 246, 0.15);
  color: #b89aff;
  border-color: rgba(139, 92, 246, 0.35);
}

/* ============ App deep-dives ============ */
.apps {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4vw, 44px);
}

.app {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 40px);
  scroll-margin-top: 90px;
}

.app-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.app-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  flex-shrink: 0;
}
.app-icon.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-dim);
  background: linear-gradient(135deg, #1a1a2e, #0d0d18);
}

.app-title {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.app-lede {
  font-size: clamp(16px, 1.6vw, 18px);
  color: var(--text-dim);
  margin: 0 0 24px;
  max-width: 760px;
}

.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px 28px;
}

.feature-grid li {
  font-size: 14.5px;
  color: var(--text-dim);
  line-height: 1.55;
  padding-left: 18px;
  position: relative;
}
.feature-grid li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--grad);
}
.feature-grid li strong {
  display: block;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}

.app-note {
  margin: 22px 0 0;
  font-size: 13.5px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

/* ============ About ============ */
.about {
  max-width: 720px;
  margin: 0 auto;
  font-size: 17px;
  color: var(--text-dim);
  text-align: center;
}
.about p { margin: 0 0 16px; }
.about a {
  color: var(--cyan);
  border-bottom: 1px solid rgba(77, 208, 255, 0.35);
}
.about a:hover { border-bottom-color: var(--cyan); }

/* ============ Bio (About me) ============ */
.bio {
  max-width: 720px;
  margin: 0 auto;
  color: var(--text-dim);
  font-size: 17px;
}
.bio p {
  margin: 0 0 18px;
  line-height: 1.75;
}
.bio-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.bio-photo {
  width: 160px;
  height: 160px;
  border-radius: 20px;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  flex-shrink: 0;
}
.bio-photo.hidden { display: none; }
.bio-header-text { display: flex; flex-direction: column; }
.bio-intro {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin: 0;
}
.bio-role {
  color: var(--text-dim);
  font-size: 16px;
  margin: 6px 0 0;
}
.bio-accent {
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
}
.bio-quote {
  margin: 40px 0 0;
  padding: 28px 0 0;
  border: 0;
  border-top: 1px solid var(--border);
  font-size: clamp(20px, 2.8vw, 30px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
  text-align: center;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============ Contact ============ */
.contact { text-align: center; }
.contact-email {
  display: inline-block;
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}
.contact-email:hover {
  filter: brightness(1.1);
  color: transparent;
}
.contact-note {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 12px;
}

/* ============ Footer ============ */
.footer {
  margin-top: 60px;
  padding: 40px clamp(20px, 5vw, 48px);
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-logo { height: 26px; opacity: 0.8; }
.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

/* ============ Responsive tweaks ============ */
@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 0;
    background: rgba(7, 7, 13, 0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    font-size: 16px;
    padding: 14px clamp(20px, 5vw, 48px);
    border-top: 1px solid var(--border);
  }
  .nav-links a:first-child { border-top: 0; }
  .card { padding: 22px; }
  .card-icon { width: 72px; height: 72px; border-radius: 18px; }
  .card-title { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-logo { animation: none; }
  .card { transition: none; }
}
