@font-face {
  font-family: "Cormorant Garamond";
  src: url("../assets/fonts/cormorant-garamond-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../assets/fonts/cormorant-garamond-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../assets/fonts/cormorant-garamond-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../assets/fonts/cormorant-garamond-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Dark is the product default. Theme no longer follows OS/browser settings. */
  --bg: #14110e;
  --bg-deep: #1b1713;
  --text: #f2ebe1;
  --muted: #a89d90;
  --line: #322c25;
  --surface: #221d18;
  --accent: #c4a574;
  --available: #8aa07c;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --content: 920px;
  --serif: "Cormorant Garamond", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --sans: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

html[data-theme="light"] {
  --bg: #f3eee6;
  --bg-deep: #ece6db;
  --text: #1b1713;
  --muted: #6e675e;
  --line: #d6cec2;
  --surface: #e8e1d5;
  --accent: #8a6b43;
  --available: #6f8466;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  color-scheme: dark;
  background: var(--bg);
  overflow-x: hidden;
}

html[data-theme="light"] {
  color-scheme: light;
}

@view-transition {
  navigation: auto;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0.01em;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: color-mix(in srgb, var(--accent) 28%, var(--bg));
  color: var(--text);
}

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

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

button {
  font-family: inherit;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
}

h1,
h2,
h3,
p,
ul,
figure,
dl,
dt,
dd {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 30;
  background: var(--text);
  color: var(--bg);
  padding: 8px 14px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.skip-link:focus {
  top: 16px;
}

/* ---------- Nav ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  padding: 22px 20px 0;
  pointer-events: none;
}

.plus-nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.plus-links {
  display: flex;
  align-items: center;
  gap: 22px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

.plus-nav.is-open .plus-links {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.plus-links a {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.25s var(--ease);
}

.plus-links a:hover,
.plus-links a.is-active {
  color: var(--text);
}

.plus-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  z-index: 2;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

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

.plus-icon {
  width: 11px;
  height: 11px;
  position: relative;
  display: block;
  transition: transform 0.4s var(--ease);
}

.plus-nav.is-open .plus-icon {
  transform: rotate(45deg);
}

.plus-icon i {
  position: absolute;
  background: var(--text);
}

.plus-icon i:first-child {
  width: 11px;
  height: 1px;
  left: 0;
  top: 5px;
}

.plus-icon i:last-child {
  width: 1px;
  height: 11px;
  left: 5px;
  top: 0;
}

/* ---------- Page ---------- */
.wrap {
  width: min(100%, var(--content));
  margin: 0 auto;
  padding: 0 28px 140px;
}

.hero {
  padding-top: 132px;
  padding-bottom: 28px;
}

.section {
  padding: 88px 0 8px;
  scroll-margin-top: 96px;
  border-top: 1px solid var(--line);
}

.kicker {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

h1 {
  font-family: var(--serif);
  font-size: clamp(42px, 6.4vw, 72px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.02em;
  font-feature-settings: "kern" 1, "liga" 1;
  overflow-wrap: break-word;
}

h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

h3 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
}

.lede {
  font-size: 17px;
  line-height: 1.75;
  color: var(--muted);
  max-width: 62ch;
}

.lede + .lede {
  margin-top: 16px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
}

/* ---------- Intro ---------- */
.intro-top {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: end;
}

.avatar {
  width: 220px;
  height: 280px;
  overflow: hidden;
  background: var(--surface);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  filter: saturate(0.9) contrast(1.03);
}

.intro-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  padding-bottom: 6px;
}

.intro-name .role {
  margin-top: 14px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  max-width: none;
}

.intro-meta {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.meta-item svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--available);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--available) 40%, transparent);
  animation: pulse 2.8s var(--ease) infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--available) 40%, transparent);
  }
  70% {
    box-shadow: 0 0 0 7px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

.intro-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 28px;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.text-link {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: max-content;
  cursor: pointer;
}

.text-link .row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}

.text-link svg {
  width: 13px;
  height: 13px;
}

.text-link .line {
  display: block;
  height: 1px;
  width: 100%;
  background: var(--line);
  position: relative;
  overflow: hidden;
}

.text-link .line span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--accent);
  transition: width 0.4s var(--ease);
}

.text-link:hover .line span,
.text-link:focus-visible .line span {
  width: 100%;
}

/* ---------- Projects ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 22px;
}

.project-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface);
}

.thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.project-card:hover .thumb img {
  transform: scale(1.04);
}

.project-card .caption {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 16px 0 4px;
}

.project-card .caption h3 {
  flex: 1;
  font-size: 26px;
}

.arrow {
  width: 14px;
  height: 14px;
  transform: rotate(45deg);
  flex-shrink: 0;
  color: var(--accent);
  opacity: 0.7;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

.project-card:hover .arrow {
  opacity: 1;
  transform: rotate(45deg) translate(1px, -1px);
}

.project-card .sub {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Stacks ---------- */
.stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 36px;
}

.job,
.edu,
.skill-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.job:last-child,
.edu:last-child,
.skill-block:last-child {
  border-bottom: none;
}

.job-head,
.edu-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.where,
.when,
.role {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.job h3,
.edu h3,
.skill-block h3 {
  font-size: 28px;
}

.job ul,
.edu ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.job li,
.edu li {
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
  padding-left: 18px;
  position: relative;
}

.job li::before,
.edu li::before {
  content: "";
  width: 8px;
  height: 1px;
  background: var(--accent);
  position: absolute;
  left: 0;
  top: 0.75em;
}

.skill-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 40px;
  margin-top: 36px;
}

.skill-block h3 {
  font-size: 22px;
  margin-bottom: 4px;
}

.skill-block .lede {
  font-size: 15px;
  line-height: 1.7;
}

.row-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.row-item > div,
.job-head > div,
.edu-head > div {
  min-width: 0;
  flex: 1;
}

.row-item .text-link,
.job-head .when,
.edu-head .when {
  flex-shrink: 0;
}

.row-item:last-child {
  border-bottom: none;
}

.row-item h3 {
  font-size: 22px;
}

.row-item .sub {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
}

.lang-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 40px;
  margin-top: 36px;
}

.lang-row .edu {
  border-bottom: 1px solid var(--line);
}

.site-footer {
  margin-top: 96px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
}

/* ---------- Quiet patterns (hero, work, experience, skills, awards) ---------- */
.hero,
#work {
  position: relative;
  isolation: isolate;
}

.hero > *,
#work > * {
  position: relative;
  z-index: 1;
}

.hero::before,
#work::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  pointer-events: none;
  z-index: 0;
}

.hero::before {
  top: 28px;
  bottom: 2px;
  background: repeating-linear-gradient(
    90deg,
    transparent 0 47px,
    color-mix(in srgb, var(--accent) 10%, transparent) 47px 48px
  );
  opacity: 0.72;
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 7%,
    black 60%,
    rgba(0, 0, 0, 0.72) 76%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 7%,
    black 60%,
    rgba(0, 0, 0, 0.72) 76%,
    transparent 100%
  );
}

#work::before {
  top: 28px;
  bottom: 8px;
  background-image:
    linear-gradient(
      color-mix(in srgb, var(--accent) 9%, transparent) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--accent) 9%, transparent) 1px,
      transparent 1px
    );
  background-size: 48px 48px;
  opacity: 0.62;
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 13%,
    black 84%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 13%,
    black 84%,
    transparent 100%
  );
}

#experience .stack {
  position: relative;
  padding-left: 20px;
}

#experience .stack::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent,
    color-mix(in srgb, var(--accent) 55%, transparent) 8%,
    color-mix(in srgb, var(--accent) 55%, transparent) 92%,
    transparent
  );
}

#experience .stack::after {
  content: "";
  position: absolute;
  left: -2.5px;
  top: 18px;
  width: 6px;
  height: 6px;
  border: 1px solid var(--accent);
  transform: rotate(45deg);
  background: var(--bg);
}



.site-footer::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  width: 7px;
  height: 7px;
  border: 1px solid var(--accent);
  background: var(--bg);
  transform: translateX(-50%) rotate(45deg);
}

/* ---------- Appear ---------- */
.appear {
  opacity: 0;
  transform: translateY(16px);
  will-change: transform, opacity;
}

.appear.in {
  animation: rise 0.9s var(--ease) forwards;
}

.appear.d1 {
  animation-delay: 0.1s;
}
.appear.d2 {
  animation-delay: 0.18s;
}
.appear.d3 {
  animation-delay: 0.26s;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(8px);
  background: var(--text);
  color: var(--bg);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 12px 18px;
  opacity: 0;
  pointer-events: none;
  z-index: 40;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .appear,
  .appear.in,
  .plus-icon,
  .plus-links,
  .thumb img,
  .dot {
    animation: none !important;
    transition: none !important;
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 860px) {
  html {
    scroll-padding-top: 80px;
  }

  .site-header {
    justify-content: flex-start;
    padding: max(14px, env(safe-area-inset-top)) 16px 0;
  }

  .plus-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .plus-btn {
    width: 44px;
    height: 44px;
  }

  .plus-links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .plus-nav.is-open {
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 10px 18px 14px;
    border: 1px solid var(--line);
    gap: 0;
    width: min(240px, calc(100vw - 32px));
  }

  .plus-nav.is-open .plus-links {
    display: flex;
  }

  .plus-links a {
    padding: 10px 0;
    min-height: 40px;
    display: flex;
    align-items: center;
  }

  .plus-links-left {
    order: 1;
  }
  .plus-btn {
    order: 0;
  }
  .plus-links-right {
    order: 2;
  }

  .wrap {
    padding: 0 max(20px, env(safe-area-inset-right)) 100px max(20px, env(safe-area-inset-left));
  }

  .hero {
    padding-top: 100px;
  }

  .section {
    padding: 56px 0 4px;
    scroll-margin-top: 80px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 28px;
  }

  h1 {
    font-size: clamp(36px, 11vw, 48px);
    line-height: 1.02;
  }

  h3 {
    font-size: 22px;
  }

  .lede {
    font-size: 16px;
    line-height: 1.7;
  }

  .intro-top {
    grid-template-columns: 1fr;
    gap: 28px;
    justify-items: center;
    text-align: center;
  }

  .avatar {
    width: min(168px, 46vw);
    height: auto;
    aspect-ratio: 11 / 14;
  }

  .intro-copy {
    align-items: center;
    width: 100%;
  }

  .intro-name {
    width: 100%;
  }

  .intro-name .role {
    letter-spacing: 0.1em;
    line-height: 1.55;
    max-width: 22em;
    margin-left: auto;
    margin-right: auto;
  }

  .intro-meta {
    justify-content: center;
    gap: 12px 20px;
  }

  .intro-links {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
  }

  .text-link {
    width: auto;
    max-width: 100%;
  }

  .text-link .row {
    display: block;
    white-space: normal;
    overflow-wrap: anywhere;
    text-transform: none;
    letter-spacing: 0.02em;
    font-size: 15px;
    line-height: 1.4;
    text-align: center;
  }

  .row-item .text-link .row,
  .section-head .text-link .row {
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 12px;
  }

  .project-grid {
    gap: 24px 18px;
  }

  .project-card .caption h3 {
    font-size: 24px;
  }

  .job,
  .edu,
  .skill-block {
    padding: 22px 0;
  }

  .job h3,
  .edu h3,
  .skill-block h3 {
    font-size: 24px;
  }

  .job-head,
  .edu-head,
  .row-item,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .row-item {
    padding: 20px 0;
  }

  .row-item h3 {
    font-size: 20px;
    line-height: 1.25;
  }

  .row-item .sub,
  .where,
  .when,
  .role {
    letter-spacing: 0.06em;
    white-space: normal;
  }

  .job li,
  .edu li {
    font-size: 15px;
  }

  .site-footer {
    margin-top: 72px;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .toast {
    max-width: calc(100vw - 32px);
    text-align: center;
  }


  .site-footer::before {
    left: 16px;
    transform: translateX(0) rotate(45deg);
  }
}

@media (max-width: 760px) {
  .hero::before {
    background: repeating-linear-gradient(
      90deg,
      transparent 0 39px,
      color-mix(in srgb, var(--accent) 9%, transparent) 39px 40px
    );
    opacity: 0.62;
  }

  #work::before {
    background-size: 40px 40px;
    opacity: 0.5;
  }
}

@media (max-width: 640px) {
  .project-grid,
  .skill-grid,
  .lang-row {
    grid-template-columns: 1fr;
    gap: 28px 0;
  }
}

@media (max-width: 480px) {
  .wrap {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    padding-bottom: 88px;
  }

  .hero {
    padding-top: 92px;
  }

  .section {
    padding: 48px 0 0;
  }

  .kicker {
    font-size: 10px;
    letter-spacing: 0.16em;
  }

  .avatar {
    width: min(148px, 52vw);
  }

  .intro-meta {
    flex-direction: column;
    gap: 10px;
  }

  .job h3,
  .edu h3 {
    font-size: 22px;
  }

  .row-item h3 {
    font-size: 19px;
  }

}

/* ---------- Theme switcher ---------- */
.theme-switcher {
  position: fixed;
  right: 22px;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 40;
  width: 58px;
  height: 32px;
  padding: 3px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-deep) 88%, transparent);
  box-shadow:
    0 10px 30px color-mix(in srgb, #000 22%, transparent),
    inset 0 1px 0 color-mix(in srgb, var(--text) 5%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  color: var(--muted);
  transition:
    border-color 240ms var(--ease),
    background 240ms var(--ease),
    color 240ms var(--ease),
    transform 240ms var(--ease);
}

.theme-switcher:hover {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
  color: var(--text);
  transform: translateY(-1px);
}

.theme-switcher:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}

.theme-switcher__icon {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.theme-switcher__icon svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 1.45;
  fill: none;
}

.theme-switcher__thumb {
  position: absolute;
  z-index: 1;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  box-shadow: 0 3px 10px color-mix(in srgb, #000 18%, transparent);
  transition:
    transform 320ms var(--ease),
    background 240ms var(--ease),
    border-color 240ms var(--ease);
}

html[data-theme="light"] .theme-switcher__thumb {
  transform: translateX(26px);
}

.theme-switcher .theme-switcher__moon {
  color: var(--text);
}

.theme-switcher .theme-switcher__sun {
  color: color-mix(in srgb, var(--muted) 75%, transparent);
}

html[data-theme="light"] .theme-switcher .theme-switcher__moon {
  color: color-mix(in srgb, var(--muted) 75%, transparent);
}

html[data-theme="light"] .theme-switcher .theme-switcher__sun {
  color: var(--accent);
}

@media (max-width: 640px) {
  .theme-switcher {
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom));
    width: 54px;
    height: 30px;
  }

  .theme-switcher__thumb {
    width: 22px;
    height: 22px;
  }

  html[data-theme="light"] .theme-switcher__thumb {
    transform: translateX(24px);
  }
}
