/* ============================================
   maramotto.com — Global Styles
   Palette: Cream #FDF5E6 / Yellow #FFD93D (accent) / Purple #7B2D8E (primary)
   Project pages: Teal #1E6B7B (hero)
   Fonts: Syne (headings) + DM Sans (body)
   ============================================ */

/* --- Reset & Base --- */
:root {
  --yellow: #FFD93D;
  --yellow-light: #FFF3C4;
  --yellow-muted: #E8CC4A;
  --purple: #7B2D8E;
  --purple-dark: #5C1F6A;
  --purple-light: #F3E8F9;
  --teal: #1E6B7B;
  --teal-dark: #155460;
  --teal-light: #E6F3F5;
  --blue-light: #E8F4FD;
  --blue: #5BA4CF;
  --blue-dark: #3A7CA5;
  --dark: #1A1A2E;
  --text: #2D2D3A;
  --text-light: #6B6B80;
  --white: #FFFEF8;
  --cream: #FDF5E6;
  --cream-dark: #F7ECDA;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* --- Utility --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container--narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

.text-center { text-align: center; }

.section-label {
  font-family: 'Syne', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--purple);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.3s;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}

.btn--primary {
  background: var(--purple);
  color: var(--white);
  border-color: var(--purple);
}
.btn--primary:hover {
  background: var(--purple-dark);
  border-color: var(--purple-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(123, 45, 142, 0.25);
}

.btn--outline {
  background: transparent;
  color: var(--purple);
  border-color: var(--purple);
}
.btn--outline:hover {
  background: var(--purple);
  color: var(--white);
  transform: translateY(-2px);
}

.btn--yellow {
  background: var(--yellow);
  color: var(--purple);
  border-color: var(--yellow);
}
.btn--yellow:hover {
  background: var(--white);
  border-color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn--small {
  padding: 0.6rem 1.4rem;
  font-size: 0.85rem;
}

.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-group--center { justify-content: center; }

/* ============================================
   NAVIGATION
   ============================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.1rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 217, 61, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 2px solid rgba(123, 45, 142, 0.06);
}

/* --- Logo with letter wave --- */
.nav__logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--purple);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: inline-flex;
}

.nav__logo-letter {
  display: inline-block;
  transition: transform 0.2s;
}

.nav__logo-letter.wave {
  animation: letter-wave 0.5s ease calc(var(--i) * 0.06s) both;
}

@keyframes letter-wave {
  0%   { transform: translateY(0); }
  40%  { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

/* --- Nav links --- */
.nav__links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  align-items: center;
}

.nav__links > li > a {
  text-decoration: none;
  color: var(--dark);
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s;
  position: relative;
}

.nav__links > li > a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--purple);
  transition: width 0.3s;
}

.nav__links > li > a:hover { color: var(--purple); }
.nav__links > li > a:hover::after { width: 100%; }

/* --- Nav item with dropdown --- */
.nav__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.nav__item > a {
  /* The "Projects" text link — navigates on click */
}

/* --- Triangle toggle button --- */
.nav__dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  outline: none;
}

.nav__dropdown-arrow {
  display: inline-block;
  font-size: 0.5rem;
  color: var(--purple);
  transition: transform 0.25s ease;
  /* Default: points RIGHT (toward About) */
  transform: rotate(-90deg);
  line-height: 1;
}

/* When open: points DOWN */
.nav__item.dropdown-open .nav__dropdown-arrow {
  transform: rotate(0deg);
}

/* --- Shake animation on hover proximity --- */
.nav__dropdown-arrow.shake {
  animation: arrow-shake 0.5s ease;
}

@keyframes arrow-shake {
  0%   { transform: rotate(-90deg) translateX(0); }
  15%  { transform: rotate(-90deg) translateX(3px); }
  30%  { transform: rotate(-90deg) translateX(-2px); }
  45%  { transform: rotate(-90deg) translateX(2px); }
  60%  { transform: rotate(-90deg) translateX(-1px); }
  75%  { transform: rotate(-90deg) translateX(1px); }
  100% { transform: rotate(-90deg) translateX(0); }
}

/* --- Dropdown menu --- */
.nav__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  background: var(--white);
  border-radius: 12px;
  padding: 0.5rem 0;
  min-width: 200px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(123, 45, 142, 0.1);
  list-style: none;
  z-index: 200;
}

.nav__dropdown::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 24px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid var(--white);
}

/* Show dropdown via JS class */
.nav__item.dropdown-open .nav__dropdown {
  display: block;
}

.nav__dropdown li a {
  display: block;
  padding: 0.6rem 1.2rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.nav__dropdown li a::after { display: none; }

.nav__dropdown li a:hover {
  background: var(--purple-light);
  color: var(--purple);
}

/* --- Mobile nav toggle --- */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--purple);
  margin: 5px 0;
  transition: 0.3s;
}

/* ============================================
   HERO
   ============================================ */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 8rem 2rem 5rem;
  background: var(--cream);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 217, 61, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: -5%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 45, 142, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.hero__wave {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  opacity: 0.35;
  letter-spacing: 0.5rem;
  color: var(--yellow-muted);
  animation: wave-float 3s ease-in-out infinite;
}

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

.hero__title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 800;
  color: var(--yellow);
  line-height: 1;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
  position: relative;
  z-index: 1;
}

.hero__subtitle {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 600;
  color: var(--purple);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
  opacity: 0.65;
}

.hero__description {
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--text);
  max-width: 600px;
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 1;
}

.hero .btn-group { position: relative; z-index: 1; }

/* ============================================
   SECTIONS
   ============================================ */

.section {
  padding: 6rem 0;
}

.section--yellow { background: var(--yellow-light); }
.section--purple { background: var(--purple); }
.section--white  { background: var(--white); }
.section--cream  { background: var(--cream-dark); }

/* --- Project cards --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.card {
  background: var(--white);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  transition: all 0.35s;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--yellow), var(--purple));
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--purple);
  box-shadow: 0 20px 40px rgba(123, 45, 142, 0.1);
}

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

.card__icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.card__icon--purple { background: var(--purple-light); }
.card__icon--yellow { background: var(--yellow-light); }

.card__img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin-bottom: 1.5rem;
}

.card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--text-light);
  line-height: 1.65;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  background: var(--white);
  color: var(--purple);
  border: 1px solid rgba(123, 45, 142, 0.15);
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--purple);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: gap 0.2s, color 0.2s;
}

.card__link:hover { gap: 0.8rem; color: var(--purple-dark); }

/* --- Featured project --- */
.featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-top: 2.5rem;
}

.featured__visual {
  background: var(--purple);
  border-radius: 24px;
  padding: 3rem;
  position: relative;
  overflow: hidden;
  min-height: 350px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.featured__visual::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 217, 61, 0.08);
}

.featured__visual::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: -30px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255, 217, 61, 0.06);
}

.featured__visual-icon {
  font-size: 5rem;
  position: relative;
  z-index: 1;
  margin-bottom: 1rem;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0px rgba(255,217,61,0)); }
  50% { transform: scale(1.05); filter: drop-shadow(0 0 20px rgba(255,217,61,0.3)); }
}

.featured__visual-img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  position: relative;
  z-index: 1;
  margin-bottom: 1rem;
  animation: pulse-glow 2s ease-in-out infinite;
}

.featured__visual-label {
  font-family: 'Syne', sans-serif;
  color: var(--yellow);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

.featured__content h3 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.featured__content p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.featured__content .tags { margin-bottom: 2rem; }

/* --- About section --- */
.about-text {
  font-size: 1.15rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 1.5rem;
}

.about-text strong {
  color: var(--yellow);
  font-weight: 600;
}

.section--purple .section-label { color: var(--yellow); }
.section--purple .section-title { color: var(--white); }

/* --- Skills grid --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.skill-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-radius: 20px;
  background: var(--cream);
  transition: all 0.3s;
}

.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

.skill-card__emoji {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.skill-card__img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin: 0 auto 1.2rem;
}

.skill-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.skill-card p {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.55;
}

/* --- Contact section --- */
.section--yellow .section-label { color: var(--purple); }

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.social-link {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.2rem;
  transition: all 0.3s;
  border: 2px solid transparent;
}

.social-link:hover {
  border-color: var(--purple);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(123, 45, 142, 0.15);
}

/* --- Footer --- */
.footer {
  padding: 2rem 3rem;
  background: var(--dark);
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.85rem;
}

.footer span { color: var(--yellow); }
.footer a { color: var(--yellow); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ============================================
   PROJECT PAGES
   ============================================ */

/* --- Project hero (teal, two-column) --- */
.project-hero {
  padding: 10rem 2rem 4rem;
  background: var(--teal);
  position: relative;
  overflow: hidden;
}

.project-hero__circle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.project-hero__circle--1 {
  top: -80px;
  right: -60px;
  width: 350px;
  height: 350px;
  background: rgba(255, 255, 255, 0.06);
}

.project-hero__circle--2 {
  top: 55%;
  right: 10%;
  width: 180px;
  height: 180px;
  background: rgba(255, 255, 255, 0.04);
}

.project-hero__circle--3 {
  bottom: -50px;
  left: 8%;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.05);
}

.project-hero__circle--4 {
  top: 20%;
  left: -40px;
  width: 100px;
  height: 100px;
  background: rgba(255, 217, 61, 0.08);
}

.project-hero__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.project-hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.project-hero__img {
  width: 320px;
  height: 320px;
  object-fit: contain;
}

.project-hero__content {
  text-align: left;
}

.project-hero__title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
  font-style: italic;
}

.project-hero__tagline {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 520px;
  margin-bottom: 2rem;
  line-height: 1.65;
}

.project-hero .tags {
  position: relative;
  z-index: 1;
}

.project-hero .tag {
  background: rgba(255, 255, 255, 0.12);
  color: var(--yellow);
  border-color: rgba(255, 255, 255, 0.15);
}

/* --- Project body --- */
.project-body {
  padding: 4rem 0;
}

.project-body h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 1rem;
  margin-top: 3rem;
  letter-spacing: -0.02em;
}

.project-body h2:first-child { margin-top: 0; }

.project-body p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.project-body .highlight {
  color: var(--teal);
  font-weight: 600;
}

/* --- Highlighted project sections --- */
.project-body--highlight {
  background: var(--cream);
  border-top: 3px solid var(--yellow);
  border-bottom: 3px solid var(--yellow);
}

.project-body--highlight-dark {
  background: var(--teal);
  padding: 3.5rem 0;
}

.project-body--highlight-dark h2 {
  color: var(--white);
  margin-top: 0;
}

.project-body--highlight-dark p {
  color: rgba(255, 255, 255, 0.8);
}

.project-body--highlight-dark .btn--primary {
  background: var(--yellow);
  color: var(--teal-dark);
  border-color: var(--yellow);
}

.project-body--highlight-dark .btn--primary:hover {
  background: var(--white);
  color: var(--teal);
  border-color: var(--white);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.project-body--highlight-dark .btn--outline {
  color: var(--yellow);
  border-color: var(--yellow);
}

.project-body--highlight-dark .btn--outline:hover {
  background: var(--yellow);
  color: var(--teal-dark);
}

/* --- Tech stack --- */
.tech-stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.tech-item {
  background: var(--teal-light);
  border-radius: 16px;
  padding: 1.5rem;
  border-left: 4px solid var(--teal);
}

.tech-item__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal);
  margin-bottom: 0.3rem;
}

.tech-item__value {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--dark);
}

/* --- Pipeline --- */
.pipeline {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 2rem 0;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.pipeline__step {
  flex: 1;
  min-width: 130px;
  background: var(--teal-light);
  border-radius: 16px;
  padding: 1.4rem 1rem;
  text-align: center;
}

.pipeline__step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 0.7rem;
}

.pipeline__step-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--dark);
  margin-bottom: 0.35rem;
}

.pipeline__step-detail {
  font-size: 0.78rem;
  color: var(--text-light);
  line-height: 1.45;
}

.pipeline__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.4rem;
  color: var(--teal);
  font-size: 1.3rem;
  font-weight: 700;
  flex-shrink: 0;
  opacity: 0.6;
}

/* --- Tech detail grid --- */
.tech-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
  margin: 1.5rem 0 2rem;
}

.tech-detail-item {
  background: var(--teal-light);
  border-radius: 14px;
  padding: 1.2rem;
  border-left: 3px solid var(--teal);
}

.tech-detail-item__label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal);
  margin-bottom: 0.2rem;
}

.tech-detail-item__value {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--dark);
  margin-bottom: 0.15rem;
}

.tech-detail-item__desc {
  font-size: 0.78rem;
  color: var(--text-light);
  line-height: 1.45;
}

/* --- Mapping table --- */
.mapping-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 1.5rem 0 2rem;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(30, 107, 123, 0.2);
}

.mapping-grid__header {
  background: var(--teal);
  color: var(--white);
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.9rem 1.2rem;
}

.mapping-grid__cell {
  padding: 0.8rem 1.2rem;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(30, 107, 123, 0.1);
}

.mapping-grid__cell:nth-child(4n+3),
.mapping-grid__cell:nth-child(4n+4) {
  background: var(--teal-light);
}

.mapping-grid__cell--move {
  font-weight: 600;
  color: var(--dark);
}

.mapping-grid__cell--sound {
  color: var(--text-light);
}

/* --- CTA / Demo --- */
.project-cta {
  background: var(--cream);
  border-radius: 24px;
  padding: 3rem;
  text-align: center;
  margin-top: 3rem;
}

.project-cta h2 { margin-top: 0; }

.demo-frame {
  width: 100%;
  height: 500px;
  border: 3px solid var(--teal-light);
  border-radius: 16px;
  margin: 1.5rem 0 2rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
  .featured {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .featured__visual { min-height: 250px; }

  .project-hero__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .project-hero__content { text-align: center; }
  .project-hero__img { width: 220px; height: 220px; }
  .project-hero .tags { justify-content: center; }
}

@media (max-width: 768px) {
  .nav {
    padding: 1rem 1.5rem;
  }

  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--yellow);
    padding: 1.5rem;
    gap: 1.2rem;
    border-bottom: 2px solid rgba(123, 45, 142, 0.1);
  }

  .nav__links.active { display: flex; }

  .nav__toggle { display: block; }

  /* Mobile: dropdown always visible under Projects */
  .nav__item .nav__dropdown {
    display: block;
    position: static;
    transform: none;
    background: rgba(123, 45, 142, 0.06);
    border-radius: 8px;
    box-shadow: none;
    border: none;
    margin-top: 0.5rem;
    padding: 0.25rem 0;
    min-width: auto;
  }

  .nav__item .nav__dropdown::before { display: none; }

  .nav__item .nav__dropdown li a {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }

  /* Hide triangle on mobile (dropdown always visible) */
  .nav__dropdown-toggle { display: none; }

  .hero { padding: 7rem 1.5rem 3rem; }
  .section { padding: 4rem 0; }
  .container, .container--narrow { padding: 0 1.5rem; }

  .projects-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .tech-stack { grid-template-columns: 1fr; }

  .project-hero { padding: 8rem 1.5rem 3rem; }
  .demo-frame { height: 350px; }

  .pipeline {
    flex-direction: column;
    align-items: stretch;
  }

  .pipeline__arrow {
    transform: rotate(90deg);
    padding: 0.3rem 0;
  }

  .tech-detail-grid {
    grid-template-columns: 1fr;
  }

  .mapping-grid {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .skills-grid { grid-template-columns: 1fr; }
  .btn-group { flex-direction: column; align-items: center; }
}
