:root {
  --font-primary: "Inter", sans-serif;
  --font-heading: "Saira Extra Condensed", sans-serif;
  --bg: #fafbfc;
  --bg-card: #ffffff;
  --text: #1a1a2e;
  --text-muted: #5a6178;
  --accent: #012169;
  --accent-light: #e8edf6;
  --border: #e2e6ee;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.04);
  --radius: 10px;
  --max-width: 960px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-primary);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Site header ───────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 251, 252, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
}

.site-header .logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.site-header .logo:hover {
  color: var(--accent);
}

.site-header nav {
  display: flex;
  gap: 1.75rem;
}

.site-header nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.site-header nav a:hover,
.site-header nav a.active {
  color: var(--accent);
}

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

.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 5rem 1.5rem 4rem;
  display: flex;
  align-items: center;
  gap: 3rem;
}

.hero-photo {
  flex-shrink: 0;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
}

.hero-text h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin: 0 0 0.5rem;
  line-height: 1.1;
  color: var(--text);
}

.hero-text .tagline {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  max-width: 480px;
}

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

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.hero-links a:hover {
  color: var(--accent);
}

/* ── Cards section ─────────────────────────────────────── */

.cards-section {
  max-width: var(--max-width);
  margin: 0 auto 5rem;
  padding: 0 1.5rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: inherit;
}

.card-icon {
  font-size: 1.75rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.card h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.35rem;
  margin: 0 0 0.5rem;
}

.card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
  flex: 1;
}

.card-arrow {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

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

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--accent);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* ── Blog placeholder ──────────────────────────────────── */

.blog-placeholder {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 5rem 1.5rem;
  text-align: center;
}

.blog-placeholder h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 1rem;
}

.blog-placeholder p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto;
}

/* ── CV page overrides ─────────────────────────────────── */

.cv-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.cv-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.cv-header img {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
}

.cv-header h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 0.25rem;
}

.cv-header .email {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.cv-header .email a {
  color: var(--accent);
  text-decoration: none;
}

.cv-header .email a:hover {
  text-decoration: underline;
}

.cv-social {
  display: flex;
  gap: 1rem;
}

.cv-social a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.15s;
}

.cv-social a:hover {
  color: var(--accent);
}

/* CV sections */

.cv-section {
  margin-bottom: 2.5rem;
}

.cv-section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text);
}

.cv-section-title::after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--border);
}

.cv-section-title i {
  color: var(--accent);
  font-size: 1.2rem;
}

.cv-entry {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.cv-date {
  flex: 0 0 110px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  padding-top: 0.15rem;
}

.cv-content {
  flex: 1;
}

.cv-content p {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  line-height: 1.65;
}

.cv-content strong {
  font-weight: 600;
}

.cv-content ul {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.65;
}

.cv-content ul li {
  margin-bottom: 0.35rem;
}

.cv-content a {
  color: var(--accent);
  text-decoration: none;
}

.cv-content a:hover {
  text-decoration: underline;
}

.cv-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.25rem 0;
}

/* Skills */

.cv-skill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
}

.cv-skill:last-child {
  border-bottom: none;
}

.cv-skill-name {
  font-size: 0.95rem;
  font-weight: 500;
}

.cv-skill-dots {
  display: flex;
  gap: 0.25rem;
  color: var(--accent);
  font-size: 0.65rem;
}

.cv-skill-dots .bi-circle {
  color: var(--border);
}

/* Table */

.cv-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
}

.cv-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 480px;
}

.cv-content table th,
.cv-content table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.cv-content table thead th {
  font-weight: 600;
  background: var(--accent-light);
  color: var(--text);
}

.cv-content table tbody tr:hover {
  background: var(--accent-light);
}

/* Responsive iframe */

.responsive-iframe {
  position: relative;
  padding-bottom: 56.25%;
  padding-top: 30px;
  height: 0;
  overflow: hidden;
  margin-bottom: 1rem;
  border-radius: var(--radius);
}

.responsive-iframe iframe,
.responsive-iframe object,
.responsive-iframe embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
}

/* Print */

@media print {
  .site-header,
  .site-footer,
  .responsive-iframe {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .cv-wrapper {
    padding: 0;
  }

  .cv-header img {
    display: none;
  }

  .cv-section-title::after {
    background: #000;
  }
}

/* Responsive */

@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding: 3rem 1.5rem 2.5rem;
    gap: 1.5rem;
  }

  .hero-photo {
    width: 120px;
    height: 120px;
  }

  .hero-text .tagline {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-links {
    justify-content: center;
  }

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

  .cv-header {
    flex-direction: column;
    text-align: center;
  }

  .cv-social {
    justify-content: center;
  }

  .cv-entry {
    flex-direction: column;
    gap: 0.25rem;
  }

  .cv-date {
    flex: none;
  }

  .site-header nav {
    gap: 1rem;
  }

  .cv-skill {
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .cv-skill-name {
    flex: 1 1 100%;
  }

  .cv-skill-dots {
    margin-left: auto;
  }
}
