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

:root {
  --bg: #ffffff;
  --surface: #f3f7f4;
  --border: #d9e3dc;
  --text: #0f2318;
  --muted: #5a6d62;
  --accent: #1b5e3f;
  --accent-hover: #103d29;
  --font: 'Segoe UI', system-ui, sans-serif;
  --font-heading: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
}

[data-theme="dark"] {
  --bg: #101713;
  --surface: #182019;
  --border: #283831;
  --text: #e6ede8;
  --muted: #92a59a;
  --accent: #4ade80;
  --accent-hover: #22c55e;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  transition: background-color 0.25s ease, color 0.25s ease;
}

header,
.card,
.edu-card,
.vol-card,
.cert-card,
.exp-card,
.btn,
.btn-apk,
.tag,
.badge {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

/* ── NAV ── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
}

nav {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: 0.02em;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.2s;
}

nav a:hover {
  color: var(--accent);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  background-color: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 0;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

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

/* ── SECTIONS ── */
main {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 6rem 0;
}

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

h2 {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

/* ── HERO ── */
#hero {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.highlight {
  color: var(--accent);
  font-style: italic;
}

.tagline {
  font-size: 1.2rem;
  color: var(--muted);
  margin-bottom: 2rem;
  max-width: 480px;
}

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  background-color: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
  border-radius: 0;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.btn-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.btn-link:hover {
  border-bottom-color: var(--accent);
}

/* ── PROJECTS GRID ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.2s;
}

.card:hover {
  border-color: var(--accent);
}

.card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
}

.card p {
  color: var(--muted);
  font-size: 0.9rem;
  flex: 1;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  background-color: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

.badge-finalist {
  background-color: color-mix(in srgb, #8a6d1f 12%, transparent);
  color: #8a6d1f;
  border-color: color-mix(in srgb, #8a6d1f 35%, transparent);
}

[data-theme="dark"] .badge-finalist {
  background-color: color-mix(in srgb, #d4af37 15%, transparent);
  color: #d4af37;
  border-color: color-mix(in srgb, #d4af37 40%, transparent);
}

.badge-hackathon {
  background-color: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.btn-apk {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  background-color: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 0;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background-color 0.2s, color 0.2s;
}

.btn-apk:hover {
  background-color: var(--accent);
  color: var(--bg);
}

/* ── EDUCATION ── */
.education-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.edu-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0;
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.edu-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.edu-card h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
}

.edu-institution {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

.edu-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  flex-shrink: 0;
}

.edu-date {
  color: var(--muted);
  font-size: 0.85rem;
}

.edu-grade {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
}

.edu-card p {
  color: var(--muted);
  font-size: 0.9rem;
}

.edu-courses {
  font-size: 0.85rem !important;
  color: #7a8a7f !important;
}

.edu-conferences {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
}

.edu-conf-links {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.edu-conf-item {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.85rem;
}

.edu-conf-desc {
  color: var(--muted);
}

/* ── VOLUNTEERING ── */
.volunteer-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.vol-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0;
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.vol-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.vol-card h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
}

.vol-organization {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

.vol-date {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.vol-card p {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ── AWARDS & CERTIFICATIONS ── */
.certs-group {
  margin-bottom: 2rem;
}

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

.certs-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cert-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cert-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.cert-body {
  flex: 1;
}

.cert-body h3 {
  font-size: 0.95rem;
  font-weight: 700;
}

.cert-issuer {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.cert-credential {
  display: block;
  font-size: 0.75rem;
  color: var(--accent);
  text-decoration: none;
  margin-top: 0.3rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.cert-credential:hover {
  border-bottom-color: var(--accent);
}

.cert-date {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── CONTACT ── */
#contact p {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

#contact .btn {
  margin-right: 0.75rem;
}

.btn-linkedin {
  background-color: #0a66c2;
  border-color: #0a66c2;
  color: #fff;
}

.btn-linkedin:hover {
  background-color: #004182;
  border-color: #004182;
  color: #fff;
}

.btn-github {
  background-color: #1a1f1c;
  border-color: #1a1f1c;
  color: #fff;
}

.btn-github:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

[data-theme="dark"] .btn-github {
  background-color: #2b332d;
  border-color: #2b332d;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  nav ul {
    gap: 1rem;
  }

  section {
    padding: 4rem 0;
  }
}
