:root {
  --bg: #0e0e0e;
  --fg: #e6e6e6;
  --muted: #888;
  --accent: #6ee7b7;
  --line: #262626;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f7f5;
    --fg: #1a1a1a;
    --muted: #777;
    --accent: #0a7a52;
    --line: #e2e2dd;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* page fade transition */
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }
body { animation: pageIn 0.35s ease both; }
body.leaving { animation: none; opacity: 0; transition: opacity 0.3s ease; }
@media (prefers-reduced-motion: reduce) {
  body, body.leaving { animation: none; transition: none; opacity: 1; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "SFMono-Regular", "Menlo", "Consolas", "Liberation Mono",
    "Courier New", monospace;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 600px;
  margin: 0 auto;
  padding: 6vh 24px 12vh;
  text-align: center;
}

.back {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
}
.back:hover { color: var(--accent); }

h1 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 28px 0 24px;
  color: var(--accent);
}
h1::before { content: "# "; color: var(--muted); }

p { margin: 0 auto 14px; max-width: 60ch; }

ul { list-style: none; padding: 0; margin: 0; }
ul li { padding: 4px 0 4px 22px; position: relative; }
ul li::before {
  content: "›";
  position: absolute;
  left: 4px;
  color: var(--accent);
}

a.link {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
}
a.link:hover { color: var(--accent); }

.entry { margin-bottom: 18px; }
.entry .when { color: var(--muted); font-size: 0.82rem; }
.entry .what { margin: 2px 0 0; }

/* numbered "what i'm doing" list -> [1] [2] ... */
.numbered {
  list-style: none;
  padding: 0;
  margin: 28px auto 0;
  max-width: 56ch;
  text-align: left;
  display: inline-block;
  counter-reset: item;
}
.numbered li {
  counter-increment: item;
  position: relative;
  padding: 8px 0 8px 46px;
}
.numbered li::before {
  content: "[" counter(item) "]";
  position: absolute;
  left: 0;
  top: 8px;
  color: var(--accent);
  font-weight: 700;
}

/* resume link under the "what i'm doing" list */
.resume-line { margin-top: 24px; }
.resume-line .arrow { color: var(--accent); font-weight: 700; margin-right: 4px; }

/* symmetric "things i like" grid */
.grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px 30px;
  max-width: 540px;
  margin: 34px auto 0;
}

.thing {
  position: relative;
  display: inline-block;
  width: 150px;
  text-decoration: none;
  color: var(--fg);
  transition: transform 0.15s ease;
}
.thing .num {
  position: absolute;
  top: 7px;
  left: 7px;
  font-size: 0.72rem;
  color: var(--accent);
  background: rgba(0, 0, 0, 0.55);
  border-radius: 4px;
  padding: 0 5px;
}
.thing .thumb {
  width: 150px;
  height: 150px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #1a1a1a center / cover no-repeat;
  background-image: linear-gradient(135deg, #1d1d1d, #2c2c2c);
}
.thing .label {
  margin-top: 9px;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}
/* phrase is hidden on the grid; it only appears in the lightbox */
.thing .phrase { display: none; }
.thing:hover { transform: translateY(-4px) scale(1.03); }
.thing:hover .thumb { border-color: var(--accent); }
.thing:hover .label { color: var(--accent); }

/* full-image lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.88);
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lb-inner { text-align: center; }
.lightbox img {
  display: block;
  margin: 0 auto;
  max-width: 90vw;
  max-height: 78vh;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.lb-cap { margin-top: 14px; }
.lb-title { display: block; color: var(--accent); font-size: 1rem; }
.lb-phrase {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-style: italic;
}

/* key legend footer (shown on every page) */
.keys {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  padding: 12px 16px;
  font-size: 0.74rem;
  color: var(--muted);
  background: linear-gradient(to top, var(--bg) 65%, transparent);
  z-index: 5;
}
.keys span { white-space: nowrap; }
.keys kbd {
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
  margin-right: 5px;
  font-family: inherit;
}
