:root {
  --black: #0d0d0d;
  --white: #fdfcf8;
  --text: #111111;
  --muted: #666666;
  --border: #e5e5e5;
  --lime: #2e5a3f;
  --lime-dark: #183827;
  --lime-tint: rgba(46, 90, 63, 0.14);
  --max-width: 780px;
  --max-width-wide: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
}

main.page {
  flex: 1;
}

footer {
  margin-top: auto;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.container-wide {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 24px;
}

/* Nav */
nav.site-nav {
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 10;
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--border);
}

nav.site-nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  width: 100%;
  max-width: var(--max-width-wide);
}

nav.site-nav .brand {
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
}

nav.site-nav .brand picture {
  display: block;
}

nav.site-nav .brand .nav-logo {
  display: block;
  height: 68px;
  width: auto;
  object-fit: contain;
  transition: filter 0.2s ease;
  filter: saturate(0.9) hue-rotate(-12deg) brightness(0.98);
}

nav.site-nav .brand .nav-logo:hover {
  transform: none;
  filter: saturate(0.9) hue-rotate(-12deg) brightness(0.98);
}

nav.site-nav .brand .logo-mark {
  color: var(--lime);
  font-size: 1.45em;
  line-height: 0.9;
  font-weight: 800;
  margin-right: 1px;
}

nav.site-nav .brand .logo-name {
  color: var(--black);
}

nav.site-nav .brand .logo-dot {
  color: var(--lime);
}

nav.site-nav ul,
nav.site-nav .nav-links {
  list-style: none;
  display: flex;
  gap: 0;
  margin-left: auto;
  align-items: center;
  padding: 16px 0;
}

nav.site-nav .nav-links li {
  display: flex;
  align-items: center;
}

nav.site-nav .nav-links li a {
  padding: 0 14px;
}

nav.site-nav .nav-toggle {
  display: none;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 10px;
  border-radius: 8px;
  transition: background 0.2s ease;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

nav.site-nav .nav-toggle:hover {
  background: rgba(0,0,0,0.08);
}

nav.site-nav .nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--black);
  border-radius: 999px;
  margin: 3px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

nav.site-nav .nav-toggle.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

nav.site-nav .nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

nav.site-nav .nav-toggle.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

nav.site-nav a.nav-link {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 0;
  transition: color 0.2s ease;
}

@media (max-width: 760px) {
  nav.site-nav .container {
    position: relative;
  }

  nav.site-nav .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  nav.site-nav .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    gap: 0;
    background: var(--white);
    padding: 16px 0;
    display: none;
    border-top: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
  }

  nav.site-nav .nav-links.open {
    display: flex;
  }

  nav.site-nav .nav-links li {
    width: 100%;
  }

  nav.site-nav .nav-links li a {
    display: block;
    width: 100%;
    padding: 12px 24px;
    text-align: center;
  }

  nav.site-nav .brand .nav-logo {
    height: 32px;
  }

  nav.site-nav .brand {
    gap: 10px;
  }
}

nav.site-nav a.nav-link:hover {
  color: var(--lime);
}

nav.site-nav a.nav-link.active {
  color: var(--lime);
}

/* Header / hero */
header.hero {
  padding: 72px 0 64px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.9fr);
  align-items: center;
  gap: 40px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 3px var(--lime-tint);
}

h1 {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.subtitle {
  font-size: 19px;
  color: var(--muted);
  margin-bottom: 20px;
  font-weight: 400;
}

.subtitle .accent { color: var(--lime-dark); font-weight: 600; }

.tagline {
  font-size: 16px;
  color: var(--text);
  max-width: 560px;
  margin-bottom: 28px;
}

.links { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }

/* Hero portrait */
.hero-image-wrap {
  position: relative;
  width: min(100%, clamp(220px, 32vw, 360px));
  max-width: 100%;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  justify-self: center;
}

.hero-image-wrap::before {
  content: "";
  position: absolute;
  inset: -18px;
  background: var(--lime);
  opacity: 0.14;
  border-radius: 50%;
  z-index: 0;
  transform: translate(14px, 14px);
}

.hero-image-wrap img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--black);
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
}

/* Stats bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.stat-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.01em;
}

.stat-num .lime-mark { color: var(--lime-dark); }

.stat-label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-image-wrap { order: -1; max-width: 220px; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn-primary { background: var(--black); color: var(--white); }
.btn-primary:hover { background: var(--lime-dark); }

.btn-secondary { border: 1px solid var(--black); color: var(--black); }
.btn-secondary:hover { background: var(--lime-tint); border-color: var(--lime-dark); }

/* Sections */
section, main.page {
  padding: 56px 0 64px;
  border-top: 1px solid var(--border);
}

main.page:first-of-type { border-top: none; }

h2 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 28px;
  position: relative;
  padding-left: 14px;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 4px;
  background: var(--lime);
  border-radius: 2px;
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.page-intro {
  color: var(--muted);
  max-width: 600px;
  margin-bottom: 8px;
}

/* About */
.about p { margin-bottom: 16px; }
.about p:last-child { margin-bottom: 0; }

.about-grid {
  display: block;
}

.about-photo {
  float: left;
  width: min(280px, 35%);
  max-width: 280px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 16px 34px rgba(0,0,0,0.14);
  margin: 0 28px 18px 0;
}

@media (max-width: 700px) {
  .about-grid { display: block; }
  .about-photo {
    float: none;
    max-width: 260px;
    width: 100%;
    margin: 0 auto 24px;
    display: block;
  }
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  background: var(--white);
}

.project-card:hover {
  border-color: var(--lime-dark);
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.08);
}

.project-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 3px solid var(--lime);
}

.project-body { padding: 22px 24px 24px; }

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.project-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.02em;
}

.project-link {
  font-size: 13px;
  color: var(--lime-dark);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.project-link:hover { text-decoration: underline; }

.project-desc {
  color: #7a7a7a;
  font-size: 15px;
  margin-bottom: 14px;
  line-height: 1.7;
}

.tags { display: flex; gap: 8px; flex-wrap: wrap; }

.tag {
  font-size: 12px;
  background: var(--lime-tint);
  color: #365314;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.skill-group h3 { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.skill-group ul { list-style: none; color: var(--muted); font-size: 14px; }
.skill-group li { margin-bottom: 6px; }

/* Experience */
.experience-item { margin-bottom: 28px; }
.experience-item:last-child { margin-bottom: 0; }

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.experience-role { font-weight: 600; font-size: 16px; }
.experience-date { font-size: 13px; color: var(--muted); white-space: nowrap; }
.experience-company { font-size: 14px; color: var(--lime-dark); font-weight: 600; margin-bottom: 8px; }
.experience-desc { font-size: 15px; color: var(--text); }

/* Blog list */
.blog-grid { display: grid; gap: 4px; }

.blog-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 22px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 20px 4px;
  border-bottom: 1px solid var(--border);
  transition: padding-left 0.15s ease;
}

.blog-card:hover { padding-left: 10px; border-bottom-color: var(--lime-dark); }

.blog-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.blog-date {
  font-size: 13px;
  color: var(--lime-dark);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

.blog-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.blog-excerpt { color: var(--muted); font-size: 15px; }

.post-cover {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  border-radius: 12px;
  margin: 20px 0 32px;
}

@media (max-width: 560px) {
  .blog-card { grid-template-columns: 1fr; }
  .blog-thumb { max-height: 160px; }
}

/* Blog detail */
.post-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  margin-bottom: 4px;
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--lime);
}

.byline-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.post-meta {
  color: var(--lime-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.post-title {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  line-height: 1.2;
}

.post-body p { margin-bottom: 18px; max-width: 640px; }
.post-body h3 { font-size: 19px; font-weight: 700; margin: 28px 0 12px; }
.post-body ul, .post-body ol { margin: 0 0 18px 22px; color: var(--text); }
.post-body li { margin-bottom: 6px; }
.post-body blockquote {
  border-left: 3px solid var(--lime);
  padding-left: 16px;
  color: var(--muted);
  font-style: italic;
  margin: 20px 0;
}

.back-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--lime-dark);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.back-link:hover { text-decoration: underline; }

.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  gap: 16px;
}

.post-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  max-width: 45%;
}

.post-nav a:hover { color: var(--lime-dark); }
.post-nav .label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.post-nav .next { text-align: right; margin-left: auto; }

/* Contact */
.contact p { color: var(--muted); margin-bottom: 24px; max-width: 520px; }

.contact-links { display: flex; gap: 24px; flex-wrap: wrap; }

.contact-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  border-bottom: 2px solid var(--border);
  padding-bottom: 2px;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.contact-links a:hover { border-color: var(--lime); color: var(--lime-dark); }

/* Footer */
footer {
  background: var(--black);
  color: #bdbdbd;
  padding: 32px 0;
  font-size: 13px;
  text-align: center;
}

footer span { color: var(--lime); }

@media (max-width: 600px) {
  header.hero { padding: 56px 0 40px; }
  h1 { font-size: 30px; }
  .subtitle { font-size: 17px; }
  nav ul { gap: 14px; }
  section, main.page { padding: 44px 0 48px; }
  .post-title { font-size: 26px; }
  .post-nav { flex-direction: column; }
  .post-nav .next { text-align: left; margin-left: 0; }
}
