:root {
  --navy: #1f3864;
  --navy-dark: #14284a;
  --navy-light: #2f4d85;
  --ink: #1a1d24;
  --grey: #55606e;
  --grey-light: #8892a0;
  --border: #e4e8ef;
  --bg-alt: #f6f8fb;
  --white: #ffffff;
  --accent: #c9a961;
  --radius: 10px;
  --max-width: 880px;
  --shadow: 0 1px 3px rgba(20, 30, 60, 0.06), 0 8px 24px rgba(20, 30, 60, 0.04);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.topbar-name {
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
  font-size: 15px;
}
.topnav {
  display: flex;
  gap: 20px;
  flex: 1;
}
.topnav a {
  color: var(--grey);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease;
}
.topnav a:hover { color: var(--navy); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--navy);
  color: var(--white);
}
.btn-primary:hover { background: var(--navy-dark); }
.btn-outline {
  border-color: var(--navy);
  color: var(--navy);
  background: transparent;
}
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-ghost {
  color: var(--navy);
  border-color: var(--border);
  background: var(--white);
  padding: 8px 14px;
}
.btn-ghost:hover { border-color: var(--navy); }

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--white) 100%);
  border-bottom: 1px solid var(--border);
}
.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 72px 24px 56px;
}
.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 12px;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 48px);
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}
.hero-summary {
  font-size: 18px;
  color: var(--grey);
  max-width: 640px;
  margin: 0 0 28px;
}
.hero-meta {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 0;
  margin: 0 0 32px;
}
.hero-meta li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--grey);
}
.hero-meta svg { color: var(--navy); flex-shrink: 0; }
.hero-meta a { color: var(--grey); text-decoration: none; }
.hero-meta a:hover { color: var(--navy); text-decoration: underline; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* Sections */
.section { padding: 56px 24px; }
.section-alt { background: var(--bg-alt); }
.section-inner { max-width: var(--max-width); margin: 0 auto; }
.section-inner-narrow { max-width: 620px; }

.section h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--navy);
  display: inline-block;
}

.summary-text {
  font-size: 16px;
  color: var(--ink);
  max-width: 720px;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.skill-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.skill-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 6px;
}
.skill-card p {
  font-size: 14px;
  color: var(--grey);
  margin: 0;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 28px;
  border-left: 2px solid var(--border);
}
.timeline-item {
  position: relative;
  margin-bottom: 40px;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -34px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--navy);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 2px var(--navy);
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-item-compact { margin-bottom: 24px; }

.timeline-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.timeline-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
}
.timeline-header h3 span {
  font-weight: 500;
  color: var(--grey);
}
.timeline-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--grey-light);
  white-space: nowrap;
}
.timeline-subtitle {
  font-style: italic;
  color: var(--grey);
  font-size: 14px;
  margin: 0 0 12px;
}
.timeline-item ul {
  margin: 0;
  padding-left: 20px;
}
.timeline-item li {
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 8px;
}
.timeline-item li:last-child { margin-bottom: 0; }
.timeline-item strong { color: var(--navy); }

/* Education */
.education-item h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 6px;
}
.education-item p {
  font-size: 15px;
  color: var(--grey);
  margin: 0;
}

/* Contact form */
.contact-intro {
  color: var(--grey);
  margin-bottom: 28px;
}
.contact-intro a { color: var(--navy); }
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-row label {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}
.form-row input,
.form-row textarea {
  font-family: inherit;
  font-size: 15px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  resize: vertical;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(31, 56, 100, 0.12);
}
.contact-form .btn { align-self: flex-start; }
.hidden-field { display: none; }
.form-status {
  font-size: 14px;
  margin: 0;
  min-height: 20px;
}
.form-status.success { color: #1a7f4b; }
.form-status.error { color: #c0392b; }

/* Footer */
.footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--grey-light);
  font-size: 13px;
  border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 640px) {
  .topbar-inner { flex-wrap: wrap; gap: 12px; }
  .topnav { order: 3; width: 100%; gap: 16px; overflow-x: auto; }
  .download-btn span { display: none; }
  .hero-inner { padding: 48px 20px 40px; }
  .section { padding: 40px 20px; }
  .timeline { padding-left: 20px; }
  .timeline-item::before { left: -26px; }
}

/* Print styles (used for PDF export) */
@media print {
  @page { size: A4; margin: 10mm 12mm; }

  .topbar, .hero-cta, .footer, #contact, .eyebrow { display: none; }

  body { font-size: 10.5px; line-height: 1.4; }

  .hero { background: none; border: none; }
  .hero-inner { max-width: 100%; padding: 0 0 10px; }
  .hero h1 { font-size: 22px; margin: 0 0 6px; color: var(--navy); }
  .hero-summary { font-size: 11px; margin: 0 0 10px; max-width: 100%; }
  .hero-meta { gap: 14px; margin: 0; }
  .hero-meta li { font-size: 10px; }

  .section { padding: 8px 0; max-width: 100%; break-inside: auto; }
  .section-inner, .section-inner-narrow { max-width: 100%; }
  .section-alt { background: none; }
  .section h2 { font-size: 13px; margin: 0 0 10px; padding-bottom: 4px; border-bottom-width: 1.5px; }

  .summary-text { font-size: 10.5px; max-width: 100%; }

  .skills-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .skill-card { padding: 6px 10px; border-color: #ddd; break-inside: avoid; }
  .skill-card h3 { font-size: 10px; margin: 0 0 2px; }
  .skill-card p { font-size: 9.5px; }

  .timeline { padding-left: 16px; border-left-width: 1px; }
  .timeline-item { margin-bottom: 12px; break-inside: avoid; }
  .timeline-item::before { left: -20px; width: 6px; height: 6px; box-shadow: 0 0 0 1.5px var(--navy); }
  .timeline-header h3 { font-size: 11.5px; }
  .timeline-date { font-size: 9.5px; }
  .timeline-subtitle { font-size: 9.5px; margin: 0 0 5px; }
  .timeline-item li { font-size: 9.8px; margin-bottom: 3px; }

  .education-item h3 { font-size: 11px; }
  .education-item p { font-size: 9.8px; }

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