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

:root {
  --bg: #0b0e14;
  --surface: #131a24;
  --border: #232b38;
  --text-primary: #e6e6e6;
  --text-muted: #8b949e;
  --accent: #ff6b35;
  
  --font-mono: "JetBrains Mono", monospace;
  --font-sans: "Inter", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0; padding: 0;
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, .site-logo {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s ease; }
a:hover { text-decoration: underline; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: none;
  font-family: var(--font-sans);
  transition: all 0.2s ease;
  font-size: 0.95rem;
}
.btn-primary {
  background: var(--accent);
  color: #000; /* Dark text for contrast against orange accent */
}
.btn-primary:hover { background: #e55a2b; text-decoration: none; color: #000; }

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.btn-social {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}
.btn-social:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* Newsletter Block */
.newsletter-cta {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2rem;
  border-radius: 8px;
  margin: 2.5rem 0;
  text-align: center;
}
.newsletter-cta h3 { margin-top: 0; font-size: 1.4rem; }
.newsletter-cta p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* Layout */
.container { max-width: 800px; margin: 0 auto; padding: 0 1rem; }
header.site-header { border-bottom: 1px solid var(--border); padding: 1.5rem 0; margin-bottom: 2rem; }
.nav-container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.site-logo { font-size: 1.5rem; color: var(--text-primary); text-decoration: none; }
.site-logo:hover { text-decoration: none; color: var(--accent); }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { color: var(--text-muted); }
.nav-links a:hover { color: var(--text-primary); }

.search-form { display: flex; gap: 0.5rem; }
.search-form input { background: var(--surface); border: 1px solid var(--border); color: var(--text-primary); padding: 0.5rem 0.75rem; border-radius: 4px; font-family: var(--font-sans); font-size: 0.9rem; }
.search-form input:focus { outline: none; border-color: var(--accent); }
.search-form button { background: var(--border); border: none; color: var(--text-primary); padding: 0.5rem 1rem; border-radius: 4px; cursor: pointer; font-family: var(--font-sans); transition: background 0.2s; }
.search-form button:hover { background: var(--accent); color: var(--bg); }

/* Footer */
footer.site-footer { border-top: 1px solid var(--border); padding: 2rem 0; margin-top: 4rem; text-align: center; color: var(--text-muted); font-size: 0.9rem; }
footer .footer-links { margin-top: 0.5rem; display: flex; justify-content: center; gap: 1rem; }

/* Post Cards */
.post-list { display: flex; flex-direction: column; gap: 1.5rem; margin-bottom: 2rem; }
.post-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 1.5rem; transition: transform 0.2s ease, border-color 0.2s ease; }
.post-card:hover { border-color: var(--accent); }
.post-card h3 { margin: 0 0 0.5rem 0; }
.post-card h3 a { color: var(--text-primary); }
.post-card h3 a:hover { color: var(--accent); text-decoration: none; }
.post-date { color: var(--text-muted); font-size: 0.875rem; font-family: var(--font-mono); display: block; margin-bottom: 1rem; }
.post-excerpt { margin: 0 0 1rem 0; color: var(--text-muted); }
.read-more { font-weight: 500; font-size: 0.9rem; }

/* Single Post Content */
.post-content { margin-top: 2rem; }
.post-content h1 { font-size: 2.5rem; margin-bottom: 0.5rem; line-height: 1.2; }
.post-content time { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.9rem; margin-bottom: 2rem; display: block; }
.post-content h2, .post-content h3 { margin-top: 2.5rem; margin-bottom: 1rem; }
.post-content p { margin-bottom: 1.5rem; }
.post-content ul, .post-content ol { margin-bottom: 1.5rem; padding-left: 1.5rem; }
.post-content li { margin-bottom: 0.5rem; }
.post-content pre { background-color: #0d1117 !important; padding: 1em; border-radius: 8px; overflow-x: auto; border: 1px solid var(--border); margin: 1.5rem 0; }
.post-content pre code { font-family: var(--font-mono); font-size: 0.9rem; }
.post-content p code, .post-content li code { background-color: var(--surface); padding: 0.2em 0.4em; border-radius: 4px; font-family: var(--font-mono); font-size: 0.85em; border: 1px solid var(--border); }
.post-content img { max-width: 100%; height: auto; display: block; margin: 1.75rem auto; border-radius: 8px; border: 1px solid #232b38; box-shadow: 0 4px 6px rgba(0,0,0,0.3); }
.post-content figure { margin: 1.75rem 0; }
.post-content figcaption { text-align: center; color: #8b949e; font-size: 0.875rem; margin-top: 0.5rem; }

/* Profile Sections (Index) */
.profile-section { margin-bottom: 3rem; }
.badges img { margin-right: 5px; margin-bottom: 5px; vertical-align: middle; }
.social-buttons { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem; }

@media (max-width: 600px) {
  .nav-container { flex-direction: column; align-items: flex-start; }
  .search-form { width: 100%; }
  .search-form input { flex-grow: 1; }
}
