/* ESGOTEI · the Instagram profile, made permanent */

:root {
  --white: #ffffff;
  --black: #000000;
  --text: #0a0a0a;
  --muted: #6b6b6b;
  --line: #dbdbdb;
  --soft: #efefef;
  --soft-2: #e2e2e2;
  --cyan: #29a8e0;
  --cyan-deep: #1b8fc2;
  --link: #00376b;

  --f-brand: "Montserrat", "Arial Black", sans-serif;
  --f-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --wrap: 975px;
  --gutter: 20px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--white); color: var(--text);
  font-family: var(--f-ui); font-size: 15px; line-height: 1.5;
  scrollbar-color: #b5b5b5 var(--white);
}
img { display: block; max-width: 100%; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .18em; }
h1, h2, h3, p { margin: 0; }
h2, h3 { text-wrap: balance; }
::selection { background: var(--cyan); color: var(--black); }
:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; border-radius: 4px; }
time { font-variant-numeric: tabular-nums; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 99; background: var(--black); color: var(--white); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }

.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon .fillpath { fill: currentColor; stroke: none; }

/* ---------- buttons, Instagram shaped ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 36px; padding: 7px 16px; border-radius: 8px; border: 0;
  font: 600 14px/1.2 var(--f-ui); cursor: pointer; text-decoration: none !important;
  white-space: nowrap;
  transition: background-color .15s, color .15s;
}
.btn-primary { background: var(--cyan); color: var(--black); }
.btn-primary:hover { background: var(--cyan-deep); color: var(--black); }
.btn-secondary { background: var(--soft); color: var(--text); }
.btn-secondary:hover { background: var(--soft-2); }
.btn-outline { background: transparent; color: var(--white); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.55); }
.btn-outline:hover { background: rgba(255,255,255,.1); color: var(--white); }
.btn-icon { padding: 7px 9px; }
.btn-sm { min-height: 32px; padding: 6px 12px; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.94); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: var(--wrap); margin: 0 auto; padding: 10px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark { color: var(--black); text-decoration: none !important; }
.wordmark span {
  display: inline-block; padding: 3px 0 2px;
  font: 900 22px/1 var(--f-brand); letter-spacing: .01em;
  border-top: 2px solid var(--black); border-bottom: 2px solid var(--black);
}
.topbar nav { display: flex; align-items: center; gap: 20px; }
.topbar nav > a:not(.btn) { color: var(--text); font-weight: 600; font-size: 14px; }
@media (max-width: 640px) { .topbar nav > a:not(.btn) { display: none; } }

/* ---------- profile header ---------- */
.profile {
  display: grid; grid-template-columns: 290px 1fr; align-items: center;
  padding: 36px 0 40px;
}
.avatar { justify-self: center; }
.avatar img {
  width: 150px; height: 150px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 4px var(--white), 0 0 0 6px var(--cyan);
}
.profile-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.profile h1 { font: 400 20px/1.3 var(--f-ui); }
.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.bio { margin-top: 20px; max-width: 46ch; }
.bio-name { font-weight: 700; }
.bio-cat { color: var(--muted); }
.bio p + p { margin-top: 2px; }
.bio .bio-cat + p { margin-top: 4px; }
.bio-link { margin-top: 6px !important; }
.bio-link a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.bio-link .icon { width: 15px; height: 15px; }

/* ---------- highlights ---------- */
.highlights { padding: 0 0 44px; }
.highlights ul {
  list-style: none; margin: 0; padding: 0 0 4px 0; display: flex; gap: 32px;
  overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
}
.highlights ul::-webkit-scrollbar { display: none; }
.highlights li { flex: none; scroll-snap-align: start; }
.highlights a { display: grid; justify-items: center; gap: 10px; width: 87px; color: var(--text); text-decoration: none !important; }
.hl-ring { display: block; width: 87px; height: 87px; border-radius: 50%; padding: 3px; background: var(--white); box-shadow: 0 0 0 1px var(--line); transition: box-shadow .2s; }
.hl-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.highlights a:hover .hl-ring { box-shadow: 0 0 0 2px var(--cyan); }
.hl-label { font-size: 12px; font-weight: 600; max-width: 87px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- tabs + grid ---------- */
.tabs { display: flex; justify-content: center; gap: 60px; border-top: 1px solid var(--line); }
.tabs button {
  display: inline-flex; align-items: center; gap: 6px; height: 52px; margin-top: -1px;
  background: none; border: 0; border-top: 1px solid transparent; cursor: pointer;
  font: 600 12px var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.tabs button .icon { width: 13px; height: 13px; stroke-width: 2.2; }
.tabs button[aria-selected="true"] { color: var(--text); border-top-color: var(--text); }
.tabs button:hover { color: var(--text); }

.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.tile[hidden] { display: none; }
.tile a { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--soft); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.tile-badge { position: absolute; top: 8px; right: 8px; color: var(--white); filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.tile-badge .icon { width: 20px; height: 20px; }
.tile-over {
  position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 14px;
  background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,0) 60%);
  color: var(--white); font: 800 15px/1.25 var(--f-brand); text-transform: uppercase;
  opacity: 0; transition: opacity .25s;
}
.tile-over span { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.tile a:hover .tile-over, .tile a:focus-visible .tile-over { opacity: 1; }
.tile a:hover img { transform: scale(1.03); }
.tile a:focus-visible { outline: 3px solid var(--cyan); outline-offset: -3px; border-radius: 0; }
.grid.is-filtering .tile:not([hidden]) { animation: tile-in .45s var(--ease) both; }
@keyframes tile-in { from { opacity: 0; transform: scale(.97); } }
.feed-more { display: flex; justify-content: center; padding: 32px 0 0; }

/* ---------- about ---------- */
.about { padding: 88px 0; margin-top: 56px; border-top: 1px solid var(--line); }
.about h2 { font: 900 clamp(34px, 5.4vw, 56px)/1 var(--f-brand); text-transform: uppercase; letter-spacing: -.01em; max-width: 16ch; }
.about-cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; margin-top: 36px; }
.about p { margin-top: 14px; font-size: 16px; color: #262626; max-width: 62ch; }
.about .lede { margin-top: 0; font-size: 20px; line-height: 1.45; color: var(--text); }
.about h3 { font: 800 13px var(--f-brand); text-transform: uppercase; letter-spacing: .1em; }
.ruled { list-style: none; margin: 12px 0 0; padding: 0; border-top: 2px solid var(--black); }
.ruled li { padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 16px; }
.press { color: var(--muted) !important; }

/* ---------- act: the logo's black field ---------- */
.act { background: var(--black); color: var(--white); padding: 96px 0 104px; }
.act h2 { text-align: center; }
.act-rule {
  display: inline-block; padding: 6px 0 2px;
  font: 900 clamp(56px, 12vw, 132px)/1 var(--f-brand); letter-spacing: .005em;
  border-top: clamp(3px, .5vw, 6px) solid var(--white); border-bottom: clamp(3px, .5vw, 6px) solid var(--white);
}
.act-tag { margin-top: 16px; text-align: center; font: 800 clamp(26px, 4.2vw, 44px)/1.1 var(--f-brand); color: var(--cyan); }
.act-sub { margin-top: 10px; text-align: center; font: 700 clamp(16px, 2vw, 20px)/1.4 var(--f-brand); }
.act-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 72px; border-top: 1px solid rgba(255,255,255,.3); }
.act-item { padding: 32px 28px 8px; border-left: 1px solid rgba(255,255,255,.3); scroll-margin-top: 80px; }
.act-item:first-child { border-left: 0; padding-left: 0; }
.act-item:last-child { padding-right: 0; }
.act-item h3 { font: 800 22px/1.15 var(--f-brand); text-transform: uppercase; }
.act-item p { margin-top: 10px; color: #cfcfcf; }
.act-item .btn { margin-top: 20px; }
.checklist { list-style: none; margin: 12px 0 0; padding: 0; }
.checklist li { position: relative; padding: 7px 0 7px 22px; border-bottom: 1px solid rgba(255,255,255,.18); color: #e8e8e8; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 15px; width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); }
.act-links { display: flex; flex-wrap: wrap; gap: 8px; }
.act-links .btn { margin-top: 20px; }
.act :focus-visible { outline-color: var(--cyan); }

/* ---------- footer ---------- */
.footer { padding: 36px var(--gutter) 48px; text-align: center; color: var(--muted); font-size: 12px; }
.footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-bottom: 14px; }
.footer a { color: var(--muted); }

/* ---------- post viewer ---------- */
.viewer { padding: 0; border: 0; background: transparent; max-width: none; max-height: none; width: 100%; height: 100%; overflow: visible; }
.viewer::backdrop { background: rgba(0,0,0,.72); }
.viewer[open] { display: grid; place-items: center; }
.viewer[open] .viewer-box { animation: viewer-in .35s var(--ease); }
@keyframes viewer-in { from { opacity: 0; transform: scale(.97); } }
.viewer-box {
  display: grid; grid-template-columns: minmax(0, 1fr) 380px;
  width: min(1100px, calc(100vw - 140px)); height: min(860px, calc(100vh - 64px));
  background: var(--white); border-radius: 4px; overflow: hidden;
}
.viewer-box:focus { outline: none; }
.viewer-media { margin: 0; background: var(--black); position: relative; min-height: 0; overflow: hidden; }
.viewer-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.viewer-side { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); }
.viewer-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.viewer-head img { width: 32px; height: 32px; border-radius: 50%; }
.viewer-head a { color: var(--text); font-weight: 600; }
.viewer-caption { flex: 1; overflow-y: auto; padding: 16px; font-size: 14px; line-height: 1.5; overscroll-behavior: contain; }
.viewer-caption p + p { margin-top: 12px; }
.viewer-caption a { color: var(--link); }
.viewer-foot { padding: 12px 16px 16px; border-top: 1px solid var(--line); }
.viewer-foot time { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.viewer-actions { display: flex; gap: 8px; margin-top: 12px; }
.viewer-actions .btn { flex: 1; }
.viewer-close, .viewer-nav {
  position: fixed; display: grid; place-items: center; width: 44px; height: 44px;
  border: 0; border-radius: 50%; cursor: pointer;
}
.viewer-close { top: 12px; right: 12px; background: transparent; color: var(--white); }
.viewer-close .icon { width: 28px; height: 28px; }
.viewer-nav { top: 50%; transform: translateY(-50%); background: var(--white); color: var(--text); width: 36px; height: 36px; }
.viewer-prev { left: 24px; }
.viewer-next { right: 24px; }
.viewer-nav[disabled] { visibility: hidden; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .about-cols { grid-template-columns: 1fr; gap: 36px; }
  .act-grid { grid-template-columns: 1fr; }
  .act-item, .act-item:first-child, .act-item:last-child { padding: 28px 0; border-left: 0; border-bottom: 1px solid rgba(255,255,255,.3); }
  .viewer-box { grid-template-columns: 1fr; grid-template-rows: minmax(0, 55%) minmax(0, 45%); width: 100vw; height: 100dvh; border-radius: 0; }
  .viewer-side { border-left: 0; }
  .viewer-close { background: rgba(0,0,0,.5); }
  .viewer-nav { top: 27%; }
  .viewer-prev { left: 8px; }
  .viewer-next { right: 8px; }
}
@media (max-width: 735px) {
  :root { --gutter: 16px; }
  .profile { grid-template-columns: 86px 1fr; gap: 0 24px; padding: 20px 0 16px; }
  .avatar img { width: 86px; height: 86px; box-shadow: 0 0 0 3px var(--white), 0 0 0 4.5px var(--cyan); }
  .profile-main, .profile-row { display: contents; }
  .profile h1 { align-self: center; font-size: 19px; overflow-wrap: anywhere; }
  .bio { grid-column: 1 / -1; margin-top: 14px; }
  .profile-actions { grid-column: 1 / -1; order: 3; margin-top: 14px; flex-wrap: nowrap; }
  .profile-actions .btn-primary, .profile-actions .btn-secondary:not(.btn-icon) { flex: 1; }
  .profile-actions .btn { padding-left: 10px; padding-right: 10px; }
  .highlights { padding-bottom: 20px; }
  .highlights ul { gap: 16px; }
  .highlights a { width: 64px; gap: 6px; }
  .hl-ring { width: 64px; height: 64px; padding: 2px; }
  .hl-label { max-width: 64px; }
  .feed { margin: 0 calc(-1 * var(--gutter)); }
  .tabs { gap: 0; justify-content: space-around; }
  .tabs button span { display: none; }
  .tabs button .icon { width: 22px; height: 22px; stroke-width: 1.8; }
  .tabs button { flex: 1; justify-content: center; }
  .grid { gap: 2px; }
  .tile-over { display: none; }
  .feed-more { padding: 24px var(--gutter) 0; }
  .about { padding: 64px 0; }
  .act { padding: 72px 0 80px; }
  .act-grid { margin-top: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
