/* ========================================
   Hugo Coder — Minimalist Style
   ======================================== */

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

:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --accent: #2d7ee7;
  --border: #e0e0e0;
  --font: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", "Consolas", "Courier New", monospace;
  --font-heading: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", "Consolas", "Courier New", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1a1a;
    --text: #e0e0e0;
    --muted: #999;
    --accent: #6ab0f3;
    --border: #333;
  }
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: transparent;
  transition: text-decoration-color 150ms;
}

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

/* ========================================
   Header & Navigation
   ======================================== */

.header {
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
}

.nav {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}

.nav-logo:hover {
  text-decoration: underline;
  text-decoration-color: var(--text);
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 1.25rem;
}

.nav-menu a {
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--muted);
  transition: color 150ms;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--text);
}

/* ========================================
   Main Content
   ======================================== */

.main {
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  flex: 1;
}

/* ========================================
   Hero (avatar + name + bio)
   ======================================== */

.hero {
  text-align: center;
  margin-bottom: 3rem;
}

.hero-avatar {
  margin-bottom: 1rem;
}

.hero-avatar img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.hero-name {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.hero-bio {
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 1rem;
  line-height: 1.6;
}

.hero-title {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.hero-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-social a {
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: transparent;
}

.hero-social a:hover {
  text-decoration-color: var(--accent);
}

/* ========================================
   Content Lists (posts, sections)
   ======================================== */

.content-list {
  margin-bottom: 2.5rem;
}

.content-list h2 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--text);
  letter-spacing: -0.02em;
}

.content-item {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.content-item:last-child {
  border-bottom: none;
}

.content-date {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 5.5rem;
}

.content-title {
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--text);
  transition: color 150ms;
}

.content-title:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* Publications */

.pub-year {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 3.5rem;
}

.pub-body {
  flex: 1;
}

.pub-title {
  font-size: 0.9rem;
  line-height: 1.5;
}

.pub-venue {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.15rem;
  line-height: 1.4;
}

.content-more {
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

.content-more a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: transparent;
}

.content-more a:hover {
  text-decoration-color: var(--accent);
}

/* Block-style content items (for about page) */

.content-item-block {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.content-item-block:last-child {
  border-bottom: none;
}

.content-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.3rem;
}

.content-item-header strong {
  font-size: 0.95rem;
}

.content-desc {
  font-size: 0.85rem;
  color: var(--text);
  margin-top: 0.2rem;
}

.content-desc.muted {
  color: var(--muted);
}

/* ========================================
   Lifestyle Section
   ======================================== */

.lifestyle-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.lifestyle-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
}

.lifestyle-item:last-child {
  border-bottom: none;
}

.lifestyle-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  line-height: 1.5;
}

.lifestyle-item h3 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.1rem;
}

.lifestyle-item p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ========================================
   Blog Post (single)
   ======================================== */

.blog-single {
  max-width: 700px;
}

.blog-back {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  text-decoration: none;
}

.blog-back:hover {
  color: var(--text);
}

.blog-single h1 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.blog-meta-line {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.blog-single-content {
  line-height: 1.85;
  font-size: 0.95rem;
}

.blog-single-content p {
  margin-bottom: 1.25rem;
}

.blog-single-content h2,
.blog-single-content h3,
.blog-single-content h4 {
  font-family: var(--font-heading);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.blog-single-content h2 {
  font-size: 1.35rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border);
}

.blog-single-content h3 {
  font-size: 1.1rem;
  color: var(--accent);
}

.blog-single-content h4 {
  font-size: 1rem;
}

/* Bold / strong */
.blog-single-content strong {
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Inline code */
.blog-single-content code {
  font-family: var(--font);
  font-size: 0.82em;
  background: #f0f0f0;
  padding: 0.18em 0.45em;
  border-radius: 4px;
  word-break: break-word;
}

@media (prefers-color-scheme: dark) {
  .blog-single-content code {
    background: #2a2a2a;
  }
}

/* Code blocks (fenced) */
.blog-single-content pre {
  background: #f6f6f6;
  padding: 1.2rem 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.82rem;
  line-height: 1.65;
  border: 1px solid var(--border);
}

.blog-single-content pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
  word-break: normal;
}

@media (prefers-color-scheme: dark) {
  .blog-single-content pre {
    background: #1e1e1e;
  }
}

/* Images */
.blog-single-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.8rem auto 0.4rem;
  border-radius: 6px;
  border: 1px solid var(--border);
}

/* Image caption (em tag right after img) */
.blog-single-content img + em,
.blog-single-content p > em:first-child {
  display: block;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  font-style: normal;
  margin-top: 0.3rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.blog-single-content em {
  font-style: italic;
}

/* Blockquotes */
.blog-single-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 0.8rem 1rem 0.8rem 1.2rem;
  margin: 1.5rem 0;
  background: rgba(45, 126, 231, 0.04);
  border-radius: 0 4px 4px 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.blog-single-content blockquote p:last-child {
  margin-bottom: 0;
}

@media (prefers-color-scheme: dark) {
  .blog-single-content blockquote {
    background: rgba(106, 176, 243, 0.06);
  }
}

/* Lists */
.blog-single-content ul,
.blog-single-content ol {
  margin: 0.8rem 0 1.2rem;
  padding-left: 1.6rem;
}

.blog-single-content li {
  margin-bottom: 0.45rem;
  line-height: 1.7;
}

.blog-single-content li:last-child {
  margin-bottom: 0;
}

.blog-single-content li > ul,
.blog-single-content li > ol {
  margin: 0.3rem 0;
}

.blog-single-content ul ul {
  list-style: circle;
}

/* Links */
.blog-single-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.blog-single-content a:hover {
  opacity: 0.8;
}

/* Horizontal rule */
.blog-single-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* Tables */
.blog-single-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.82rem;
  border: 1px solid var(--border);
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.blog-single-content thead {
  border-bottom: 2px solid var(--text);
  background: rgba(0,0,0,0.02);
}

.blog-single-content th {
  font-family: var(--font-heading);
  font-weight: 700;
  text-align: left;
  padding: 0.65rem 0.6rem;
  white-space: nowrap;
  font-size: 0.8rem;
}

.blog-single-content td {
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.blog-single-content tbody tr:nth-child(even) {
  background: rgba(0,0,0,0.015);
}

.blog-single-content tbody tr:last-child td {
  border-bottom: none;
}

.blog-single-content tbody tr:hover {
  background: rgba(0,0,0,0.035);
}

@media (prefers-color-scheme: dark) {
  .blog-single-content thead {
    background: rgba(255,255,255,0.04);
  }
  .blog-single-content tbody tr:nth-child(even) {
    background: rgba(255,255,255,0.02);
  }
  .blog-single-content tbody tr:hover {
    background: rgba(255,255,255,0.04);
  }
}

/* Highlighted text (==text== in markdown) */
.blog-single-content mark {
  background: #fff3cd;
  color: inherit;
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

@media (prefers-color-scheme: dark) {
  .blog-single-content mark {
    background: #3a3220;
  }
}
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--muted);
}

.blog-single-tags span {
  color: var(--muted);
}

/* Blog list page */
.blog-container {
  max-width: 700px;
}

.blog-header {
  margin-bottom: 2rem;
}

.blog-kicker {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.blog-header h1 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
}

.blog-intro {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.blog-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 1rem;
}

.blog-featured article {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem;
  margin-bottom: 2rem;
}

.blog-featured h2 {
  margin: 0.5rem 0;
}

.blog-featured h2 a {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  text-decoration: none;
}

.blog-featured h2 a:hover {
  color: var(--accent);
}

.blog-excerpt {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}

.blog-readmore {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text);
}

.blog-list-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--text);
  margin-bottom: 0;
}

.blog-list-head h3 {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.blog-list-head span {
  font-size: 0.8rem;
  color: var(--muted);
}

.blog-item {
  display: flex;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.blog-item-meta {
  flex-shrink: 0;
}

.blog-side-date {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

.blog-item-body h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.blog-item-body h2 a {
  text-decoration: none;
}

.blog-item-body h2 a:hover {
  color: var(--accent);
}

.blog-item-excerpt {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.blog-item-foot {
  margin-top: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.blog-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ========================================
   Footer
   ======================================== */

.footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 600px) {
  .nav {
    flex-direction: column;
    gap: 0.75rem;
  }

  .hero-avatar img {
    width: 90px;
    height: 90px;
  }

  .hero-name {
    font-size: 1.3rem;
  }

  .content-item {
    flex-direction: column;
    gap: 0.15rem;
  }

  .content-date {
    min-width: auto;
  }

  .blog-item {
    flex-direction: column;
    gap: 0.15rem;
  }

  .blog-single h1 {
    font-size: 1.4rem;
  }
}

/* ========================================
   Print
   ======================================== */

@media print {
  .header, .footer { display: none; }
  body { background: white; color: black; }
}
