/* owennurminen.com — link-in-bio hub theme (dark).
   Mobile-first centered column; scales cleanly to desktop. The existing
   editorial theme lives in styles.css and still powers /story. */

:root {
  --bg: #0a0a0b;
  --bg-2: #121214;
  --card: #161618;
  --card-hover: #1d1d20;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f5f7;
  --text-mid: #b6b6bd;
  --text-dim: #7c7c85;
  --accent: #2d6cdf;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius: 18px;
  --col: 510px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(45, 108, 223, 0.16), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

.hub {
  width: 100%;
  max-width: var(--col);
  margin-inline: auto;
  padding: 0 16px 64px;
}

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  margin-top: 16px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  isolation: isolate;
}

.hero-bg {
  width: 100%;
  aspect-ratio: 5 / 6;
  object-fit: cover;
  object-position: center 38%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
  padding: 24px 20px 22px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 8%, rgba(0, 0, 0, 0.28) 46%, rgba(0, 0, 0, 0.05) 72%);
}

.hero-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: clamp(26px, 7vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.verified {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  object-fit: contain;
}

.hero-handle {
  margin: 3px 0 0;
  color: var(--text-mid);
  font-size: 14px;
  font-weight: 500;
}

/* ── Social icon row ──────────────────────────────────────────────── */
.socials {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: clamp(6px, 1.8vw, 12px);
  margin-top: 16px;
}

.social-btn {
  display: grid;
  place-items: center;
  width: clamp(36px, 10.5vw, 44px);
  height: clamp(36px, 10.5vw, 44px);
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
  transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

.social-btn:hover {
  transform: translateY(-2px);
  background: var(--card-hover);
  border-color: var(--line-strong);
}

.social-btn svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

/* Total-followers line with an expandable per-platform breakdown. */
.followers {
  margin-top: 16px;
  text-align: center;
}

.followers-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border: 0;
  background: none;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
}

.followers-toggle strong {
  font-weight: 800;
}

.chev-down {
  margin-top: 1px;
  color: var(--text-dim);
  transition: transform 0.2s ease;
}

.followers.open .chev-down {
  transform: rotate(180deg);
}

.followers-breakdown {
  display: grid;
  gap: 4px;
  max-width: 300px;
  margin: 0 auto;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.26s ease, opacity 0.2s ease, margin-top 0.26s ease;
}

.followers.open .followers-breakdown {
  max-height: 360px;
  opacity: 1;
  margin-top: 10px;
}

.fb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  transition: background 0.14s ease, border-color 0.14s ease;
}

.fb-row:hover {
  background: var(--card-hover);
  border-color: var(--line-strong);
}

.fb-icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--text);
}

.fb-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.fb-name {
  flex: 1;
  text-align: left;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-mid);
}

.fb-count {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
}

/* Mission-statement bio — the personal line under the socials. */
.bio {
  margin: 12px auto 0;
  max-width: 380px;
  text-align: center;
  color: var(--text-mid);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.55;
}

.bio span {
  color: var(--text);
  font-weight: 700;
}

/* ── Generic stack spacing ────────────────────────────────────────── */
.stack {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.section-label {
  margin: 10px 2px -2px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* Photo gallery — an Instagram-style 3-column grid of portrait (3:4) tiles.
   One dedicated section; tiles wrap into rows like an IG profile grid. */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: 14px;
}

.gallery > img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  border: 1px solid var(--line);
  object-fit: cover;
  transition: transform 0.16s ease, border-color 0.16s ease;
  display: block;
}

.gallery > img:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

/* ── Row card (book a call, website) ──────────────────────────────── */
.row-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px 12px 12px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

.row-card:hover {
  transform: translateY(-2px);
  background: var(--card-hover);
  border-color: var(--line-strong);
}

.row-card .thumb {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  border-radius: 12px;
  object-fit: cover;
  background: var(--bg-2);
}

.row-card .row-body {
  min-width: 0;
  flex: 1;
}

.row-card .row-title {
  font-size: 15.5px;
  font-weight: 700;
}

.row-card .row-sub {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--text-dim);
}

.row-card .chev {
  color: var(--text-dim);
  flex: 0 0 auto;
}

/* ── Banner card (big project tiles) ──────────────────────────────── */
.banner {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.banner:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
}

.banner-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.banner-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.banner:hover .banner-media img {
  transform: scale(1.04);
}

.banner-media.fallback {
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 120% at 20% 0%, rgba(45, 108, 223, 0.35), transparent 60%),
    linear-gradient(160deg, #1b1b2e, #101015);
}

.banner-media.fallback .fallback-word {
  font-size: clamp(28px, 9vw, 46px);
  font-weight: 900;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.9);
}

/* Logo-tile mode: a centered, never-cropped logo on a branded gradient.
   Use for app icons / wordmarks (square or wide logos on transparent/solid bg).
   The --brand CSS var sets the accent; override per-banner inline. */
.banner-media.logo {
  display: grid;
  place-items: center;
  /* Logo sits in the upper portion; generous bottom padding keeps it clear of
     the title/overlay band at the bottom of the banner. */
  padding: 13% 20% 34%;
  background:
    radial-gradient(120% 130% at 25% 10%, var(--brand, rgba(45, 108, 223, 0.4)), transparent 62%),
    linear-gradient(160deg, #17171c, #0d0d10);
}

.banner-media.logo img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

/* light tile for dark logos (e.g. a black glyph that needs a pale backdrop) */
.banner-media.logo.on-light {
  background:
    radial-gradient(120% 130% at 25% 10%, var(--brand, rgba(45, 108, 223, 0.25)), transparent 60%),
    linear-gradient(160deg, #f4f5f7, #e7e9ee);
}

/* Render mode: a square-ish product render (e.g. the crystal heart) sized by
   HEIGHT and centered in the upper area, clear of the title band — no app-icon
   chrome. Height-driven so a square image can't overflow the short banner. */
.banner-media.render {
  display: grid;
  place-items: center;
  padding: 6% 18% 22%;
  background:
    radial-gradient(120% 130% at 25% 8%, var(--brand, rgba(255, 64, 0, 0.4)), transparent 60%),
    linear-gradient(160deg, #17171c, #0d0d10);
}

.banner-media.render img {
  height: 100%;
  max-height: 180px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.banner:hover .banner-media.render img {
  transform: scale(1.04);
}

/* Icon mode: render an actual app icon as a rounded-square tile, App-Store-
   feature style, instead of stretching it. The icon keeps its own corner radius
   and sits on a branded gradient with the title band below. */
.banner-media.icon {
  display: grid;
  place-items: center;
  padding: 11% 20% 30%;
  background:
    radial-gradient(120% 130% at 25% 8%, var(--brand, rgba(255, 64, 0, 0.4)), transparent 60%),
    linear-gradient(160deg, #17171c, #0d0d10);
}

.banner-media.icon img {
  width: auto;
  height: 100%;
  max-height: 132px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  transition: transform 0.4s ease;
}

.banner:hover .banner-media.icon img {
  transform: scale(1.05);
}

.banner-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px 18px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.84) 4%, rgba(0, 0, 0, 0.18) 52%, transparent 80%);
}

.badge {
  align-self: flex-start;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
}

.banner-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.18;
}

.banner-sub {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-mid);
  max-width: 92%;
}

.banner-cta {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: #fff;
  color: #0a0a0b;
}

/* media-type badge (auto feed banners) */
.play-dot {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  color: #fff;
}

.play-dot svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.feed-loading {
  font-size: 12.5px;
  color: var(--text-dim);
}

/* ── Footer ───────────────────────────────────────────────────────── */
.hub-footer {
  margin-top: 34px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-dim);
}

.hub-footer a {
  color: var(--text-mid);
  font-weight: 700;
}

.hub-footer .dot {
  margin: 0 8px;
  opacity: 0.5;
}

/* ── Desktop polish ───────────────────────────────────────────────── */
@media (min-width: 640px) {
  .hub {
    padding-top: 8px;
  }
  .hero-bg {
    aspect-ratio: 16 / 11;
    object-position: center 40%;
  }
}

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