/* ── Local fonts ────────────────────────────────────────── */
/* Download woff2 files from:
   https://github.com/JetBrains/JetBrainsMono/releases/latest
   -> Assets -> JetBrainsMono-X.X.X.zip -> fonts/webfonts/
   Copy these files into your fonts/ folder:
     JetBrainsMono-Light.woff2
     JetBrainsMono-Regular.woff2
     JetBrainsMono-Medium.woff2
     JetBrainsMono-Bold.woff2
*/

@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/JetBrainsMono-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/JetBrainsMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/JetBrainsMono-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/JetBrainsMono-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ── Variables ─────────────────────────────────────────── */
:root {
  --bg:           #0d0d0d;
  --bg2:          #141414;
  --bg3:          #1a1a1a;
  --border:       #2a2a2a;
  --text:         #e8e8e8;
  --text-muted:   #666;
  --text-dim:     #444;
  --accent:       #4af08a;
  --card-bg:      #111;
  --card-border:  #222;
  --prompt-user:  #4af08a;
  --prompt-host:  #888;
}

[data-theme="light"] {
  --bg:           #f5f5f0;
  --bg2:          #eeede8;
  --bg3:          #e8e7e2;
  --border:       #d0cfc8;
  --text:         #1a1a1a;
  --text-muted:   #666;
  --text-dim:     #999;
  --accent:       #1a7a3c;
  --card-bg:      #fafaf7;
  --card-border:  #ddddd8;
  --prompt-user:  #1a7a3c;
  --prompt-host:  #888;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Base ───────────────────────────────────────────────── */
body {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.6;
  transition: background 0.2s, color 0.2s;
  padding-bottom: 80px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

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

/* ── Layout ─────────────────────────────────────────────── */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

.page {
  padding-top: 48px;
  padding-bottom: 32px;
}

/* ── Browser chrome wrapper ─────────────────────────────── */
/*
  Usage in HTML:

  <div class="browser">
    <div class="browser-bar">
      <div class="browser-dots">
        <div class="browser-dot"></div>
        <div class="browser-dot"></div>
        <div class="browser-dot"></div>
      </div>
      <div class="browser-url">svir0x.dev</div>
    </div>
    <main class="container page">
      ...your content...
    </main>
  </div>
*/

.browser {
  max-width: 960px;
  margin: 32px auto 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card-bg);
  box-shadow: 0 0 0 1px var(--border);
}

.browser-bar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.browser-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.browser-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1px solid var(--border);
}

.browser-url {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: inherit;
}

.browser > .container {
  padding: 40px 48px 60px;
}

.browser > .container.page {
  padding-top: 40px;
}

@media (max-width: 640px) {
  .browser {
    margin: 12px;
    border-radius: 8px;
  }
  .browser > .container {
    padding: 24px 20px 40px;
  }
}

/* ── Terminal prompt ────────────────────────────────────── */
.prompt {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  cursor: pointer;
}

a.prompt:hover .user,
a.prompt:hover .host {
  opacity: 0.75;
  transition: opacity 0.15s;
}

a.prompt {
  position: relative;
}

a.prompt::after {
  content: 'homepage';
  font-size: 11px;
  color: var(--text-dim);
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  padding-right: 10px;
  opacity: 0;
  transition: opacity 0.15s;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

a.prompt:hover::after {
  opacity: 1;
}

.prompt .user   { color: var(--prompt-user); }
.prompt .host   { color: var(--prompt-host); }

.cursor {
  display: inline-block;
  width: 10px;
  height: 16px;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 1.1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── Hero / Bio ─────────────────────────────────────────── */
.bio-name {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 6px;
}

.bio-tagline {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 40px;
}

/* ── Section label ──────────────────────────────────────── */
.section-label {
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 16px;
}

/* ── Bio text / whoami ──────────────────────────────────── */
.bio-text {
  border-left: 2px solid var(--border);
  padding-left: 20px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 0;
}

/* ── Post card ──────────────────────────────────────────── */
.post-card {
  display: block;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 18px 22px;
  background: var(--bg);
  color: inherit;
  text-decoration: none;
  margin-bottom: 12px;
  transition: border-color 0.15s, background 0.15s;
}

.post-card:hover {
  border-color: var(--accent);
  background: var(--bg2);
}

.post-card:hover .post-card-arrow {
  color: var(--accent);
}

.post-card-title {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.post-card-arrow {
  color: var(--text-dim);
  flex-shrink: 0;
  transition: color 0.15s;
}

.post-card-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.post-card-meta .date {
  color: var(--accent);
}

/* ── About page ─────────────────────────────────────────── */
.about-block {
  max-width: 560px;
}

.about-block h2 {
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 12px;
  margin-top: 32px;
}

.about-block h2:first-child { margin-top: 0; }

.about-block p {
  font-size: 14px;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 8px;
}

.skill-list {
  list-style: none;
  margin: 8px 0 16px;
}

.skill-list li {
  font-size: 13px;
  color: var(--text-muted);
  padding: 3px 0;
}

.skill-list li::before {
  content: '// ';
  color: var(--accent);
}

/* ── PGP page ────────────────────────────────────────────── */
.pgp-label {
  color: var(--accent);
  font-size: 12px;
  margin-bottom: 8px;
}

.pgp-block {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px;
  font-size: 12px;
  color: var(--text-muted);
  word-break: break-all;
  line-height: 1.7;
  max-width: 600px;
}

.copy-btn {
  font-family: inherit;
  font-size: 12px;
  padding: 6px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 4px;
  cursor: pointer;
  margin-top: 12px;
  transition: border-color 0.15s, color 0.15s;
}

.copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Bottom navigation ──────────────────────────────────── */
.site-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  z-index: 100;
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.nav-logo {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.nav-logo span {
  color: var(--text-muted);
  font-weight: 300;
}

.nav-logo {
  position: relative;
}

.nav-logo::after {
  content: 'homepage';
  font-size: 11px;
  color: var(--text-dim);
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  padding-right: 10px;
  opacity: 0;
  transition: opacity 0.15s;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.nav-logo:hover::after {
  opacity: 1;
}

/* tilde ~ tooltip */
.nav-links li:has(a[href="index.html"]),
.nav-links li:has(a[href="../index.html"]) {
  position: relative;
}

.nav-links a[href="index.html"]::after,
.nav-links a[href="../index.html"]::after {
  content: 'homepage';
  font-size: 11px;
  color: var(--text-dim);
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  padding-right: 8px;
  opacity: 0;
  transition: opacity 0.15s;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.nav-links a[href="index.html"]:hover::after,
.nav-links a[href="../index.html"]:hover::after {
  opacity: 1;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 24px;
}

.nav-links a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--accent);
}

/* ── Theme toggle ───────────────────────────────────────── */
.theme-bar {
  display: flex;
  gap: 8px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.theme-btn {
  font-family: inherit;
  font-size: 13px;
  padding: 6px 16px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  transition: all 0.15s;
}

.theme-btn.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* ── Post article page ──────────────────────────────────── */
.post-header {
  margin-bottom: 40px;
}

.post-header h1 {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.post-header .post-card-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.post-body {
  max-width: 640px;
}

.post-body p {
  font-size: 14px;
  line-height: 1.9;
  color: var(--text);
  margin-bottom: 20px;
}

.post-body h2 {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 36px 0 12px;
}

.post-body code {
  font-family: inherit;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 13px;
  color: var(--accent);
}

.post-body pre {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px;
  overflow-x: auto;
  margin-bottom: 20px;
}

.post-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.7;
}

.post-body ul,
.post-body ol {
  padding-left: 0;
  list-style: none;
  margin-bottom: 20px;
}

.post-body ul li::before {
  content: '// ';
  color: var(--accent);
}

.post-body ul li,
.post-body ol li {
  font-size: 14px;
  color: var(--text-muted);
  padding: 3px 0;
  line-height: 1.7;
}

.post-body blockquote {
  border-left: 2px solid var(--border);
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 20px;
}