/* Vlad.studio domain-specific styles layered on top of VUI.
   Everything layout/component-level lives in VUI; this file only holds
   brand artwork, wallpaper aspect frames, hand-drawn dividers/smiles,
   and lightweight AJAX modal/tree hooks used by foot.js. */

html {
  background: var(--c-bg-page) url(/static/images/bg.jpg) no-repeat center top / cover fixed;
}
html.dark {
  background-image: url(/static/images/bg-dark.jpg);
}
body {
  background: transparent;
}
@media (max-width: 768px) {
  body {
    padding-bottom: 4.5rem;
  }
}

/* Shell layout */
.vlad-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--pad-md);
}
.vlad-sidebar {
  position: sticky;
  top: var(--pad-md);
  max-height: calc(100vh - 2 * var(--pad-md));
  overflow-y: auto;
}
.vlad-mobile-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  border-radius: 0;
  backdrop-filter: blur(12px);
}

/* Hero banner on /home */
#truly-amazing-wallpapers {
  background-color: #565532;
  background-repeat: no-repeat;
  background-position: 50% 100%;
  background-size: cover;
  background-image: url(/static/images/truly.jpg);
  background-image: url(/static/images/truly.webp);
}
#truly-amazing-wallpapers * {
  color: #fff;
}
#truly-amazing-wallpapers h1 {
  font-size: 3rem;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.08rem;
}

/* Brand logo */
a#nav-logo-l {
  background: var(--c-icon-accent) url(/static/images/nav-logo.svg) no-repeat 0 center / 2.4rem 2.4rem;
  padding-left: 2.4rem;
  color: transparent;
  font-weight: 700;
  margin: 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.14s ease-in-out;
  height: 2.4rem;
  width: 2.4rem;
  border-radius: var(--vui-radius-md);
  text-decoration: none;
  overflow: hidden;
  white-space: nowrap;
}
a#nav-logo-l:hover {
  color: #fff;
  width: 100%;
}
a#nav-logo-sm {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  height: 2.4rem;
  padding: 0 0.75rem 0 2.4rem;
  background: var(--c-icon-accent) url(/static/images/nav-logo.svg) no-repeat 0 center / 2.4rem 2.4rem;
  border-radius: var(--vui-radius-md);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

/* Hand-drawn decorative dividers */
.hr1, .hr2, .hr3, .hr4, .hr5, .hr6, .hr7, .hr8, .hr9 {
  display: block;
  height: 36px;
  width: 100%;
  background: no-repeat 50%;
  background-size: 2000px 36px, 36px 36px;
  padding: 0;
}
.hr1 { background-image: url(/static/images/hr/line.svg), url(/static/images/hr/1.svg); }
.hr2 { background-image: url(/static/images/hr/line.svg), url(/static/images/hr/2.svg); }
.hr3 { background-image: url(/static/images/hr/line.svg), url(/static/images/hr/3.svg); }
.hr4 { background-image: url(/static/images/hr/line.svg), url(/static/images/hr/4.svg); }
.hr5 { background-image: url(/static/images/hr/line.svg), url(/static/images/hr/5.svg); }
.hr6 { background-image: url(/static/images/hr/line.svg), url(/static/images/hr/6.svg); }
.hr7 { background-image: url(/static/images/hr/line.svg), url(/static/images/hr/7.svg); }
.hr8 { background-image: url(/static/images/hr/line.svg), url(/static/images/hr/8.svg); }
.hr9 { background-image: url(/static/images/hr/line.svg), url(/static/images/hr/9.svg); }

/* Comment smiles */
.vlad-smile {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 80%;
}
.smile-vlad { background-image: url(/static/images/smiles/vlad.svg); }
.smile-1 { background-image: url(/static/images/smiles/1.svg); }
.smile-2 { background-image: url(/static/images/smiles/2.svg); }
.smile-3 { background-image: url(/static/images/smiles/3.svg); }
.smile-4 { background-image: url(/static/images/smiles/4.svg); }
.smile-5 { background-image: url(/static/images/smiles/5.svg); }
.smile-6 { background-image: url(/static/images/smiles/6.svg); }
#smile-picker a.is-picked {
  background: var(--c-bg-accent);
  border-radius: var(--vui-radius-md);
}

/* Hand-drawn bullet lists */
ul.vlad-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
ul.vlad-list li {
  padding-left: 26px;
  margin: 0.35rem 0;
  background: url(/static/images/ul/1.svg) no-repeat 0 2px / 18px 18px;
}
ul.vlad-list.style-2 li { background-image: url(/static/images/ul/2.svg); }
ul.vlad-list.style-3 li { background-image: url(/static/images/ul/3.svg); }

/* Personal project cover cards (/apps) */
.vlad-app-card {
  display: block;
  width: 100%;
  min-height: 320px;
  border-radius: var(--vui-radius-lg);
  box-shadow: var(--vui-shadow-card);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.vlad-app-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--vui-shadow-card-elevated);
}
.vlad-app-card-inner {
  min-height: 320px;
}

/* Art & wallpaper media */
.vlad-art-card {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: var(--vui-radius-lg);
  box-shadow: var(--vui-shadow-card);
  background: var(--c-bg);
  text-decoration: none;
}
.vlad-art-card img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}
.vlad-art-card .vlad-art-caption {
  position: absolute;
  left: var(--pad-md);
  right: var(--pad-md);
  bottom: var(--pad-md);
  display: flex;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.16s ease;
  pointer-events: none;
}
.vlad-art-card:hover .vlad-art-caption {
  opacity: 1;
}
.vlad-art-pill {
  background: rgba(24, 24, 26, 0.86);
  color: #fff;
  padding: 4px 12px;
  border-radius: var(--vui-radius-md);
  font-weight: 700;
  font-size: var(--size-sm);
}

.wall-thumb-1 { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; display: block; }
.wall-thumb-m { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; display: block; }
.wall-thumb-2 { aspect-ratio: 8 / 3; object-fit: cover; width: 100%; display: block; }
.wall-thumb-3 { aspect-ratio: 4 / 1; object-fit: cover; width: 100%; display: block; }
.vlad-square { aspect-ratio: 1 / 1; width: 100%; object-fit: cover; display: block; }
.vlad-video-frame { aspect-ratio: 16 / 9; width: 100%; border: 0; border-radius: var(--vui-radius-md); }
.preload-bg { background-size: cover; background-position: center; }

/* Full-bleed wallpaper preview backdrop */
img#wallpaper_preview {
  position: fixed;
  inset: 0;
  width: 100dvw;
  height: 100dvh;
  object-fit: cover;
  pointer-events: none;
  z-index: 0;
}
.vlad-wallpaper-spacer {
  height: calc(100dvh - 6rem);
  pointer-events: none;
}
.vlad-above-preview {
  position: relative;
  z-index: 2;
}

/* Scroll down indicator */
#scroll-down {
  position: fixed;
  left: 50%;
  bottom: 2.5rem;
  transform: translateX(-50%);
  z-index: 40;
  background: rgba(24, 24, 26, 0.85);
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: var(--size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  animation: vlad-pulse 2s infinite;
}
@keyframes vlad-pulse {
  0%, 100% { opacity: 0.9; transform: translate(-50%, 0); }
  50% { opacity: 0.45; transform: translate(-50%, 4px); }
}

/* Responsive grids for media/cards */
.vlad-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap-md);
  width: 100%;
}
.vlad-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap-md);
  width: 100%;
}
@media (max-width: 768px) {
  .vlad-grid-2,
  .vlad-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Highlight mark */
mark.vlad-mark {
  margin: 0 -0.15rem;
  padding: 0.05rem 0.25rem;
  border-radius: 0.4rem;
  background: linear-gradient(to right, rgba(255, 225, 0, 0.15), rgba(255, 225, 0, 0.55) 10%, rgba(255, 225, 0, 0.25));
  color: inherit;
}

/* AJAX modal overlay (native <dialog>, driven by foot.js) */
body:has(dialog.modal[open]) {
  overflow: hidden;
}
dialog.modal {
  border: 0;
  padding: var(--pad-lg);
  background: transparent;
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  margin: auto;
  color: inherit;
}
dialog.modal::backdrop {
  background: var(--c-bg-backdrop);
  backdrop-filter: blur(4px);
}
dialog.modal > .vui.card {
  width: 100%;
}

/* Native HTML <select> styled like VUI Input */
select.vlad-select {
  width: 100%;
  font: inherit;
  font-size: var(--size-sm);
  color: var(--c-text-default);
  background: var(--c-bg);
  border: 1px solid var(--c-border-default);
  border-radius: var(--vui-radius-md);
  padding: var(--pad-sm) var(--pad-md);
}

/* Inline prose links */
.vlad-link {
  color: var(--c-text-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.vlad-link:hover {
  opacity: 0.8;
}

/* Standard HTML tables styled with VUI tokens (for SSR admin/pricing tables) */
table.vlad-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--size-sm);
}
table.vlad-table th,
table.vlad-table td {
  padding: var(--pad-sm) var(--pad-md);
  border-bottom: 1px solid var(--c-border-muted);
  text-align: left;
  vertical-align: top;
}
table.vlad-table th {
  color: var(--c-text-muted);
  font-weight: 700;
  font-size: var(--size-xs);
  white-space: nowrap;
}
table.vlad-table tr:last-child td {
  border-bottom: none;
}
table.vlad-table td {
  overflow-wrap: anywhere;
}

/* Prose styling for static legal pages (/terms, /privacy, /license-agreement) */
.page-body p {
  margin: 0.75rem 0;
}
.page-body h2,
.page-body h3,
.page-body h4 {
  margin: 1.5rem 0 0.5rem;
  font-weight: 700;
  color: var(--c-text-accent);
}
.page-body ul,
.page-body ol {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}
.page-body ul {
  list-style: disc;
}
.page-body ol {
  list-style: decimal;
}
.page-body li {
  margin: 0.3rem 0;
}
.page-body a {
  color: var(--c-text-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
