/* codepappa — brand tokens + Bootstrap overrides */

:root,
[data-bs-theme="light"] {
  --cp-bg: #f7f7f5;
  --cp-surface: #ffffff;
  --cp-ink: #111111;
  --cp-mid: #555555;
  --cp-light: #999999;
  --cp-border: #e2e2de;
  --cp-teal: #1a7a82;
  --cp-teal-lt: #e6f4f5;
  --cp-teal-grd: linear-gradient(135deg, #1a7a82, #2ba3ad);
  --cp-contact-bg: #111111;
  --cp-footer-bg: #111111;
  --cp-nav-bg: rgba(247, 247, 245, 0.88);

  --bs-body-bg: var(--cp-bg);
  --bs-body-color: var(--cp-ink);
  --bs-border-color: var(--cp-border);
  --bs-primary: var(--cp-teal);
  --bs-primary-rgb: 26, 122, 130;
}

[data-bs-theme="dark"] {
  --cp-bg: #111113;
  --cp-surface: #1c1c1e;
  --cp-ink: #f2f2f0;
  --cp-mid: #98989e;
  --cp-light: #636366;
  --cp-border: #2c2c2e;
  --cp-teal: #2ec4cc;
  --cp-teal-lt: rgba(46, 196, 204, 0.12);
  --cp-teal-grd: linear-gradient(135deg, #2ec4cc, #1a8c94);
  --cp-contact-bg: #0a0a0c;
  --cp-footer-bg: #0a0a0c;
  --cp-nav-bg: rgba(17, 17, 19, 0.88);

  --bs-body-bg: var(--cp-bg);
  --bs-body-color: var(--cp-ink);
  --bs-border-color: var(--cp-border);
  --bs-primary: var(--cp-teal);
  --bs-primary-rgb: 46, 196, 204;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  background: var(--cp-bg);
  color: var(--cp-ink);
  line-height: 1.6;
}

/* ── NAV ── */
.cp-navbar {
  background: var(--cp-nav-bg) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cp-border);
  min-height: 64px;
}

.cp-navbar .navbar-brand {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--cp-ink);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.cp-navbar .navbar-brand span {
  color: var(--cp-teal);
}

.cp-navbar .navbar-toggler {
  border-color: var(--cp-border);
}

.cp-navbar .navbar-toggler-icon {
  filter: none;
}

[data-bs-theme="dark"] .cp-navbar .navbar-toggler-icon {
  filter: invert(1) brightness(0.9);
}

.cp-brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  flex-shrink: 0;
}

.cp-navbar .nav-link {
  font-size: 0.9rem;
  color: var(--cp-mid) !important;
  transition: color 0.2s;
}

.cp-navbar .nav-link:hover,
.cp-navbar .nav-link:focus {
  color: var(--cp-teal) !important;
}

.cp-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  background: none;
  border: 1.5px solid var(--cp-border);
  border-radius: 0.45rem;
  cursor: pointer;
  width: 36px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cp-mid);
  transition: border-color 0.2s, color 0.2s;
  flex-shrink: 0;
  padding: 0;
}

.theme-toggle:hover {
  border-color: var(--cp-teal);
  color: var(--cp-teal);
}

.theme-toggle svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sun { display: none; }
.icon-moon { display: block; }
[data-bs-theme="dark"] .icon-sun { display: block; }
[data-bs-theme="dark"] .icon-moon { display: none; }

/* ── BUTTONS ── */
.btn-cp-primary {
  background: var(--cp-teal-grd);
  color: #fff;
  border: none;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(26, 122, 130, 0.3);
  transition: opacity 0.2s, transform 0.2s;
}

.btn-cp-primary:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  color: #fff;
}

.btn-cp-outline {
  background: transparent;
  color: var(--cp-ink);
  border: 1.5px solid var(--cp-border);
  font-weight: 600;
  transition: border-color 0.2s, color 0.2s;
}

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

/* ── SECTIONS ── */
.cp-section {
  padding: 5rem 0;
}

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

.cp-section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.cp-section-desc {
  color: var(--cp-mid);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 3.5rem;
}

/* ── HERO ── */
.cp-hero {
  padding: 7rem 0 5rem;
}

.cp-hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.cp-hero h1 em {
  color: var(--cp-teal);
  font-style: normal;
}

.cp-hero-sub {
  font-size: 1.1rem;
  color: var(--cp-mid);
  line-height: 1.75;
  margin-bottom: 2.5rem;
  max-width: 480px;
}

.cp-hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  min-height: 320px;
}

.phone-wrap {
  position: relative;
  width: 220px;
}

.phone-wrap img {
  width: 100%;
  border-radius: 2.4rem;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.18);
}

.phone-wrap-2 {
  position: absolute;
  top: 80px;
  left: 130px;
  width: 200px;
  z-index: 2;
}

.phone-wrap-2 img {
  width: 100%;
  border-radius: 2.2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
}

[data-bs-theme="dark"] .phone-wrap img,
[data-bs-theme="dark"] .phone-wrap-2 img,
[data-bs-theme="dark"] .app-screen {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.09), 0 24px 64px rgba(0, 0, 0, 0.7);
}

/* ── APPS ── */
#apps {
  background: var(--cp-surface);
  border-top: 1px solid var(--cp-border);
  border-bottom: 1px solid var(--cp-border);
}

.app-card + .app-card {
  margin-top: 4rem;
  padding-top: 4rem;
  border-top: 1px solid var(--cp-border);
}

.app-screens {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  padding: 1rem 0;
}

.app-screen {
  width: 44%;
  border-radius: 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s;
}

.app-screen:hover {
  transform: translateY(-6px);
}

.app-screen:first-child {
  margin-top: 2rem;
}

.app-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--cp-teal-lt);
  color: var(--cp-teal);
  padding: 0.3rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.app-name {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 0.5rem;
}

.app-tagline {
  font-size: 1.05rem;
  color: var(--cp-mid);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--cp-mid);
}

.feature-list li::before {
  content: "✓";
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: var(--cp-teal-grd);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  margin-top: 1px;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  background: var(--cp-bg);
  border: 1px solid var(--cp-border);
  padding: 0.3rem 0.75rem;
  border-radius: 0.35rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--cp-mid);
  font-family: "SF Mono", "Fira Code", monospace;
}

[data-bs-theme="dark"] .tech-tag {
  background: #2c2c2e;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--cp-ink);
  color: white;
  padding: 0.65rem 1.25rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: opacity 0.2s;
}

.store-btn:hover {
  opacity: 0.8;
  color: white;
}

/* ── ABOUT ── */
#about {
  background: var(--cp-bg);
}

.about-text p {
  color: var(--cp-mid);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.skill-card {
  background: var(--cp-surface);
  border: 1px solid var(--cp-border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  height: 100%;
}

.skill-card-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--cp-teal);
  margin-bottom: 0.75rem;
}

.skill-pill {
  background: var(--cp-bg);
  border: 1px solid var(--cp-border);
  padding: 0.25rem 0.6rem;
  border-radius: 0.3rem;
  font-size: 0.8rem;
  color: var(--cp-mid);
}

[data-bs-theme="dark"] .skill-pill {
  background: #2c2c2e;
}

/* ── CONTACT ── */
#contact {
  background: var(--cp-contact-bg);
  color: white;
}

#contact .cp-section-label {
  color: #5ecfd6;
}

#contact .cp-section-title {
  color: white;
}

#contact .cp-section-desc {
  color: rgba(255, 255, 255, 0.55);
  max-width: 480px;
  margin-bottom: 2.5rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.3rem;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.5rem;
  text-decoration: none;
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.contact-link:hover {
  border-color: var(--cp-teal);
  background: rgba(26, 122, 130, 0.15);
  color: white;
}

/* ── FOOTER ── */
.cp-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem 0;
  text-align: center;
  background: var(--cp-footer-bg);
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.85rem;
}

.cp-footer a {
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
}

.cp-footer a:hover {
  color: white;
}

/* ── LEGAL PAGES ── */
.cp-legal {
  padding: 4rem 0 6rem;
  max-width: 760px;
}

.cp-legal h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.cp-legal .updated {
  font-size: 0.88rem;
  color: var(--cp-mid);
  margin-bottom: 3rem;
}

.cp-legal h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 2.5rem 0 0.75rem;
}

.cp-legal p,
.cp-legal ul {
  color: var(--cp-mid);
  margin-bottom: 1rem;
}

.cp-legal ul {
  padding-left: 1.5rem;
}

.cp-legal a {
  color: var(--cp-teal);
}

.cp-legal-card {
  background: var(--cp-surface);
  border: 1px solid var(--cp-border);
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

.cp-legal-summary {
  border-left: 4px solid var(--cp-teal);
}

/* ── RESPONSIVE ── */
@media (max-width: 767.98px) {
  .cp-hero {
    padding: 4rem 0 3rem;
  }

  .cp-hero-visual {
    min-height: 240px;
  }

  .phone-wrap {
    width: 160px;
  }

  .phone-wrap-2 {
    width: 145px;
    top: 55px;
    left: 95px;
  }

  .cp-section {
    padding: 3.5rem 0;
  }

  .app-screen:first-child {
    margin-top: 0;
  }
}