:root {
  --bg: #d7efff;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: #ffffff;
  --text: #111318;
  --muted: #55606f;
  --line: rgba(17, 19, 24, 0.1);
  --accent: #0f00b8;
  --shadow: 0 24px 70px rgba(25, 36, 61, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(88, 169, 221, 0.16), transparent 24rem),
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.58), transparent 22rem),
    linear-gradient(180deg, #dff4ff 0%, #dff4ff 34rem, #ffffff 76rem, #ffffff 100%);
  transition: background 260ms ease, color 260ms ease;
}

html.theme-dark body,
body.is-dark {
  --surface: rgba(5, 14, 42, 0.82);
  --surface-strong: #091431;
  --text: #f5f8ff;
  --muted: #b6c4dd;
  --line: rgba(221, 232, 255, 0.16);
  --accent: #f044a9;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
  background:
    radial-gradient(circle at top left, rgba(86, 161, 230, 0.18), transparent 26rem),
    radial-gradient(circle at 85% 10%, rgba(239, 72, 168, 0.1), transparent 18rem),
    linear-gradient(180deg, #04112d 0%, #06183d 42rem, #020817 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(17, 19, 24, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 19, 24, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 58rem);
}

.page-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 16px auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(232, 247, 255, 0.72) 0%, rgba(232, 247, 255, 0.66) 34rem, rgba(255, 255, 255, 0.92) 78rem, rgba(255, 255, 255, 0.96) 100%);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  transition: background 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

html.theme-dark .page-shell,
body.is-dark .page-shell {
  background:
    linear-gradient(180deg, rgba(8, 24, 58, 0.92) 0%, rgba(5, 17, 45, 0.94) 34rem, rgba(2, 8, 23, 0.96) 78rem, rgba(2, 8, 23, 0.98) 100%);
}

.site-header,
.site-nav,
.hero-meta,
.about-grid,
.contact-actions {
  display: grid;
  gap: 18px;
}

.site-header {
  grid-template-columns: 1fr auto;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.brand,
.site-nav a,
.button {
  text-decoration: none;
  color: inherit;
}

.brand {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-nav {
  grid-auto-flow: column;
  gap: 18px;
}

.site-nav a,
.eyebrow,
.meta-label,
.project-topline {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.theme-switcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 10px 14px 10px 16px;
  border: 1px solid rgba(15, 0, 184, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  transition: background 260ms ease, border-color 260ms ease;
}

.theme-switcher > span {
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.theme-toggle-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.theme-toggle-track {
  position: relative;
  display: block;
  width: 68px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow:
    inset 0 0 0 1px rgba(15, 0, 184, 0.14),
    0 8px 20px rgba(25, 36, 61, 0.08);
  transition: background 220ms ease, box-shadow 220ms ease;
}

.theme-toggle-knob {
  position: absolute;
  top: 4px;
  left: 8px;
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 3px 10px rgba(25, 36, 61, 0.16);
  transition: transform 220ms ease, left 220ms ease;
}

.theme-toggle[aria-pressed="true"] .theme-toggle-track {
  background: #f044a9;
  box-shadow:
    inset 0 0 0 1px rgba(156, 28, 101, 0.08),
    0 10px 22px rgba(240, 68, 169, 0.22);
}

.theme-toggle[aria-pressed="true"] .theme-toggle-knob {
  left: 34px;
  background: #ffffff;
}

body.is-dark .theme-switcher {
  border-color: rgba(245, 248, 255, 0.14);
  background: rgba(7, 21, 54, 0.78);
}

body.is-dark .theme-switcher > span {
  color: #f044a9;
}

.intro-headline {
  display: grid;
  grid-template-columns: minmax(250px, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(26px, 5vw, 70px);
  align-items: center;
  min-height: clamp(400px, 44vw, 570px);
  margin: 24px 0 10px;
  padding: clamp(24px, 4.5vw, 54px);
  border: 1px solid rgba(15, 0, 184, 0.12);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(225, 246, 255, 0.96), rgba(246, 251, 255, 0.98)),
    #dff4ff;
}

body.is-dark .intro-headline {
  border-color: rgba(245, 248, 255, 0.14);
  background:
    linear-gradient(135deg, rgba(10, 34, 76, 0.96), rgba(5, 17, 45, 0.98)),
    #071a42;
}

.intro-portrait {
  position: relative;
  width: min(100%, 338px);
  margin: 0;
  aspect-ratio: 479 / 736;
}

.intro-photo-window {
  position: absolute;
  left: 11.5%;
  top: 8.4%;
  z-index: 1;
  display: block;
  width: 65.8%;
  height: 58.2%;
  overflow: hidden;
  border-radius: 3px;
  background: #ffffff;
}

.intro-photo-window img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  transform: scale(1.12);
}

.intro-camera-frame {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.intro-copy {
  display: grid;
  align-self: stretch;
  grid-template-rows: auto 1fr;
  gap: 16px;
  justify-items: start;
}

.intro-label {
  align-self: start;
  margin: 0;
  padding: 8px 18px;
  border: 1px solid rgba(15, 0, 184, 0.22);
  border-radius: 999px;
  color: #0f00b8;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-decoration: none;
}

body.is-dark .intro-label {
  border-color: rgba(240, 68, 169, 0.28);
  color: #ffffff;
  background: rgba(240, 68, 169, 0.18);
}

.intro-headline h1 {
  align-self: end;
  display: grid;
  gap: 0.08em;
  max-width: 13ch;
  margin: 0;
  color: var(--text);
  font-size: clamp(2.75rem, 5.8vw, 6.35rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 0.92;
  text-align: left;
}

.intro-headline h1 span {
  color: var(--accent);
  font-size: 0.68em;
  font-weight: 800;
  line-height: 0.96;
}

.intro-headline strong {
  font-size: 0.96em;
  font-weight: 500;
  line-height: 1.02;
}

.photo-strip {
  margin: 14px -24px 10px;
  overflow: hidden;
}

.photo-strip-caption {
  margin: 0 24px 8px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.4;
}

.photo-strip-viewport {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.photo-strip-viewport::-webkit-scrollbar {
  display: none;
}

.photo-strip-track {
  display: flex;
  gap: 12px;
  width: max-content;
  padding: 8px 0 18px 24px;
}

.photo-strip-track img {
  width: clamp(118px, 16vw, 190px);
  aspect-ratio: 1;
  flex: 0 0 auto;
  border: 1px solid rgba(17, 19, 24, 0.08);
  border-radius: 10px;
  object-fit: cover;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(25, 36, 61, 0.09);
}

body.is-dark .photo-strip-track img {
  border-color: rgba(245, 248, 255, 0.14);
  background: #091431;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

.hero,
.about-section,
.projects-section,
.experience-section,
.contact-section {
  padding: 48px 0;
}

.projects-section {
  position: relative;
  isolation: isolate;
}

.projects-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    url("./assets/star-confetti.jpg"),
    url("./assets/star-confetti.jpg"),
    url("./assets/star-confetti.jpg"),
    url("./assets/star-confetti.jpg"),
    url("./assets/star-confetti.jpg");
  background-position:
    90% 23%,
    8% 38%,
    92% 54%,
    10% 70%,
    86% 86%;
  background-repeat: no-repeat;
  background-size:
    min(48vw, 520px) auto,
    min(44vw, 480px) auto,
    min(48vw, 520px) auto,
    min(44vw, 480px) auto,
    min(40vw, 440px) auto;
  opacity: 0.6;
  pointer-events: none;
}

body.is-dark .projects-section::before {
  opacity: 0;
}

.projects-section > * {
  position: relative;
  z-index: 1;
}

.hero h1,
.section-heading h2,
.contact-section h2 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(3rem, 7vw, 5.75rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.hero h1 {
  max-width: 22ch;
}

.eyebrow,
.meta-label {
  margin: 0 0 12px;
  color: var(--accent);
}

.hero-copy,
.about-grid p,
.hero-meta p,
.project-copy h3 {
  margin: 0;
}

.hero-copy,
.about-grid p,
.hero-meta p,
.contact-section h2 {
  max-width: 66ch;
  color: var(--muted);
  line-height: 1.7;
}

.hero-copy {
  margin-top: 22px;
  font-size: 1.05rem;
}

.hero-meta,
.about-grid {
  margin-top: 30px;
}

.hero-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero-meta div,
.about-grid p,
.contact-section {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  max-width: 12ch;
}

.experience-board {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}

.experience-panel {
  display: grid;
  align-content: end;
  gap: 12px;
  min-height: 230px;
  grid-column: span 4;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid rgba(15, 0, 184, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 44px rgba(25, 36, 61, 0.08);
}

.experience-panel-feature {
  min-height: 360px;
  grid-column: span 4;
  background:
    radial-gradient(circle at 84% 18%, rgba(15, 0, 184, 0.14), transparent 13rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(213, 241, 255, 0.94));
}

body.is-dark .experience-panel {
  border-color: rgba(245, 248, 255, 0.14);
  background: rgba(8, 24, 58, 0.84);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.26);
}

body.is-dark .experience-panel-feature {
  background:
    radial-gradient(circle at 84% 18%, rgba(240, 68, 169, 0.18), transparent 13rem),
    linear-gradient(135deg, rgba(10, 34, 76, 0.96), rgba(4, 17, 45, 0.94));
}

.experience-panel-jobs {
  align-content: start;
  grid-column: span 8;
}

.experience-panel-text {
  grid-column: span 8;
  min-height: 230px;
  background: #ffffff;
}

.experience-panel-wide {
  grid-column: span 6;
}

.experience-panel h3 {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(1.75rem, 3.8vw, 4rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.experience-panel:not(.experience-panel-feature) h3 {
  max-width: 12ch;
  font-size: clamp(1.45rem, 2.6vw, 2.5rem);
}

.experience-panel-study h3 {
  max-width: none;
  white-space: nowrap;
  font-size: clamp(1.35rem, 2.4vw, 2.35rem);
}

.experience-panel-feature h3 {
  font-size: clamp(1.45rem, 2.7vw, 2.6rem);
}

.experience-panel p {
  margin: 0;
  max-width: 58ch;
  color: var(--muted);
  line-height: 1.65;
}

.experience-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  line-height: 1.45;
}

.experience-list li {
  padding-top: 10px;
  border-top: 1px solid rgba(15, 0, 184, 0.1);
}

.experience-list li:first-child {
  padding-top: 0;
  border-top: 0;
}

.experience-list strong {
  display: block;
  margin-bottom: 2px;
  color: var(--accent);
  font-weight: 700;
}

.experience-meta {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.35;
}

.text-link {
  width: max-content;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.about-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-list {
  display: grid;
  gap: 22px;
  margin-top: 18px;
}

.project-tile {
  position: relative;
  display: grid;
  min-height: clamp(320px, 48vw, 560px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #ffffff;
  background: #dfe5ec;
  text-decoration: none;
  box-shadow: 0 18px 42px rgba(25, 36, 61, 0.1);
  isolation: isolate;
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.project-tile.is-hidden {
  display: none;
}

.project-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(17, 19, 24, 0.04) 34%, rgba(17, 19, 24, 0.72) 100%),
    linear-gradient(90deg, rgba(17, 19, 24, 0.54), transparent 54%);
  pointer-events: none;
}

.project-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 54px rgba(25, 36, 61, 0.16);
}

.project-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms ease;
}

.project-tile:hover img {
  transform: scale(1.025);
}

.project-details {
  position: relative;
  z-index: 2;
  align-self: end;
  display: grid;
  gap: 10px;
  width: min(100%, 720px);
  padding: clamp(22px, 4vw, 42px);
}

.project-year {
  width: max-content;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.project-title {
  max-width: 16ch;
  font-size: clamp(2rem, 5.8vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.96;
}

.project-preview {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: clamp(20px, 4vw, 52px);
  align-items: center;
  margin-top: clamp(34px, 6vw, 72px);
  padding: clamp(24px, 5vw, 58px);
  border: 1px solid rgba(195, 169, 75, 0.22);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgb(255, 250, 222), rgb(255, 244, 183)),
    #fff2a8;
}

body.is-dark .project-preview {
  border-color: rgba(245, 248, 255, 0.12);
  color: #f5f8ff;
  box-shadow: 0 26px 58px rgba(0, 0, 0, 0.28);
}

body.is-dark .project-preview--pink {
  background:
    linear-gradient(135deg, rgb(95, 18, 51), rgb(132, 32, 71)),
    #5f1233;
}

body.is-dark .project-preview--sage {
  background:
    linear-gradient(135deg, rgb(27, 58, 42), rgb(48, 82, 59)),
    #1b3a2a;
}

body.is-dark .project-preview--blue {
  background:
    linear-gradient(135deg, rgb(10, 42, 83), rgb(22, 74, 118)),
    #0a2a53;
}

body.is-dark .project-preview--yellow {
  background:
    linear-gradient(135deg, rgb(97, 76, 17), rgb(128, 101, 26)),
    #614c11;
}

body.is-dark .project-preview--pale-yellow {
  background:
    linear-gradient(135deg, rgb(91, 73, 18), rgb(124, 98, 30)),
    #5b4912;
}

body.is-dark .project-preview--lilac {
  background:
    linear-gradient(135deg, rgb(52, 34, 86), rgb(76, 54, 113)),
    #342256;
}

body.is-dark .project-preview-copy p {
  color: rgba(245, 248, 255, 0.78);
}

body.is-dark .project-preview .eyebrow {
  color: rgba(245, 248, 255, 0.74);
}

body.is-dark .project-preview-image,
body.is-dark .project-preview-thumbs img {
  border-color: rgba(17, 19, 24, 0.1);
}

body.is-dark .project-preview-button {
  border-color: rgba(245, 248, 255, 0.26);
  color: #f5f8ff;
  background: rgba(255, 255, 255, 0.12);
}

body.is-dark .project-preview-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.project-preview--pink {
  border-color: rgba(190, 113, 142, 0.22);
  background:
    linear-gradient(135deg, rgb(255, 237, 244), rgb(249, 202, 218)),
    #ffdceb;
}

.project-preview--sage {
  border-color: rgba(88, 116, 85, 0.24);
  background:
    linear-gradient(135deg, rgb(235, 245, 224), rgb(199, 221, 181)),
    #d9ebc9;
}

.project-preview--blue {
  border-color: rgba(92, 135, 174, 0.22);
  background:
    linear-gradient(135deg, rgb(232, 247, 255), rgb(190, 222, 243)),
    #d3ecff;
}

.project-preview--yellow {
  border-color: rgba(195, 169, 75, 0.22);
}

.project-preview--pale-yellow {
  border-color: rgba(190, 166, 72, 0.2);
  background:
    linear-gradient(135deg, rgb(255, 253, 232), rgb(255, 244, 188)),
    #fff6bf;
}

.project-preview--lilac {
  border-color: rgba(137, 120, 166, 0.22);
  background:
    linear-gradient(135deg, rgb(246, 241, 255), rgb(222, 211, 241)),
    #ede2ff;
}

.project-preview--terracotta {
  border-color: rgba(173, 112, 74, 0.22);
  background:
    linear-gradient(135deg, rgb(255, 242, 229), rgb(239, 202, 178)),
    #f6dcc9;
}

.project-preview-media {
  position: relative;
  z-index: 1;
  min-height: clamp(360px, 48vw, 620px);
}

.project-preview-image,
.project-preview-thumbs img {
  display: block;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf1;
  object-fit: cover;
  box-shadow: 0 22px 42px rgba(79, 76, 43, 0.13);
}

.project-preview-image-main {
  position: absolute;
  left: 3%;
  top: 11%;
  z-index: 1;
  width: 72%;
  aspect-ratio: 1.44;
}

.project-preview-thumbs {
  position: absolute;
  inset: 0;
}

.project-preview-thumbs img {
  position: absolute;
  z-index: 2;
  width: 36%;
  aspect-ratio: 1.2;
}

.project-preview-thumbs img:first-child {
  right: 6%;
  top: 0;
}

.project-preview-thumbs img:last-child {
  right: 0;
  bottom: 6%;
  width: 42%;
}

.project-preview-media--tommi .project-preview-thumbs img:first-child {
  right: 3%;
  top: 1%;
  width: 35%;
  aspect-ratio: 0.95;
  object-position: center 28%;
}

.project-preview-media--tommi .project-preview-thumbs img:last-child {
  right: 0;
  bottom: 8%;
  width: 43%;
  aspect-ratio: 1.45;
  object-position: center;
}

.project-preview-object {
  position: absolute;
  z-index: 3;
  display: block;
  object-fit: contain;
  pointer-events: none;
}

.project-preview-object--tommi-packaging {
  left: -9%;
  bottom: -4%;
  width: clamp(170px, 28vw, 330px);
  max-height: 66%;
  transform: rotate(-8deg);
  transform-origin: center bottom;
  filter: drop-shadow(0 22px 26px rgba(79, 76, 43, 0.18));
}

.project-preview-character {
  position: absolute;
  left: -1%;
  bottom: 4%;
  z-index: 3;
  display: block;
  width: clamp(120px, 18vw, 220px);
  max-height: 76%;
  object-fit: contain;
  filter: drop-shadow(0 20px 24px rgba(79, 76, 43, 0.18));
}

.project-preview-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  padding-bottom: 4px;
}

.project-preview-copy h3 {
  max-width: 10ch;
  margin: 0;
  font-size: clamp(2.1rem, 4.6vw, 4.8rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.project-preview--sage .project-preview-copy h3 {
  max-width: 13ch;
}

.project-preview--yellow .project-preview-copy h3 {
  max-width: 14ch;
}

.project-preview-copy p {
  max-width: 44ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.project-preview-button {
  width: max-content;
  margin-top: 4px;
  padding: 11px 15px;
  border: 1px solid rgba(116, 96, 24, 0.32);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.42);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 180ms ease, transform 180ms ease;
}

.project-preview-button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.72);
}

.contact-section h2 {
  margin-top: 0;
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
  line-height: 1.15;
  color: var(--text);
}

.legal-card,
.legal-note {
  max-width: 760px;
}

.legal-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.legal-card p,
.legal-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.legal-card p + p,
.legal-note {
  margin-top: 10px;
}

.contact-actions {
  grid-auto-flow: column;
  justify-content: start;
  margin-top: 22px;
}

.site-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

body.is-dark .contact-section {
  background: rgba(8, 24, 58, 0.84);
}

body.is-dark .button-secondary {
  color: var(--text);
}

body.is-dark .impressum-link {
  color: rgba(182, 196, 221, 0.78);
}

.impressum-link {
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(85, 96, 111, 0.74);
  text-decoration: none;
  transition: color 180ms ease;
}

.impressum-link:hover {
  color: var(--muted);
}

.page-shell-legal {
  width: min(860px, calc(100% - 32px));
}

.case-page {
  background: #ffffff;
}

html.theme-dark body.case-page,
body.case-page.is-dark {
  background:
    radial-gradient(circle at top left, rgba(86, 161, 230, 0.16), transparent 26rem),
    linear-gradient(180deg, #04112d 0%, #020817 100%);
}

.case-page::before {
  opacity: 0;
}

.case-shell {
  background: #ffffff;
  box-shadow: none;
}

html.theme-dark .case-shell,
body.is-dark .case-shell {
  background: rgba(5, 17, 45, 0.96);
}

.case-main {
  padding: 26px 0 8px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 42px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.case-hero {
  display: grid;
  gap: 22px;
  padding-bottom: 34px;
}

.case-hero h1 {
  margin: 0;
  max-width: 13ch;
  font-size: clamp(3.1rem, 8vw, 7.2rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.case-hero p:last-child {
  max-width: 62ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.65;
}

.case-feature-image,
.case-gallery {
  margin: 26px 0;
}

.case-feature-image img,
.case-gallery img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f4f6f8;
}

html.theme-dark .case-feature-image img,
html.theme-dark .case-gallery img,
body.is-dark .case-feature-image img,
body.is-dark .case-gallery img {
  border-color: rgba(245, 248, 255, 0.14);
  background: #091431;
}

.case-text-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 28px;
  padding: 48px 0 28px;
}

.case-text-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.case-text-grid p + p {
  margin-top: 18px;
}

.case-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.case-gallery img:first-child:nth-last-child(odd) {
  grid-column: 1 / -1;
}

.case-note {
  max-width: 760px;
  margin: 46px 0 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

html.theme-dark .case-note,
body.is-dark .case-note {
  border-color: rgba(245, 248, 255, 0.14);
  background: rgba(8, 24, 58, 0.86);
}

.case-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.cv-main {
  padding-bottom: 42px;
}

.cv-hero h1 {
  max-width: 15ch;
}

.cv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 18px 0 34px;
}

.cv-card,
.cv-timeline article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.cv-card h2,
.cv-card h3,
.cv-timeline h2 {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.05;
}

.cv-card p:last-child,
.cv-timeline p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.cv-timeline {
  display: grid;
  gap: 14px;
}

.cv-timeline article {
  display: grid;
  grid-template-columns: minmax(140px, 0.35fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.cv-timeline span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-header {
  margin-bottom: 26px;
}

.legal-page-main {
  padding: 12px 0 4px;
}

.legal-page-section {
  padding: 24px 0 40px;
}

.legal-page-section h1 {
  margin: 0 0 18px;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.button-primary {
  background: var(--accent);
  color: #ffffff;
}

.button-secondary {
  border: 1px solid var(--line);
  background: transparent;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .about-grid,
  .hero-meta,
  .project-preview {
    grid-template-columns: 1fr 1fr;
  }

  .project-tile {
    min-height: clamp(300px, 58vw, 460px);
  }

  .project-preview-media {
    min-height: clamp(300px, 44vw, 480px);
  }
}

@media (max-width: 720px) {
  .site-header,
  .about-grid,
  .hero-meta {
    grid-template-columns: 1fr;
  }

  .site-nav,
  .contact-actions {
    grid-auto-flow: row;
  }

  .theme-switcher {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
  }

  .site-footer {
    justify-content: flex-start;
  }

  .page-shell {
    width: min(100% - 20px, 1200px);
    padding: 18px;
    border-radius: 16px;
  }

  .intro-headline {
    grid-template-columns: 1fr;
    min-height: auto;
    margin-top: 20px;
    padding: 18px;
  }

  .intro-portrait {
    width: min(76vw, 280px);
  }

  .intro-copy {
    gap: 18px;
  }

  .intro-headline h1 {
    max-width: 12ch;
    font-size: clamp(2.65rem, 10vw, 4.6rem);
  }

  .photo-strip {
    margin-right: -18px;
    margin-left: -18px;
  }

  .photo-strip-track {
    gap: 10px;
    padding-right: 0;
    padding-left: 18px;
  }

  .photo-strip-track img {
    width: clamp(126px, 42vw, 168px);
    border-radius: 10px;
  }

  .project-list {
    gap: 16px;
  }

  .project-tile {
    min-height: 360px;
    border-radius: 12px;
  }

  .project-tile::after {
    background:
      linear-gradient(180deg, rgba(17, 19, 24, 0.08) 28%, rgba(17, 19, 24, 0.78) 100%),
      linear-gradient(90deg, rgba(17, 19, 24, 0.3), transparent 70%);
  }

  .project-title {
    max-width: 12ch;
  }

  .case-hero h1 {
    max-width: 10ch;
  }

  .case-text-grid,
  .case-gallery,
  .project-preview,
  .project-preview-thumbs,
  .experience-board,
  .cv-grid,
  .cv-timeline article {
    grid-template-columns: 1fr;
  }

  .project-preview {
    padding: 18px;
    border-radius: 14px;
  }

  .project-preview-media {
    min-height: 380px;
  }

  .project-preview-image-main {
    left: 0;
    top: 14%;
    width: 78%;
  }

  .project-preview-thumbs img:first-child {
    right: 0;
    top: 2%;
    width: 42%;
  }

  .project-preview-thumbs img:last-child {
    right: 2%;
    bottom: 2%;
    width: 48%;
  }

  .project-preview-character {
    left: -2%;
    bottom: 5%;
    width: min(38vw, 160px);
    max-height: 72%;
  }

  .experience-board {
    gap: 10px;
  }

  .experience-panel,
  .experience-panel-feature,
  .experience-panel-jobs,
  .experience-panel-text,
  .experience-panel-wide {
    grid-column: auto;
    min-height: 240px;
  }

  .case-gallery img:first-child:nth-last-child(odd) {
    grid-column: auto;
  }

  .hero,
  .about-section,
  .projects-section,
  .experience-section,
  .contact-section,
  .legal-section {
    padding: 34px 0;
  }

}
