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

/* ── Light theme (default) ── */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --border: #dde0eb;
  --accent: #4a8239;
  --accent-soft: rgba(105, 219, 101, 0.08);
  --text: #182318;
  --muted: #43533f;
  --radius: 12px;
}

/* ── Dark theme ── */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #171f18;
    --border: #273227;
    --accent: #76c279;
    --accent-soft: rgba(125, 255, 127, 0.12);
    --text: #e8eaf0;
    --muted: #869a83;
  }
}

body {
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  background-image: url('assets/background.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed; /* keeps it from scrolling with content */
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ── */
.container {
  max-width: 720px;
  margin: 2rem auto;
  padding: 2rem 1.5rem;
  background: rgba(255, 255, 255, 0.75); /* light theme */
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); /* Safari support */
}

@media (prefers-color-scheme: dark) {
  .container {
    background: rgba(26, 29, 39, 0.75); /* dark theme */
  }
}

/* ── Hero ── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3.5rem 0 2.5rem;
  gap: 1rem;
}

.avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  background: var(--surface);
  /* placeholder gradient until you add a real photo */
  background-image: linear-gradient(135deg, #3a3f5c, #6c8efb44);
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.hero .tagline {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 480px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  list-style: none;
  margin-top: 0.25rem;
}

.hero-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.hero-meta-item svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  fill: currentColor;
  opacity: 0.75;
}

.hero-meta-item a {
  color: var(--muted);
}

.hero-meta-item a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ── Social links ── */
.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.875rem;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}

.social-link:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
  color: var(--accent);
}

.social-link svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ── Sections ── */
section {
  margin-top: 2.5rem;
}

section h2 {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

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

/* ── About ── */
.about p {
  color: var(--text);
  font-size: 0.975rem;
  margin-bottom: 0.75rem;
}
.about p:last-child { margin-bottom: 0; }

/* ── Gallery ── */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

.gallery img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
}

/* ── CV / Experience ── */
.cv-entry {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.cv-entry:first-child { padding-top: 0; }
.cv-entry:last-child { border-bottom: none; padding-bottom: 0; }

.cv-entry .role {
  font-weight: 600;
  font-size: 0.975rem;
}

.cv-entry .org {
  color: var(--accent);
  font-size: 0.875rem;
}

.cv-entry .period {
  color: var(--muted);
  font-size: 0.8rem;
}

.cv-entry .desc {
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: 0.2rem;
}

/* ── Skills ── */
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  padding: 0.3rem 0.75rem;
  background: var(--accent-soft);
  border: 1px solid rgba(108,142,251,0.25);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--accent);
}

/* ── Footer ── */
footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 3rem 0 2rem;
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.6rem; }
}

/* ── Home nav buttons (shown on profile page) ── */
.section-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.section-nav-btn {
  padding: 0.5rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.section-nav-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

/* ── Top tab bar (shown inside a section) ── */
.tab-bar {
  display: none;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.tab-bar.visible {
  display: flex;
}

.tab-btn {
  padding: 0.45rem 1rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: var(--accent);
}

.tab-btn.active {
  background: var(--accent-soft);
  border-color: rgba(108,142,251,0.25);
  color: var(--accent);
}

.tab-btn.home-btn {
  color: var(--text);
  border-color: var(--border);
}

/* ── Page visibility ── */
.page {
  display: none;
}

.page.active {
  display: block;
}