:root {
    --white: #ececf1;
    --gray: #8b8b96;
    --red: #8b0101;
  }

* { box-sizing: border-box; }
  ::selection {
    background: rgba(139, 1, 1, 0.55);
    color: var(--white);
  }
  ::-webkit-scrollbar { width: 10px; }
  ::-webkit-scrollbar-track { background: #000; }
  ::-webkit-scrollbar-thumb {
    background: rgba(236, 236, 241, 0.14);
    border: 3px solid #000;
  }
  html { scrollbar-width: thin; scrollbar-color: rgba(236,236,241,0.18) transparent; }
  a:focus-visible {
    outline: 1px solid var(--red);
    outline-offset: 2px;
  }
  html, body {
    margin: 0;
    padding: 0;
    background: #000;
    color: var(--white);
    font-family: 'Anthropic Sans', sans-serif;
    height: 100%;
  }

#bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    display: block;
    background: #000;
  }

.site {
    position: relative;
    z-index: 1;
  }

@font-face {
    font-family: 'amali';
    src: url('fonts/amali.ttf') format('truetype');
  }
  
  
  
  .page {
    min-height: 100vh;
    min-height: 100svh;
    max-width: 880px;
    margin: 0 auto;
    padding: 12vh 6vw 10vh;
  }
  @media (max-width: 480px) {
    .page { padding: 9vh 5vw 8vh; }
    .card { padding: 8px 4px 2px; }
  }
  .page-head {
    text-align: center;
    margin-bottom: 7vh;
  }
  .page-head .mark {
    width: 28px;
    height: 1px;
    background: var(--red);
    margin: 0 auto 1.4em;
    opacity: 0.8;
  }
  .page-head h1 {
    font-family: 'ChronoType', 'Anthropic Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(2rem, 5vw, 3.2rem);
    letter-spacing: -0.02em;
    margin: 0 0 0.5em;
  }
  .page-head p {
    font-family: 'NDS12', 'Anthropic Sans', sans-serif;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--gray);
    margin: 0;
  }
  .feed {
    columns: 16rem;
    column-gap: 14px;
  }
  .card {
    break-inside: avoid;
    margin: 0 0 8px;
    padding: 10px 6px 4px;
    text-align: center;
  }
  .card::after {
    content: "";
    display: block;
    width: 2px;
    height: 32px;
    margin: 26px auto 0;
    background: linear-gradient(180deg, transparent, rgba(236, 236, 241, 0.4) 25%, rgba(236, 236, 241, 0.85) 50%, rgba(236, 236, 241, 0.4) 75%, transparent);
    background-size: 100% 200%;
    animation: lineShimmer 7s ease-in-out infinite;
  }
  .card:nth-child(3n)::after { animation-delay: -2.3s; }
  .card:nth-child(3n+1)::after { animation-delay: -4.6s; }
  @keyframes lineShimmer {
    0%, 100% { background-position: 0% 0%; opacity: 0.55; }
    50% { background-position: 0% 100%; opacity: 1; }
  }
  @media (prefers-reduced-motion: reduce) {
    .card::after { animation: none; }
  }
  .card:last-child::after { display: none; }
  .card p {
    font-weight: 300;
    line-height: 1.7;
    font-size: 0.9rem;
    color: var(--white);
    text-align: center;
    margin: 0 0 0.8em;
  }
  .card p:last-child { margin-bottom: 0; }
  .card a {
    color: var(--red);
    text-decoration: none;
    border-bottom: 1px solid rgba(139, 1, 1, 0.4);
    display: inline-block;
    margin-right: 0.8em;
    overflow-wrap: anywhere;
  }
  .card a:hover { border-bottom-color: var(--red); }
  .card:target {
    background: rgba(139, 1, 1, 0.06);
  }
  .meta {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
  }
  .pid {
    font-family: 'tewi', ui-monospace, Menlo, Consolas, monospace;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    color: var(--red);
    text-decoration: none;
  }
  .pid:hover { color: var(--white); }
  .pid.copied { color: var(--gray); }
  .meta time {
    font-size: 0.62rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--gray);
  }
  .command {
    font-family: 'tewi', ui-monospace, Menlo, Consolas, monospace;
    font-size: 0.85em;
    color: var(--white);
    background: rgba(236, 236, 241, 0.07);
    border: 1px solid rgba(236, 236, 241, 0.09);
    padding: 0.15em 0.45em;
    overflow-wrap: anywhere;
  }
  .sinhala { font-family: 'amali'; font-size: 1.15em; }
  .verse, .verse .post { text-align: center; }
  .verse h3 {
    font-family: 'ChronoType', 'Anthropic Sans', sans-serif;
    font-weight: 400;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    margin: 0 0 1.2em;
  }
  .postimages {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
  }
  .imggallery {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-top: 6px;
  }
  .card > video,
  .postimages video:only-child {
    display: block;
    width: 100%;
    height: auto;
    margin-top: 6px;
  }
  .postimg {
    max-width: 100%;
    height: auto;
    display: block;
    border: 1px solid rgba(236, 236, 241, 0.14);
  }
  video {
    border: 1px solid rgba(236, 236, 241, 0.14);
    max-width: 100%;
    height: auto;
    filter: brightness(0.92);
    transition: filter 0.3s, border-color 0.3s;
  }
  video:hover {
    filter: none;
    border-color: rgba(139, 1, 1, 0.4);
  }
  video::-webkit-media-controls-panel {
    background-image: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  }
  video.vloading {
    background: radial-gradient(circle at 50% 50%, rgba(139, 1, 1, 0.4), rgba(139, 1, 1, 0.06) 45%, transparent 70%);
    animation: vpulse 1.5s ease-in-out infinite;
  }
  @keyframes vpulse {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 1; }
  }
  .page-foot {
    margin-top: 9vh;
    text-align: center;
  }
  .page-foot p {
    font-family: 'NDS12', 'Anthropic Sans', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--gray);
    margin: 0 0 1em;
  }
  .page-foot a {
    color: var(--gray);
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-decoration: none;
    border-bottom: 1px solid rgba(139, 1, 1, 0.4);
    transition: color 0.25s;
  }
  .page-foot a:hover {
    color: var(--red);
    border-bottom-color: var(--red);
  }
  .vp {
    position: relative;
    display: inline-block;
    max-width: 100%;
    line-height: 0;
  }
  .card > .vp,
  .postimages .vp:only-child {
    display: block;
    width: 100%;
    height: auto;
    margin-top: 6px;
  }
  .card > .vp video,
  .postimages .vp:only-child video {
    width: 100%;
  }
  .vp video {
    display: block;
    max-width: 100%;
  }
  .vplay {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 58px;
    height: 58px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(139, 1, 1, 0.7);
    cursor: pointer;
    padding: 0;
    transition: opacity 0.25s, box-shadow 0.25s;
  }
  .vplay::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 0;
    height: 0;
    border-left: 16px solid var(--white);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    transform: translateX(2px);
  }
  .vplay:hover { box-shadow: 0 0 18px rgba(139, 1, 1, 0.5); }
  .vp.playing .vplay { opacity: 0; pointer-events: none; }
  .vbar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 8px 10px 7px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    opacity: 0;
    transition: opacity 0.25s;
  }
  .vp:hover .vbar,
  .vp.paused .vbar { opacity: 1; }
  .vtrack {
    height: 3px;
    background: rgba(236, 236, 241, 0.18);
    cursor: pointer;
  }
  .vfill {
    height: 100%;
    width: 0%;
    background: var(--red);
  }
  .vrow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
  }
  .vtime {
    font-family: 'tewi', ui-monospace, Menlo, Consolas, monospace;
    font-size: 0.62rem;
    line-height: 1;
    color: var(--gray);
  }
  .vbtns { display: flex; gap: 4px; }
  .vbtn {
    background: none;
    border: none;
    padding: 4px 6px;
    cursor: pointer;
    font-family: 'tewi', ui-monospace, Menlo, Consolas, monospace;
    font-size: 0.62rem;
    line-height: 1;
    color: var(--gray);
  }
  .vbtn:hover { color: var(--red); }
