@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&family=JetBrains+Mono:wght@400;600&display=swap");

/* EMSAMA — unified design system */
:root {
  --bg: #0a0e17;
  --bg-elevated: #111827;
  --surface: #151c2e;
  --surface-hover: #1c2640;
  --border: rgba(148, 163, 184, 0.12);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --accent-dim: rgba(56, 189, 248, 0.15);
  --gradient: linear-gradient(135deg, #0ea5e9 0%, #6366f1 50%, #a855f7 100%);
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --font: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --header-h: 64px;
  --max: 1120px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(14, 165, 233, 0.18), transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 50%, rgba(99, 102, 241, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 0% 80%, rgba(168, 85, 247, 0.06), transparent);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--accent-strong);
}

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

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 9999;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(12px);
}

.site-header__inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-logo span {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.75rem;
}

.site-nav a {
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--surface);
}

.lang-switcher {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}

.lang-switcher button {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.45rem 0.65rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.lang-switcher button:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.lang-switcher button.is-active {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.45);
}

.site-header__controls {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.theme-switcher {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}

.theme-switcher button {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.45rem 0.55rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.theme-switcher button:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.theme-switcher button.is-active {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.45);
}

/* Main — grows so footer stays at viewport bottom on short pages */
.site-main {
  flex: 1 1 auto;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

/* Hero home */
.hero {
  padding: 3rem 0 2rem;
  text-align: center;
}

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 1rem;
}

.hero__lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 36rem;
  margin: 0 auto 2.5rem;
}

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.card-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.25s var(--ease), border-color 0.25s;
  overflow: hidden;
}

.card-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.06), transparent 40%);
  pointer-events: none;
}

.card-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.35);
}

.card-tile h2 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

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

.card-tile .card-tile__link {
  margin-top: 1.25rem;
  font-weight: 600;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent);
}

.card-tile .card-tile__link::after {
  content: "→";
  transition: transform 0.2s;
}

.card-tile:hover .card-tile__link::after {
  transform: translateX(4px);
}

/* Page header (inner pages) */
.page-hero {
  padding: 2rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.page-hero p {
  margin: 0;
  color: var(--text-muted);
  max-width: 42rem;
  font-size: 1.0625rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn--primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 8px 32px rgba(14, 165, 233, 0.35);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 40px rgba(14, 165, 233, 0.45);
  color: #fff;
}

.btn--ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  background: var(--surface-hover);
  color: var(--text);
}

/* Prose */
.prose {
  color: var(--text-muted);
}

.prose h2 {
  color: var(--text);
  font-size: 1.35rem;
  margin: 2rem 0 0.75rem;
}

.prose h3 {
  color: var(--text);
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
}

.prose p {
  margin: 0 0 1rem;
}

.prose ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.35rem;
}

/* Feature list */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.feature-card {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--text);
}

.feature-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Project cards (AM projects) */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s;
}

.project-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
}

.project-card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  background: var(--bg-elevated);
}

.project-card__body {
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-card h2 {
  font-size: 1.15rem;
  margin: 0 0 0.35rem;
}

.project-card h2 a {
  color: inherit;
  text-decoration: none;
}

.project-card h2 a:hover {
  color: var(--accent);
}

.project-card .meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* CV layout */
.cv-layout {
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .cv-layout {
    grid-template-columns: 320px 1fr;
    align-items: start;
  }
}

.cv-sidebar {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 1.75rem;
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}

.cv-sidebar img.avatar {
  width: 100%;
  max-width: 220px;
  margin: 0 auto 1.25rem;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
}

.cv-sidebar .name {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.cv-sidebar .role {
  color: var(--accent);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.cv-sidebar .location {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.cv-sidebar .social a {
  margin-right: 0.75rem;
  font-size: 1.25rem;
  color: var(--accent);
}

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

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

.cv-section h2 {
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
  color: var(--accent);
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.cv-section h3.cv-subheading {
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font);
  text-transform: none;
  letter-spacing: normal;
  color: var(--text);
  margin: 2rem 0 0.75rem;
  padding: 0;
  border: none;
}

.cv-section h3.cv-subheading:first-of-type {
  margin-top: 1rem;
}

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

.skill-box {
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.skill-box h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-box ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.edu-grid {
  display: grid;
  gap: 1rem;
}

.edu-card {
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

.edu-card .edu-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.edu-card .edu-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.certificat-img {
  margin-top: 0.75rem;
}

.certificat-img img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.cv-section .level {
  color: var(--text-muted);
  font-size: 0.85em;
}

/* University courses (grouped) */
.uni-courses-intro {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: -0.5rem 0 1.5rem;
}

.uni-group {
  margin-bottom: 2.25rem;
}

.uni-group:last-child {
  margin-bottom: 0;
}

.uni-group__name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.25rem;
}

.uni-group__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

.uni-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.uni-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.uni-table th,
.uni-table td {
  padding: 0.5rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.uni-table th {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--surface);
  white-space: nowrap;
}

.uni-table tr:last-child td {
  border-bottom: none;
}

.uni-table tbody tr:hover td {
  background: rgba(56, 189, 248, 0.04);
}

.uni-table .col-course {
  min-width: 12rem;
}

/* Emma journeys */
.journey-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.journey-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}

.journey-card .carousel {
  border-bottom: 1px solid var(--border);
}

.journey-card .journey-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.journey-card h2 {
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
}

.journey-card .journey-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

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

/* SM landing page layout */
body.sm-page .sm-landing {
  flex: 1;
}

/* SM landing video */
.sm-landing {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  overflow: hidden;
}

.sm-landing__video {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.sm-landing__video video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

.sm-landing__video::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(10, 14, 23, 0.45) 0%, rgba(10, 14, 23, 0.88) 100%);
  pointer-events: none;
}

.sm-landing__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 32rem;
}

.sm-landing__card {
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(17, 24, 39, 0.75);
  backdrop-filter: blur(12px);
}

.sm-landing__card img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 1rem;
  border: 3px solid rgba(56, 189, 248, 0.4);
}

.sm-landing__name {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.sm-landing__tagline {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
  min-height: 1.5em;
}

.sm-landing .btn {
  margin-top: 1.25rem;
}

.sm-landing__credit {
  position: absolute;
  bottom: 0.75rem;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  z-index: 1;
}

.sm-landing__credit a {
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 2rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.site-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--text-muted);
}

.site-footer a:hover {
  color: var(--accent);
}

.site-footer__meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.site-footer__domain {
  color: var(--text-muted);
}

.site-footer__book {
  margin: 0;
  padding: 0.45rem 1rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  background: var(--accent-strong);
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.25);
  transition: background 0.2s var(--ease), transform 0.15s var(--ease);
}

.site-footer__book:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

.site-footer__book:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[data-theme="light"] .site-footer__book {
  color: #fff;
}

/* Utilities */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.text-center {
  text-align: center;
}

.mt-0 {
  margin-top: 0;
}

.mb-2 {
  margin-bottom: 2rem;
}

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

/* Bootstrap carousel overrides in journey (emma) */
.journey-card .carousel-control-prev,
.journey-card .carousel-control-next {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

/* —— Light theme (toggle: html[data-theme="light"]) —— */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f1f5f9;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-hover: #e2e8f0;
  --border: rgba(15, 23, 42, 0.12);
  --text: #0f172a;
  --text-muted: #64748b;
  --accent: #0284c7;
  --accent-strong: #0369a1;
  --accent-dim: rgba(2, 132, 199, 0.14);
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] body {
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(14, 165, 233, 0.1), transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 50%, rgba(99, 102, 241, 0.05), transparent),
    radial-gradient(ellipse 60% 40% at 0% 80%, rgba(168, 85, 247, 0.04), transparent);
}

html[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.94);
  border-bottom-color: var(--border);
}

html[data-theme="light"] .lang-switcher button.is-active,
html[data-theme="light"] .theme-switcher button.is-active {
  box-shadow: inset 0 0 0 1px rgba(2, 132, 199, 0.35);
}

html[data-theme="light"] .sm-landing__card {
  background: rgba(255, 255, 255, 0.94);
  border-color: var(--border);
}

html[data-theme="light"] .sm-landing__video::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(241, 245, 249, 0.92) 100%);
}

html[data-theme="light"] .em-cover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), var(--bg));
}

html[data-theme="light"] .journey-card .carousel-control-prev,
html[data-theme="light"] .journey-card .carousel-control-next {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* —— Projects: NordMyt card —— */
.nordmyt-project-card__body p {
  margin: 0 0 0.75rem;
  color: var(--text);
  line-height: 1.55;
}

.nordmyt-project-card__body p:last-child {
  margin-bottom: 0;
}

.nordmyt-social__label {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nordmyt-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.25rem;
}

.nordmyt-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 1.25rem;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.nordmyt-social__link:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

/* —— CV: Experience —— */
.exp-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.exp-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.35);
}

html[data-theme="light"] .exp-item {
  background: rgba(255, 255, 255, 0.6);
}

.exp-logo {
  flex: 0 0 2.75rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  background: var(--accent-dim);
  color: var(--accent-strong);
}

.exp-logo--wide {
  font-size: 0.75rem;
  letter-spacing: -0.02em;
}

.exp-body {
  min-width: 0;
  flex: 1;
}

.exp-role {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.exp-company {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.exp-when,
.exp-where {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.exp-desc {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text);
}

.exp-tags {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* —— CV: Certificates grid + modal —— */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 1rem;
}

.cert-thumb {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin: 0;
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: rgba(15, 23, 42, 0.35);
  cursor: zoom-in;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

html[data-theme="light"] .cert-thumb {
  background: rgba(255, 255, 255, 0.75);
}

.cert-thumb:hover,
.cert-thumb:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}

.cert-thumb__meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.5rem;
}

.cert-thumb__title {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}

.cert-thumb__year {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.cert-thumb__frame {
  display: block;
  border-radius: 0.35rem;
  overflow: hidden;
  background: var(--surface-hover);
  aspect-ratio: 4 / 3;
}

.cert-thumb__frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cert-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.cert-modal[hidden] {
  display: none;
}

.cert-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  cursor: pointer;
}

html[data-theme="light"] .cert-modal__backdrop {
  background: rgba(15, 23, 42, 0.55);
}

.cert-modal__panel {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 56rem);
  max-height: min(92vh, 48rem);
  padding: 0.5rem;
  border-radius: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.cert-modal__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  padding: 0.35rem 0.65rem;
  border-radius: 0.4rem;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.cert-modal__close:hover {
  background: var(--surface-hover);
}

.cert-modal__img {
  display: block;
  max-width: 100%;
  max-height: min(85vh, 44rem);
  width: auto;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 0.35rem;
}
