/* ============================================================
   kanyantamubanga.com v2 — Shared Stylesheet
   Aesthetic: Apple Music "New" — Dark Minimalism / Flat Matte
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg:             #000000;
  --bg-elevated:    #0a0a0a;
  --bg-surface:     #1a1a1a;

  --text:           #f5f5f7;
  --text-muted:     #a1a1a6;
  --text-tertiary:  #6e6e73;

  --border:         rgba(255, 255, 255, 0.08);
  --border-hover:   rgba(255, 255, 255, 0.15);

  --accent-blue:    #2997ff;
  --accent-green:   #30d158;
  --accent-orange:  #ff9f0a;

  --type-display:   clamp(3rem, 8vw, 4.5rem);
  --type-h1:        clamp(2rem, 5vw, 3rem);
  --type-h2:        clamp(1.5rem, 3vw, 2rem);
  --type-h3:        1.125rem;
  --type-label:     0.6875rem;
  --type-body:      1rem;
  --type-body-sm:   0.875rem;
  --type-caption:   0.75rem;

  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  --max-w:      1200px;
  --radius:     12px;
  --radius-lg:  20px;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display',
               'SF Pro Text', 'Inter', 'Helvetica Neue', Helvetica,
               Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a   { color: var(--accent-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

/* ── Utility ────────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 768px) {
  .container { padding: 0 2rem; }
}

/* ── Hero fade-in (page load only) ──────────────────────────── */
.hero-fade {
  opacity: 0;
  transform: translateY(16px);
  animation: heroFadeIn 0.5s ease forwards;
}

.hero-fade:nth-child(2) { animation-delay: 0.08s; }
.hero-fade:nth-child(3) { animation-delay: 0.16s; }
.hero-fade:nth-child(4) { animation-delay: 0.24s; }

@keyframes heroFadeIn {
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-fade {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-blue);
  color: #fff;
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  font-size: var(--type-body-sm);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity 200ms ease;
}
.btn-primary:hover { opacity: 0.85; text-decoration: none; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--text);
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  font-size: var(--type-body-sm);
  font-weight: 600;
  border: 1px solid var(--border-hover);
  cursor: pointer;
  transition: border-color 200ms ease;
}
.btn-outline:hover { border-color: rgba(255, 255, 255, 0.35); text-decoration: none; }

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  line-height: 1;
}

.badge-new      { background: rgba(41, 151, 255, 0.15); color: var(--accent-blue); }
.badge-featured { background: rgba(255, 69, 58, 0.15);  color: #ff453a; }
.badge-updated  { background: rgba(48, 209, 88, 0.15);  color: var(--accent-green); }
.badge-in-dev   { background: rgba(255, 159, 10, 0.15); color: var(--accent-orange); }
.badge-app      { background: rgba(191, 90, 242, 0.15); color: #bf5af2; }
.badge-coming   { background: rgba(255, 255, 255, 0.06); color: var(--text-tertiary); }

/* ── Navbar ─────────────────────────────────────────────────── */
#navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.875rem 0;
  transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}

#navbar.scrolled {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom-color: var(--border);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity 200ms ease;
}
.nav-brand img {
  height: 28px;
  width: auto;
}
.nav-brand:hover { opacity: 0.7; text-decoration: none; }

.nav-links {
  display: flex;
  gap: 0.125rem;
  align-items: center;
  margin-left: auto;
}

.nav-link {
  color: var(--text-muted);
  font-size: var(--type-body-sm);
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  transition: color 200ms ease;
}
.nav-link:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Sections ───────────────────────────────────────────────── */
.section {
  padding: var(--space-3xl) 0;
}

@media (min-width: 768px) {
  .section { padding: var(--space-4xl) 0; }
}

.section-alt {
  background: var(--bg-elevated);
}

.section-divider {
  border-top: 1px solid var(--border);
}

.section-title {
  font-size: var(--type-h1);
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: var(--space-2xl);
  line-height: 1.1;
}

.section-label {
  font-size: var(--type-label);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 0.75rem;
}

/* ── Cards (per spec 5.4) ───────────────────────────────────── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: border-color 200ms ease;
  cursor: pointer;
}
.card:hover {
  border-color: var(--border-hover);
  text-decoration: none;
}

/* ── Contact Links (pill-shaped) ────────────────────────────── */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid var(--border-hover);
  color: var(--text);
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  font-size: var(--type-body-sm);
  font-weight: 600;
  transition: border-color 200ms ease;
  cursor: pointer;
}
.contact-link:hover {
  border-color: rgba(255, 255, 255, 0.35);
  text-decoration: none;
}
.contact-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ── Footer ─────────────────────────────────────────────────── */
footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  font-size: var(--type-caption);
  color: var(--text-tertiary);
}
footer a {
  color: var(--text-tertiary);
  transition: color 200ms ease;
}
footer a:hover { color: var(--text); text-decoration: none; }
.footer-sep { opacity: 0.3; }

/* ── Focus States ───────────────────────────────────────────── */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* ════════════════════════════════════════════════════════════
   HOMEPAGE-SPECIFIC
   ════════════════════════════════════════════════════════════ */

/* Hero */
.home-hero {
  padding: var(--space-3xl) 0 var(--space-2xl);
}

.home-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

@media (min-width: 768px) {
  .home-hero-grid {
    grid-template-columns: auto 1fr;
    gap: var(--space-2xl);
  }
  .portrait-wrap {
    justify-content: flex-start;
  }
}

.home-hero-title {
  font-size: var(--type-display);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--text);
}

.home-hero-sub {
  font-size: var(--type-body);
  color: var(--text-muted);
  margin-top: var(--space-lg);
  line-height: 1.7;
  max-width: 480px;
}

.home-hero-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: var(--space-xl);
}

.home-hero-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text);
  font-size: var(--type-body-sm);
  font-weight: 600;
  padding: 0.55rem 1.15rem;
  border: 1px solid var(--border-hover);
  border-radius: 9999px;
  transition: border-color 200ms ease, color 200ms ease;
}
.home-hero-nav a:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  text-decoration: none;
}

.portrait-wrap {
  display: flex;
  justify-content: center;
}

.portrait-frame {
  width: 320px;
  height: 400px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  flex-shrink: 0;
}
.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Web Dev section on homepage */
.home-webdev {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
}

@media (min-width: 768px) {
  .home-webdev {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
  }
}

.home-webdev-copy h2 {
  font-size: var(--type-h1);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
  line-height: 1.15;
}

.home-webdev-copy p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

.arrow-link {
  color: var(--accent-blue);
  font-weight: 600;
  font-size: var(--type-body);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.arrow-link:hover { text-decoration: underline; }

/* Browser Frame */
.browser-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-surface);
}

.browser-frame-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.browser-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.browser-url {
  flex: 1;
  text-align: center;
  font-size: var(--type-caption);
  color: var(--text-tertiary);
}

.browser-frame-content {
  aspect-ratio: 16 / 10;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

.browser-frame-content img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.browser-placeholder {
  color: var(--text-tertiary);
  font-size: var(--type-body-sm);
  text-align: center;
  padding: var(--space-xl);
}

/* Apps section on homepage */
.apps-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.app-row {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: border-color 200ms ease;
}

a.app-row:hover {
  border-color: var(--border-hover);
  text-decoration: none;
}

.app-row-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-surface);
}
.app-row-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-row-icon-placeholder {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
}
.app-row-icon-placeholder svg {
  width: 28px;
  height: 28px;
}

.app-row-text h3 {
  font-size: var(--type-body);
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.app-row-text p {
  font-size: var(--type-body-sm);
  color: var(--text-muted);
  margin-top: 0.125rem;
}

/* ════════════════════════════════════════════════════════════
   WEB DEVELOPMENT PAGE
   ════════════════════════════════════════════════════════════ */
.web-hero {
  padding: var(--space-5xl) 0 var(--space-4xl);
}
.web-hero-title {
  font-size: var(--type-display);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--text);
  max-width: 680px;
}
.web-hero-sub {
  font-size: var(--type-h3);
  color: var(--text-muted);
  margin-top: var(--space-lg);
  max-width: 680px;
  line-height: 1.65;
}
.web-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: var(--space-xl);
}

/* Services grid */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}
@media (min-width: 768px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

.service-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}
.service-card h3 {
  font-size: var(--type-h3);
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.service-card p {
  font-size: var(--type-body-sm);
  color: var(--text-muted);
  line-height: 1.6;
}

/* Portfolio grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}
@media (min-width: 768px) {
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .portfolio-grid { grid-template-columns: repeat(3, 1fr); }
}

.portfolio-card {
  display: block;
  color: var(--text);
}
.portfolio-card:hover { text-decoration: none; }

.portfolio-card-title {
  font-size: var(--type-body);
  font-weight: 700;
  margin-top: 0.75rem;
}
.portfolio-card-desc {
  font-size: var(--type-body-sm);
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Process strip */
.process-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}
@media (min-width: 768px) {
  .process-strip { grid-template-columns: repeat(3, 1fr); }
}

.process-step {
  text-align: center;
}
@media (min-width: 768px) {
  .process-step { text-align: left; }
}

.process-step-num {
  font-size: var(--type-label);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: var(--space-sm);
}
.process-step h3 {
  font-size: var(--type-h3);
  font-weight: 700;
  margin-bottom: 0.375rem;
}
.process-step p {
  font-size: var(--type-body-sm);
  color: var(--text-muted);
  line-height: 1.6;
}

/* Web contact form */
.contact-form {
  max-width: 520px;
}
.form-group {
  margin-bottom: var(--space-lg);
}
.form-group label {
  display: block;
  font-size: var(--type-body-sm);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-sm);
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: var(--type-body);
  transition: border-color 200ms ease;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
}
.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* ════════════════════════════════════════════════════════════
   ABOUT PAGE
   ════════════════════════════════════════════════════════════ */
.about-hero {
  padding: var(--space-5xl) 0 var(--space-3xl);
}

.about-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

@media (min-width: 768px) {
  .about-hero-grid {
    grid-template-columns: 280px 1fr;
    gap: var(--space-3xl);
  }
}

.about-portrait {
  width: 280px;
  height: 350px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .about-portrait { margin: 0; }
}
.about-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.about-bio h1 {
  font-size: var(--type-h1);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
  line-height: 1.1;
}
.about-bio p {
  font-size: var(--type-body);
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: var(--space-md);
  max-width: 640px;
}

/* Skills */
.skills-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}
.skills-group-title {
  font-size: var(--type-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: var(--space-sm);
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.skill-tag {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 0.3rem 0.85rem;
  font-size: var(--type-caption);
  font-weight: 500;
  color: var(--text-muted);
}

/* Timeline */
.sub-section-title {
  font-size: var(--type-h3);
  font-weight: 800;
  margin-bottom: var(--space-xl);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.timeline {
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid var(--border);
  display: flex;
  flex-direction: column;
}

.timeline-item {
  position: relative;
  padding: 0 0 2.25rem 1.5rem;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: calc(-1.5rem - 7px);
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-blue);
  border: 2px solid var(--bg);
}

.timeline-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}
.timeline-company { font-size: 0.95rem; font-weight: 700; }
.timeline-period  { font-size: var(--type-caption); color: var(--text-muted); font-weight: 500; white-space: nowrap; }
.timeline-role    { font-size: var(--type-body-sm); color: var(--accent-blue); font-weight: 600; margin-bottom: 0.4rem; }
.timeline-desc    { font-size: var(--type-body-sm); color: var(--text-muted); line-height: 1.65; }

/* Education */
.education-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}
@media (min-width: 768px) {
  .education-grid { grid-template-columns: repeat(3, 1fr); }
}

.edu-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}
.edu-year {
  display: inline-block;
  font-size: var(--type-label);
  font-weight: 700;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
}
.edu-card h4 { font-size: var(--type-body-sm); font-weight: 700; margin-bottom: 0.3rem; line-height: 1.35; }
.edu-card p  { font-size: var(--type-caption); color: var(--text-muted); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 767px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    padding: 1.5rem 1.25rem;
    gap: 0.25rem;
    border-bottom: 1px solid var(--border);
    z-index: 99;
  }
  .nav-link { padding: 0.65rem 1rem; }

  .home-hero { padding: var(--space-3xl) 0 var(--space-2xl); }
  .home-hero-grid { text-align: center; }
  .home-hero-sub { margin-left: auto; margin-right: auto; }
  .home-hero-nav { justify-content: center; }
  .portrait-frame { width: 240px; height: 300px; }

  .web-hero { padding: var(--space-3xl) 0 var(--space-2xl); }
  .about-hero { padding: var(--space-3xl) 0 var(--space-xl); }
  .about-portrait { width: 220px; height: 275px; }

  .contact-links { flex-direction: column; }
  .contact-link { justify-content: center; }

  .timeline-header { flex-direction: column; gap: 0.1rem; }
  .education-grid { grid-template-columns: 1fr; }
}
