/* lekspect.com - minimal editorial portfolio */

:root {
  --bg: #fafaf9;
  --text: #404040;
  --muted: #a3a3a3;
  --ink: #0a0a0a;
  --toast-bg: #171717;
  --selection-bg: #fed7aa;
  --border-subtle: #e5e5e5;
}

@supports (color: oklch(0% 0 0)) {
  :root {
    --bg: oklch(98.5% 0.001 106.423);
    --text: oklch(37.1% 0 0);
    --muted: oklch(70.8% 0 0);
    --ink: oklch(14.5% 0 0);
    --toast-bg: oklch(20.5% 0 0);
    --selection-bg: oklch(90.1% 0.076 62);
    --border-subtle: oklch(92.2% 0 0);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 5rem auto 7.5rem;
  padding: 0 1.5rem;
  max-width: 40rem;
  background-color: var(--bg);
  color: var(--text);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.7rem;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: var(--selection-bg);
  color: var(--text);
}

h1,
h2,
h3,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
  padding: 0;
  font-size: inherit;
  font-weight: inherit;
}

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
}

/* Layout column (max-w-prose mr-4 sm:mr-6) */

.col {
  max-width: 65ch;
  margin-right: 1rem;
}

@media (min-width: 40rem) {
  .col {
    margin-right: 1.5rem;
  }
}

.space-y-6 > * + * {
  margin-top: 1.5rem;
}

.section-gap {
  margin-top: 5rem;
}

.leading-normal {
  line-height: 1.5;
}

.muted {
  color: var(--muted);
}

.section-heading {
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.page-head {
  margin-top: 0.5rem;
}

/* Inline links & copy buttons */

.link,
.copy-btn {
  text-decoration: underline;
  text-decoration-color: var(--muted);
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  cursor: pointer;
}

.link:hover,
.link:focus-visible,
.copy-btn:hover,
.copy-btn:focus-visible {
  text-decoration-color: var(--ink);
  outline: none;
}

/* Work & Writing list rows */

.work-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.25rem 0;
  text-decoration: none;
  color: inherit;
}

.row-left {
  min-width: 0;
}

.row-title {
  text-decoration: underline;
  text-decoration-color: var(--muted);
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.work-row:hover .row-title,
.work-row:focus-visible .row-title {
  text-decoration-color: var(--ink);
}

.work-row:focus-visible {
  outline: none;
}

.row-role {
  margin-left: 0.5rem;
  color: var(--muted);
}

.row-meta {
  flex-shrink: 0;
  color: var(--muted);
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Subpage Back link */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  text-decoration: none;
}

.back-label {
  text-decoration: underline;
  text-decoration-color: var(--muted);
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.back-link:hover .back-label,
.back-link:focus-visible .back-label {
  text-decoration-color: var(--ink);
}

.back-link:active,
.back-link:focus-visible {
  color: var(--ink);
  outline: none;
}

/* Prose body (matching prose prose-sm prose-neutral) */

.prose {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
}

.prose p {
  margin: 1.14286em 0;
}

.prose p:first-child {
  margin-top: 0;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose a {
  text-decoration: underline;
  text-decoration-color: var(--muted);
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.prose a:hover,
.prose a:focus-visible {
  text-decoration-color: var(--ink);
  outline: none;
}

.prose em {
  font-style: italic;
}

.prose figure {
  margin: 1.71429em 0;
}

.prose figcaption {
  margin-top: 0.5rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

.prose blockquote {
  margin: 1.5em 0;
  padding-left: 1rem;
  border-left: 2px solid var(--border-subtle);
  font-style: italic;
}

.prose blockquote p {
  margin: 0;
}

.prose blockquote footer {
  margin-top: 0.35rem;
  font-style: normal;
  color: var(--muted);
}

/* Lite YouTube facade */

lite-youtube {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #000;
  cursor: pointer;
  overflow: hidden;
}

lite-youtube::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(
    rgba(0, 0, 0, 0.67) 0%,
    rgba(0, 0, 0, 0.54) 14%,
    rgba(0, 0, 0, 0.15) 54%,
    rgba(0, 0, 0, 0.05) 72%,
    rgba(0, 0, 0, 0) 94%
  );
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

lite-youtube .lyt-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s ease;
}

lite-youtube .lyt-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 68px;
  height: 48px;
  transform: translate(-50%, -50%);
  z-index: 2;
  cursor: pointer;
  filter: grayscale(100%);
  opacity: 0.9;
  transition: filter 0.1s cubic-bezier(0, 0, 0.2, 1), opacity 0.2s ease;
}

lite-youtube:hover .lyt-play,
lite-youtube .lyt-play:focus-visible {
  filter: none;
  opacity: 1;
  outline: none;
}

lite-youtube.lyt-activated {
  cursor: default;
}

lite-youtube.lyt-activated::before,
lite-youtube.lyt-activated .lyt-poster,
lite-youtube.lyt-activated .lyt-play {
  opacity: 0;
  pointer-events: none;
}

lite-youtube iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  z-index: 3;
}

/* Vertical 9:16 grid for Short-Form edits */

.shorts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 1rem;
  margin: 1.71429em 0;
}

.shorts-grid figure {
  margin: 0;
}

.shorts-grid lite-youtube {
  aspect-ratio: 9 / 16;
}

@media (max-width: 440px) {
  .shorts-grid {
    grid-template-columns: 1fr;
  }
}

/* Copy confirmation toast pill */

#toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  z-index: 50;
  transform: translate(-50%, 0.5rem);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  border-radius: 9999px;
  background-color: var(--toast-bg);
  color: #fff;
  padding: 0.5rem 1rem;
  font-size: 0.9375rem;
  line-height: 1.35rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -4px rgba(0, 0, 0, 0.1);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
