/* Common styles for all pages */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

/* Theme palette */
:root {
  /* Serika Dark palette */
  --color-bg: #1F1F1F;         /* deep charcoal */
  --color-text: #EAE7DE;       /* warm cream */
  --color-accent: #F5D06F;     /* serika yellow */
  --color-accent-2: #C7A86B;   /* muted golden */
  --color-card: #2A2A2A;       /* dark card */
}

/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

/* Layout */
section { padding: 2rem; max-width: 800px; margin: 2rem auto; background: transparent; border-radius: 0; box-shadow: none; }

/* Navbar (top) */
nav:not(.bottom-nav) { position: sticky; top: 0; background: #fff; border-bottom: 1px solid #e5e7eb; z-index: 1000; }
.navbar { max-width: 1000px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; position: relative; }
.navbar .brand { font-weight: 700; color: var(--color-text); }
.navbar ul { display: flex; gap: 0.5rem; list-style: none; padding: 0; margin: 0; }
.navbar ul li::before { content: none; }
.navbar a { color: var(--color-text); padding: 0.5rem 0.75rem; border-radius: 8px; font-weight: 500; text-decoration: none; }
.navbar a:hover { background: #f1f5f9; color: var(--color-text); }
#nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.hamburger { display: none; font-size: 1.25rem; padding: 0.4rem 0.6rem; border-radius: 8px; cursor: pointer; }

/* Responsive menu */
@media (max-width: 700px) {
  .hamburger { display: block; }
  .navbar ul {
    display: none;
    position: fixed; /* overlay on top of content */
    left: 0; right: 0;
    top: 52px; /* approx nav height */
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 0.5rem;
    flex-direction: column;
    z-index: 3000; /* above header/content */
  }
  #nav-toggle:checked + label + ul { display: flex; }
  .navbar a { display: block; }
}

/* Header */
header { background: transparent; color: var(--color-text); text-align: center; padding: 3rem 1rem; border-bottom-left-radius: 0; border-bottom-right-radius: 0; box-shadow: none; }
header h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
header p { font-size: 1.1rem; opacity: 0.9; }

/* Typography */
h2 { color: var(--color-text); margin-bottom: 1rem; border-left: none; padding-left: 0; }
ul { list-style: none; padding-left: 1rem; }
ul li { margin: 0.5rem 0; padding-left: 10px; position: relative; }
ul li::before { content: '•'; color: var(--color-text); position: absolute; left: -10px; }
a { color: var(--color-text); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--color-accent); }

/* Footer */
footer { text-align: center; padding: 1.5rem; background: var(--color-bg); color: rgba(255, 255, 255, 0.8); border-top: none; font-size: 0.9rem; }
footer a { color: rgb(255, 255, 255); font-weight: 600; }

/* Utilities */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.5rem; align-items: stretch; }
.about-photo { width: 100%; min-height: 360px; }
.about-photo {
  max-width: 350px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  border: 8px solid var(--color-accent-2);
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { min-height: 0; max-width: 260px; }
  .about-photo img { height: auto; }
}

/* Cards (used on connect page) */
.card { background: var(--color-card); border: 1px solid rgba(0,0,0,0.08); border-radius: 12px; padding: 1rem 1.25rem; margin-bottom: 1rem; box-shadow: 0 4px 12px rgba(0,0,0,0.06); display: block; }

/* Cards layout (Connect page) */
.cards { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .cards { grid-template-columns: repeat(3, 1fr); } }

/* Interactive background (Connect page only) */
.connect-page #bg-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.connect-page nav,
.connect-page header,
.connect-page main,
.connect-page footer { position: relative; z-index: 1; }

/* Full-page interactive background canvas */
#bg-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 0; /* behind navbar (which has higher z-index) */
  pointer-events: none; /* don't block clicks */
}

/* Ensure content sits above canvas (do not override nav's z-index) */
header, main, section, footer { position: relative; z-index: 1; }

/* Skills section */
.skills-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(3, 1fr); max-width: 1000px; margin: 0 auto; }
@media (max-width: 900px) { .skills-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .skills-grid { grid-template-columns: 1fr; } }
.skill h3 { margin-bottom: 0.75rem; font-size: 1.1rem; color: var(--color-text); }
.skill-item { margin-bottom: 0.9rem; }
.skill-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.95rem; margin-bottom: 0.35rem; color: var(--color-text); }
.bar { height: 8px; background: rgba(0,0,0,0.12); border-radius: 9999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--color-accent); width: 0; border-radius: 9999px; transition: width 0.6s ease; }

/* Buttons / CTA */
.cta { text-align: center; margin: 2rem auto; }
.btn { display: inline-block; padding: 0.9rem 1.5rem; border: 2px solid var(--color-accent-2); border-radius: 9999px; color: #ffffff; background: var(--color-accent); text-decoration: none; font-weight: 600; transition: transform .08s ease, background .2s ease, color .2s ease, box-shadow .2s ease, border-color .2s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,0.25); background: var(--color-accent-2); border-color: var(--color-accent-2); color: #000000; }
.btn:active { transform: translateY(0); box-shadow: 0 2px 6px rgba(0,0,0,0.12); }
.btn-lg { font-size: 1.05rem; padding: 1rem 2rem; }

/* Contact form */
#contact form { max-width: 800px; margin: 0 auto; display: grid; gap: 0.9rem; }
#contact label { font-weight: 600; color: var(--color-text); }
.input, .textarea { width: 100%; padding: 0.7rem 0.85rem; border: 1px solid rgba(0,0,0,0.12); border-radius: 10px; background: #fff; color: var(--color-text); font: inherit; }
.input, .textarea { width: 100%; padding: 0.7rem 0.85rem; border: 1px solid rgba(234,231,222,0.18); border-radius: 10px; background: var(--color-card); color: var(--color-text); font: inherit; }
.textarea { min-height: 140px; resize: vertical; }
.form-row { display: grid; gap: 0.9rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 700px) { .form-row { grid-template-columns: 1fr; } }
#contact .actions { text-align: center; margin-top: 0.5rem; }
#contact .note { text-align: center; font-size: 0.9rem; opacity: 0.8; margin-top: 0.25rem; }

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 24px;
  top: auto; /* prevent full-height stretch from global nav rule */
  left: 50%;
  transform: translateX(-50%);
  width: min(92vw, 800px);
  background: #202020;
  color: var(--color-text);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 43px; /* pill shape */
  box-shadow: 0 14px 34px rgba(0,0,0,0.32), inset 0 1px 0 rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  z-index: 100;
}

.nav-center { display: flex; gap: 26px; align-items: center; justify-content: center; width: 100%; }

.nav-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ffffff;
  color: #000000;
  border: 1px solid rgba(0,0,0,0.12);
  box-shadow: 0 6px 18px rgba(0,0,0,0.22);
  text-decoration: none;
}
.nav-icon-btn:hover { transform: translateY(-1px); }

.nav-item {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--color-text);
  padding: 8px 10px;
  border-radius: 16px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  gap: 8px;
}

.nav-item:hover, .nav-item:focus { color: var(--color-accent); transform: translateY(-1px); }
.nav-item.active {
  background: #ffffff;
  color: #000000;
  padding: 8px 14px;
  border-radius: 9999px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.20);
}

.nav-icon { font-size: 20px; }

/* Ensure SVG icons appear white against dark navbar */
.nav-icon img {
  display: block;
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1);
}

.nav-label { display: inline-block; font-weight: 500; }

/* removed right email capsule as per request */

/* Add bottom padding to body to prevent content being hidden behind bottom nav */
body { padding-bottom: 80px; }
