:root {
  --bg: #0c0c0f;
  --bg-card: #111116;
  --bg-card-hover: #16161c;
  --border: #1e1e26;
  --border-hover: #2a2a35;
  --fg: #8a8a97;
  --fg-bright: #cdcdd6;
  --fg-dim: #44444f;
  --green: #4ade80;
  --green-dim: rgba(74, 222, 128, 0.08);
  --green-glow: rgba(74, 222, 128, 0.15);
  --mono: 'JetBrains Mono', 'SF Mono', monospace;
  --sans: 'Space Grotesk', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 15px; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--green-dim) 0%, transparent 65%);
  top: -200px;
  right: -200px;
  pointer-events: none;
  z-index: 0;
  animation: pulse 12s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

/* Layout */
.page {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 4rem 2rem 3rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top bar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  color: var(--fg-dim);
  letter-spacing: 0.08em;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4rem;
}

.topbar nav {
  display: flex;
  gap: 1.5rem;
}

.topbar nav a {
  color: var(--fg-dim);
  text-decoration: none;
  transition: color 0.3s ease;
}

.topbar nav a:hover {
  color: var(--fg-bright);
}

.topbar nav a.active {
  color: var(--green);
}

.status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green-glow);
  animation: statusPulse 3s ease-in-out infinite;
}

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

/* Identity */
.identity {
  margin-bottom: 1.75rem;
}

.identity h1 {
  font-family: var(--sans);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 600;
  color: var(--fg-bright);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.6rem;
}

.identity .role {
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--green);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Divider */
.rule {
  width: 36px;
  height: 1px;
  background: var(--fg-dim);
  margin-bottom: 1.75rem;
}

/* About */
.about {
  font-size: 0.85rem;
  font-weight: 300;
  line-height: 1.9;
  color: var(--fg);
  max-width: 560px;
  margin-bottom: 3rem;
}

.about strong {
  color: var(--fg-bright);
  font-weight: 400;
}

/* Expertise cards */
.expertise {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.85rem;
  margin-bottom: 3rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--green);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.card:hover::after { opacity: 1; }

.card-tag {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.45rem;
}

.card-title {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--fg-bright);
  margin-bottom: 0.35rem;
}

.card-desc {
  font-size: 0.72rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--fg);
}

/* Contact */
.contact {
  margin-top: auto;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.contact-label {
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 0.85rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-links a {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--fg);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  transition: color 0.3s ease;
}

.contact-links a .lbl {
  font-size: 0.7rem;
  color: var(--fg-dim);
  min-width: 52px;
  transition: color 0.3s ease;
}

.contact-links a:hover { color: var(--fg-bright); }
.contact-links a:hover .lbl { color: var(--green); }

.contact-right {
  font-size: 0.7rem;
  font-weight: 300;
  color: var(--fg-dim);
  text-align: right;
  line-height: 1.7;
  letter-spacing: 0.03em;
}

/* Blog list */
.page-title {
  font-family: var(--sans);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  color: var(--fg-bright);
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--fg-dim);
  margin-bottom: 3rem;
}

.post-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 3rem;
}

.post-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.post-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--green);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.post-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.post-item:hover::after { opacity: 1; }

.post-item a {
  display: block;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
}

.post-meta {
  font-size: 0.65rem;
  color: var(--fg-dim);
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.post-title {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--fg-bright);
  margin-bottom: 0.35rem;
}

.post-summary {
  font-size: 0.75rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--fg);
}

.no-posts {
  color: var(--fg-dim);
  font-size: 0.8rem;
  font-weight: 300;
}

/* Single post */
.post-header {
  margin-bottom: 2.5rem;
}

.post-header h1 {
  font-family: var(--sans);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600;
  color: var(--fg-bright);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.6rem;
}

.post-header .post-date {
  font-size: 0.7rem;
  color: var(--fg-dim);
  letter-spacing: 0.08em;
}

.post-content {
  font-size: 0.88rem;
  font-weight: 300;
  line-height: 1.95;
  color: var(--fg);
  max-width: 640px;
  margin-bottom: 3rem;
}

.post-content h2 {
  font-family: var(--sans);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--fg-bright);
  margin: 2.5rem 0 1rem;
}

.post-content h3 {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--fg-bright);
  margin: 2rem 0 0.75rem;
}

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

.post-content a {
  color: var(--green);
  text-decoration: none;
  border-bottom: 1px solid var(--green-dim);
  transition: border-color 0.3s ease;
}

.post-content a:hover {
  border-color: var(--green);
}

.post-content strong {
  color: var(--fg-bright);
  font-weight: 400;
}

.post-content code {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.15rem 0.4rem;
  font-size: 0.82rem;
}

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

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

.post-content blockquote {
  border-left: 3px solid var(--green);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: var(--fg-dim);
  font-style: italic;
}

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

.post-content li {
  margin-bottom: 0.4rem;
}

.post-content img {
  max-width: 100%;
  border-radius: 6px;
  border: 1px solid var(--border);
  margin: 1.5rem 0;
}

.back-link {
  font-size: 0.75rem;
  color: var(--fg-dim);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.3s ease;
  margin-bottom: 2rem;
}

.back-link:hover { color: var(--green); }

/* Responsive */
@media (max-width: 600px) {
  .page { padding: 2.5rem 1.5rem 2rem; }
  .expertise { grid-template-columns: 1fr; }
  .contact { flex-direction: column; align-items: flex-start; }
  .contact-right { text-align: left; }
}
