/* felafagbure.com · Official Archive
   Reference: glukhovsky.com / Behance Dmitry Glukhovsky Official Archive
   Warm archival editorial. Not black-gold luxury. Not blueprint loft. */

:root {
  --bg: #faf4eb;
  --bg-soft: #f3ebe0;
  --ink: #402100;
  --ink-soft: rgba(64, 33, 0, 0.72);
  --ink-mute: rgba(64, 33, 0, 0.48);
  --ink-faint: rgba(64, 33, 0, 0.16);
  --ink-hair: rgba(64, 33, 0, 0.1);
  --serif: "Noto Serif", "Literata", Georgia, serif;
  --sans: "Source Sans 3", "DM Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --rail: 17.5rem;
  --gutter: clamp(1rem, 2.2vw, 2rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--ink); color: var(--bg); }

/* —— Shell —— */
.shell {
  display: grid;
  grid-template-columns: minmax(15rem, var(--rail)) minmax(0, 1fr) 4.25rem;
  min-height: 100vh;
}

/* —— Left: latest —— */
.rail-news {
  border-right: 1px solid var(--ink-hair);
  padding: 1.35rem var(--gutter) 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  background: var(--bg);
}
.rail-label {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.news-list { display: flex; flex-direction: column; gap: 1.15rem; flex: 1; }
.news-item {
  display: grid;
  gap: 0.55rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--ink-hair);
}
.news-item:last-child { border-bottom: 0; }
.news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--ink-faint);
  border-radius: 999px;
  padding: 0.12rem 0.55rem;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  background: rgba(255,255,255,0.35);
}
.news-date {
  font-size: 0.72rem;
  color: var(--ink-mute);
  margin-left: 0.15rem;
}
.news-title {
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.015em;
  transition: opacity 0.25s var(--ease);
}
.news-item:hover .news-title { opacity: 0.65; }
.news-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--bg-soft);
  border: 1px solid var(--ink-hair);
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: auto;
  padding: 0.85rem 1rem;
  border: 1px solid var(--ink-faint);
  font-family: var(--serif);
  font-size: 0.95rem;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.btn-outline:hover { background: var(--ink); color: var(--bg); }

/* —— Center stage —— */
.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem var(--gutter) 3rem;
  text-align: center;
  min-width: 0;
}
.role-line {
  font-family: var(--serif);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  font-weight: 400;
  color: var(--ink-soft);
  min-height: 1.4em;
  margin-bottom: 0.35rem;
}
.role-line span {
  display: inline-block;
  animation: roleIn 0.55s var(--ease);
}
@keyframes roleIn {
  from { opacity: 0; transform: translateY(0.35em); }
  to { opacity: 1; transform: none; }
}
.display-name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.6rem, 7.2vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  max-width: 14ch;
  margin: 0 auto 0.85rem;
}
.stage-tools {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin-bottom: 1.4rem;
  color: var(--ink-mute);
  font-size: 0.78rem;
}
.lang {
  position: relative;
}
.lang summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.68rem;
  padding: 0.2rem 0.4rem;
}
.lang summary::-webkit-details-marker { display: none; }
.lang[open] summary { color: var(--ink); }
.lang-menu {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 125%;
  background: var(--bg);
  border: 1px solid var(--ink-faint);
  padding: 0.35rem 0;
  min-width: 4.5rem;
  z-index: 20;
}
.lang-menu a {
  display: block;
  padding: 0.3rem 0.7rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
}
.lang-menu a:hover { background: var(--bg-soft); }

.portrait-wrap {
  position: relative;
  width: min(22rem, 72vw);
  margin: 0 auto 1.25rem;
}
.portrait {
  width: 100%;
  aspect-ratio: 520 / 760;
  background:
    linear-gradient(160deg, #efe4d4 0%, #e7d7c2 48%, #dcc7ad 100%);
  border: 1px solid var(--ink-hair);
  position: relative;
  overflow: hidden;
}
.portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
  pointer-events: none;
  mix-blend-mode: multiply;
  z-index: 3;
}

/* —— Portrait photo (from ITC / LinkedIn headshot) —— */
.portrait.has-photo { background: #1c130a; }
.portrait-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  /* light warm tie-in only; heavy filters amplify source compression */
  filter: saturate(0.96) contrast(1.01);
  z-index: 1;
  animation: portraitIn 0.9s var(--ease) both;
  image-rendering: auto;
}
/* warm wash + soft bottom scrim for caption/signature legibility */
.portrait.has-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(28,19,10,0) 55%, rgba(28,19,10,0.55) 100%),
    linear-gradient(160deg, rgba(64,33,0,0.12) 0%, rgba(64,33,0,0) 45%);
}
@keyframes portraitIn {
  from { opacity: 0; transform: scale(1.04); }
  to   { opacity: 1; transform: none; }
}
.portrait-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(5rem, 18vw, 8.5rem);
  letter-spacing: -0.06em;
  color: rgba(64, 33, 0, 0.18);
  z-index: 1;
}
.portrait-caption {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  z-index: 4;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.sig {
  position: absolute;
  right: 0.6rem;
  bottom: 0.85rem;
  z-index: 4;
  font-family: "Segoe Script", "Apple Chancery", cursive;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--ink);
  opacity: 0.88;
  transform: rotate(-4deg);
  pointer-events: none;
}
/* over the dark photo, warm-cream marks read better than brown ink */
.portrait.has-photo .portrait-caption { color: rgba(250, 244, 235, 0.72); }
.portrait.has-photo .sig { color: rgba(250, 244, 235, 0.92); opacity: 1; }

.follow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 1.1rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.follow-links { display: flex; gap: 0.45rem; }
.follow-links a {
  width: 1.7rem;
  height: 1.7rem;
  border: 1px solid var(--ink-faint);
  display: grid;
  place-items: center;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.follow-links a:hover { background: var(--ink); color: var(--bg); }
.follow-links svg { width: 0.85rem; height: 0.85rem; fill: currentColor; }

.lede {
  max-width: 34rem;
  margin: 0 auto;
  font-size: clamp(0.92rem, 1.2vw, 1.02rem);
  line-height: 1.65;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* —— Right chapter rail —— */
.rail-chapters {
  border-left: 1px solid var(--ink-hair);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.1rem 0.35rem 1.5rem;
  gap: 0.35rem;
  background: var(--bg);
}
.chapter {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 0.45rem;
  padding: 0.85rem 0.2rem;
  color: var(--ink-mute);
  transition: color 0.25s var(--ease);
  flex: 1;
  justify-content: center;
  min-height: 5.5rem;
}
.chapter:hover,
.chapter.is-active { color: var(--ink); }
.chapter-name {
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}
.chapter-count {
  font-family: var(--mono);
  font-size: 0.62rem;
  border: 1px solid currentColor;
  padding: 0.15rem 0.28rem;
  transform: rotate(180deg);
  writing-mode: horizontal-tb;
}
.chapter-meta {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  margin-top: auto;
  padding-top: 0.8rem;
}

/* —— Below-fold archive index —— */
.archive-band {
  border-top: 1px solid var(--ink-hair);
  /* horizontal padding matches the shell gutter: one left margin line down the page */
  padding: clamp(3rem, 7vw, 5.5rem) var(--gutter);
  background: var(--bg-soft);
}
.archive-kicker {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 2rem;
  max-width: 18ch;
}
.chapter-rows {
  display: flex;
  flex-direction: column;
  max-width: 52rem;
}
.chapter-row {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1.15rem 0;
  border-top: 1px solid var(--ink-hair);
  position: relative;
  transition: opacity 0.25s var(--ease);
}
.chapter-row:last-child { border-bottom: 1px solid var(--ink-hair); }
.chapter-row::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--ink);
  transition: width 0.35s var(--ease);
}
.chapter-row:hover { opacity: 0.72; }
.chapter-row:hover::after { width: 100%; }
.chapter-ico {
  width: 2.1rem;
  height: 2.1rem;
  color: var(--ink);
  transition: opacity 0.25s var(--ease);
}
.chapter-row:hover .chapter-ico { opacity: 0.55; }
.chapter-ico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.4; }
.chapter-row h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.45rem, 3vw, 2rem);
  letter-spacing: -0.02em;
}
.chapter-row .chp {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  white-space: nowrap;
}

/* —— Presence media strip (dial 3) —— */
.presence-band {
  border-top: 1px solid var(--ink-hair);
  padding: clamp(2.4rem, 5vw, 3.75rem) 0 clamp(2.8rem, 5vw, 4rem);
  background: var(--bg);
}
.presence-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 var(--gutter);
  margin-bottom: 1.35rem;
  max-width: 100%;
}
.presence-kicker {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.presence-more {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border-bottom: 1px solid transparent;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.presence-more:hover {
  color: var(--ink);
  border-bottom-color: var(--ink-faint);
}
.presence-strip {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0.85rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  padding: 0.15rem var(--gutter) 0.85rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-faint) transparent;
}
.presence-frame {
  flex: 0 0 auto;
  width: clamp(9.5rem, 22vw, 13.5rem);
  max-width: 13.5rem;
  scroll-snap-align: start;
  margin: 0;
  opacity: 0;
  transform: translateY(0.7rem);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.presence-frame.is-in,
.presence-frame.is-enter.is-in {
  opacity: 1;
  transform: none;
}
.presence-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid var(--ink-hair);
  background: var(--bg-soft);
}
.presence-frame figcaption {
  margin-top: 0.55rem;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.news-item.is-enter {
  opacity: 0;
  transform: translateY(0.45rem);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.news-item.is-in {
  opacity: 1;
  transform: none;
}

.contact-band {
  padding: clamp(2.5rem, 6vw, 4rem) var(--gutter) 3.5rem;
  display: grid;
  gap: 1rem;
  border-top: 1px solid var(--ink-hair);
}
.contact-band h2 + h2,
.contact-band .band-break { margin-top: 1.5rem; }
.contact-band h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
}
.contact-band p { color: var(--ink-soft); max-width: 36rem; }
.contact-band a.mail {
  font-family: var(--serif);
  font-size: 1.25rem;
  border-bottom: 1px solid var(--ink-faint);
  width: fit-content;
  transition: border-color 0.2s;
}
.contact-band a.mail:hover { border-color: var(--ink); }
.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  justify-content: space-between;
  padding: 1.25rem var(--gutter) 2rem;
  border-top: 1px solid var(--ink-hair);
  font-size: 0.75rem;
  color: var(--ink-mute);
}
.foot a:hover { color: var(--ink); }

/* —— Mobile —— */
@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .rail-chapters {
    order: -1;
    flex-direction: row;
    writing-mode: horizontal-tb;
    border-left: 0;
    border-bottom: 1px solid var(--ink-hair);
    overflow-x: auto;
    padding: 0.75rem 1rem;
    gap: 0.25rem;
    justify-content: flex-start;
  }
  .chapter {
    writing-mode: horizontal-tb;
    transform: none;
    flex-direction: row;
    min-height: 0;
    flex: 0 0 auto;
    padding: 0.45rem 0.7rem;
    gap: 0.4rem;
  }
  .chapter-count { transform: none; writing-mode: horizontal-tb; }
  .chapter-meta { display: none; }
  .rail-news {
    order: 2;
    border-right: 0;
    border-top: 1px solid var(--ink-hair);
  }
  .stage { order: 1; padding-top: 1.75rem; }
  .display-name { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .role-line span { animation: none; }
  .portrait-img { animation: none; }
  html { scroll-behavior: auto; }
  .presence-frame,
  .presence-frame.is-enter,
  .news-item.is-enter {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .chapter-row::after { transition: none; }
}
