/* ── RESET & VARIABLES ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:       #1a1a2e;
  --mid:       #4a4a6a;
  --muted:     #7a7a9a;
  --accent:    #0f4c81;
  --accent2:   #1a7abf;
  --light:     #e8f0f8;
  --sidebar:   #0d2d4f;
  --sidebar2:  #0a2240;
  --white:     #ffffff;
  --rule:      #c8d8e8;
}

html { font-size: 16px; }

body {
  font-family: 'DM Sans', sans-serif;
  background: #f0f4f8;
  color: var(--ink);
  line-height: 1.6;
}

a {
  color: var(--accent2);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img { max-width: 100%; }

/* ── NAVIGATION ── */
.nav {
  background: var(--sidebar);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-family: 'DM Serif Display', serif;
  font-size: 1.25rem;
  color: var(--white);
  padding: 1rem 0;
}

.nav-brand a {
  color: inherit;
}

.nav-brand a:hover {
  text-decoration: none;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}

.nav-links a {
  color: rgba(255,255,255,0.8);
  padding: 1rem 0.875rem;
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  text-decoration: none;
}

.nav-links .btn-resume {
  background: var(--accent2);
  color: var(--white);
  border-radius: 4px;
  padding: 0.5rem 1rem;
  margin-left: 0.5rem;
  align-self: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.nav-links .btn-resume:hover {
  background: #1589d4;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, var(--sidebar) 0%, var(--sidebar2) 50%, #061525 100%);
  padding: 5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(26,122,191,0.12);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: rgba(26,122,191,0.08);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

.hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 3rem;
  font-weight: 400;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.hero h2 {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--accent2);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero p {
  color: rgba(255,255,255,0.75);
  font-size: 1.05rem;
  max-width: 550px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.1s;
  cursor: pointer;
  border: none;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent2);
  color: var(--white);
}

.btn-primary:hover {
  background: #1589d4;
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.3);
}

.btn-outline:hover {
  border-color: var(--white);
  color: var(--white);
}

/* ── SECTION CONTAINERS ── */
.section {
  padding: 4rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

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

.section-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 2.8px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--light);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 36px;
  height: 2px;
  background: var(--accent2);
}

/* ── TAG PILLS ── */
.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tag-group-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent2);
  width: 100%;
  margin-bottom: 0.25rem;
}

.tag {
  background: var(--light);
  color: var(--accent);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0.25rem 0.625rem;
  font-size: 0.82rem;
  font-weight: 500;
}

/* ── CARDS ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 1.75rem;
  transition: box-shadow 0.2s, transform 0.15s;
}

.card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.93rem;
  color: var(--mid);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 1rem;
}

.card-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent2);
}

.card-link:hover {
  text-decoration: underline;
}

/* ── SKILLS GRID (homepage) ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 1.5rem;
}

.skill-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* ── ABOUT PAGE ── */
.about-content {
  max-width: 750px;
}

.about-content p {
  font-size: 1rem;
  color: var(--mid);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.about-content p:first-of-type {
  font-size: 1.1rem;
  color: var(--ink);
}

.cert-list,
.edu-list {
  list-style: none;
  padding: 0;
}

.cert-list li,
.edu-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--light);
  font-size: 0.95rem;
  color: var(--mid);
}

.cert-list li:last-child,
.edu-list li:last-child {
  border-bottom: none;
}

.cert-list li strong,
.edu-list li strong {
  color: var(--ink);
  display: block;
  font-weight: 600;
}

/* ── CONTACT PAGE ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-item {
  font-size: 1rem;
  color: var(--mid);
}

.contact-item strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.contact-item a {
  color: var(--accent2);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-links .btn {
  text-align: center;
}

/* ── FOOTER ── */
.footer {
  background: var(--sidebar);
  padding: 2rem;
  text-align: center;
}

.footer p {
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--white);
}

/* ── ERROR PAGE ── */
.error-page {
  text-align: center;
  padding: 6rem 2rem;
}

.error-page h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 5rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.error-page h2 {
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: 1rem;
}

.error-page p {
  color: var(--mid);
  margin-bottom: 2rem;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    padding-bottom: 1rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.75rem 0;
  }

  .nav-links .btn-resume {
    margin-left: 0;
    text-align: center;
  }

  .hero {
    padding: 3rem 1.5rem;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .section {
    padding: 2.5rem 1.5rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}
