:root {
  --navy: #1c2b4a;
  --navy-dark: #12203a;
  --text: #232733;
  --text-muted: #5b6272;
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --border: #e5e7eb;
  --radius: 12px;
  --max-width: 880px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}

a {
  color: var(--navy);
}

h1, h2, h3 {
  line-height: 1.2;
  font-weight: 700;
}

/* ── Nav ─────────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--navy);
}

/* ── Hero ────────────────────────────────────────────────────────── */

.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 72px 24px 56px;
  text-align: center;
}

.hero-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 24px;
  box-shadow: 0 4px 24px rgba(28, 43, 74, 0.12);
}

.hero h1 {
  font-size: 2.25rem;
  margin: 0 0 8px;
}

.hero-tagline {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0 0 20px;
}

.hero-lede {
  max-width: 560px;
  margin: 0 auto 32px;
  font-size: 1.05rem;
}

.hero-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Buttons ─────────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--navy);
  color: #fff;
}

.btn-primary:hover {
  background: var(--navy-dark);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

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

/* ── Sections ────────────────────────────────────────────────────── */

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 24px;
  border-top: 1px solid var(--border);
}

.section h2 {
  font-size: 1.5rem;
  margin: 0 0 24px;
}

.section p {
  max-width: 680px;
}

/* ── Company cards ───────────────────────────────────────────────── */

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.card h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
}

.card-url a {
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--text-muted);
}

.card-url {
  margin: 0 0 12px;
}

.card p:not(.card-url) {
  color: var(--text);
  font-size: 0.95rem;
}

.card-link {
  display: inline-block;
  margin-top: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

/* ── Experience timeline ─────────────────────────────────────────── */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--border);
}

.timeline li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  padding: 0 0 32px 24px;
  position: relative;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--navy);
  border: 2px solid var(--bg);
}

.timeline-when {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding-top: 2px;
}

.timeline-body h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.timeline-body p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ── Contact form ────────────────────────────────────────────────── */

.contact-lede {
  color: var(--text-muted);
}

.contact-form {
  max-width: 480px;
}

.form-row {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
}

.form-row label {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-row input,
.form-row textarea {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-soft);
  resize: vertical;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: 2px solid var(--navy);
  outline-offset: 1px;
}

.contact-status {
  margin-top: 12px;
  font-size: 0.9rem;
  min-height: 1.2em;
}

.contact-status.ok { color: #16794a; }
.contact-status.err { color: #b3261e; }

/* ── Footer ──────────────────────────────────────────────────────── */

.footer {
  text-align: center;
  padding: 32px 24px 48px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ── Responsive ──────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .nav-inner { flex-direction: column; gap: 8px; padding: 12px 20px; }
  .nav-links { gap: 16px; flex-wrap: wrap; justify-content: center; }
  .cards { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .timeline-when { padding-top: 0; }
  .hero { padding: 56px 20px 40px; }
  .hero h1 { font-size: 1.85rem; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e6e8ec;
    --text-muted: #a3a9b7;
    --bg: #14161c;
    --bg-soft: #1b1e26;
    --border: #2a2e38;
  }
  .nav { background: rgba(20, 22, 28, 0.9); }
}
