/* ============================================================
   Artificial Pini — static site styles
   Palette: deep navy + Bluesky cyan accent
   ============================================================ */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2-variations"),
       url("../fonts/inter-latin.woff2") format("woff2");
}

:root {
  --bg:           #0a0d14;
  --bg-elev:      #121724;
  --bg-card:      #161c2c;
  --border:       #232a3d;
  --border-soft:  #1c2233;
  --text:         #e7ecf5;
  --text-dim:     #98a2b8;
  --text-faint:   #6b7488;
  --accent:       #1d9bf0;
  --accent-soft:  #1d9bf022;
  --danger:       #f43f5e;
  --radius:       12px;
  --container:    760px;
  --container-wide: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ------------------ Header ------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 13, 20, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.site-header .container {
  max-width: var(--container-wide);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.brand:hover { text-decoration: none; }
.brand img {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}
.nav { display: flex; gap: 18px; align-items: center; }
.nav-link {
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-link:hover { color: var(--accent); text-decoration: none; }

/* ------------------ Hero / Profile ------------------ */
.hero {
  position: relative;
  padding-bottom: 28px;
}
.hero__banner {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 1;
  max-height: 280px;
  overflow: hidden;
  background: linear-gradient(135deg, #1d9bf022, #7e3bd022);
}
.hero__banner::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 40%, var(--bg) 100%);
}
.hero__banner img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero__inner {
  max-width: var(--container);
  margin-top: -60px;
  position: relative;
  z-index: 2;
}

.profile {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.profile__avatar img {
  width: 120px; height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg);
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
  background: var(--bg-card);
}
.profile__meta { display: flex; flex-direction: column; gap: 6px; }
.profile__name {
  margin: 6px 0 0;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.profile__handle {
  color: var(--text-dim);
  font-size: 0.95rem;
  width: max-content;
}
.profile__handle:hover { color: var(--accent); text-decoration: none; }
.profile__bio {
  margin: 8px 0 4px;
  color: var(--text);
  max-width: 56ch;
}
.profile__stats {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-size: 0.95rem;
  color: var(--text-dim);
}
.profile__stats strong {
  color: var(--text);
  font-weight: 600;
  margin-right: 4px;
}

/* ------------------ Section ------------------ */
.section { padding: 40px 0 80px; }
.section-head {
  margin: 0 0 22px;
  border-top: 1px solid var(--border-soft);
  padding-top: 28px;
}
.kicker {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 6px;
}
.section-head h2 {
  margin: 4px 0 0;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

/* ------------------ Feed ------------------ */
.feed-status {
  color: var(--text-dim);
  font-size: 0.9rem;
  padding: 14px 0;
}
.feed-status.is-error { color: var(--danger); }
.feed-status.is-hidden { display: none; }

.feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.post {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.post:hover { border-color: var(--accent); }

.post__link {
  display: block;
  padding: 16px 18px;
  color: var(--text);
}
.post__link:hover { text-decoration: none; }

.post__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.post__author {
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 500;
}
.post__date {
  color: var(--text-faint);
  font-size: 0.8rem;
}
.post__text {
  margin: 0 0 12px;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-size: 1rem;
  line-height: 1.55;
}
.post__text a { color: var(--accent); }

.post__gallery {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
  border-radius: 10px;
  overflow: hidden;
}
.post__gallery:empty { display: none; }
.post__gallery.has-1 { grid-template-columns: 1fr; }
.post__gallery.has-2 { grid-template-columns: 1fr 1fr; }
.post__gallery.has-3 { grid-template-columns: 1fr 1fr; }
.post__gallery.has-3 > :first-child { grid-row: span 2; }
.post__gallery.has-4 { grid-template-columns: 1fr 1fr; }
.post__gallery img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--bg-elev);
  cursor: zoom-in;
}
.post__gallery.has-1 img { aspect-ratio: auto; max-height: 540px; }

.post__footer {
  display: flex;
  gap: 22px;
  color: var(--text-dim);
  font-size: 0.82rem;
}
.post__metric {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.post__metric svg { opacity: 0.8; }

.noscript-note {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  color: var(--text-dim);
}

/* ------------------ Footer ------------------ */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 28px 0 40px;
  color: var(--text-dim);
  font-size: 0.85rem;
}
.site-footer .container {
  max-width: var(--container-wide);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
  align-items: center;
}
.footer-links a { color: var(--text-dim); }
.footer-links a:hover { color: var(--accent); }

/* ------------------ Lightbox ------------------ */
.lightbox {
  border: none;
  background: rgba(0, 0, 0, 0.92);
  padding: 0;
  max-width: 92vw;
  max-height: 92vh;
}
.lightbox::backdrop { background: rgba(0, 0, 0, 0.7); }
.lightbox img {
  display: block;
  max-width: 92vw;
  max-height: 88vh;
  margin: 0 auto;
}
.lightbox__close {
  position: absolute;
  top: 8px; right: 12px;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

/* ------------------ Reduced motion ------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ------------------ Wider screens ------------------ */
@media (min-width: 640px) {
  .profile {
    flex-direction: row;
    align-items: flex-end;
    gap: 22px;
  }
  .profile__meta { padding-bottom: 4px; }
  .profile__name { font-size: 2rem; }
}
