/* raw, dark, melancholic void theme with classical Times New Roman typography */

:root {
  --bg: #000000;
  --fg: #94949b;
  --fg-bright: #d8d8e0;
  --accent: #7899b2;
  --accent-hover: #131920;
  --border: #1a1a1e;
  --border-dashed: #242428;
  --muted: #62626a;
  --tag-bg: #0b0d10;
  --tag-border: #1a2228;
  --font-times: 'Times New Roman', Times, 'Liberation Serif', 'Tinos', 'DejaVu Serif', serif;
  --font-mono: 'Courier New', Courier, ui-monospace, monospace;
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

::selection {
  background: #1c242e;
  color: #d8e4f0;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-times);
  line-height: 1.65;
  font-size: 16.5px;
  max-width: 780px;
  margin: 44px auto;
  padding: 0 20px 50px;
  position: relative;
  letter-spacing: 0.01em;
}

#snow-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1000;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(120, 153, 178, 0.4);
  text-underline-offset: 3px;
  transition: color 0.15s ease, background 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover {
  color: #f0f0f5;
  background: var(--accent-hover);
  text-decoration-color: var(--accent);
}

h1,
h2,
h3 {
  font-family: var(--font-times);
  font-weight: 700;
  color: var(--fg-bright);
}

h1 {
  font-size: 1.7rem;
  margin-top: 0;
  margin-bottom: 0.25em;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.25rem;
  margin-top: 2.2em;
  margin-bottom: 0.6em;
  color: var(--fg-bright);
  letter-spacing: 0.01em;
}

h3 {
  color: #888892;
  font-size: 1.05rem;
  margin-top: 1.2em;
  margin-bottom: 0.4em;
}

.cursor {
  display: inline-block;
  color: var(--accent);
  opacity: 0.85;
  font-family: var(--font-mono);
  animation: blink 1.3s step-start infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.site-header {
  margin-bottom: 24px;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.site-sub {
  color: var(--muted);
  margin: 6px 0 0;
  font-size: 0.98rem;
  font-style: italic;
}

.snow-btn {
  background: #08080a;
  border: 1px dotted var(--border);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  flex-shrink: 0;
}

.snow-btn:hover {
  color: var(--fg-bright);
  border-color: var(--muted);
}

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

/* Sections */
.section {
  margin-bottom: 30px;
}

p,
ul {
  margin: 10px 0;
}

ul {
  padding-left: 22px;
}

li {
  margin-bottom: 8px;
}

hr {
  border: 0;
  border-top: 1px dashed var(--border-dashed);
  margin: 40px 0 26px;
}

/* Projects */
.project-list {
  list-style: none;
  padding-left: 0;
}

.project-item {
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
  transition: border-left-color 0.15s ease;
}

.project-item:hover {
  border-left-color: var(--accent);
}

.project-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.project-title a {
  color: var(--fg-bright);
  text-decoration: none;
}

.project-title a:hover {
  color: #fff;
  text-decoration: underline;
  background: transparent;
}

.project-tag {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  border: 1px solid var(--tag-border);
  padding: 1px 6px;
  background: var(--tag-bg);
}

.project-desc {
  margin: 4px 0 0 0;
  font-size: 0.95rem;
  color: #808088;
}

/* Hardware tag */
.hw-tag {
  color: #928b7a;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  border: 1px dotted #363228;
  padding: 0 4px;
}

/* Math determinant */
#math-age {
  cursor: help;
  color: var(--fg-bright);
  border-bottom: 1px dotted var(--muted);
  display: inline-block;
  margin-left: 2px;
  padding: 0 2px;
  transition: all 0.15s ease;
}

#math-age:hover {
  color: #ffffff;
  border-bottom-color: var(--accent);
}

/* Friend favicons */
.friend-favicon {
  width: 15px;
  height: 15px;
  vertical-align: -2px;
  margin-right: 6px;
  border-radius: 2px;
  opacity: 0.75;
  filter: grayscale(20%);
  display: inline-block;
  transition: opacity 0.15s ease, filter 0.15s ease;
}

li:hover .friend-favicon {
  opacity: 1;
  filter: grayscale(0%);
}

/* 88x31 Badges Row */
.badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 22px 0 16px;
}

.badges-row a {
  display: inline-block;
  line-height: 0;
  border: 0;
  opacity: 0.65;
  filter: grayscale(35%) contrast(90%);
  transition: opacity 0.2s ease, filter 0.2s ease, transform 0.15s ease;
}

.badges-row a:hover {
  opacity: 1;
  filter: grayscale(0%) contrast(100%);
  transform: translateY(-1px);
  background: transparent;
}

.badges-row img {
  display: block;
  width: 88px;
  height: 31px;
}

/* Footer */
.site-footer {
  margin-top: 24px;
}

code,
kbd,
pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}
