html.fonts-loading body {
  visibility: hidden;
}

@font-face {
  font-family: "Merriweather";
  src: url("/fonts/Merriweather-VariableFont_opsz,wdth,wght.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
}

@font-face {
  font-family: "Merriweather";
  src: url("/fonts/Merriweather-Italic-VariableFont_opsz,wdth,wght.woff2") format("woff2");
  font-style: italic;
  font-weight: 300 900;
  font-display: swap;
}

@font-face {
  font-family: "Google Sans Code";
  src: url("/fonts/GoogleSansCode-VariableFont_wght.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Google Sans Code";
  src: url("/fonts/GoogleSansCode-Italic-VariableFont_wght.woff2") format("woff2");
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  --elel-bg-light: #f7f3ec;
  --elel-text-light: #141010;

  --elel-bg-dark: #050607;
  --elel-text-dark: #f5f1ea;

  --elel-font-serif: "Merriweather", "Times New Roman", serif;
  --elel-font-sans: "Google Sans Code", "SF Pro Text", "Segoe UI", system-ui,
    -apple-system, sans-serif;
  --elel-font-badge: "Google Sans Code", "SF Mono", "SFMono-Regular",
    "Cascadia Code", "JetBrains Mono", monospace;
  --elel-lightbox-close: #000000;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--elel-bg-light);
  color: var(--elel-text-light);
  font-family: var(--elel-font-serif);
  font-size: 15px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-color-scheme: dark) {
  body {
    background-color: var(--elel-bg-dark);
    color: var(--elel-text-dark);
  }

  :root {
    --elel-lightbox-close: #f4f7f9;
  }
}

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

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

html[data-theme="light"] body {
  background-color: var(--elel-bg-light);
  color: var(--elel-text-light);
}

html[data-theme="dark"] body {
  background-color: var(--elel-bg-dark);
  color: var(--elel-text-dark);
}

html[data-theme="light"] {
  --elel-lightbox-close: #000000;
}

html[data-theme="dark"] {
  --elel-lightbox-close: #f4f7f9;
}

.elel-page {
  min-height: 100vh;
  padding: 32px 24px;
  box-sizing: border-box;
}

body.elel-home .elel-page {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

body.elel-home .elel-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.elel-home .elel-main-inner {
  width: 100%;
  max-width: 640px;
  text-align: center;
}

body.elel-project {
  line-height: 1.65;
}

body.elel-project .elel-main {
  margin: 0 auto;
  width: 100%;
  max-width: 760px;
}

.elel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

body.elel-home .elel-header {
  width: 100%;
  margin-bottom: 12px;
}

.elel-header-spacer {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.elel-theme-toggle {
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.elel-theme-toggle svg {
  width: 20px;
  height: 20px;
  display: block;
}

.elel-theme-toggle:hover,
.elel-theme-toggle:focus-visible {
  transform: translateY(-1px);
  opacity: 0.8;
}

body.elel-project .elel-header .elel-badge-row {
  margin-bottom: 0;
}

.elel-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

body.elel-home .elel-badge-row {
  justify-content: center;
  margin-bottom: 18px;
}

body.elel-project .elel-badge-row {
  margin-bottom: 20px;
}

.elel-home-badge-group {
  margin: 0 auto 14px;
  max-width: 540px;
  width: 100%;
}

.elel-home-badge-label {
  margin: 0 0 4px;
  font-family: var(--elel-font-sans);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.82;
}

.elel-home-badge-hint {
  margin: 0 0 10px;
  font-family: var(--elel-font-sans);
  font-size: 12px;
  opacity: 0.7;
}

.elel-badge-row-projects {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  justify-items: center;
}

.elel-badge-row-links {
  justify-content: center;
  margin-bottom: 0;
}

.elel-badge {
  border: 1.5px solid currentColor;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-family: var(--elel-font-badge);
  font-style: normal;
  white-space: nowrap;
  background: transparent;
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.elel-badge-project {
  width: auto;
  max-width: 100%;
  justify-content: space-between;
  padding: 10px 16px;
  white-space: normal;
  text-align: left;
}

.elel-badge-cta {
  font-family: var(--elel-font-sans);
  font-size: 16px;
  line-height: 1;
  opacity: 0.85;
}

.elel-badge:hover,
.elel-badge:focus-visible,
.elel-launch-button:hover,
.elel-launch-button:focus-visible {
  transform: translateY(-1px);
  background-color: rgba(20, 16, 16, 0.04);
}

@media (prefers-color-scheme: dark) {
  .elel-badge:hover,
  .elel-badge:focus-visible,
  .elel-launch-button:hover,
  .elel-launch-button:focus-visible {
    background-color: rgba(245, 241, 234, 0.08);
  }
}

.elel-body p {
  margin: 0 0 1em;
}

.elel-body p:last-child {
  margin-bottom: 0;
}

.elel-emphasis {
  margin-top: 1.5em;
  font-size: 15px;
}

.elel-footer {
  font-family: var(--elel-font-sans);
  font-size: 12px;
  opacity: 0.85;
  text-align: center;
  margin-top: 24px;
}

.elel-portrait {
  width: 100%;
  max-width: min(100%, clamp(180px, 26vw, 280px));
  margin: 0 auto clamp(18px, 4vw, 24px);
}

.elel-portrait-visual {
  width: 100%;
  aspect-ratio: 1024 / 1536;
  border: 2px solid currentColor;
  border-radius: clamp(4px, 0.6vw, 8px);
  box-sizing: border-box;
  background-image: url("/images/michael.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 108% 108%;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

@media (max-width: 1024px) {
  .elel-portrait {
    max-width: min(100%, 220px);
  }
}

.elel-project-title {
  font-family: var(--elel-font-sans);
  font-size: clamp(32px, 4.4vw, 44px);
  line-height: 1.15;
  margin: 0 0 10px;
}

.elel-project-summary {
  margin: 0 0 26px;
  max-width: 66ch;
}

.elel-launch {
  margin-bottom: 30px;
}

.elel-launch-button {
  border: 1.5px solid currentColor;
  border-radius: 999px;
  padding: 11px 18px;
  font-family: var(--elel-font-badge);
  font-size: 13px;
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.elel-section {
  margin: 0 0 24px;
}

.elel-section h2 {
  margin: 0 0 8px;
  font-family: var(--elel-font-sans);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 400;
  opacity: 0.82;
}

.elel-section ul {
  margin: 0;
  padding-left: 18px;
}

.elel-section li {
  margin: 0 0 8px;
}

body.elel-project .elel-section ul {
  list-style: none;
  padding-left: 0;
}

body.elel-project .elel-section li::before {
  content: "\00B7\00A0";
}

body.elel-project .elel-section li {
  font-size: 14px;
  margin: 0 0 4px;
}

.elel-shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 220px);
  justify-content: start;
  gap: 12px;
}

.elel-shot {
  border: 1.5px solid currentColor;
  border-radius: 8px;
  width: 220px;
  min-height: 0;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--elel-font-sans);
  font-size: 12px;
  opacity: 0.8;
  overflow: hidden;
  margin: 0;
}

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

.elel-shot[data-lightbox-ready] {
  cursor: zoom-in;
}

.elel-shot[data-lightbox-ready]:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.elel-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 10, 10, 0.82);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  overscroll-behavior: contain;
  touch-action: none;
}

.elel-lightbox[aria-hidden="false"] {
  display: flex;
}

.elel-lightbox-image {
  max-width: min(96vw, 1100px);
  max-height: 86vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  border: 1.5px solid rgba(244, 247, 249, 0.7);
  background: #111;
  object-fit: contain;
}

.elel-lightbox-close {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 12px);
  right: calc(env(safe-area-inset-right) + 12px);
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--elel-lightbox-close);
  font: inherit;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
}

body.elel-lightbox-open {
  overflow: hidden;
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
}
