/* ===== Variables ===== */
:root {
  --bg:        #0d1117;
  --bg-card:   #161b22;
  --bg-hover:  #1c2128;
  --green:     #3fb950;
  --green-dim: #0d2b1a;
  --text:      #e6edf3;
  --muted:     #8b949e;
  --border:    #30363d;
  --mono: 'Courier New', Courier, monospace;
  --sans: Arial, Helvetica, sans-serif;
  --max-w: 860px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 0.5px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.nav-brand:hover { text-decoration: none; }
.nav-hex {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 1px;
}
.nav-sep {
  width: 20px;
  height: 1px;
  background: var(--green);
  flex-shrink: 0;
}
.nav-name {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.5px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}
.nav-links a {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.3px;
  transition: color 0.15s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--green);
  text-decoration: none;
}

/* ===== Hero ===== */
.hero {
  padding: 5rem 1.5rem 4rem;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 3.5rem;
}
.hero-logo img {
  width: 110px;
  height: auto;
}
.hero-tagline {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--green);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.hero-title {
  font-size: 2.6rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.hero-bar {
  width: 100%;
  height: 2px;
  background: var(--green);
  margin-bottom: 1.25rem;
}
.hero-bio {
  font-size: 14px;
  color: var(--muted);
  max-width: 400px;
  line-height: 1.6;
  margin-bottom: 1.75rem;
}
.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  padding: 7px 16px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  transition: all 0.15s;
  cursor: pointer;
  text-decoration: none;
  border: 0.5px solid transparent;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--green);
  color: #0d1117;
  font-weight: 700;
  border-color: var(--green);
}
.btn-primary:hover { background: #4ac261; border-color: #4ac261; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--green); color: var(--green); }

/* ===== Section ===== */
.section {
  padding: 3rem 1.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
}
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 0.5px solid var(--border);
}
.section-title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 3px;
  text-transform: uppercase;
}
.section-more {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--mono);
}
.section-more:hover { color: var(--green); text-decoration: none; }

/* ===== Tags ===== */
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--green);
  background: var(--green-dim);
  border: 0.5px solid rgba(63, 185, 80, 0.25);
  border-radius: 4px;
  padding: 1px 7px;
  letter-spacing: 0.5px;
}

/* ===== Post Card ===== */
.post-list { display: grid; gap: 0.75rem; }
.post-card {
  display: block;
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  padding: 1.1rem 1.4rem;
  transition: border-color 0.15s;
  color: inherit;
  text-decoration: none;
}
.post-card:hover { border-color: var(--green); text-decoration: none; }
.post-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}
.post-date {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.post-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.25rem;
  line-height: 1.4;
}
.post-excerpt {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

/* ===== Project Card ===== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}
.project-card {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  padding: 1.1rem 1.4rem;
  transition: border-color 0.15s;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.project-card:hover { border-color: var(--green); }
.project-name {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
}
.project-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
}
.project-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.25rem; }
.project-links {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 0.5px solid var(--border);
}
.project-link {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--mono);
}
.project-link:hover { color: var(--green); text-decoration: none; }

/* ===== Page Header ===== */
.page-header {
  padding: 3.5rem 1.5rem 2rem;
  max-width: var(--max-w);
  margin: 0 auto;
}
.page-header-pre {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--green);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.page-header-title {
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -1px;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.page-header-desc {
  font-size: 13px;
  color: var(--muted);
}
.page-header-bar {
  height: 0.5px;
  background: var(--border);
  margin-top: 2rem;
}

/* ===== Blog filter ===== */
.tag-filter {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}
.tag-btn {
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 10px;
  border: 0.5px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.tag-btn:hover,
.tag-btn.active {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-dim);
}

/* ===== Post article ===== */
.post-article-header {
  padding: 3rem 1.5rem 2rem;
  max-width: var(--max-w);
  margin: 0 auto;
}
.post-article-title {
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -1px;
  color: var(--text);
  line-height: 1.25;
  margin: 0.75rem 0 1rem;
}
.post-read-time {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.post-divider {
  height: 0.5px;
  background: var(--border);
  max-width: var(--max-w);
  margin: 0 auto 2rem;
}

/* ===== Prose ===== */
.prose {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}
.prose h2 {
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.5px;
  margin: 2.5rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 0.5px solid var(--border);
}
.prose h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green);
  font-family: var(--mono);
  letter-spacing: 0.5px;
  margin: 1.75rem 0 0.5rem;
}
.prose p { margin-bottom: 1rem; }
.prose ul, .prose ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.prose li { margin-bottom: 0.25rem; color: var(--text); }
.prose a { color: var(--green); }
.prose strong { color: var(--text); font-weight: 600; }
.prose em { color: var(--muted); }
.prose code {
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--bg-card);
  color: var(--green);
  padding: 1px 5px;
  border-radius: 3px;
  border: 0.5px solid var(--border);
}
.prose pre {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.25rem 0;
  position: relative;
}
.prose pre .pre-lang {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.prose pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
}
.prose blockquote {
  border-left: 2px solid var(--green);
  padding-left: 1rem;
  margin: 1.25rem 0;
  color: var(--muted);
  font-style: italic;
}
.prose hr { border: none; border-top: 0.5px solid var(--border); margin: 2rem 0; }
.prose img { border-radius: 8px; border: 0.5px solid var(--border); margin: 1.25rem 0; }
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 1.25rem; font-size: 13px; }
.prose th {
  text-align: left;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  color: var(--green);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.prose td { padding: 8px 12px; border: 0.5px solid var(--border); color: var(--muted); }
.post-back {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}
.post-back a {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.post-back a:hover { color: var(--green); }

/* ===== About ===== */
.about-body {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}
.about-bio { margin-bottom: 2.5rem; }
.about-bio p { color: var(--muted); font-size: 14px; line-height: 1.75; margin-bottom: 0.75rem; }
.skills-section { margin-bottom: 2.5rem; }
.skills-section-title {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--green);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 0.5px solid var(--border);
}
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.skill-group-title {
  font-size: 12px;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.skill-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.social-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.social-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  padding: 6px 14px;
  border: 0.5px solid var(--border);
  border-radius: 6px;
  transition: all 0.15s;
}
.social-link:hover { border-color: var(--green); color: var(--green); text-decoration: none; }

/* ===== Resume ===== */
.resume-header {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 2rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.resume-name {
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -1px;
  color: var(--text);
}
.resume-role {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--green);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 0.25rem;
}
.resume-contact {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  text-align: right;
}
.resume-contact a { color: var(--muted); }
.resume-contact a:hover { color: var(--green); }
.resume-divider {
  height: 0.5px;
  background: var(--border);
  max-width: var(--max-w);
  margin: 0 auto 2rem;
}
.resume-body {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}
.resume-section { margin-bottom: 2.5rem; }
.resume-section-title {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--green);
  letter-spacing: 3px;
  text-transform: uppercase;
  padding-bottom: 0.5rem;
  border-bottom: 0.5px solid var(--border);
  margin-bottom: 1.25rem;
}
.resume-entry { margin-bottom: 1.5rem; }
.resume-entry-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.15rem;
}
.resume-entry-title { font-size: 14px; font-weight: 500; color: var(--text); }
.resume-entry-date { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.resume-entry-org { font-family: var(--mono); font-size: 12px; color: var(--green); margin-bottom: 0.5rem; }
.resume-entry-bullets { padding-left: 1.25rem; }
.resume-entry-bullets li { font-size: 13px; color: var(--muted); margin-bottom: 0.2rem; line-height: 1.55; }
.resume-skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.resume-skill-group-title { font-size: 12px; color: var(--text); font-weight: 500; margin-bottom: 0.4rem; }
.resume-skill-list { font-size: 12px; color: var(--muted); font-family: var(--mono); line-height: 1.7; }
.resume-certs { display: grid; gap: 0.5rem; }
.resume-cert {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 6px;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.resume-cert-name { font-size: 13px; color: var(--text); font-weight: 500; }
.resume-cert-meta { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.resume-download-wrap { text-align: center; margin-top: 2rem; padding-top: 2rem; border-top: 0.5px solid var(--border); }

/* ===== Footer ===== */
.footer {
  border-top: 0.5px solid var(--border);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-brand {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.footer-brand span { color: var(--green); }
.footer-links { display: flex; gap: 1.25rem; list-style: none; }
.footer-links a { font-size: 11px; font-family: var(--mono); color: var(--muted); }
.footer-links a:hover { color: var(--green); text-decoration: none; }

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .hero {
    flex-direction: column;
    gap: 1.5rem;
    padding: 3rem 1.5rem 2.5rem;
    text-align: center;
  }
  .hero-bar { width: 80px; margin: 0 auto 1.25rem; }
  .hero-bio { max-width: 100%; }
  .hero-actions { justify-content: center; }
  .hero-title { font-size: 2rem; }
  .nav { padding: 0 1rem; }
  .nav-links { gap: 1rem; }
  .project-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .resume-contact { text-align: left; }
  .resume-header { flex-direction: column; }
}
