/* =====================================================
   Design Tokens
   ===================================================== */
:root {
  --bg: #0c0c0f;
  --bg-secondary: #141419;
  --bg-card: #18181f;
  --text: #e4e4e7;
  --text-muted: #71717a;
  --accent: #818cf8;
  --accent-dim: rgba(129, 140, 248, 0.1);
  --accent-hover: #a5b4fc;
  --border: #27272a;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --radius: 8px;
  --radius-sm: 4px;
  --max-width: 740px;
  --ease: 0.2s ease;
}

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

/* =====================================================
   Base
   ===================================================== */
html {
  scroll-behavior: smooth;
}

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

/* =====================================================
   Typography
   ===================================================== */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
}

h3 {
  font-size: 1.1rem;
}

p {
  margin-bottom: 1rem;
}

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

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

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

.prose a {
  color: var(--text);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: background-size var(--ease), color var(--ease);
}

.prose a:hover {
  background-size: 100% 1px;
}

code, pre {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

code {
  background: var(--bg-card);
  color: var(--accent);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
}

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.25rem;
}

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

blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 1rem;
}

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

/* =====================================================
   Layout
   ===================================================== */
.wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.page-content {
  flex: 1;
  padding: 3rem 0;
}

/* =====================================================
   Header
   ===================================================== */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 12, 15, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.site-header .wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-title {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text) !important;
  letter-spacing: 0.04em;
  transition: color var(--ease);
}

.site-title::before {
  content: "~/";
  color: var(--accent);
}

.site-title:hover {
  color: var(--text-muted) !important;
}

/* Desktop nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none;
}

.site-nav a.page-link {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted) !important;
  letter-spacing: 0.02em;
  transition: color var(--ease);
}

.site-nav a.page-link:hover {
  color: var(--text) !important;
}

/* Mobile nav */
@media (max-width: 580px) {
  .site-header .wrapper {
    flex-wrap: wrap;
    gap: 0;
  }
  .nav-toggle-label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
  }
  .nav-toggle-label span {
    display: block;
    width: 20px;
    height: 1.5px;
    background: var(--text-muted);
    transition: all var(--ease);
  }
  .nav-toggle:checked ~ .site-nav {
    display: flex;
  }
  .site-nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
    padding: 1rem 0 0.5rem;
    border-top: 1px solid var(--border);
    margin-top: 1rem;
  }
}
/* =====================================================
   Footer
   ===================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
}

.site-footer .wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.footer-links a {
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: color var(--ease);
}

.footer-links a:hover {
  color: var(--text);
}

/* =====================================================
   Home Page
   ===================================================== */
.home {
  display: flex;
  flex-direction: column;
  gap: 5rem;
}

/* --- Terminal Hero --- */
.terminal-window {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-red {
  background: #ff5f57;
}

.dot-yellow {
  background: #febc2e;
}

.dot-green {
  background: #28c840;
}

.terminal-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 0 auto;
}

.terminal-body {
  padding: 1.5rem 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.9;
}

.terminal-body p {
  margin: 0;
}

.prompt {
  color: var(--accent);
  user-select: none;
  margin-right: 0.5rem;
}

.output {
  color: var(--text-muted);
  padding-left: 1.5rem;
}

.output-em {
  color: var(--text);
  padding-left: 1.5rem;
}

.cursor {
  display: inline-block;
  color: var(--accent);
  animation: blink 1.1s step-start infinite;
}

@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}
/* --- Section Labels --- */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* --- About Section --- */
.about-body {
  font-size: 1.05rem;
  color: var(--text);
  max-width: 58ch;
  line-height: 1.8;
}

.about-body p {
  margin-bottom: 0.75rem;
}

/* --- Projects Grid --- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease);
}

.project-card:hover {
  border-color: rgba(129, 140, 248, 0.5);
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(129, 140, 248, 0.08);
}

.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.project-name {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
}

.project-link-icon {
  color: var(--text-muted) !important;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  transition: color var(--ease) !important;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.project-link-icon:hover {
  color: var(--accent) !important;
}

.project-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
  margin: 0;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(129, 140, 248, 0.18);
  padding: 0.12em 0.55em;
  border-radius: 3px;
  letter-spacing: 0.02em;
}

/* =====================================================
   Blog Page
   ===================================================== */
.post-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-list li {
  border-bottom: 1px solid var(--border);
  padding: 1.75rem 0;
}

.post-list li:first-child {
  padding-top: 0;
}

.post-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 0.4rem;
}

.post-link {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--text) !important;
  display: block;
  transition: color var(--ease) !important;
}

.post-link:hover {
  color: var(--accent) !important;
}

.post-list-heading {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.blog-empty {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  line-height: 1.9;
}

.blog-empty .hint {
  display: block;
  font-size: 0.75rem;
  margin-top: 0.5rem;
  color: #3f3f46;
}

/* =====================================================
   Blog Post
   ===================================================== */
.post-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

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

.post-header .post-meta {
  display: block;
}

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

.post-content h3 {
  margin: 1.5rem 0 0.75rem;
}

.post-content p {
  margin-bottom: 1.1rem;
}

/* =====================================================
   404 Page
   ===================================================== */
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  padding: 2rem 0;
}

.error-terminal {
  font-family: var(--font-mono);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  max-width: 480px;
  width: 100%;
  line-height: 2;
  font-size: 0.9rem;
}

.error-terminal p {
  margin: 0;
}

.err {
  color: #f87171;
}

.path {
  color: var(--text-muted);
}

/* =====================================================
   Fade-in Scroll Animation
   ===================================================== */
.fade-in {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =====================================================
   Responsive
   ===================================================== */
@media (max-width: 580px) {
  .page-content {
    padding: 2rem 0;
  }
  .home {
    gap: 3.5rem;
  }
  .project-grid {
    grid-template-columns: 1fr;
  }
  .site-footer .wrapper {
    flex-direction: column;
    align-items: flex-start;
  }
  .terminal-body {
    font-size: 0.8rem;
    padding: 1.25rem;
  }
}

/*# sourceMappingURL=main.css.map */