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

:root {
  --bg: #f4f1ec;
  --bg-elevated: #ffffff;
  --text: #1b1b1b;
  --muted: #5b5b5b;
  --accent: #0c3b58;
  --accent-soft: #cde7f5;
  --highlight: #f3c969;
  --border: rgba(27, 27, 27, 0.12);
  --shadow: 0 24px 60px rgba(12, 20, 33, 0.12);
  --radius: 22px;
}

[data-theme="dark"] {
  --bg: #0f1419;
  --bg-elevated: #161d24;
  --text: #f4f4f4;
  --muted: #b3b3b3;
  --accent: #7dd3fc;
  --accent-soft: #1f2f3a;
  --highlight: #f2a93b;
  --border: rgba(244, 244, 244, 0.12);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, #ffffff 0%, var(--bg) 45%, #e9eef1 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("./assets/pattern.svg");
  opacity: 0.4;
  pointer-events: none;
  z-index: -1;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 16px;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  z-index: 999;
}

.skip-link:focus {
  left: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244, 241, 236, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .site-header {
  background: rgba(15, 20, 25, 0.92);
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.brand-text {
  font-size: 18px;
  letter-spacing: 0.4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  font-size: 15px;
  color: var(--muted);
  position: relative;
}

.nav-link.active,
.nav-link:hover {
  color: var(--text);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 2px;
  background: var(--accent);
}

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  border: none;
  background: transparent;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.section {
  margin-top: 100px;
}

.section-heading {
  margin-bottom: 32px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}

.eyebrow-icon {
  width: 22px;
  height: 22px;
}

h1 {
  font-family: "Crimson Pro", serif;
  font-size: clamp(42px, 5vw, 70px);
  line-height: 1;
  margin-bottom: 16px;
}

h2 {
  font-family: "Crimson Pro", serif;
  font-size: clamp(30px, 4vw, 48px);
  margin-bottom: 6px;
}

h3 {
  font-size: 22px;
  margin-bottom: 12px;
}

p {
  line-height: 1.6;
  color: var(--muted);
}

.about-card .paragraph-gap {
  margin-top: 12px;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  background: linear-gradient(140deg, rgba(12, 59, 88, 0.08), rgba(243, 201, 105, 0.18));
  padding: 48px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-lede {
  font-size: 18px;
  max-width: 540px;
}

.hero-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.3px;
}

.hero-subtitle {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--muted);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
}

.button.primary {
  background: var(--accent);
  color: #fff;
}

.button.ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.button.small {
  padding: 8px 14px;
  font-size: 13px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--muted);
}

.hero-card {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 18px;
  display: grid;
  gap: 16px;
  border: 1px solid var(--border);
}

.hero-media-wrap {
  background: linear-gradient(135deg, rgba(12, 59, 88, 0.18), rgba(243, 201, 105, 0.2));
  border-radius: 18px;
  padding: 8px;
}

.hero-media {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  object-fit: cover;
  background: radial-gradient(circle at top, #ffffff 0%, #e8edf1 65%);
  display: block;
}

.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.about-card,
.about-panel {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.education-item + .education-item {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.edu-title {
  font-weight: 600;
  color: var(--text);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.skill-card {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 22px;
  border: 1px solid var(--border);
  display: grid;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.skill-card img {
  width: 36px;
  height: 36px;
}

.skill-card::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 18px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--highlight));
  opacity: 0.6;
}

.skill-card h3 {
  margin-bottom: 4px;
}

.skill-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  padding-bottom: 12px;
}

.projects-lede {
  margin-bottom: 18px;
  max-width: 680px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.filter-chip {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
}

.filter-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.featured-project {
  border: 1px solid rgba(12, 59, 88, 0.4);
  box-shadow: var(--shadow);
}

.project-card img {
  height: 180px;
  object-fit: cover;
}

.project-body {
  padding: 18px;
  display: grid;
  gap: 12px;
}

.outcome {
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.timeline {
  border-left: 1px solid var(--border);
  padding-left: 22px;
  display: grid;
  gap: 22px;
}

.timeline-item {
  position: relative;
  padding: 16px 22px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.timeline-marker {
  position: absolute;
  left: -32px;
  top: 24px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-item ul {
  margin-top: 12px;
  padding-left: 20px;
  color: var(--muted);
}

.role {
  color: var(--muted);
  font-size: 14px;
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.cert-card {
  padding: 20px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  align-items: start;
}

.contact-card,
.contact-form {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 22px;
  border: 1px solid var(--border);
}

.contact-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}

.contact-form input,
.contact-form textarea {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
}

.form-note {
  font-size: 12px;
  margin-top: 10px;
}

.footer {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  color: var(--muted);
}

.footer-brand {
  font-weight: 600;
  color: var(--text);
}

.footer-links,
.footer-actions {
  display: grid;
  gap: 10px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 15, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.open {
  display: flex;
}

.modal-content {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 640px;
  width: 100%;
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  right: 16px;
  top: 12px;
  font-size: 22px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text);
}

.case-visuals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.case-visuals img {
  border-radius: 16px;
  border: 1px solid var(--border);
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 32px;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 72px;
    right: 24px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    display: none;
    box-shadow: var(--shadow);
  }

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

  main {
    padding: 24px 20px 60px;
  }

  .case-visuals {
    grid-template-columns: 1fr;
  }
}
