/* Dark theme, minimal */
:root {
  --bg: #0d0d0d;
  --surface: #1a1a1a;
  --text: #e5e5e5;
  --text-muted: #a3a3a3;
  --accent: #7c9cbf;
  --accent-hover: #9bb8d9;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  margin: 0;
  min-height: 100vh;
}

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

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

/* Layout */
.site-header {
  padding: 1.25rem 0 1rem;
  border-bottom: 1px solid var(--surface);
}

.header-inner {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.site-name {
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--text);
}

.site-name:hover {
  color: var(--accent-hover);
}

.social-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.social-icon {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-icon:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav {
  font-size: 0.95rem;
}

.nav-sep {
  color: var(--text-muted);
  margin: 0 0.5rem;
}

.main {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

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

.site-footer p {
  margin: 0;
}

/* Sections */
section {
  margin-bottom: 3rem;
}

section:last-child {
  margin-bottom: 0;
}

h1, h2, h3 {
  font-weight: 600;
  line-height: 1.3;
  margin-top: 0;
}

h1 { font-size: 1.75rem; }
h2 {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* About */
.about p {
  margin: 0 0 1rem;
}

.about p:last-child {
  margin-bottom: 0;
}

/* Blog list (homepage) */
.blog-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-list li {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--surface);
}

.blog-list li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.blog-list .post-title {
  font-size: 1.125rem;
  margin: 0 0 0.25rem;
}

.blog-list .post-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.blog-list .post-preview {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0;
}

/* Projects carousel */
.projects-carousel-wrap {
  overflow: hidden;
  margin: 0 -1.5rem;
  padding: 0 1.5rem;
}

.projects-carousel {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--surface) var(--bg);
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
}

.projects-carousel::-webkit-scrollbar {
  height: 6px;
}

.projects-carousel::-webkit-scrollbar-track {
  background: var(--bg);
}

.projects-carousel::-webkit-scrollbar-thumb {
  background: var(--surface);
  border-radius: 3px;
}

.project-card {
  flex: 0 0 min(280px, 85vw);
  scroll-snap-align: start;
  background: var(--surface);
  border-radius: 8px;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.project-card h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

.project-card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
  line-height: 1.5;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.project-links a {
  opacity: 0.9;
}

/* Full blog post layout */
.post-header {
  margin-bottom: 1.5rem;
}

.post-header h1 {
  margin-bottom: 0.25rem;
}

.post-date {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.post-content {
  font-size: 1rem;
}

.post-content h2 {
  font-size: 1.25rem;
  color: var(--text);
  margin: 1.5rem 0 0.5rem;
}

.post-content h3 {
  font-size: 1.0625rem;
  margin: 1.25rem 0 0.5rem;
}

.post-content p {
  margin: 0 0 1rem;
}

.post-content ul, .post-content ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}

.post-content pre, .post-content code {
  background: var(--surface);
  border-radius: 4px;
  font-size: 0.9em;
}

.post-content code {
  padding: 0.15em 0.4em;
}

.post-content pre {
  padding: 1rem;
  overflow-x: auto;
  margin: 0 0 1rem;
}

.post-content pre code {
  padding: 0;
  background: none;
}

.post-content blockquote {
  margin: 0 0 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  color: var(--text-muted);
}

/* Contact */
.contact p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.contact-form {
  display: grid;
  gap: 0.75rem;
}

.contact-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.95rem;
}

.label-text {
  display: inline-flex;
  align-items: center;
}

.required {
  color: #f87171;
  margin-left: 0.15rem;
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: var(--surface);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  font: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid rgba(124, 156, 191, 0.5);
  outline-offset: 1px;
}

.contact-form button {
  justify-self: start;
  background: var(--accent);
  color: #0b0b0b;
  border: none;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  cursor: pointer;
}

.contact-form button:hover {
  background: var(--accent-hover);
}

.hidden {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
