:root {
  --bg: #fbfaf7;
  --bg-alt: #f2f0ea;
  --surface: #ffffff;
  --text: #16201f;
  --muted: #56615f;
  --border: #e0ddd4;
  --primary: #073f3b;
  --primary-hover: #0a5751;
  --accent: #20b486;
  --on-primary: #ffffff;
  --danger: #b42318;
  --coral: #ff6b4a;
  --gold: #f5b942;
  --lilac: #8b6cf0;
  --mint: #20b486;
  --grad: linear-gradient(100deg, #0a8f6a 0%, #8b6cf0 55%, #ff6b4a 100%);
  --font-display: 'Bricolage Grotesque', Manrope, system-ui, sans-serif;
  --radius: 18px;
  --shadow: 0 1px 2px rgb(16 24 23 / 6%), 0 8px 24px rgb(16 24 23 / 6%);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1514;
    --bg-alt: #141c1b;
    --surface: #18211f;
    --text: #e8eeec;
    --muted: #9aa8a5;
    --border: #273331;
    --primary: #2fcf9c;
    --primary-hover: #5bdcb3;
    --accent: #2fcf9c;
    --on-primary: #06201d;
    --danger: #ff8a7a;
    --coral: #ff8a6e;
    --gold: #f7c766;
    --lilac: #a993ff;
    --mint: #2fcf9c;
    --grad: linear-gradient(100deg, #2fcf9c 0%, #a993ff 55%, #ff8a6e 100%);
    --shadow: none;
    color-scheme: dark;
  }
}

/* Language switch: show only the active language. */
html[data-lang='tr'] [lang='en'],
html[data-lang='en'] [lang='tr'] {
  display: none !important;
}

/* The hidden attribute must win over display rules like .btn { display: inline-flex }. */
[hidden] {
  display: none !important;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 Manrope, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--primary-hover);
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.5rem);
  font-weight: 800;
  margin: 0 0 1.25rem;
}

/* Short colored bar under section titles. */
h2::after {
  content: '';
  display: block;
  width: 56px;
  height: 6px;
  margin-top: 10px;
  border-radius: 99px;
  background: var(--grad);
}

h3 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}

.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 720px) {
  .container {
    padding: 0 32px;
  }
}

.muted {
  color: var(--muted);
}

.mt {
  margin-top: 3rem;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  background: var(--surface);
  padding: 8px 12px;
}

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
}

.brand {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--grad);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
}

.brand:hover {
  color: #fff;
}

.nav {
  display: none;
  gap: 20px;
  margin-left: auto;
}

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

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

@media (min-width: 820px) {
  .nav {
    display: flex;
  }
}

.lang {
  display: flex;
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px;
}

@media (min-width: 820px) {
  .lang {
    margin-left: 8px;
  }
}

.lang button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.lang button[aria-pressed='true'] {
  background: var(--primary);
  color: var(--on-primary);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  /* A very light tint + bottom edge separate the hero from About. */
  background: linear-gradient(180deg, var(--bg) 0%, color-mix(in srgb, var(--mint) 4%, var(--bg)) 100%);
  border-bottom: 1px solid color-mix(in srgb, var(--mint) 12%, var(--border));
  padding: clamp(64px, 11vw, 136px) 0 clamp(56px, 9vw, 104px);
}

.hero__inner {
  position: relative;
}

/* Soft colored blobs drifting behind the hero; faded out towards the bottom edge. */
.hero__blobs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
}

.hero__blobs span {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.28;
  animation: drift 18s ease-in-out infinite alternate;
}

.hero__blobs span:nth-child(1) {
  width: 420px;
  height: 420px;
  right: -80px;
  top: -120px;
  background: var(--mint);
}

.hero__blobs span:nth-child(2) {
  width: 340px;
  height: 340px;
  right: 18%;
  top: 30%;
  background: var(--lilac);
  animation-delay: -6s;
}

.hero__blobs span:nth-child(3) {
  width: 300px;
  height: 300px;
  right: -40px;
  bottom: -140px;
  background: var(--coral);
  opacity: 0;
  animation-delay: -12s;
}

@keyframes drift {
  to {
    transform: translate(-40px, 30px) scale(1.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__blobs span {
    animation: none;
  }
}

.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  padding: 6px 14px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border: 1px solid var(--border);
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  backdrop-filter: blur(6px);
}

.hero h1 {
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0 0 24px;
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  max-width: 640px;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--muted);
  margin: 0 0 32px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

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

.btn {
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

.btn--primary:hover {
  background: var(--primary-hover);
  color: var(--on-primary);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 30%, transparent);
}

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

.btn--ghost:hover {
  border-color: var(--primary);
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.links,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-weight: 600;
}

/* Sections */
.section {
  padding: clamp(56px, 8vw, 96px) 0;
}

.section--alt {
  background:
    radial-gradient(500px 260px at 0% 0%, color-mix(in srgb, var(--lilac) 10%, transparent), transparent 70%),
    radial-gradient(500px 260px at 100% 100%, color-mix(in srgb, var(--gold) 12%, transparent), transparent 70%),
    var(--bg-alt);
}

.grid-2 {
  display: grid;
  gap: 40px;
}

@media (min-width: 860px) {
  .grid-2 {
    grid-template-columns: 1.15fr 1fr;
    gap: 64px;
  }
}

.motto {
  margin: 28px 0 0;
  padding: 18px 22px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--gold) 16%, var(--surface));
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.skills {
  margin: 0;
  display: grid;
  gap: 4px;
}

.skills dt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  margin-top: 12px;
}

.skills dt::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--mint);
}

.skills dt:nth-of-type(5n + 2)::before {
  background: var(--lilac);
}

.skills dt:nth-of-type(5n + 3)::before {
  background: var(--coral);
}

.skills dt:nth-of-type(5n + 4)::before {
  background: var(--gold);
}

.skills dt:nth-of-type(5n + 5)::before {
  background: var(--primary);
}

.skills dd {
  margin: 4px 0 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.chips li {
  padding: 4px 12px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.88rem;
  font-weight: 600;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.chips li:hover {
  border-color: var(--lilac);
  color: var(--lilac);
}

/* Timeline: a gradient line with a colored dot per entry. */
.timeline {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0 0 0 28px;
  display: grid;
  gap: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 3px;
  background: var(--grad);
  opacity: 0.8;
}

.timeline > li {
  --dot: var(--mint);
  position: relative;
  display: grid;
  gap: 4px 32px;
}

.timeline > li::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 5px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--dot);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--dot) 25%, transparent);
}

.timeline > li:nth-child(4n + 2) {
  --dot: var(--lilac);
}

.timeline > li:nth-child(4n + 3) {
  --dot: var(--coral);
}

.timeline > li:nth-child(4n + 4) {
  --dot: var(--gold);
}

@media (min-width: 720px) {
  .timeline > li {
    grid-template-columns: 150px 1fr;
  }
}

.timeline__meta {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.timeline ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

/* Projects */
.cards {
  display: grid;
  gap: 20px;
}

@media (min-width: 860px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  --card-color: var(--mint);
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px 24px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--card-color);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px color-mix(in srgb, var(--card-color) 22%, transparent);
}

.card--lilac {
  --card-color: var(--lilac);
}

.card--coral {
  --card-color: var(--coral);
}

.card h3 {
  font-size: 1.35rem;
}

.card p {
  color: var(--muted);
  margin: 0 0 16px;
}

.card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-weight: 600;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.tags li {
  --tag: var(--mint);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tag) 16%, transparent);
  color: color-mix(in srgb, var(--tag) 70%, var(--text));
}

.tags li:nth-child(4n + 2) {
  --tag: var(--lilac);
}

.tags li:nth-child(4n + 3) {
  --tag: var(--coral);
}

.tags li:nth-child(4n + 4) {
  --tag: var(--gold);
}

.pubs {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 12px;
}

/* Contact form */
.form {
  display: grid;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.form label {
  display: grid;
  gap: 6px;
}

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

.form input,
.form textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}

.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent);
}

.form [aria-invalid='true'] {
  border-color: var(--danger);
}

.form textarea {
  resize: vertical;
  min-height: 140px;
}

.form .btn {
  justify-self: start;
}

.error,
.form__status--error {
  color: var(--danger);
  font-size: 0.9rem;
}

.error:empty,
.form__status:empty {
  display: none;
}

.form__status {
  margin: 0;
  font-weight: 600;
}

.form__status--ok {
  color: var(--primary);
}

.hp {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.footer {
  padding: 32px 0;
  border-top: 4px solid transparent;
  border-image: var(--grad) 1;
  color: var(--muted);
  font-size: 0.9rem;
}

/* "Save as CV": the page prints as a compact A4 CV. */
@media print {
  @page {
    size: A4;
    margin: 14mm 16mm;
  }

  :root {
    --bg: #fff;
    --bg-alt: #fff;
    --surface: #fff;
    --text: #111;
    --muted: #333;
    --border: #ccc;
    --primary: #073f3b;
    --accent: #073f3b;
    --shadow: none;
  }

  body {
    font-size: 10.5pt;
    line-height: 1.45;
  }

  .topbar,
  .footer,
  .no-print,
  .skip,
  #contact > .container > .form {
    display: none !important;
  }

  .hero {
    padding: 0 0 12pt;
    background: none;
  }

  .hero__blobs,
  h2::after,
  .card::before {
    display: none !important;
  }

  .grad {
    background: none;
    color: inherit;
  }

  .eyebrow {
    padding: 0;
    border: 0;
    background: none;
    margin-bottom: 4pt;
  }

  .hero h1 {
    letter-spacing: -0.02em;
  }

  .motto {
    padding: 0 0 0 8pt;
    background: none;
    border-left: 3px solid #073f3b;
  }

  .skills dt::before {
    display: none;
  }

  .hero h1 {
    font-size: 24pt;
    margin-bottom: 6pt;
  }

  .lead {
    font-size: 11pt;
    margin-bottom: 8pt;
  }

  .section {
    padding: 10pt 0;
  }

  h2 {
    font-size: 14pt;
    margin-bottom: 6pt;
    border-bottom: 1px solid var(--border);
    padding-bottom: 2pt;
  }

  .container {
    max-width: none;
    padding: 0;
  }

  .grid-2,
  .cards {
    grid-template-columns: 1fr;
    gap: 10pt;
  }

  .card {
    padding: 0;
    border: 0;
  }

  .timeline {
    gap: 8pt;
  }

  .timeline > li,
  .card,
  .pubs li {
    break-inside: avoid;
  }

  .timeline > li {
    grid-template-columns: 110pt 1fr;
    padding-left: 0;
    border-left: 0;
  }

  /* Links print with their address, so the PDF stays useful on paper. */
  .links a::after,
  .contact-links a::after {
    content: ' (' attr(href) ')';
    font-weight: 400;
    color: var(--muted);
  }

  .tags li {
    background: none;
    padding: 0 6pt 0 0;
  }

  h2,
  h3 {
    break-after: avoid;
  }

  /* Skills as a compact two-column table. */
  .skills {
    grid-template-columns: 90pt 1fr;
    gap: 2pt 10pt;
  }

  .skills dt {
    margin: 0;
  }

  .motto {
    margin-top: 8pt;
    font-size: 11pt;
  }

  h3 {
    font-size: 11.5pt;
  }

  /* Grid lists are not split across pages by Chrome; plain blocks are. */
  .timeline,
  .cards {
    display: block;
  }

  .timeline > li,
  .card {
    margin-bottom: 8pt;
  }

  /* The links are already at the top of the CV. */
  #contact {
    display: none !important;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}

/* Experience on a dark petrol band. */
.section--dark {
  --text: #eef5f3;
  --muted: #a9bdb8;
  --border: rgb(255 255 255 / 12%);
  --primary: #5bdcb3;
  color: var(--text);
  background:
    radial-gradient(520px 300px at 100% 0%, rgb(139 108 240 / 28%), transparent 70%),
    radial-gradient(480px 280px at 0% 100%, rgb(32 180 134 / 25%), transparent 70%),
    #072f2c;
}

.section--dark a {
  color: var(--primary);
}

/* Project screenshot */
.card__shot {
  display: block;
  margin: -6px -2px 20px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.card__shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  transition: transform 0.4s ease;
}

.card:hover .card__shot img {
  transform: scale(1.03);
}

/* Contact: a colored panel */
.section--contact > .container {
  padding-top: 40px;
  padding-bottom: 40px;
  border-radius: 32px;
  background:
    radial-gradient(420px 260px at 100% 100%, color-mix(in srgb, var(--lilac) 10%, transparent), transparent 70%),
    var(--bg-alt);
}

@media (min-width: 720px) {
  .section--contact > .container {
    padding: 56px;
  }
}

@media print {
  .section--dark {
    --text: #111;
    --muted: #333;
    --border: #ccc;
    --primary: #073f3b;
    background: none;
  }

  .timeline {
    padding-left: 0;
  }

  .timeline::before,
  .timeline > li::before,
  .card__shot {
    display: none !important;
  }

  .chips {
    gap: 0;
  }

  .chips li {
    padding: 0;
    border: 0;
    background: none;
    font-weight: 400;
  }

  .chips li:not(:last-child)::after {
    content: ' · ';
  }

  .section--alt {
    background: none;
  }

  /* overflow: hidden clipped the first letter of the display font. */
  .card {
    overflow: visible;
  }
}

/* Photo gallery: mixed tile sizes (wide 2x1, tall 1x2, square 1x1) that together fill one
   rectangle. Order in index.html decides placement; on desktop 16 tiles fill 4 columns x 7 rows. */
.gallery__intro {
  margin: -4px 0 24px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 140px;
  grid-auto-flow: dense;
  gap: 10px;
}

@media (min-width: 640px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 170px;
    gap: 12px;
  }
}

@media (min-width: 1000px) {
  .gallery {
    grid-auto-rows: 200px;
    gap: 14px;
  }
}

.gallery__item {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-alt);
  cursor: zoom-in;
}

.gallery__item--wide {
  grid-column: span 2;
}

.gallery__item--tall {
  grid-row: span 2;
}

.gallery__item img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.3s ease;
}

/* Colored ring on hover, cycling through the palette. */
.gallery__item::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 0 var(--ring, var(--mint));
  transition: box-shadow 0.25s ease;
  pointer-events: none;
}

.gallery__item:hover::after,
.gallery__item:focus-visible::after {
  box-shadow: inset 0 0 0 4px var(--ring, var(--mint));
}

.gallery__item:hover img {
  transform: scale(1.06);
  filter: saturate(1.2);
}

.gallery__more {
  margin: 8px 0 0;
  font-weight: 700;
}

/* Lightbox */
.lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  display: none;
  place-items: center;
}

.lightbox[open] {
  display: grid;
}

.lightbox::backdrop {
  background: rgb(6 20 18 / 88%);
  backdrop-filter: blur(6px);
}

.lightbox img {
  max-width: 92vw;
  max-height: 86vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgb(0 0 0 / 50%);
}

.lightbox__btn {
  position: fixed;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 14%);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox__btn:hover {
  background: rgb(255 255 255 / 26%);
}

.lightbox__close {
  top: 16px;
  right: 16px;
}

.lightbox__prev {
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__next {
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

@media print {
  #photos,
  .lightbox {
    display: none !important;
  }
}

/* ---------- More color ---------- */

/* Each section gets its own accent: title bar + soft background wash. */
.tint {
  --tone: var(--mint);
  background:
    radial-gradient(560px 300px at 100% 0%, color-mix(in srgb, var(--tone) 6%, transparent), transparent 70%),
    var(--bg);
}

.tint--lilac {
  --tone: var(--lilac);
}

.tint--coral {
  --tone: var(--coral);
}

.tint--gold {
  --tone: var(--gold);
  background:
    radial-gradient(560px 300px at 100% 0%, color-mix(in srgb, var(--gold) 8%, transparent), transparent 70%),
    var(--bg-alt);
}

.tint h2::after {
  width: 72px;
  background: linear-gradient(90deg, var(--tone), color-mix(in srgb, var(--tone) 40%, transparent));
}

/* Marker-pen highlight */
.hl {
  --hl: var(--mint);
  padding: 0 0.15em;
  border-radius: 0.2em;
  color: inherit;
  background: linear-gradient(transparent 55%, color-mix(in srgb, var(--hl) 22%, transparent) 60%);
  font-weight: 700;
}

.hl--lilac {
  --hl: var(--lilac);
}

/* Primary button: solid petrol, slight lift on hover */
.btn--primary {
  background: var(--primary);
  color: var(--on-primary);
}

.btn--primary:hover {
  background: var(--primary-hover);
  color: var(--on-primary);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 25%, transparent);
}

/* Nav: gradient underline on hover */
.nav a {
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 3px;
  border-radius: 3px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.nav a:hover::after,
.nav a:focus-visible::after {
  transform: scaleX(1);
}

/* Skill chips stay neutral; the group color is on the dot before each title. */
.chips li {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.chips li:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Publication numbers in color */
.pubs li::marker {
  color: var(--coral);
  font-weight: 800;
}

/* Footer: gradient band */
.footer {
  border-top: 3px solid transparent;
  border-image: var(--grad) 1;
  background: var(--bg);
  color: var(--muted);
}

@media print {
  .tint {
    background: none;
  }

  .hl {
    background: none;
    padding: 0;
  }
}

/* Contact form: success state replaces the fields */
.form.is-sent > label,
.form.is-sent > .captcha,
.form.is-sent > .form__status,
.form.is-sent > button[type='submit'] {
  display: none;
}

.form__success {
  display: grid;
  justify-items: start;
  gap: 10px;
  padding: 8px 0;
}

.form__success h3 {
  margin: 0;
  font-size: 1.4rem;
}

.form__success p {
  margin: 0 0 6px;
  color: var(--muted);
}

.form__success-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--mint) 18%, transparent);
  color: var(--mint);
  font-size: 1.5rem;
  font-weight: 800;
}
