/* ============================================================
   emeyva — custom theme
   A dark, warm palette with subtle accent colors.
   ============================================================ */

/* --- Variables ------------------------------------------------ */
:root {
  --bg:        #0f0f0f;
  --bg-raised: #1a1a1a;
  --bg-hover:  #222222;
  --text:      #d4d4d4;
  --text-muted:#888888;
  --accent:    #e8a845;       /* warm gold */
  --accent2:   #5ba3cf;       /* cool blue for links */
  --border:    #2a2a2a;
  --radius:    8px;
  --max-width: 720px;
  --font:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:      'JetBrains Mono', 'Fira Code', monospace;
}

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

html { font-size: 17px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; width: 100%; }

a { color: var(--accent2); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }

img { max-width: 100%; height: auto; border-radius: var(--radius); }

/* --- Header --------------------------------------------------- */
.site-header {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
  backdrop-filter: blur(8px);
  background: rgba(15,15,15,.85);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -.02em;
}
.site-logo:hover { color: var(--text); }

.site-nav { display: flex; gap: 1.75rem; }
.site-nav a {
  color: var(--text-muted);
  font-size: .9rem;
  font-weight: 500;
  position: relative;
  padding-bottom: 2px;
}
.site-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width .25s ease;
}
.site-nav a:hover,
.site-nav a.active { color: var(--text); }
.site-nav a:hover::after,
.site-nav a.active::after { width: 100%; }

/* hamburger */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}

@media (max-width: 600px) {
  .menu-toggle { display: flex; }
  .site-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    gap: .75rem;
  }
  .site-nav.open { display: flex; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* --- Main ----------------------------------------------------- */
.site-main { flex: 1; padding: 3rem 0; }

/* --- Hero (home) ---------------------------------------------- */
.hero {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.hero-greeting {
  font-size: .95rem;
  color: var(--text-muted);
  margin-bottom: .25rem;
}
.hero-name {
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -.03em;
  line-height: 1.15;
}
.hero-tagline {
  margin-top: .5rem;
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* --- Section titles ------------------------------------------- */
.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 1.25rem;
}

/* --- Post list / cards ---------------------------------------- */
.post-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.post-card a {
  display: block;
  padding: 1.25rem 1.5rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .25s, transform .15s;
}
.post-card a:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.post-card time {
  font-size: .8rem;
  color: var(--text-muted);
  font-family: var(--mono);
}
.post-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-top: .25rem;
}
.post-card p {
  font-size: .9rem;
  color: var(--text-muted);
  margin-top: .35rem;
  line-height: 1.5;
}

/* --- Page content --------------------------------------------- */
.page-header { margin-bottom: 2rem; }
.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -.02em;
}
.page-description {
  color: var(--text-muted);
  margin-top: .5rem;
}

.page-content h2 { margin-top: 2rem; margin-bottom: .75rem; font-size: 1.4rem; }
.page-content h3 { margin-top: 1.5rem; margin-bottom: .5rem; font-size: 1.15rem; }
.page-content p { margin-bottom: 1rem; }
.page-content ul, .page-content ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.page-content li { margin-bottom: .35rem; }
.page-content blockquote {
  border-left: 3px solid var(--accent);
  padding: .75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--bg-raised);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
  font-style: italic;
}

/* --- Post (single) -------------------------------------------- */
.post-header { margin-bottom: 2rem; }
.post-header time {
  font-size: .85rem;
  color: var(--text-muted);
  font-family: var(--mono);
}
.post-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-top: .5rem;
  letter-spacing: -.02em;
}
.post-content { margin-bottom: 3rem; }
.post-content p { margin-bottom: 1rem; }
.post-content h2 { margin-top: 2rem; margin-bottom: .75rem; }
.post-content h3 { margin-top: 1.5rem; margin-bottom: .5rem; }
.post-content ul, .post-content ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.post-content li { margin-bottom: .35rem; }
.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: .75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--bg-raised);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
  font-style: italic;
}

.post-footer {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.post-footer a {
  font-weight: 500;
  color: var(--accent);
}

/* --- Code ----------------------------------------------------- */
code {
  font-family: var(--mono);
  font-size: .88em;
  background: var(--bg-raised);
  padding: .15em .4em;
  border-radius: 4px;
}
pre {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}
pre code { background: none; padding: 0; }

/* --- Footer --------------------------------------------------- */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.site-footer p {
  font-size: .85rem;
  color: var(--text-muted);
}
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a {
  font-size: .85rem;
  color: var(--text-muted);
  font-weight: 500;
}
.footer-links a:hover { color: var(--accent); }

/* --- 404 ------------------------------------------------------ */
.container h1:only-child { text-align: center; margin-top: 4rem; font-size: 4rem; color: var(--accent); }

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

/* --- Scrollbar ------------------------------------------------ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
