/* ridaallah.com — single stylesheet, no inline styles (CSP: style-src 'self'). */

@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-latin-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- tokens ---------- */

:root {
  --navy-950: #070d1a;
  --navy-900: #0a1120;
  --navy-800: #111b30;
  --navy-700: #1b2842;
  --navy-600: #2a3a5a;

  --bg: #f7f8fa;
  --bg-alt: #eef1f5;
  --surface: #ffffff;
  --text: #0e1626;
  --text-muted: #4a5568;
  --border: #d9dee7;
  --accent: #0b7268;          /* teal, 5.6:1 on white */
  --accent-strong: #095c54;
  --accent-soft: #e2f3f1;
  --on-accent: #ffffff;
  --focus: #0b63ce;

  --hero-bg: var(--navy-900);
  --hero-text: #eef2f8;
  --hero-muted: #b4c0d4;
  --hero-accent: #4fd1c5;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgb(10 17 32 / 6%), 0 8px 24px rgb(10 17 32 / 6%);
  --container: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --space-section: clamp(4rem, 9vw, 7rem);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: var(--navy-950);
    --bg-alt: var(--navy-900);
    --surface: var(--navy-800);
    --text: #e8edf5;
    --text-muted: #a9b5c8;
    --border: #25334f;
    --accent: #4fd1c5;
    --accent-strong: #7ee3d9;
    --accent-soft: rgb(79 209 197 / 12%);
    --on-accent: #06231f;
    --focus: #8ab8ff;
    --hero-bg: var(--navy-900);
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --bg: var(--navy-950);
  --bg-alt: var(--navy-900);
  --surface: var(--navy-800);
  --text: #e8edf5;
  --text-muted: #a9b5c8;
  --border: #25334f;
  --accent: #4fd1c5;
  --accent-strong: #7ee3d9;
  --accent-soft: rgb(79 209 197 / 12%);
  --on-accent: #06231f;
  --focus: #8ab8ff;
  --hero-bg: var(--navy-900);
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
  color-scheme: dark;
}

/* ---------- base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-strong);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

main:focus {
  outline: none;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  fill: currentColor;
  flex: none;
}

.icon-sm {
  width: 0.95em;
  height: 0.95em;
  display: inline-block;
  vertical-align: -0.1em;
  margin-left: 0.2em;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-weight: 600;
}

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

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover {
  background: var(--accent-strong);
  color: var(--on-accent);
}

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

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--text);
}

.btn-meta {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  opacity: 0.8;
  padding: 0.1rem 0.4rem;
  border: 1px solid currentColor;
  border-radius: 4px;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(10 17 32 / 92%);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid rgb(255 255 255 / 8%);
  color: var(--hero-text);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--hero-text);
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.brand:hover {
  color: #fff;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  background: var(--hero-accent);
  color: var(--navy-900);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-nav ul {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  color: var(--hero-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.site-nav a:hover {
  color: #fff;
  background: rgb(255 255 255 / 8%);
}

.lang-switch,
.theme-toggle,
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0 0.7rem;
  border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 18%);
  background: transparent;
  color: var(--hero-text);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.lang-switch:hover,
.theme-toggle:hover,
.nav-toggle:hover {
  color: #fff;
  border-color: var(--hero-accent);
}

.lang-current {
  color: var(--hero-accent);
}

.lang-sep {
  opacity: 0.4;
}

.theme-toggle {
  padding: 0;
}

.nav-toggle[hidden] {
  display: none;
}

.theme-toggle .icon-sun {
  display: none;
}

:root[data-theme='dark'] .theme-toggle .icon-sun {
  display: block;
}

:root[data-theme='dark'] .theme-toggle .icon-moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-toggle .icon-sun {
    display: block;
  }
  :root:not([data-theme='light']) .theme-toggle .icon-moon {
    display: none;
  }
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.nav-toggle-bar {
  position: relative;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: '';
  position: absolute;
  left: 0;
}

.nav-toggle-bar::before {
  top: -5px;
}

.nav-toggle-bar::after {
  top: 5px;
}

/* Mobile navigation: collapsed behind the menu button once JS is running. */
@media (max-width: 52rem) {
  .brand-name {
    display: none;
  }

  .js .nav-toggle {
    display: inline-flex;
  }

  .js .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    background: var(--navy-900);
    border-bottom: 1px solid rgb(255 255 255 / 10%);
    padding: 0.5rem var(--gutter) 1rem;
  }

  .js .site-nav.is-open {
    display: block;
  }

  .js .site-nav ul {
    flex-direction: column;
  }

  .js .site-nav a {
    padding: 0.85rem 0.75rem;
    font-size: 1.05rem;
    border-radius: var(--radius-sm);
  }

  /* Without JS, the links wrap below the header row. */
  html:not(.js) .header-inner {
    flex-wrap: wrap;
    padding-block: 0.5rem;
  }

  html:not(.js) .site-nav ul {
    flex-wrap: wrap;
  }
}

@media (min-width: 52.01rem) {
  .nav-toggle {
    display: none !important;
  }
}

/* ---------- hero ---------- */

.hero {
  background:
    radial-gradient(60rem 30rem at 85% -10%, rgb(79 209 197 / 14%), transparent 60%),
    radial-gradient(40rem 30rem at -10% 110%, rgb(59 130 246 / 10%), transparent 60%),
    var(--hero-bg);
  color: var(--hero-text);
  padding-block: clamp(3rem, 8vw, 6.5rem) clamp(3rem, 7vw, 5.5rem);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.eyebrow {
  margin-bottom: 1rem;
  color: var(--hero-accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 750;
  letter-spacing: -0.035em;
  margin-bottom: 0.4em;
}

.hero-headline {
  font-size: clamp(1.2rem, 2.3vw, 1.5rem);
  line-height: 1.4;
  font-weight: 550;
  color: #fff;
  max-width: 38ch;
  text-wrap: balance;
}

.hero-summary {
  color: var(--hero-muted);
  max-width: 54ch;
  font-size: 1.075rem;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 1.5rem 0 2rem;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
  color: var(--hero-text);
}

.hero-facts li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-facts .icon {
  color: var(--hero-accent);
}

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

.hero .btn-primary {
  background: var(--hero-accent);
  color: var(--navy-950);
}

.hero .btn-primary:hover {
  background: #7ee3d9;
}

.hero .btn-secondary {
  color: var(--hero-text);
  border-color: rgb(255 255 255 / 28%);
}

.hero .btn-secondary:hover {
  border-color: var(--hero-accent);
  color: #fff;
}

.hero-alt-cv {
  margin: 1rem 0 0;
  font-size: 0.9rem;
}

.hero-alt-cv a {
  color: var(--hero-muted);
}

.hero-alt-cv a:hover {
  color: #fff;
}

.hero-aside {
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 22rem;
}

.hero-photo {
  margin: 0;
  width: 100%;
}

.hero-photo picture {
  display: block;
}

.hero-photo img {
  width: 100%;
  height: auto;
  border-radius: 20px;
  border: 1px solid rgb(255 255 255 / 12%);
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / 55%);
  background: var(--navy-800);
}

.hero :focus-visible,
.site-header :focus-visible {
  outline-color: #8ab8ff;
}

@media (max-width: 52rem) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-aside {
    order: -1;
    justify-self: start;
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
    max-width: none;
  }

  .hero-photo {
    width: 8.5rem;
    flex: none;
  }

  .toptal {
    --tt: 0.8;
    margin-top: 0;
  }

  .hero-photo img {
    border-radius: 16px;
  }
}

/* ---------- Toptal badge (from Toptal's embed, restyled for the CSP) ---------- */

.toptal {
  --tt: 1;
  margin-top: -2.5rem;
  position: relative;
  isolation: isolate;
  filter: drop-shadow(0 20px 30px rgb(0 0 0 / 40%));
}

.toptal-hex {
  --hex: polygon(50% 0, 100% 24%, 100% 76%, 50% 100%, 0 76%, 0 24%);
  width: calc(200px * var(--tt));
  padding: calc(24px * var(--tt)) 0 calc(40px * var(--tt));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(8px * var(--tt));
  color: #204ecf;
  text-align: center;
  background:
    radial-gradient(circle at 20% -10%, #00c3ff -80%, #fff 30%),
    radial-gradient(circle at -20% 20%, #00c3ff -80%, #fff 30%),
    radial-gradient(circle at 70% 100%, #00c3ff -80%, #fff 30%),
    radial-gradient(circle at 120% 80%, #00c3ff -80%, #fff 30%);
  background-blend-mode: multiply;
  clip-path: var(--hex);
}

/* The border: a slightly larger blue hexagon behind the white one. */
.toptal::before {
  content: '';
  position: absolute;
  inset: calc(-6px * var(--tt));
  background: #25a9ef;
  clip-path: polygon(50% 0, 100% 24%, 100% 76%, 50% 100%, 0 76%, 0 24%);
  z-index: -1;
}

.toptal-stars {
  width: calc(64px * var(--tt));
  height: auto;
  fill: #00c3ff;
}

.toptal-title {
  margin: 0;
  font-size: calc(19px * var(--tt));
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
}

.toptal-rule {
  display: block;
  width: calc(120px * var(--tt));
  height: 1px;
  background: #25a9ef;
}

.toptal-by {
  margin: 0 0 calc(-6px * var(--tt));
  font-size: calc(16px * var(--tt));
  line-height: 1.3;
}

.toptal-logo {
  width: calc(100px * var(--tt));
  height: auto;
}

.toptal-logo-mark {
  fill: #204ecf;
}

.toptal-logo-word {
  fill: #262d3d;
}

.toptal-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: calc(32px * var(--tt));
  padding: calc(4px * var(--tt)) calc(20px * var(--tt));
  border-radius: 6px;
  background: #204ecf;
  color: #fff;
  font-size: calc(16px * var(--tt));
  font-weight: 600;
  text-decoration: none;
}

.toptal-cta:hover {
  background: #1a3fa8;
  color: #fff;
  text-decoration: underline;
}

.hero .toptal-cta:focus-visible {
  outline: 3px solid #0b1f5c;
  outline-offset: 2px;
}

/* ---------- certification row ---------- */

.certs {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding-block: 1.25rem;
}

.cert-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cert-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.45rem 0.9rem 0.45rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.cert-link:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
  text-decoration: none;
}

.cert-link .icon {
  color: var(--accent);
}

.cert-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.cert-short {
  font-weight: 700;
  font-size: 0.95rem;
}

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

/* ---------- stats ---------- */

.stats {
  background: var(--bg);
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--border);
}

.stat-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 0;
}

.stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 0.35rem;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
}

.stat dd {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat dt {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

@media (max-width: 64rem) {
  .stat-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 40rem) {
  .stat-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem 1rem;
  }
}

/* ---------- sections ---------- */

.section {
  padding-block: var(--space-section);
}

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  font-weight: 720;
  margin-bottom: 0.75rem;
}

.section-title::before {
  content: '';
  display: block;
  width: 2.5rem;
  height: 3px;
  margin-bottom: 1rem;
  border-radius: 3px;
  background: var(--accent);
}

.section-intro {
  color: var(--text-muted);
  max-width: 60ch;
  margin-bottom: 2.5rem;
  font-size: 1.075rem;
}

.sub-title {
  font-size: 1.15rem;
  font-weight: 680;
  margin-bottom: 1rem;
}

.prose {
  max-width: 68ch;
}

.about-text {
  margin-top: 1.5rem;
  font-size: 1.125rem;
}

.about-text p:first-child {
  font-size: 1.2rem;
  color: var(--text);
}

/* ---------- expertise cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: 1.25rem;
}

.card {
  position: relative;
  padding: 1.75rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-index {
  display: block;
  margin-bottom: 0.9rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.tick-list,
.dash-list,
.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tick-list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.97rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.tick-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
}

/* ---------- timeline ---------- */

.timeline {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.timeline-item {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 2rem;
  padding-block: 2rem;
  border-top: 1px solid var(--border);
}

.timeline-item:last-child {
  border-bottom: 1px solid var(--border);
}

.timeline-dates {
  margin: 0.2rem 0 0;
  color: var(--accent);
  font-weight: 650;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.timeline-body h3 {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.timeline-org {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.97rem;
}

.timeline-org a {
  color: inherit;
}

.dash-list li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.55rem;
  max-width: 70ch;
}

.dash-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 0.7rem;
  height: 2px;
  background: var(--accent);
}

.plain-list li {
  color: var(--text-muted);
}

@media (max-width: 40rem) {
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
}

/* ---------- case studies ---------- */

.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1.25rem;
}

.case {
  display: flex;
  flex-direction: column;
  padding: 1.75rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.case-tag {
  margin-bottom: 0.6rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case h3 {
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
}

.case-steps {
  margin: 0;
  display: grid;
  gap: 1rem;
}

.case-steps dt {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.case-steps dd {
  margin: 0.2rem 0 0;
  color: var(--text-muted);
  font-size: 0.97rem;
  line-height: 1.55;
}

/* ---------- education ---------- */

.edu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
  margin-top: 2rem;
}

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

.edu-list li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.edu-list li:first-child {
  border-top: 1px solid var(--border);
}

.edu-degree {
  font-weight: 600;
  line-height: 1.4;
}

.edu-meta {
  color: var(--text-muted);
  font-size: 0.93rem;
}

.learning {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
}

.learning p {
  margin: 0;
  font-size: 0.97rem;
}

.learning-label {
  margin-bottom: 0.2rem !important;
  color: var(--accent);
  font-size: 0.78rem !important;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 48rem) {
  .edu-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  margin-top: 1rem;
}

.contact-list {
  margin: 0 0 2.5rem;
  padding: 0;
  list-style: none;
}

.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}

.contact-list .icon {
  margin-top: 0.25rem;
  color: var(--accent);
}

.contact-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.contact-list a {
  font-weight: 600;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

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

.contact-form {
  padding: clamp(1.5rem, 4vw, 2.25rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.field {
  margin-bottom: 1.1rem;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.req {
  color: #b42318;
}

:root[data-theme='dark'] .req {
  color: #ff8a80;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .req {
    color: #ff8a80;
  }
}

.optional {
  color: var(--text-muted);
  font-weight: 400;
}

.field input[type='text'],
.field input[type='email'],
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.85rem;
  border: 1px solid #8a94a6;
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}

.field textarea {
  resize: vertical;
  min-height: 9rem;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--focus);
}

.field [aria-invalid='true'] {
  border-color: #b42318;
  border-width: 2px;
}

.field-check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.field-check input {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.2rem 0 0;
  flex: none;
  accent-color: var(--accent);
}

.field-check label {
  font-weight: 400;
  font-size: 0.93rem;
  color: var(--text-muted);
  margin: 0;
}

/* Honeypot: off-screen for people, still in the form for bots. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin: 1rem 0 0;
  min-height: 1.5em;
  font-weight: 600;
}

.form-status.is-success {
  color: var(--accent);
}

.form-status.is-error {
  color: #b42318;
}

:root[data-theme='dark'] .form-status.is-error {
  color: #ff8a80;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .form-status.is-error {
    color: #ff8a80;
  }
}

.contact-form .btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

@media (max-width: 52rem) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- legal pages ---------- */

.legal h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
}

.legal h2 {
  font-size: 1.3rem;
  margin-top: 2.25rem;
}

.legal-date {
  color: var(--text-muted);
}

.legal ul {
  padding-left: 1.25rem;
}

.legal li {
  margin-bottom: 0.5rem;
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--navy-950);
  color: var(--hero-muted);
  padding-block: 2.5rem;
  font-size: 0.93rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 2rem;
}

.footer-inner p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: var(--hero-text);
  display: inline-block;
  padding-block: 0.4rem;
}

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

.site-footer :focus-visible {
  outline-color: #8ab8ff;
}

/* ---------- motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js-motion .reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  .js-motion .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ---------- print ---------- */

@media print {
  .site-header,
  .contact-form,
  .theme-toggle,
  .skip-link {
    display: none !important;
  }

  .hero,
  .site-footer {
    background: none;
    color: #000;
  }

  .hero-headline,
  .hero-summary {
    color: #000;
  }
}
