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

body {
  font-family: 'Courier New', Courier, monospace;
  font-size: 17px;
  line-height: 1.75;
  color: #ffffff;
  background: #1a1a14;
}

/* ============================================================
   Layout
   ============================================================ */
.site-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: #111109;
  border-right: 1px solid #3a3a28;
  color: #a8a87a;
  padding: 2rem 1.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar .site-title {
  font-size: 1rem;
  font-weight: bold;
  color: #c8c87a;
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sidebar .tagline {
  font-size: 0.75rem;
  color: #5a5a42;
  margin-bottom: 2rem;
  letter-spacing: 0.03em;
}

.sidebar nav ul {
  list-style: none;
}

.sidebar nav ul li {
  margin-bottom: 0.25rem;
}

.sidebar nav ul li a {
  color: #8a8a62;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.25rem 0.4rem;
  display: block;
  letter-spacing: 0.03em;
  transition: color 0.1s;
}

.sidebar nav ul li a::before {
  content: '  ';
}

.sidebar nav ul li a:hover {
  color: #c8c87a;
}

.sidebar nav ul li a.active {
  color: #6aaf6a;
}

.sidebar nav ul li a.active::before {
  content: '> ';
}

.sidebar-rss {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #2a2a1e;
}

.sidebar-rss .rss-link {
  font-size: 0.8rem;
  color: #5a5a42;
  text-decoration: none;
  border-bottom: none;
  letter-spacing: 0.03em;
  transition: color 0.1s;
}

.sidebar-rss .rss-link::before {
  content: '~$ ';
  color: #6aaf6a;
}

.sidebar-rss .rss-link:hover {
  color: #c8c87a;
}

.content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 3rem 2rem;
}

.content {
  width: 80%;
}

/* ============================================================
   Typography
   ============================================================ */
h1 {
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
  color: #c8c87a;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h2 {
  font-size: 1.2rem;
  margin: 2rem 0 0.5rem;
  color: #b0b07a;
  letter-spacing: 0.03em;
}

h3 {
  font-size: 1rem;
  margin: 1.5rem 0 0.4rem;
  color: #a0a06a;
}

p {
    margin-bottom: 1.2rem;
}

a {
  color: #6aaf6a;
  text-decoration: none;
  border-bottom: 1px solid #3a6a3a;
  transition: color 0.1s, border-color 0.1s;
}

a:hover {
  color: #8acf8a;
  border-bottom-color: #6aaf6a;
}

hr {
  border: none;
  border-top: 1px solid #3a3a28;
  margin: 2rem 0;
}

code {
  background: #0e0e0a;
  border: 1px solid #3a3a28;
  padding: 0.1em 0.4em;
  font-size: 0.9em;
  color: #8acf8a;
}

pre {
  background: #0e0e0a;
  border: 1px solid #3a3a28;
  border-left: 3px solid #6aaf6a;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

pre code {
  background: none;
  border: none;
  padding: 0;
}

blockquote {
  border-left: 3px solid #5a5a42;
  padding: 0.5rem 1rem;
  margin: 1.5rem 0;
  color: #8a8a6a;
  font-style: italic;
}

/* ============================================================
   Tag filter submenu
   ============================================================ */
.tag-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 1.25rem 0 1.75rem;
  padding: 0.75rem 1rem;
  background: #111109;
  border: 1px solid #2a2a1e;
  border-left: 3px solid #3a3a28;
  font-size: 0.82rem;
}

.tag-filter-label {
  color: #6aaf6a;
  letter-spacing: 0.05em;
  margin-right: 0.25rem;
  user-select: none;
}

.tag-filter-item {
  color: #5a5a42;
  text-decoration: none;
  border: 1px solid #2a2a1e;
  border-bottom: 1px solid #2a2a1e;
  padding: 0.15em 0.55em;
  border-radius: 2px;
  letter-spacing: 0.03em;
  transition: color 0.1s, border-color 0.1s;
}

.tag-filter-item::before {
  content: '#';
  color: #3a5a3a;
}

.tag-filter-item--all::before {
  content: '';
}

.tag-filter-item:hover {
  color: #c8c87a;
  border-color: #5a5a42;
}

.tag-filter-item--active,
.tag-filter-item--all {
  color: #6aaf6a;
  border-color: #3a6a3a;
}

/* ============================================================
   Post list
   ============================================================ */
.post-list {
  list-style: none;
  margin-top: 1rem;
}

.post-list li {
  display: flex;
  gap: 1.5rem;
  align-items: baseline;
  padding: 0.4rem 0;
  border-bottom: 1px solid #2a2a1e;
}

.post-date {
  font-size: 0.8rem;
  color: #5a5a42;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.post-list-item {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
}

.post-list-meta {
  display: flex;
  gap: 1.5rem;
  align-items: baseline;
  width: 100%;
}

.post-list-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding-left: 1.1rem;
}

.post-tag {
  font-size: 0.75rem;
  color: #5a5a42;
  text-decoration: none;
  border: none;
  letter-spacing: 0.03em;
  transition: color 0.1s;
}

.post-tag:hover {
  color: #6aaf6a;
  border: none;
}

/* ============================================================
   Article (blog post)
   ============================================================ */
.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

article.post time.post-date {
  font-size: 0.85rem;
  color: #5a5a42;
  letter-spacing: 0.03em;
}

article.post time.post-date::before {
  content: 'date: ';
  color: #6aaf6a;
}

article.post .post-list-tags {
  padding-left: 0;
}

article.post p,
article.page p {
  margin-bottom: 1.2rem;
}

article.post h2,
article.page h2 {
  margin-top: 2rem;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  text-align: left;
  padding: 1.5rem 0;
  font-size: 0.8rem;
  color: #3a3a28;
  border-top: 1px solid #2a2a1e;
  width: 100%;
  margin-top: auto;
  letter-spacing: 0.03em;
}

.site-footer::before {
  content: '-- ';
  color: #5a5a42;
}

/* ============================================================
   Banner
   ============================================================ */
.site-banner {
  line-height: 0;
  width: 1198px;
  height: 220px;
  overflow: hidden;
}

.banner-gif {
  display: block;
  width: 1198px;
  height: 502px;
  object-fit: cover;
  object-position: center center;
  margin-top: calc((220px - 502px) / 2);
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding: 1.5rem 0 2rem;
  border-bottom: 1px solid #2a2a1e;
  margin-bottom: 2.5rem;
}

.hero-prompt {
  font-size: 0.9rem;
  color: #5a5a42;
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}

.prompt-symbol {
  color: #6aaf6a;
  user-select: none;
}

.hero-typed {
  color: #c8c87a;
}

.hero-typed.typing::after {
  content: '_';
  animation: blink 0.7s step-end infinite;
}

.hero-typed.done::after {
  content: '_';
  animation: blink 0.7s step-end infinite;
  opacity: 0.4;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero-name {
  font-size: 2.2rem;
  color: #c8c87a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
}

.hero-name::before { content: none; }

.hero-bio {
  color: #8a8a6a;
  font-size: 1rem;
  margin-bottom: 0;
}

/* ============================================================
   Projects
   ============================================================ */
.projects-section {
  margin-bottom: 3rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.1rem 1.25rem;
  background: #111109;
  border: 1px solid #2a2a1e;
  border-left: 3px solid #3a3a28;
  text-decoration: none;
  border-bottom: none;
  color: inherit;
  transition: border-left-color 0.15s, background 0.15s;
  cursor: pointer;
}

.project-card:hover {
  background: #0e0e0b;
  border-left-color: #6aaf6a;
  color: inherit;
}

.project-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.project-name {
  font-size: 1rem;
  color: #c8c87a;
  letter-spacing: 0.03em;
}

.project-status {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15em 0.5em;
  border: 1px solid;
  border-radius: 2px;
  white-space: nowrap;
  font-family: 'Courier New', monospace;
}

.project-status--active   { color: #6aaf6a; border-color: #3a6a3a; }
.project-status--wip      { color: #c8a84a; border-color: #6a5a2a; }
.project-status--archived { color: #5a5a42; border-color: #3a3a28; }

.project-description {
  font-size: 0.88rem;
  color: #8a8a6a;
  line-height: 1.6;
  margin-bottom: 0;
  flex: 1;
}

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

.project-tag {
  font-size: 0.72rem;
  color: #5a5a42;
  letter-spacing: 0.04em;
  padding: 0.1em 0.4em;
  border: 1px solid #2a2a1e;
  border-radius: 2px;
}

.project-tag::before {
  content: '#';
  color: #3a5a3a;
}

/* ============================================================
   Recent posts section (homepage)
   ============================================================ */
.recent-posts-section {
  margin-bottom: 2rem;
}

/* ============================================================
   Responsive — sidebar collapses above content on small screens
   ============================================================ */
@media (max-width: 700px) {
  .site-wrapper {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    padding: 1rem 1.5rem;
    border-right: none;
    border-bottom: 1px solid #3a3a28;
  }

  .sidebar nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
  }

  .sidebar .tagline {
    display: none;
  }

  .content-area {
    padding: 1.5rem 1rem;
  }


}
