/*
Theme Name: Metro
Theme URI: https://example.com/metro
Author: metro
Description: a flat, square blog theme. solid colour tiles, light type, no shadows, no gradients, one accent.
Version: 1.3.9
License: MIT
Text Domain: metro
Tags: blog, flat, minimal, dark
*/

/* Windows 8 "Metro" look: flat, square, solid colour, light type, no shadows or gradients. */
:root {
  --bg: #1d1d1d;
  --fg: #ffffff;
  --muted: #a3a3a3;
  --panel: #2b2b2b;
  --panel2: #3a3a3a;
  --line: #4d4d4d;
  --accent: #26a1db;
  --accent-fg: #ffffff;
  --bar: #000000;
  --bar-fg: #ffffff;
  --c-btn: #4a4a4a;
  --c-btn-h: #5b5b5b;
  --c-press: #ffffff;
  --c-press-fg: #000000;
  --font: "Segoe UI", "Selawik", "Open Sans", "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
  border-radius: 0;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
h4 {
  font-family: "Segoe UI Light", "Segoe UI", "Selawik", "Open Sans", "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  height: 36px;
  padding: 0 16px;
  border: 0;
  background: var(--accent);
  color: var(--accent-fg);
  font: 600 14px/1 var(--font);
  cursor: pointer;
  user-select: none;
}

.btn:hover {
  background: var(--c-btn-h);
  color: var(--fg);
  text-decoration: none;
}

.btn:active {
  background: var(--c-press);
  color: var(--c-press-fg);
}

.btn.primary {
  background: var(--accent);
  color: var(--accent-fg);
}

/* ---- top bar ---- */
#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header.top {
  background: var(--bar);
  color: var(--bar-fg);
  padding: 10px 20px 8px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.sp {
  flex: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.logo {
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: var(--accent-fg);
  display: grid;
  place-items: center;
  font-weight: 300;
  font-size: 22px;
  flex: none;
}

.brand .bt {
  font-family: "Segoe UI Light", "Segoe UI", "Selawik", "Open Sans", sans-serif;
  font-size: 30px;
  font-weight: 300;
  letter-spacing: -0.3px;
  line-height: 1;
  text-transform: lowercase;
  position: relative;
  top: -0.09em;
  color: #fff;
}

/* back button: a thin ring with a heavy arrow, in front of the brand */
.circle {
  position: relative;
  flex: none;
  box-sizing: border-box;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  display: grid;
  place-items: center;
}

.circle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: square;
}

.circle:hover {
  background: rgba(255, 255, 255, 0.22);
  text-decoration: none;
}

header.top .back {
  margin-right: 14px;
  animation: backrise 1.1s var(--ease) both;
}

@keyframes backrise {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* ---- page frame ---- */
main {
  flex: 1;
  padding: 40px 24px 60px;
}

.col {
  max-width: 980px;
  margin: 0 auto;
}

.sec {
  margin: 40px 0 14px;
  font-size: 26px;
  font-weight: 300;
  color: var(--accent);
  text-transform: lowercase;
}

main .sec:first-child {
  margin-top: 0;
}

/* ---- post feed: one wide flat card per row ---- */
.feed {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin: 8px 0 40px;
}

.pf-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 150px;
  color: #fff;
  transition: transform 0.08s;
}

.pf-card:hover {
  outline: 3px solid var(--fg);
  outline-offset: -3px;
  text-decoration: none;
}

.pf-card:active {
  transform: scale(0.995);
}

.pf-big {
  flex: none;
  width: 150px;
  display: grid;
  place-items: center;
  font: 300 42px/1.2 var(--font);
}

.pf-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.55);
}

.pf-name {
  display: block;
  font: 300 20px/1.2 var(--font);
  text-transform: lowercase;
}

.pf-desc {
  font-size: 13.5px;
  font-weight: 300;
  opacity: 0.85;
}


.pf-card.blue { background: #26a1db; }
.pf-card.blue:hover { outline-color: #fff; }
.pf-card.olive { background: #a4c400; }
.pf-card.plum { background: #6d5fa8; }
.pf-card.teal { background: #1ba1e2; }

/* ---- post page ---- */
.post-page {
  max-width: 640px;
}

.ph-head {
  margin-bottom: 32px;
}

.ph-date {
  display: block;
  font: 300 16px/1 var(--font);
  letter-spacing: 0.5px;
  color: var(--muted);
  text-transform: lowercase;
  margin-bottom: 10px;
}

.ph-head h1 {
  font-size: 52px;
  line-height: 1.05;
  text-transform: lowercase;
}

.ph-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 14px;
}

.ph-tags span {
  padding: 4px 10px;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 12px;
  letter-spacing: 0.3px;
  text-transform: lowercase;
}

.postpage-body {
  font: 300 16.5px/1.55 var(--font);
}

.postpage-body p {
  margin: 0 0 18px;
}

.postpage-body h2 {
  font-size: 28px;
  margin: 32px 0 14px;
  text-transform: lowercase;
  color: var(--accent);
}

.postpage-body ul,
.postpage-body ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

.postpage-body li {
  margin-bottom: 6px;
}

.postpage-body blockquote {
  border-left: 3px solid var(--accent);
  margin: 0 0 18px;
  padding: 2px 0 2px 16px;
  color: var(--muted);
}

.postpage-body code {
  font: 13px ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--panel);
  padding: 2px 6px;
}

.post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 36px;
}

/* ---- footer ---- */
footer {
  background: var(--bar);
  color: var(--bar-fg);
  padding: 14px 24px;
  font-size: 12.5px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 600px) {
  .ph-head h1 {
    font-size: 38px;
  }
  .brand .bt {
    font-size: 24px;
  }
  .pf-big {
    width: 96px;
    font-size: 30px;
  }
}

/* ---- settings button in header ---- */
.cmd {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--c-btn);
  border: none;
  color: var(--fg);
  font: 300 14px/1 var(--font);
  cursor: pointer;
}
.cmd:hover { background: var(--c-btn-h); }
.cmd .ringicon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}
.cmd .ringicon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

/* ---- settings overlay ---- */
.metro-veil {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 20;
  animation: fadein 0.26s ease-out both;
}
.metro-veil.out {
  animation: fadeout 0.22s ease-in both;
  pointer-events: none;
}

.metro-panel {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(560px, 100vw);
  background: var(--bg);
  z-index: 21;
  flex-direction: column;
  animation: flyin 0.55s var(--ease) both;
}
.metro-panel.outro {
  animation: flyout 0.24s cubic-bezier(0.5, 0, 0.9, 0.4) both;
  pointer-events: none;
}

.p-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 28px 14px;
  background: var(--accent);
  color: var(--accent-fg);
  flex: none;
}
.p-head h2 {
  font: 300 40px/1.25 var(--font);
  text-transform: lowercase;
  flex: 1;
}
.p-body {
  padding: 20px 28px 28px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
}
.p-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 12px 28px 18px;
  background: var(--panel);
  flex: none;
}

/* setting rows */
.setrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.setrow:last-child { border-bottom: 0; }
.setrow .k { font-size: 16px; }
.setrow .k small {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
}
.setrow .v {
  font-size: 14px;
  color: var(--muted);
}

/* swatches */
.swatches {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: flex-end;
}
.swatches button {
  width: 28px;
  height: 28px;
  border: 2px solid transparent;
  cursor: pointer;
}
.swatches button:hover { border-color: var(--fg); }
.swatches button.on { border-color: var(--fg); }
.swatches button.on::after {
  content: '✓';
  display: grid;
  place-items: center;
  font-size: 14px;
  color: #fff;
}

/* segmented control */
.seg {
  display: flex;
  gap: 0;
}
.seg button {
  padding: 5px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
.seg button.on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}
.seg button:hover { background: var(--panel2); }
.seg button.on:hover { background: var(--accent); }

/* pop-in animation for rows */
.p-body .pop {
  animation: panelpop 0.5s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 28ms + 60ms);
}

/* keyframes */
@keyframes fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeout {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes flyin {
  from { transform: translateX(100%); }
  to { transform: none; }
}
@keyframes flyout {
  from { transform: none; }
  to { transform: translateX(100%); }
}
@keyframes panelpop {
  from { opacity: 0; transform: translateX(140px); }
  to { opacity: 1; transform: none; }
}

/* article page: slide in from the right on load */
.article-in {
  animation: pagein 0.5s var(--ease) both;
}
@keyframes pagein {
  from { opacity: 0; transform: translateX(60px); }
  to { opacity: 1; transform: none; }
}

/* reverse: slide in from the left (back navigation) */
.article-in-back {
  animation: pagein-back 0.5s var(--ease) both;
}
@keyframes pagein-back {
  from { opacity: 0; transform: translateX(-60px); }
  to { opacity: 1; transform: none; }
}

/* WordPress file block button */
.wp-block-file__button,
.wp-element-button {
  display: inline-block;
  padding: 8px 20px;
  background: var(--accent);
  color: var(--accent-fg);
  border: none;
  font: 300 14px/1.4 var(--font);
  text-decoration: none;
  cursor: pointer;
}
.wp-block-file__button:hover,
.wp-element-button:hover {
  background: var(--c-btn-h);
  color: var(--fg);
}

/* pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 24px 0 8px;
}
.pagination .nav-links {
  display: flex;
  gap: 6px;
}
.pagination a,
.pagination span {
  display: grid;
  place-items: center;
  min-width: 48px;
  height: 48px;
  padding: 0 14px;
  font-size: 18px;
  background: var(--panel);
  color: var(--fg);
  text-decoration: none;
}
.pagination a:hover { background: var(--panel2); }
.pagination .current {
  background: var(--accent);
  color: var(--accent-fg);
}

/* staggered card entrance */
.card-in {
  animation: cardin 0.45s var(--ease) both;
  animation-delay: calc(var(--i) * 60ms);
}
@keyframes cardin {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: none; }
}

/* staggered article entrance */
.stag {
  animation: stagin 0.45s var(--ease) both;
  animation-delay: calc(var(--i) * 100ms);
}
@keyframes stagin {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: none; }
}
