/* =============================================
   CSS Custom Properties
   ============================================= */
:root {
  --bg:            #0a0a12;
  --surface:       #0f0f1a;
  --card:          #14141e;
  --card-hover:    #1a1a28;
  --accent:        #7c5cfc;
  --accent-bright: #9d7fe3;
  --accent-glow:   rgba(124, 92, 252, 0.22);
  --cyan:          #22d3ee;
  --cyan-glow:     rgba(34, 211, 238, 0.18);
  --text:          #e2e8f0;
  --text-muted:    #8892a4;
  --text-faint:    #3d4557;
  --border:        rgba(255, 255, 255, 0.07);
  --border-hover:  rgba(255, 255, 255, 0.13);

  --font-heading: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;

  --radius:      12px;
  --radius-sm:   8px;
  --radius-pill: 999px;

  --nav-height:      72px;
  --container-max:   1100px;
  --container-pad:   1.5rem;
  --section-pad:     7rem 0;

  --ease:        0.25s ease;
  --ease-slow:   0.6s ease;
}

/* =============================================
   Reset & Base
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* =============================================
   Utility
   ============================================= */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.section { padding: var(--section-pad); }
.section-alt { background: var(--surface); }

.section-header { margin-bottom: 3.5rem; }

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.18;
  color: var(--text);
}

/* =============================================
   Navbar
   ============================================= */
#navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-height);
  transition: background var(--ease), backdrop-filter var(--ease), box-shadow var(--ease);
}

#navbar.scrolled {
  background: rgba(10, 10, 18, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(130deg, #fff 10%, var(--accent-bright) 60%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 2.25rem;
  align-items: center;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--ease);
  position: relative;
  padding-bottom: 2px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-bright);
  transition: width var(--ease);
}

.nav-link:hover { color: var(--text); }
.nav-link:hover::after { width: 100%; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease);
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =============================================
   Hero
   ============================================= */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Ambient gradient orbs */
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 55% at 50% -10%, rgba(124, 92, 252, 0.2) 0%, transparent 65%),
    radial-gradient(ellipse 55% 45% at 85% 85%, rgba(34, 211, 238, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 40% 30% at 15% 70%, rgba(124, 92, 252, 0.06) 0%, transparent 55%);
  animation: bgPulse 9s ease-in-out infinite alternate;
}

@keyframes bgPulse {
  from { opacity: 0.75; }
  to   { opacity: 1; }
}

/* Subtle grid overlay */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, black, transparent);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 var(--container-pad);
}

.hero-greeting {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 0.4rem;
  animation: fadeUp 0.9s ease 0.2s both;
}

.hero-name {
  font-family: var(--font-heading);
  font-size: clamp(3.75rem, 11vw, 7.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.045em;
  background: linear-gradient(140deg, #ffffff 0%, var(--accent-bright) 45%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
  animation: fadeUp 0.9s ease 0.35s both;
}

.hero-tagline {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--text-muted);
  margin-bottom: 2.75rem;
  min-height: 2em;
  animation: fadeUp 0.9s ease 0.5s both;
}

.tagline-dynamic {
  color: var(--accent-bright);
  font-weight: 500;
}

.tagline-cursor {
  color: var(--accent-bright);
  font-weight: 300;
  margin-left: 1px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero-cta {
  display: flex;
  gap: 0.875rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeUp 0.9s ease 0.65s both;
}

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

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-faint);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  animation: scrollBounce 2.2s ease-in-out infinite, fadeUp 1s ease 1.2s both;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(7px); }
}

/* =============================================
   Buttons
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease), color var(--ease), background var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-bright));
  color: #fff;
  box-shadow: 0 0 18px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--accent-glow), 0 8px 20px rgba(0, 0, 0, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-hover);
}

.btn-outline:hover {
  border-color: var(--accent-bright);
  color: var(--accent-bright);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.78rem;
}

/* =============================================
   About
   ============================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-bio p {
  color: var(--text-muted);
  font-size: 1.025rem;
  line-height: 1.85;
  margin-bottom: 1.25rem;
}

.about-bio p:last-child { margin-bottom: 0; }

.about-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.stack-group {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--ease);
}

.stack-group:hover { border-color: var(--border-hover); }

.stack-label {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 0.875rem;
}

.stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.stack-tag {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  background: rgba(124, 92, 252, 0.1);
  border: 1px solid rgba(124, 92, 252, 0.2);
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* =============================================
   Carousel
   ============================================= */
.carousel-outer { position: relative; }

.carousel-wrapper {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* The clipping viewport */
.carousel-viewport {
  flex: 1;
  overflow: hidden;
  border-radius: var(--radius);
}

/* Flex row of slides; width & slide flex-basis set by JS */
.carousel-track {
  display: flex;
  transition: transform 0.52s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* Each slide is one project */
.carousel-slide { flex-shrink: 0; }

/* ---- Slide card (the clickable link) ---- */
.slide-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: border-color var(--ease), box-shadow var(--ease);
}

.slide-card:hover {
  border-color: rgba(124, 92, 252, 0.38);
  box-shadow: 0 0 48px var(--accent-glow), 0 16px 40px rgba(0,0,0,0.4);
}

/* Browser chrome bar */
.browser-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.875rem;
  background: #0d0d1a;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.browser-dots {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.browser-dots span {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.browser-dots span:nth-child(1) { background: #ff5f57; }
.browser-dots span:nth-child(2) { background: #febc2e; }
.browser-dots span:nth-child(3) { background: #28c840; }

.browser-url {
  flex: 1;
  text-align: center;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  padding: 0.2rem 0.875rem;
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: var(--font-body);
  max-width: 260px;
  margin: 0 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Screenshot / placeholder area */
.slide-image-wrap {
  height: clamp(220px, 42vw, 460px);
  overflow: hidden;
  position: relative;
  background: var(--surface);
}

.slide-screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.6s ease;
}

.slide-card:hover .slide-screenshot { transform: scale(1.025); }

.slide-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-placeholder svg {
  width: 40px;
  height: 40px;
  color: rgba(255,255,255,0.2);
}

/* Card footer row: title + arrow */
.slide-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--card);
}

.slide-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.18rem;
}

.slide-tagline {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.slide-arrow {
  width: 22px;
  height: 22px;
  color: var(--accent-bright);
  flex-shrink: 0;
  transition: transform var(--ease);
}

.slide-card:hover .slide-arrow { transform: translateX(5px); }

/* Concept badge on carousel card */
.slide-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.28rem 0.6rem;
  background: rgba(34, 211, 238, 0.14);
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--cyan);
  text-transform: uppercase;
  z-index: 2;
}

/* Nav arrow buttons */
.carousel-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--ease), color var(--ease), box-shadow var(--ease);
}

.carousel-btn:hover {
  border-color: var(--accent-bright);
  color: var(--accent-bright);
  box-shadow: 0 0 12px var(--accent-glow);
}

.carousel-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

/* Dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--border-hover);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--ease), width var(--ease);
}

.dot.active {
  background: var(--accent-bright);
  width: 24px;
}

/* =============================================
   Project Detail Page
   ============================================= */
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--ease);
  margin-bottom: 2.5rem;
}

.detail-back svg { flex-shrink: 0; }
.detail-back:hover { color: var(--text); }

.detail-hero {
  padding-top: calc(var(--nav-height) + 3rem);
  padding-bottom: 3rem;
  background: var(--surface);
}

/* Browser mockup on detail page */
.detail-browser {
  max-width: 860px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.04);
}

.detail-browser-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: #0d0d1a;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.detail-browser-bar .browser-dots span {
  width: 10px;
  height: 10px;
}

.detail-browser-bar .browser-url {
  font-size: 0.75rem;
  max-width: 320px;
}

.detail-screenshot-wrap {
  height: clamp(260px, 50vw, 520px);
  overflow: hidden;
  background: var(--card);
}

.detail-screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.detail-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-placeholder svg {
  width: 52px;
  height: 52px;
  color: rgba(255,255,255,0.15);
}

/* Detail content below the screenshot */
.detail-content {
  padding: 4rem 0 6rem;
}

.detail-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}

.detail-titles .detail-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 0.5rem;
}

.detail-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.detail-tagline {
  font-size: 1rem;
  color: var(--text-muted);
}

.detail-cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Concept badge on detail page */
.detail-concept-badge {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.detail-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 4rem;
  align-items: start;
}

.detail-description h2 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 1rem;
}

.detail-description p {
  color: var(--text-muted);
  font-size: 1.025rem;
  line-height: 1.85;
}

.detail-stack h2 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 1.25rem;
}

.detail-stack-groups {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.detail-stack-group-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.5rem;
}

.detail-stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.detail-tag {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  background: rgba(124, 92, 252, 0.1);
  border: 1px solid rgba(124, 92, 252, 0.22);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Flat tag list fallback (when no stackGroups) */
.detail-tags-flat {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Not-found state on detail page */
.detail-not-found {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1rem;
  padding: calc(var(--nav-height) + 4rem) var(--container-pad) 4rem;
}

.detail-not-found h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--text);
}

.detail-not-found p {
  color: var(--text-muted);
}

/* =============================================
   Project Prev / Next Nav
   ============================================= */
.proj-nav {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.proj-nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 1rem;
  padding: 0;
}

.proj-nav-link {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1.75rem 0;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--ease);
  flex: 1;
  max-width: 48%;
}

.proj-nav-link--next {
  justify-content: flex-end;
  text-align: right;
  margin-left: auto;
}

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

.proj-nav-link:hover svg {
  color: var(--accent-bright);
}

.proj-nav-link svg {
  flex-shrink: 0;
  color: var(--text-faint);
  transition: color var(--ease), transform var(--ease);
}

.proj-nav-link--prev:hover svg { transform: translateX(-3px); }
.proj-nav-link--next:hover svg { transform: translateX(3px); }

.proj-nav-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.2rem;
}

.proj-nav-title {
  display: block;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: inherit;
}

/* =============================================
   Contact
   ============================================= */
#contact .container {
  display: flex;
  justify-content: center;
}

.contact-inner {
  text-align: center;
  max-width: 580px;
}

.contact-inner .section-label { display: block; }
.contact-inner .section-title { margin: 0.75rem 0 1rem; }

.contact-sub {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 2.5rem;
}

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

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color var(--ease);
}

.contact-email:hover { color: var(--text); }

.contact-socials {
  display: flex;
  gap: 0.875rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: border-color var(--ease), color var(--ease), transform var(--ease), box-shadow var(--ease);
}

.social-link:hover {
  border-color: var(--accent-bright);
  color: var(--accent-bright);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px var(--accent-glow);
}

/* =============================================
   Footer
   ============================================= */
footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

footer p {
  color: var(--text-faint);
  font-size: 0.8rem;
}

/* =============================================
   Intersection Observer Animations
   ============================================= */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* =============================================
   Reduced Motion
   ============================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .animate-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .carousel-track { transition: none; }

  .hero-greeting, .hero-name, .hero-tagline, .hero-cta, .hero-scroll-hint {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .tagline-cursor { animation: none; }
  .hero-bg { animation: none; }
  .hero-scroll-hint { animation: none; }
}

/* =============================================
   iOS Phone Mockup — Carousel Card
   ============================================= */
.slide-image-wrap--ios {
  height: clamp(300px, 46vw, 520px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #08080f;
}

.slide-phone {
  position: relative;
  width: clamp(118px, 18.4vw, 218px);
  aspect-ratio: 9 / 19.5;
  background: #111;
  border-radius: 44px;
  border: 2px solid rgba(255,255,255,0.1);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.6),
    0 20px 50px rgba(0,0,0,0.7),
    inset 0 0 0 1px rgba(255,255,255,0.04);
  flex-shrink: 0;
  transition: transform 0.6s ease;
}

.slide-card:hover .slide-phone { transform: scale(1.025); }

.slide-phone-island {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 32%;
  height: 4.5%;
  background: #000;
  border-radius: 999px;
  z-index: 3;
  pointer-events: none;
}

.slide-phone-screen {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.slide-phone-home {
  position: absolute;
  bottom: 1.8%;
  left: 50%;
  transform: translateX(-50%);
  width: 36%;
  height: 1.2%;
  background: rgba(255,255,255,0.28);
  border-radius: 2px;
  z-index: 3;
  pointer-events: none;
}

/* =============================================
   iOS Screenshot Slider — Detail Page
   ============================================= */
.detail-phone-slider {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 0 1.75rem;
}

.phone-slider-viewport {
  flex: 1;
  overflow: hidden;
}

.phone-slider-track {
  display: flex;
  transition: transform 0.52s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.phone-slider-page {
  flex: 0 0 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 1.5rem;
}

.phone-slider-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--ease), color var(--ease), box-shadow var(--ease);
}

.phone-slider-btn:hover {
  border-color: var(--accent-bright);
  color: var(--accent-bright);
  box-shadow: 0 0 12px var(--accent-glow);
}

.phone-slider-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

.gallery-phone {
  position: relative;
  flex: 0 0 auto;
  width: clamp(140px, 15vw, 195px);
  aspect-ratio: 9 / 19.5;
  background: #111;
  border-radius: 44px;
  border: 2px solid rgba(255,255,255,0.1);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.6),
    0 28px 60px rgba(0,0,0,0.7),
    inset 0 0 0 1px rgba(255,255,255,0.04);
}

.gallery-phone-island {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 32%;
  height: 4.5%;
  background: #000;
  border-radius: 999px;
  z-index: 3;
  pointer-events: none;
}

.gallery-phone-screen {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.gallery-phone-home {
  position: absolute;
  bottom: 1.8%;
  left: 50%;
  transform: translateX(-50%);
  width: 35%;
  height: 1.2%;
  background: rgba(255,255,255,0.28);
  border-radius: 3px;
  z-index: 3;
  pointer-events: none;
}

/* iOS badge on detail page */
.detail-ios-badge {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  background: rgba(124, 92, 252, 0.1);
  border: 1px solid rgba(124, 92, 252, 0.3);
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--accent-bright);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

/* =============================================
   Responsive — Mobile
   ============================================= */
@media (max-width: 768px) {
  :root { --section-pad: 4.5rem 0; }

  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(10, 10, 18, 0.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--ease), opacity var(--ease);
    z-index: 99;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-links li { width: 100%; }

  .nav-link {
    display: block;
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
  }

  .nav-link::after { display: none; }

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

  /* Carousel: hide side arrows, full-width card */
  .carousel-btn { display: none; }

  .detail-body {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .detail-phone-gallery {
    justify-content: flex-start;
  }

  .gallery-phone {
    width: 165px;
    height: 330px;
  }
}

@media (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
    max-width: 240px;
  }

  .detail-meta {
    flex-direction: column;
    gap: 1.5rem;
  }

  .detail-cta { width: 100%; }
  .detail-cta .btn { flex: 1; justify-content: center; }
}

/* =============================================
   Responsive — Tablet
   ============================================= */
@media (min-width: 769px) and (max-width: 1023px) {
  .about-grid { gap: 2.5rem; }
}
