/* dravon.net: black, white, moving. Shared by every page except /ember (Ember keeps its own brand). */
@font-face {
  font-family: "Archivo"; font-style: normal; font-display: swap;
  font-weight: 100 900; font-stretch: 62% 125%;
  src: url("/fonts/archivo-wdth.woff2") format("woff2-variations"), url("/fonts/archivo-wdth.woff2") format("woff2");
}
@font-face {
  font-family: "Plex Arabic"; font-weight: 700; font-display: swap; unicode-range: U+0600-06FF, U+FE70-FEFF;
  src: url("/fonts/plex-arabic-700.woff2") format("woff2");
}
:root {
  --ink: #000;
  --paper: #fff;
  --silver: #cfcfcf;
  --ash: #8c8c8c;
  --line: #2e2e2e;
  --font: "Archivo", "Plex Arabic", system-ui, sans-serif;
  --mx: 50vw; --my: 30vh;
}
* { box-sizing: border-box; }
html { background: var(--ink); color: var(--silver); }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; min-height: 100vh; overflow-x: hidden; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--paper); outline-offset: 4px; }
::selection { background: var(--paper); color: var(--ink); }

/* light that follows the cursor, under the grain */
.glow { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(520px circle at var(--mx) var(--my), rgba(255,255,255,.075), transparent 62%); }
/* moving film grain */
.grain {
  position: fixed; inset: -50%; z-index: 60; pointer-events: none; opacity: .11;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain .9s steps(5) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 25%{transform:translate(-3%,2%)} 50%{transform:translate(2%,-3%)} 75%{transform:translate(-2%,-2%)} 100%{transform:translate(0,0)} }
main, header, nav, footer, .top { position: relative; z-index: 1; }

/* ---------- top bar ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px clamp(18px, 4vw, 48px); }
.brand { font-weight: 800; font-stretch: 125%; font-size: 16px; text-decoration: none; color: var(--paper); letter-spacing: -0.01em; }
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--silver); text-decoration: none; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ash); }
body.live .pill { background: var(--paper); color: var(--ink); border-color: var(--paper); }
body.live .pill .dot { background: #ff2a2a; box-shadow: 0 0 0 0 rgba(255,42,42,.6); animation: ping 1.4s ease-out infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 9px rgba(255,42,42,0); } 100% { box-shadow: 0 0 0 0 rgba(255,42,42,0); } }

/* ---------- hero ---------- */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: clamp(18px, 4vh, 44px) 18px clamp(30px, 5vh, 54px); }
.avatar { position: relative; width: 104px; height: 104px; display: block; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; filter: grayscale(1) contrast(1.4); position: relative; }
.avatar::before { /* spinning dashed ring */
  content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 1.5px dashed #5a5a5a;
  animation: spin 18s linear infinite;
}
body.live .avatar::before { border: 2px dashed var(--paper); animation-duration: 5s; }
@keyframes spin { to { transform: rotate(360deg); } }

.name {
  margin: 24px 0 0; color: var(--paper); font-weight: 900; font-stretch: 125%;
  font-size: clamp(40px, 8vw, 104px); line-height: .85; letter-spacing: -0.045em; white-space: nowrap;
  display: flex; align-items: flex-end; justify-content: center;
}
.name .v { display: inline-block; transform-origin: 50% 100%; animation: eq 1.8s ease-in-out infinite; animation-delay: calc(var(--i) * -0.16s); }
@keyframes eq { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(var(--amp, .82)); } }
body.live .name .v { --amp: 1.38; animation-duration: .7s; animation-timing-function: cubic-bezier(.5, 0, .5, 1); }
.name .v:nth-child(odd) { animation-direction: reverse; }

.status { margin: 18px 0 0; font-size: 16px; font-weight: 600; color: var(--paper); }
.now { margin: 6px auto 0; max-width: 60ch; color: var(--ash); font-size: 16px; }
.now[hidden] { display: none; }
.watch {
  margin-top: 18px; display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 24px; border-radius: 999px;
  background: var(--paper); color: var(--ink); text-decoration: none; font-weight: 800; font-stretch: 112%; font-size: 16px;
  transition: transform .2s ease;
}
.watch:hover { transform: scale(1.04); }
.watch[hidden] { display: none; }

/* ---------- ticker ---------- */
.ticker { position: relative; z-index: 1; overflow: hidden; border-block: 1px solid var(--line); background: var(--ink); }
body.live .ticker { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.ticker-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
body.live .ticker-track { animation-duration: 22s; }
.ticker span { white-space: nowrap; padding: 10px 0; font-weight: 800; font-stretch: 118%; font-size: 13.5px; letter-spacing: .01em; }
.ticker i { font-style: normal; display: inline-block; margin: 0 22px; opacity: .55; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- projects: boxes that zigzag left, right, left ---------- */
.wrap { max-width: 980px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px) 40px; }
.index { position: relative; display: flex; flex-direction: column; gap: 22px; padding: 44px 0 10px; }
.index::before { /* the line the boxes hang off */
  content: ""; position: absolute; left: 50%; top: 20px; bottom: 0; width: 1px;
  background: linear-gradient(var(--line), var(--line) 70%, transparent); }
.box {
  position: relative; width: calc(50% - 34px); align-self: flex-start; text-decoration: none;
  padding: 22px 24px 20px; border: 1px solid var(--line); border-radius: 18px; background: rgba(0,0,0,.6);
  display: flex; flex-direction: column; gap: 8px; isolation: isolate; overflow: hidden;
  transition: border-color .25s, transform .25s cubic-bezier(.2, .8, .2, 1);
}
.box:nth-child(even) { align-self: flex-end; }
.box::after { /* dot on the line */
  content: ""; position: absolute; top: 30px; width: 11px; height: 11px; border-radius: 50%; background: var(--ink); border: 1.5px solid #6a6a6a; }
.box:nth-child(odd)::after { right: -40px; }
.box:nth-child(even)::after { left: -40px; }
.box { overflow: visible; }
.box::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--paper); transform: scaleY(0); transform-origin: 50% 100%; transition: transform .3s cubic-bezier(.7, 0, .2, 1); }
.box-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.box-name { color: var(--paper); font-weight: 900; font-stretch: 115%; font-size: clamp(26px, 3.2vw, 34px); line-height: 1; letter-spacing: -0.03em; transition: color .2s, font-stretch .35s; }
.box-tag { color: var(--ash); font-size: 13px; font-weight: 600; white-space: nowrap; transition: color .2s; }
.box-desc { color: var(--ash); font-size: 15px; line-height: 1.45; transition: color .2s; }
.box:hover, .box:focus-visible { border-color: var(--paper); transform: translateY(-3px); outline: none; }
.box:hover::before, .box:focus-visible::before { transform: scaleY(1); }
.box:hover .box-name, .box:focus-visible .box-name { color: var(--ink); font-stretch: 125%; }
.box:hover .box-desc, .box:hover .box-tag, .box:focus-visible .box-desc, .box:focus-visible .box-tag { color: #333; }
.box:hover::after { background: var(--paper); border-color: var(--paper); }

.foot { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; padding: 34px 0 10px; border-top: 1px solid var(--line); margin-top: 30px; }
.socials { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.socials a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; font-size: 15px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--paper); font-weight: 700; transition: background-color .2s, color .2s, border-color .2s; }
.socials a:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.domain { color: var(--ash); font-size: 14px; }

/* ---------- inner pages ---------- */
.page-title { color: var(--paper); font-weight: 900; font-stretch: 125%; font-size: clamp(38px, 6vw, 68px); line-height: .9; letter-spacing: -0.045em; margin: 18px 0 10px; }
.lede { color: var(--ash); max-width: 58ch; margin: 0 0 24px; font-size: 16px; }

@media (max-width: 700px) {
  .avatar { width: 88px; height: 88px; }
  .index::before { left: 8px; }
  .box, .box:nth-child(even) { width: calc(100% - 30px); align-self: flex-end; }
  .box:nth-child(odd)::after, .box:nth-child(even)::after { left: -28px; right: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .grain, .ticker-track, .avatar::before, .name .v, body.live .pill .dot { animation: none !important; }
  .box, .box::before, .box-name { transition: none; }
}
