:root {
  --bg: #0e0e10;
  --surface: #18181b;
  --surface-2: #232327;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --border: #2b2b30;
  --danger: #fca5a5;
  --accent: #2dd4bf;
  --accent-ink: #0e0e10;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #efede8;
  --text: #18181b;
  --muted: #625d55;
  --border: #e3e0d9;
  --danger: #b42318;
  --accent-ink: #ffffff;
  color-scheme: light;
}

[data-accent="teal"] { --accent: #2dd4bf; }
[data-accent="blue"] { --accent: #60a5fa; }
[data-accent="violet"] { --accent: #a78bfa; }
[data-accent="pink"] { --accent: #f472b6; }
[data-accent="red"] { --accent: #f87171; }
[data-accent="orange"] { --accent: #fb923c; }
[data-accent="gold"] { --accent: #facc15; }
[data-accent="green"] { --accent: #4ade80; }
[data-accent="mono"] { --accent: #f4f4f5; }
[data-theme="light"][data-accent="teal"] { --accent: #0f766e; }
[data-theme="light"][data-accent="blue"] { --accent: #1d4ed8; }
[data-theme="light"][data-accent="violet"] { --accent: #6d28d9; }
[data-theme="light"][data-accent="pink"] { --accent: #be185d; }
[data-theme="light"][data-accent="red"] { --accent: #b91c1c; }
[data-theme="light"][data-accent="orange"] { --accent: #c2410c; }
[data-theme="light"][data-accent="gold"] { --accent: #a16207; }
[data-theme="light"][data-accent="green"] { --accent: #15803d; }
[data-theme="light"][data-accent="mono"] { --accent: #18181b; }

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

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(120% 60% at 50% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
p,
figure {
  margin: 0;
}

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

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent);
  outline-offset: 3px;
}

.icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.page {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: calc(48px + env(safe-area-inset-top)) 20px calc(56px + env(safe-area-inset-bottom));
}

/* ---- profile ------------------------------------------------------------- */

.profile {
  text-align: center;
}

.avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 18px;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px color-mix(in srgb, var(--accent) 70%, transparent);
}

.avatar-empty {
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 44px;
  font-weight: 700;
}

.profile h1 {
  font-size: 1.65rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.headline {
  margin-top: 6px;
  color: var(--text);
  opacity: 0.86;
  font-size: 1rem;
}

.org {
  margin-top: 4px;
  color: var(--accent);
  font-weight: 650;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.bio {
  margin: 12px auto 0;
  max-width: 440px;
  color: var(--muted);
  font-size: 0.95rem;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* ---- socials and contact --------------------------------------------------- */

.socials {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 18px;
}

.socials a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--text);
  transition: background 0.15s, color 0.15s;
}

.socials a:hover {
  background: var(--surface-2);
  color: var(--accent);
}

.actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 24px;
}

.actions[data-n="1"] { grid-template-columns: 1fr; }
.actions[data-n="2"] { grid-template-columns: repeat(2, 1fr); }
.actions[data-n="3"] { grid-template-columns: repeat(3, 1fr); }

.action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 74px;
  padding: 10px 6px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  transition: border-color 0.15s, transform 0.1s;
}

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

.action:hover {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--border));
}

.action:active {
  transform: scale(0.97);
}

.contact-lines {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-lines a:hover {
  color: var(--text);
}

/* ---- blocks ------------------------------------------------------------------ */

.blocks {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}

.link {
  display: grid;
  grid-template-columns: 44px 1fr 20px;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 8px 16px 8px 9px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.15s, transform 0.1s;
}

.link:hover,
.card-link:hover {
  border-color: color-mix(in srgb, var(--accent) 65%, var(--border));
}

.link:active,
.card-link:active {
  transform: scale(0.985);
}

.link-thumb,
.link-thumb-space {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
}

.link-title {
  text-align: center;
  font-weight: 620;
  font-size: 1rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.link-arrow {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.card-link {
  display: block;
  overflow: hidden;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.15s, transform 0.1s;
}

.card-img {
  display: block;
  width: 100%;
  aspect-ratio: 1.91 / 1;
  object-fit: cover;
  background: var(--surface-2);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 16px 16px;
}

.card-title {
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.card-desc {
  color: var(--muted);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-host {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.video {
  overflow: hidden;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.video-play {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  background: #000;
  cursor: pointer;
}

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

.video-button {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 8px 30px rgb(0 0 0 / 0.35);
  transition: transform 0.15s;
}

.video-button .icon {
  width: 28px;
  height: 28px;
  margin-left: 3px;
}

.video-play:hover .video-button {
  transform: scale(1.06);
}

.video iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.video figcaption {
  padding: 12px 16px 14px;
  font-weight: 620;
  line-height: 1.35;
}

.block-heading {
  margin: 16px 4px 0;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.block-text {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  white-space: pre-line;
  padding: 0 6px;
  overflow-wrap: anywhere;
}

.block-image img {
  display: block;
  width: 100%;
  border-radius: 20px;
  background: var(--surface-2);
}

.block-image figcaption {
  margin-top: 8px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

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

.form-card {
  margin-top: 28px;
  padding: 22px 20px 20px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.form-card h2 {
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.form-intro {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.95rem;
  white-space: pre-line;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: 400 16px/1.4 var(--font); /* 16px keeps iOS from zooming in */
  transition: border-color 0.15s, box-shadow 0.15s;
}

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

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-note {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: -4px;
}

.form-error {
  color: var(--danger);
  font-size: 0.9rem;
  font-weight: 600;
}

.form-error:empty {
  display: none;
}

.submit {
  min-height: 52px;
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 650 1rem/1 var(--font);
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
}

.submit:hover {
  filter: brightness(1.08);
}

.submit:active {
  transform: scale(0.99);
}

.submit:disabled {
  opacity: 0.6;
  cursor: default;
}

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

@media (max-width: 420px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .actions:not([data-n="1"]):not([data-n="2"]) {
    gap: 8px;
  }

  .action {
    font-size: 0.74rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
