/* ============================================
   Base & Reset
   ============================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem; /* ~17px */
  line-height: 1.75;
  color: #222;
  background-color: #fff;
}

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

/* ============================================
   Layout
   ============================================ */

.container {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Skip-to-content link (accessibility) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: #2b6cb0;
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
  text-decoration: none;
  font-size: 0.875rem;
  border-radius: 0 0 4px 0;
}

.skip-link:focus {
  top: 0;
}

/* ============================================
   Header & Navigation
   ============================================ */

.site-header {
  border-bottom: 1px solid #e8e8e8;
  padding: 1rem 0;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.site-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a202c;
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.site-title:hover {
  color: #2b6cb0;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 1.25rem;
  align-items: center;
}

.site-nav a {
  font-size: 0.9375rem;
  color: #4a5568;
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
  display: inline-block;
}

.site-nav a:hover {
  color: #2b6cb0;
  border-bottom-color: #bee3f8;
}

.site-nav a[aria-current="page"] {
  color: #2b6cb0;
  border-bottom-color: #2b6cb0;
  font-weight: 500;
}

/* ============================================
   Main Content
   ============================================ */

main {
  padding-top: 2.5rem;
  padding-bottom: 4rem;
  min-height: calc(100vh - 140px);
}

/* ============================================
   Page Layout (page.html)
   ============================================ */

.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #e8e8e8;
}

.page-header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  color: #1a202c;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.page-subtitle {
  color: #4a5568;
  font-size: 1.05rem;
  margin: 0.5rem 0 0;
}

/* ============================================
   Home / Hero
   ============================================ */

.hero {
  padding: 3rem 0 2.5rem;
}

.hero h1 {
  margin: 0 0 0.4rem;
  font-size: 2.5rem;
  font-weight: 800;
  color: #1a202c;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.hero .tagline {
  font-size: 1.15rem;
  color: #4a5568;
  margin: 0 0 1.5rem;
  font-weight: 400;
}

.hero p {
  max-width: 640px;
  color: #374151;
}

.hero .links {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero .links a {
  display: inline-block;
  padding: 0.45rem 1.1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.hero .links a.btn-primary {
  background: #2b6cb0;
  color: #fff;
  border: 1px solid #2b6cb0;
}

.hero .links a.btn-primary:hover {
  background: #2c5282;
  border-color: #2c5282;
}

.hero .links a.btn-secondary {
  background: #fff;
  color: #2b6cb0;
  border: 1px solid #bee3f8;
}

.hero .links a.btn-secondary:hover {
  background: #ebf8ff;
}

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: inherit;
  color: #1a202c;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-top: 0;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #f0f0f0;
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.4rem;
  color: #2d3748;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

ul, ol {
  padding-left: 1.5rem;
  margin-top: 0;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.35rem;
}

a {
  color: #2b6cb0;
  text-underline-offset: 2px;
}

a:hover {
  color: #2c5282;
}

strong {
  font-weight: 600;
  color: #1a202c;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.875em;
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  padding: 0.1em 0.4em;
  border-radius: 3px;
  color: #c53030;
}

pre {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

blockquote {
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  border-left: 3px solid #2b6cb0;
  background: #ebf8ff;
  color: #2d3748;
  border-radius: 0 4px 4px 0;
}

blockquote p:last-child {
  margin-bottom: 0;
}

hr {
  border: none;
  border-top: 1px solid #e8e8e8;
  margin: 2.5rem 0;
}

/* ============================================
   Publication List
   ============================================ */

.pub-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pub-item {
  padding: 1rem 0;
  border-bottom: 1px solid #f0f4f8;
}

.pub-item:last-child {
  border-bottom: none;
}

.pub-title {
  font-weight: 600;
  color: #1a202c;
  display: block;
}

.pub-authors {
  color: #4a5568;
  font-size: 0.9375rem;
  display: block;
}

.pub-venue {
  color: #718096;
  font-size: 0.9rem;
  font-style: italic;
  display: block;
}

.pub-links {
  margin-top: 0.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pub-link {
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.1rem 0.55rem;
  border: 1px solid #bee3f8;
  border-radius: 3px;
  color: #2b6cb0;
  text-decoration: none;
  background: #ebf8ff;
}

.pub-link:hover {
  background: #bee3f8;
  color: #2c5282;
}

/* ============================================
   Software Page
   ============================================ */

.sw-page {
  padding-top: 0;
  padding-bottom: 4rem;
}

/* Group section */
.sw-group {
  margin-top: 3rem;
}

.sw-group-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
  margin: 0 0 1.25rem;
  padding-bottom: 0;
  border-bottom: none;
}

/* Card grid */
.sw-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

/* Individual card */
.sw-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.4rem 1.5rem 1.2rem;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.sw-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.06);
}

/* Card head: title + status badge on same row */
.sw-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.2rem;
}

.sw-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.35;
}

.sw-card-title a {
  color: inherit;
  text-decoration: none;
}

.sw-card-title a:hover {
  color: #2563eb;
}

/* Full name / subtitle */
.sw-card-full {
  font-size: 0.8125rem;
  color: #64748b;
  font-style: italic;
  margin: 0 0 0.75rem;
}

/* Description */
.sw-card-desc {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.65;
  margin: 0 0 1rem;
  flex: 1;
}

/* Status badge */
.sw-status {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  line-height: 1.5;
  white-space: nowrap;
  margin-top: 0.1rem;
}

.sw-status--active {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.sw-status--standard {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.sw-status--platform {
  background: #faf5ff;
  color: #7c3aed;
  border: 1px solid #ddd6fe;
}

.sw-status--archived {
  background: #f8fafc;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
}

/* Tags */
.sw-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.9rem;
}

.sw-tag {
  display: inline-block;
  font-size: 0.73rem;
  font-weight: 500;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 0.1rem 0.5rem;
  border-radius: 3px;
}

/* Link buttons */
.sw-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}

.sw-links a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #334155;
  text-decoration: none;
  padding: 0.25rem 0.7rem;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #f8fafc;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.sw-links a:first-child {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}

.sw-links a:first-child:hover {
  background: #1e293b;
  border-color: #1e293b;
}

.sw-links a:not(:first-child):hover {
  border-color: #bfdbfe;
  color: #2563eb;
  background: #f0f7ff;
}

/* CTA strip */
.sw-cta {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid #f1f5f9;
}

.sw-cta p {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  color: #334155;
}

.sw-cta-sub {
  font-size: 0.9rem !important;
  color: #64748b !important;
}

/* Software page responsive */
@media (max-width: 680px) {
  .sw-list {
    grid-template-columns: 1fr;
  }

  .sw-card-head {
    flex-direction: row;
    align-items: flex-start;
  }
}

/* ── keep old .project-* classes for any legacy usage ── */
.project-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

.project-card {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  background: #fafafa;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.project-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 2px 8px rgba(43, 108, 176, 0.07);
}

.project-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.0625rem;
}

.project-card p {
  margin: 0 0 0.75rem;
  color: #4a5568;
  font-size: 0.9375rem;
}

.project-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.tag {
  display: inline-block;
  background: #ebf4ff;
  color: #2b6cb0;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.15rem 0.55rem;
  border-radius: 3px;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: #2b6cb0;
  text-decoration: none;
  padding: 0.2rem 0.6rem;
  border: 1px solid #bee3f8;
  border-radius: 3px;
  background: #fff;
}

.project-links a:hover {
  background: #ebf8ff;
}

/* ============================================
   Highlights (home page)
   ============================================ */

.highlights {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #e8e8e8;
}

.highlights h2 {
  border-bottom: none;
  margin-top: 0;
}

.highlight-item {
  display: flex;
  gap: 1.25rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid #f0f4f8;
  align-items: baseline;
}

.highlight-item:last-child {
  border-bottom: none;
}

.highlight-date {
  flex-shrink: 0;
  font-size: 0.85rem;
  color: #718096;
  min-width: 5.5rem;
  font-variant-numeric: tabular-nums;
}

.highlight-text {
  font-size: 0.9375rem;
  color: #374151;
  margin: 0;
}

/* ============================================
   Contact
   ============================================ */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.contact-block h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #718096;
}

.contact-block p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
  border-top: 1px solid #e8e8e8;
  padding: 1.5rem 0;
  background: #fafafa;
  font-size: 0.875rem;
  color: #718096;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
}

.site-footer a {
  color: #4a5568;
  text-decoration: none;
}

.site-footer a:hover {
  color: #2b6cb0;
  text-decoration: underline;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 640px) {
  body {
    font-size: 1rem;
  }

  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .hero .tagline {
    font-size: 1rem;
  }

  .page-header h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .highlight-item {
    flex-direction: column;
    gap: 0.15rem;
  }
}

/* ============================================
   Print
   ============================================ */

@media print {
  .site-header,
  .site-footer,
  .skip-link {
    display: none;
  }

  body {
    font-size: 11pt;
    color: #000;
  }

  a {
    color: #000;
  }

  main {
    padding: 0;
  }
}

/* ============================================
   Homepage — Hero
   ============================================ */

.home-hero {
  padding: 4rem 0 1.75rem;
  border-bottom: none;
}

.home-hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 3.25rem);
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.home-descriptor {
  margin: 0.65rem 0 0;
  font-size: 1.0625rem;
  color: #64748b;
  font-weight: 400;
  letter-spacing: 0;
}

.home-descriptor-sep {
  margin: 0 0.4em;
  color: #cbd5e1;
}

/* ============================================
   Homepage — Intro
   ============================================ */

.home-intro {
  padding: 2rem 0 1rem;
  max-width: 660px;
}

.home-intro p {
  font-size: 1.0625rem;
  color: #334155;
  line-height: 1.8;
  margin-bottom: 0.85rem;
}

.home-intro-links {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
}

.home-intro-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: #2563eb;
  text-decoration: none;
  border-bottom: 1px solid #bfdbfe;
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}

.home-intro-links a:hover {
  color: #1d4ed8;
  border-bottom-color: #1d4ed8;
}

/* ============================================
   Homepage — Navigation Cards
   ============================================ */

.home-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2.75rem 0;
}

.home-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.5rem 1.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  position: relative;
}

.home-card:hover {
  border-color: #bfdbfe;
  background: #f8faff;
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.06);
}

.home-card-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  display: block;
  margin-bottom: 0.5rem;
}

.home-card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
  display: block;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}

.home-card:hover .home-card-title {
  color: #2563eb;
}

.home-card-desc {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.6;
  flex: 1;
  display: block;
}

.home-card-arrow {
  display: block;
  margin-top: 1.25rem;
  font-size: 1rem;
  color: #cbd5e1;
  transition: color 0.15s, transform 0.15s;
}

.home-card:hover .home-card-arrow {
  color: #2563eb;
  transform: translateX(3px);
}

/* ============================================
   Homepage — Highlights
   ============================================ */

.home-highlights {
  padding: 1rem 0 0;
  border-top: 1px solid #f1f5f9;
}

.home-highlights h2 {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #94a3b8;
  border-bottom: none;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.home-hl-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.home-hl-item {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 0 1.5rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid #f1f5f9;
  align-items: baseline;
}

.home-hl-item:last-child {
  border-bottom: none;
}

.home-hl-year {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
  line-height: 1.75;
}

.home-hl-body {
  min-width: 0;
}

.home-hl-text {
  margin: 0;
  font-size: 0.9375rem;
  color: #334155;
  line-height: 1.65;
}

.home-hl-text a {
  color: #2563eb;
}

.home-hl-text a:hover {
  color: #1d4ed8;
}

.home-hl-more {
  margin-top: 1.25rem;
  font-size: 0.875rem;
}

.home-hl-more a {
  color: #2563eb;
  font-weight: 500;
  text-decoration: none;
}

.home-hl-more a:hover {
  text-decoration: underline;
}

/* ============================================
   Homepage — Contact Strip
   ============================================ */

.home-contact {
  margin-top: 3rem;
  padding: 2rem 0;
  border-top: 1px solid #f1f5f9;
}

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

.home-contact-line {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0 1rem;
  font-size: 0.9rem;
  color: #334155;
  align-items: baseline;
}

.home-contact-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #94a3b8;
}

.home-contact-line a {
  color: #2563eb;
  text-decoration: none;
}

.home-contact-line a:hover {
  text-decoration: underline;
}

.home-contact-profiles {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
}

/* ============================================
   Homepage Responsive
   ============================================ */

@media (max-width: 700px) {
  .home-hero {
    padding-top: 2.5rem;
  }

  .home-cards {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .home-hl-item {
    grid-template-columns: 2.75rem 1fr;
    gap: 0 0.85rem;
  }

  .home-contact-line {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

/* ============================================
   CV Page
   ============================================ */

.cv-page {
  padding-top: 2.5rem;
  padding-bottom: 4rem;
}

/* Header */
.cv-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid #0f172a;
  margin-bottom: 2.5rem;
}

.cv-header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.cv-header-role {
  margin: 0.4rem 0 0.15rem;
  font-size: 1rem;
  font-weight: 500;
  color: #334155;
}

.cv-header-inst {
  margin: 0;
  font-size: 0.875rem;
  color: #64748b;
}

.cv-header-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-end;
  flex-shrink: 0;
}

.cv-dl-link {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.35rem 0.9rem;
  border-radius: 4px;
  text-decoration: none;
  background: #0f172a;
  color: #fff;
  transition: background 0.15s;
  white-space: nowrap;
}

.cv-dl-link:hover {
  background: #1e293b;
  color: #fff;
}

.cv-dl-link--ghost {
  background: #fff;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.cv-dl-link--ghost:hover {
  background: #f8fafc;
  color: #0f172a;
}

/* Bio */
.cv-bio p {
  font-size: 1rem;
  color: #334155;
  line-height: 1.8;
  max-width: 680px;
  margin: 0;
}

/* Sections */
.cv-section {
  margin-top: 2.75rem;
}

.cv-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
  margin: 0 0 1.25rem;
  padding-bottom: 0;
  border-bottom: none;
}

/* Current position */
.cv-current {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0 1.5rem;
  align-items: baseline;
}

.cv-current-badge {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  padding: 0.2rem 0.6rem;
  text-align: center;
  white-space: nowrap;
  line-height: 1.5;
  align-self: start;
  margin-top: 0.2rem;
}

.cv-current-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.2rem;
}

.cv-current-inst {
  font-size: 0.9375rem;
  color: #475569;
  margin: 0 0 0.6rem;
}

.cv-current-body p:last-child {
  margin-bottom: 0;
}

/* Timeline */
.cv-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}

.cv-timeline::before {
  content: "";
  position: absolute;
  left: 6.5rem;
  top: 0.6rem;
  bottom: 0.6rem;
  width: 1px;
  background: #e2e8f0;
}

.cv-entry {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 0 1.5rem;
  padding: 0.75rem 0;
  position: relative;
}

.cv-entry + .cv-entry {
  border-top: 1px solid #f8fafc;
}

.cv-entry-year {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #94a3b8;
  text-align: right;
  padding-top: 0.2rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.6;
}

/* Dot on the timeline */
.cv-entry::after {
  content: "";
  position: absolute;
  left: calc(6rem + 1.5rem / 2 - 4px); /* midpoint of gap */
  top: 1.05rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #cbd5e1;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #cbd5e1;
}

.cv-entry-body {
  padding-left: 0.5rem;
}

.cv-entry-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 0.15rem;
}

.cv-entry-title a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid #bfdbfe;
}

.cv-entry-title a:hover {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

.cv-entry-inst {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0 0 0.35rem;
  font-style: italic;
}

.cv-entry-note {
  font-weight: 400;
  color: #64748b;
  font-style: italic;
  font-size: 0.875em;
}

.cv-entry-body p {
  font-size: 0.9rem;
  color: #475569;
  margin: 0 0 0.3rem;
  line-height: 1.6;
}

.cv-entry-body p:last-child {
  margin-bottom: 0;
}

/* Skills grid */
.cv-skills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin: 0;
}

.cv-skill-group {
  padding: 0.9rem 1rem 0.9rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.cv-skill-group:nth-child(even) {
  padding-left: 1.25rem;
  border-left: 1px solid #f1f5f9;
}

.cv-skills dt {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569;
  margin: 0 0 0.3rem;
}

.cv-skills dd {
  margin: 0;
  font-size: 0.9rem;
  color: #334155;
  line-height: 1.55;
}

/* Links bar */
.cv-links-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.cv-links-bar a {
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  padding: 0.2rem 0.9rem;
  border-right: 1px solid #e2e8f0;
}

.cv-links-bar a:first-child {
  padding-left: 0;
}

.cv-links-bar a:last-child {
  border-right: none;
}

.cv-links-bar a:hover {
  color: #2563eb;
}

/* CV Responsive */
@media (max-width: 640px) {
  .cv-header {
    flex-direction: column;
  }

  .cv-header-actions {
    flex-direction: row;
    align-items: flex-start;
  }

  .cv-current {
    grid-template-columns: 1fr;
    gap: 0.5rem 0;
  }

  .cv-current-badge {
    display: inline-block;
    width: auto;
    align-self: auto;
  }

  .cv-timeline::before {
    display: none;
  }

  .cv-entry {
    grid-template-columns: 3.75rem 1fr;
    gap: 0 0.75rem;
  }

  .cv-entry::after {
    display: none;
  }

  .cv-entry-year {
    text-align: left;
    font-size: 0.75rem;
  }

  .cv-entry-body {
    padding-left: 0;
  }

  .cv-skills {
    grid-template-columns: 1fr;
  }

  .cv-skill-group:nth-child(even) {
    padding-left: 0;
    border-left: none;
  }
}

/* CV print overrides */
@media print {
  .cv-header-actions,
  .cv-links-bar,
  .site-header,
  .site-footer {
    display: none;
  }

  .cv-timeline::before {
    display: none;
  }

  .cv-entry::after {
    display: none;
  }

  .cv-page {
    padding: 0;
  }
}
