/* OEB contest landing — responsive (all screen sizes) */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

:root {
  --content-max: min(100%, 42rem);
  --font: Calibri, "Segoe UI", system-ui, sans-serif;
  --text: rgba(0, 0, 0, 1);
  --green-card: rgb(22, 135, 54);
  --green-card-2: rgb(15, 131, 47);
  --green-avatar: rgb(35, 163, 71);
  --radius-card: clamp(9px, 2vw, 13px);
  --radius-card-lg: clamp(12px, 2.5vw, 18px);
  --spacing: clamp(10px, 2.8vw, 16px);
  --page-bg: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(0, 0, 0, 0));
  --pad-inline: clamp(12px, 4.5vw, 28px);
  --pad-block-top: clamp(28px, 8vw, 56px);
  --pad-block-bottom: clamp(20px, 5vw, 40px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: clamp(0.875rem, 0.82rem + 0.35vw, 1rem);
  line-height: 1.45;
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

.bg-blur {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--page-bg);
  background-size: cover;
}

.bg-blur::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("./assets/5fe3669d-f6af-4e28-aebe-d3b5a84572e3_1747575333160(1).jpg");
  background-size: cover;
  background-position: center;
  filter: blur(18px);
  opacity: 0.45;
  transform: scale(1.08);
}

@media (prefers-reduced-motion: reduce) {
  .bg-blur::after {
    filter: blur(0);
    opacity: 0.2;
    transform: none;
  }
}

.shell {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding:
    max(var(--pad-block-top), env(safe-area-inset-top, 0px))
    max(var(--pad-inline), env(safe-area-inset-right, 0px))
    max(var(--pad-block-bottom), env(safe-area-inset-bottom, 0px))
    max(var(--pad-inline), env(safe-area-inset-left, 0px));
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
}

.profile {
  text-align: center;
  margin-bottom: calc(var(--spacing) + 6px);
}

.avatar {
  width: clamp(7.5rem, 32vw, 12.5rem);
  height: clamp(7.5rem, 32vw, 12.5rem);
  border-radius: 50%;
  object-fit: cover;
  border: clamp(4px, 1.5vw, 8px) solid var(--green-avatar);
  display: block;
  margin: 0 auto;
  background: #e8e8e8;
}

.profile h1 {
  font-size: clamp(1.05rem, 0.95rem + 1.5vw, 1.45rem);
  font-weight: 700;
  line-height: 1.2;
  margin: clamp(14px, 4vw, 22px) var(--spacing) 0;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-wrap: balance;
  padding: 0 clamp(4px, 2vw, 8px);
}

.profile .bio {
  margin: clamp(6px, 2vw, 10px) 0 0;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
  padding: 0 clamp(2px, 1vw, 6px);
}

.links {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 2.2vw, 14px);
}

a.card-hero {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: clamp(100px, 28vw, 140px);
  border-radius: var(--radius-card);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  background: var(--green-card);
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04);
  -webkit-tap-highlight-color: transparent;
}

a.card-hero:hover {
  background: #000;
  color: var(--green-card);
  box-shadow: 0 0 0 2px var(--green-card);
}

@media (hover: none) {
  a.card-hero:active {
    background: #000;
    color: var(--green-card);
  }
}

a.card-hero img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  max-height: min(52vh, 420px);
}

a.card-hero span {
  padding: clamp(10px, 2.5vw, 14px) clamp(10px, 3vw, 16px) clamp(12px, 3vw, 18px);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: center;
  align-self: center;
  hyphens: auto;
  font-size: clamp(0.88rem, 0.84rem + 0.25vw, 1rem);
  line-height: 1.35;
}

a.card-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2vw, 12px);
  min-height: max(3.25rem, 48px);
  padding: clamp(10px, 2.5vw, 14px) clamp(12px, 3vw, 16px);
  border-radius: var(--radius-card);
  text-decoration: none;
  color: var(--text);
  background: var(--green-card-2);
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

a.card-row:hover {
  background: #000;
  color: var(--green-card-2);
  box-shadow: 0 0 0 2px var(--green-card-2);
}

@media (hover: none) {
  a.card-row:active {
    background: #000;
    color: var(--green-card-2);
  }
}

a.card-row img {
  width: clamp(2.75rem, 11vw, 3.25rem);
  height: clamp(2.75rem, 11vw, 3.25rem);
  object-fit: cover;
  flex-shrink: 0;
  border-radius: 4px;
}

a.card-row span {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 0 clamp(4px, 1.5vw, 8px);
  line-height: 1.35;
  font-size: clamp(0.86rem, 0.82rem + 0.22vw, 0.98rem);
}

a.card-hero.alt-green {
  background: var(--green-card-2);
  border-radius: var(--radius-card-lg);
}

a.card-hero.alt-green:hover {
  color: var(--green-card-2);
}

@media (hover: none) {
  a.card-hero.alt-green:active {
    color: var(--green-card-2);
  }
}

.fineprint {
  margin-top: var(--spacing);
  padding: clamp(16px, 4vw, 24px) clamp(8px, 2vw, 12px);
  text-align: center;
  white-space: pre-wrap;
  line-height: 1.5;
  font-size: clamp(0.82rem, 0.78rem + 0.2vw, 0.95rem);
  color: var(--text);
  border-radius: var(--radius-card);
  overflow-wrap: anywhere;
}

.page-foot {
  text-align: center;
  font-size: clamp(0.75rem, 0.72rem + 0.15vw, 0.85rem);
  color: rgba(0, 0, 0, 0.45);
  margin-top: clamp(16px, 4vw, 28px);
  padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
}

.page-foot code {
  font-size: 0.85em;
  word-break: break-word;
}

/* Narrow phones (e.g. 320px) */
@media (max-width: 360px) {
  :root {
    --pad-inline: 10px;
  }

  a.card-row {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  a.card-row span {
    flex: 1 1 100%;
    text-align: center;
  }
}

/* Short landscape: reduce hero image height */
@media (max-height: 480px) and (orientation: landscape) {
  .shell {
    --pad-block-top: 16px;
    --pad-block-bottom: 16px;
  }

  .avatar {
    width: clamp(5rem, 22vh, 7rem);
    height: clamp(5rem, 22vh, 7rem);
  }

  a.card-hero img {
    max-height: 36vh;
    aspect-ratio: 2 / 1;
  }
}

/* Large / ultra-wide: comfortable reading width, centered */
@media (min-width: 90rem) {
  :root {
    --content-max: 48rem;
  }
}
