/*
 * shots.pablomurad.com: the anemone layout (one mono column, "# " headings,
 * "» " lists, dashed lines) with Catppuccin colors, Latte in light mode and
 * Mocha in dark mode.
 */
:root {
  color-scheme: light dark;
  --bg: #eff1f5;       /* latte base */
  --bg-light: #e6e9ef; /* latte mantle */
  --block: #ccd0da;    /* latte surface0 */
  --text: #4c4f69;     /* latte text */
  --text-light: #6c6f85; /* latte subtext0 */
  --accent: #d20f39;   /* latte red */
  --link: #1e66f5;     /* latte blue */
  --mono: Consolas, Menlo, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1e1e2e;       /* mocha base */
    --bg-light: #181825; /* mocha mantle */
    --block: #313244;    /* mocha surface0 */
    --text: #cdd6f4;     /* mocha text */
    --text-light: #a6adc8; /* mocha subtext0 */
    --accent: #94e2d5;   /* mocha teal */
    --link: #eba0ac;     /* mocha maroon */
  }
}

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

html {
  background: var(--bg);
  scrollbar-color: var(--accent) var(--bg-light);
  scrollbar-width: thin;
}

body {
  display: grid;
  grid-template-columns: 1fr min(47rem, 90%) 1fr;
  grid-template-rows: auto 1fr auto;
  row-gap: .625rem;
  min-height: 100svh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font: 1rem/1.5 var(--mono);
  -webkit-font-smoothing: antialiased;
}
body > * { grid-column: 2; }

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

h1, h2 { margin: .5em 0; line-height: 1.1; font-size: 2rem; overflow-wrap: anywhere; }
h2 { font-size: 1.5rem; }
h1::before, h2::before { content: "# "; color: var(--accent); }

p { margin: 1rem 0; }

a { color: var(--link); text-decoration: none; border-radius: .125rem; }
a:hover, a:focus-visible { color: var(--bg); background: var(--link); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

hr { margin: .5rem 0; border: 0; border-top: 1px dashed var(--accent); }

:not(pre) > code { padding: 0 .2rem; border-radius: 3px; color: var(--bg); background: var(--text); }

pre {
  max-height: 24rem;
  margin: .75rem 0 0;
  padding: .625rem;
  overflow: auto;
  border: 1px solid var(--accent);
  border-radius: 5px;
  background: var(--bg-light);
  font: .8rem/1.5 var(--mono);
  white-space: pre-wrap;
  word-break: break-all;
}

.meta { color: var(--text-light); font-size: .875rem; }

/* header */
.top { display: flex; align-items: center; gap: .6rem; padding-top: 1.25rem; }
.top a { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); font-weight: 700; font-size: 1.25rem; }
.top a:hover, .top a:focus-visible { color: var(--bg); background: var(--text); }
.top img { display: block; }

/* lists: "» " markers that turn into "# " on hover */
.actions { margin: 1rem 0; padding-inline-start: 1.5rem; }
.actions li { margin-bottom: .125rem; }
.actions li::marker { content: "» "; color: var(--accent); }
.actions li:hover::marker { content: "# "; font-weight: 700; color: var(--link); }
.actions button {
  padding: 0;
  font: inherit;
  color: var(--link);
  background: none;
  border: 0;
  border-radius: .125rem;
  cursor: pointer;
}
.actions button:hover, .actions button:focus-visible { color: var(--bg); background: var(--link); }

/* gallery */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 1.25rem;
  margin: 1rem 0;
  padding: 0;
  list-style: none;
}
.grid a { display: block; color: var(--text); }
.grid a:hover, .grid a:focus-visible { color: var(--text); background: none; }
.grid a:hover .name { color: var(--bg); background: var(--link); }
.grid img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  padding: .125rem;
  border: 2px dashed var(--accent);
  border-radius: 15px;
  background: var(--bg-light);
}
.grid .name { display: inline-block; margin-top: .4rem; color: var(--link); overflow-wrap: anywhere; }
.grid .meta { display: block; }

.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem .9rem; margin: 2rem 0 1rem; }
.pager [aria-current] { color: var(--accent); font-weight: 700; }
.pager .gap { color: var(--text-light); }

/* single shot */
.shot-image { display: block; margin: 1rem 0; }
.shot-image:hover, .shot-image:focus-visible { background: none; }
.shot-image img {
  display: block;
  max-width: 100%;
  height: auto;
  padding: .125rem;
  border: 2px dashed var(--accent);
  border-radius: 15px;
}

details { margin: .5rem 0 1rem; }
summary { cursor: pointer; color: var(--link); }
summary::marker { color: var(--accent); }

footer { padding: 1.5rem 0 1rem; border-top: 1px dashed var(--accent); color: var(--text-light); font-size: .875rem; }

@media (max-width: 720px) {
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
  .grid { grid-template-columns: 1fr; }
}
