:root {
  --color-bg: #F8FAFC;
  --color-surface: #FFFFFF;
  --color-text: #0F172A;
  --color-muted: #475569;
  --color-border: #E2E8F0;
  --color-accent: #4F46E5;
  --color-accent-strong: #4338CA;
  --color-ink: #111827;
  --color-code: #0B1120;
  --shadow-soft: 0 18px 48px rgba(15, 23, 42, 0.08);
  --shadow-panel: 0 28px 80px rgba(15, 23, 42, 0.12);
  --content-width: 1120px;
  --article-width: 720px;
  color: var(--color-text);
  background: var(--color-bg);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  background:
    linear-gradient(rgba(226, 232, 240, 0.55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226, 232, 240, 0.55) 1px, transparent 1px);
  background-size: 48px 48px;
  content: "";
  inset: 0;
  mask-image: linear-gradient(to bottom, black, transparent 460px);
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

body::after {
  background: var(--color-accent);
  content: "";
  height: 240px;
  opacity: 0.08;
  pointer-events: none;
  position: fixed;
  right: 0;
  top: 110px;
  width: 1px;
  z-index: -1;
}

a {
  color: var(--color-accent);
  text-underline-offset: 0.18em;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 4px;
}

.skip-link {
  background: var(--color-text);
  color: var(--color-surface);
  left: 16px;
  padding: 10px 12px;
  position: fixed;
  top: 12px;
  transform: translateY(-160%);
  z-index: 10;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
main {
  width: min(var(--content-width), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  align-items: center;
  backdrop-filter: blur(14px);
  background: rgba(248, 250, 252, 0.86);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  color: var(--color-text);
  font-weight: 750;
  text-decoration: none;
}

nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

nav a {
  border-radius: 8px;
  color: var(--color-muted);
  font-size: 0.95rem;
  padding: 8px 10px;
  text-decoration: none;
}

nav a:hover {
  background: var(--color-surface);
  color: var(--color-text);
}

.language-link {
  border: 1px solid var(--color-border);
  color: var(--color-accent);
  font-weight: 750;
  min-width: 44px;
  text-align: center;
}

.hero {
  align-items: center;
  display: grid;
  gap: 52px;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  min-height: 640px;
  padding: 88px 0 80px;
  position: relative;
}

.hero::before {
  background: var(--color-accent);
  content: "";
  height: 1px;
  left: 0;
  opacity: 0.22;
  position: absolute;
  top: 76px;
  width: 120px;
}

.hero-copy {
  transform: translateY(-8px);
}

.eyebrow {
  color: var(--color-accent);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.86rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  margin: 0 0 18px;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  letter-spacing: 0;
  line-height: 1.15;
  margin: 0;
}

h1 {
  font-size: 4.85rem;
  max-width: 880px;
}

h2 {
  font-size: 1.45rem;
}

h3 {
  font-size: 1rem;
}

p {
  color: var(--color-muted);
  max-width: var(--article-width);
}

.lead {
  color: #334155;
  font-size: 1.18rem;
  margin: 24px 0 0;
  max-width: 660px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  display: inline-flex;
  font-weight: 750;
  min-height: 46px;
  padding: 11px 16px;
  text-decoration: none;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
}

.button.primary:hover {
  background: var(--color-accent-strong);
  border-color: var(--color-accent-strong);
}

.button.secondary {
  background: var(--color-surface);
  color: var(--color-text);
}

.system-panel {
  align-self: stretch;
  background: var(--color-code);
  border: 1px solid rgba(79, 70, 229, 0.22);
  border-radius: 8px;
  box-shadow: var(--shadow-panel);
  color: #E5E7EB;
  margin-top: 28px;
  overflow: hidden;
  position: relative;
}

.system-panel::before {
  background:
    linear-gradient(rgba(148, 163, 184, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.14) 1px, transparent 1px);
  background-size: 28px 28px;
  content: "";
  inset: 42px 0 0;
  opacity: 0.65;
  pointer-events: none;
  position: absolute;
}

.panel-header {
  align-items: center;
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  display: flex;
  gap: 7px;
  height: 42px;
  padding: 0 14px;
  position: relative;
  z-index: 1;
}

.panel-header strong {
  color: #CBD5E1;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 600;
  margin-left: 8px;
}

.panel-dot {
  background: #475569;
  border-radius: 999px;
  height: 9px;
  width: 9px;
}

.panel-dot:first-child {
  background: #818CF8;
}

.panel-body {
  display: grid;
  gap: 10px;
  padding: 18px;
  position: relative;
  z-index: 1;
}

.terminal-line {
  align-items: center;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 6px;
  display: flex;
  gap: 10px;
  min-height: 52px;
  padding: 0 14px;
}

.terminal-line span,
.terminal-line code {
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

.terminal-line span {
  color: #818CF8;
}

.terminal-line code {
  color: #E5E7EB;
  font-size: 0.88rem;
}

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

.status-pill {
  background: rgba(79, 70, 229, 0.16);
  border: 1px solid rgba(129, 140, 248, 0.28);
  border-radius: 999px;
  color: #C7D2FE;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.76rem;
  padding: 6px 9px;
}

.panel-row {
  align-items: center;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-left: 2px solid rgba(129, 140, 248, 0.6);
  border-radius: 6px;
  display: grid;
  gap: 12px;
  grid-template-columns: 40px 1fr;
  min-height: 52px;
  padding: 10px 12px;
}

.panel-row:nth-child(2n + 1) {
  margin-left: 10px;
}

.panel-row span {
  color: #94A3B8;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.78rem;
}

.panel-row strong {
  color: #F8FAFC;
  font-size: 0.95rem;
}

.section {
  border-top: 1px solid var(--color-border);
  display: grid;
  gap: 56px;
  grid-template-columns: 240px minmax(0, 1fr);
  padding: 72px 0;
}

.section-heading {
  position: relative;
}

.section-heading h2 {
  position: sticky;
  top: 96px;
}

.section-content p {
  margin: 0;
}

.section-content p + p {
  margin-top: 16px;
}

.experience-cards,
.skill-list {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
}

.experience-cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.experience-cards li {
  align-items: flex-start;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  min-height: 216px;
  padding: 18px 18px 20px;
  position: relative;
  transition: border-color 140ms ease, transform 140ms ease;
}

.experience-cards li:hover {
  border-color: #CBD5E1;
  transform: translateY(-2px);
}

.experience-card-top {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  width: 100%;
}

.experience-card-icon {
  align-items: center;
  background: #EEF2FF;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  color: var(--color-accent);
  display: flex;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.experience-card-icon svg {
  fill: none;
  height: 24px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
  width: 24px;
}

.experience-card-label {
  color: #94A3B8;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1;
  padding-top: 4px;
}

.experience-cards h3 {
  line-height: 1.2;
  min-height: 2.4em;
}

.experience-cards p {
  font-size: 0.95rem;
  line-height: 1.58;
  margin-top: 12px;
}

.skill-list {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 900px;
}

.skill-list li {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  min-height: 150px;
  padding: 18px;
  position: relative;
}

.skill-list li::before {
  background: var(--color-accent);
  content: "";
  height: 2px;
  opacity: 0.6;
  position: absolute;
  right: 18px;
  top: 26px;
  width: 42px;
}

.skill-list li:nth-child(2) {
  transform: translateY(12px);
}

.skill-list li:nth-child(3) {
  grid-column: auto;
  margin-left: 0;
}

.skill-list li:nth-child(4) {
  transform: translateY(12px);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.skill-tags span {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-muted);
  font-size: 0.9rem;
  padding: 6px 9px;
}

.contact-link {
  display: inline-flex;
  font-weight: 750;
  margin-top: 18px;
}

.ai-section {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.72), rgba(248, 250, 252, 0));
  margin-inline: -24px;
  padding-inline: 24px;
}

.ai-content {
  border-left: 2px solid rgba(79, 70, 229, 0.5);
  padding-left: 24px;
}

.ai-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 22px 0 0;
  max-width: 760px;
  padding: 0;
}

.ai-list li {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-muted);
  font-size: 0.94rem;
  padding: 8px 11px;
}

.blog-shell,
.article-shell {
  padding-bottom: 72px;
}

.page-hero {
  border-bottom: 1px solid var(--color-border);
  padding: 76px 0 52px;
}

.page-hero h1,
.article-header h1 {
  font-size: 3.2rem;
  max-width: var(--article-width);
}

.post-list {
  display: grid;
  gap: 16px;
  list-style: none;
  margin: 32px 0 0;
  max-width: 860px;
  padding: 0;
}

.post-card a {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  display: block;
  padding: 22px;
  text-decoration: none;
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.post-card:nth-child(2n) {
  margin-left: 36px;
}

.post-card a:hover {
  border-color: rgba(79, 70, 229, 0.35);
  box-shadow: var(--shadow-soft);
  transform: translate(4px, -1px);
}

.post-card h2 {
  font-size: 1.28rem;
  margin-top: 8px;
}

.post-card p {
  margin: 10px 0 0;
}

.post-meta,
.back-link {
  color: #64748B;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.82rem;
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  text-decoration: none;
}

.article-shell {
  width: min(var(--article-width), calc(100% - 32px));
}

.article-header {
  border-bottom: 1px solid var(--color-border);
  padding: 72px 0 42px;
}

.article-header .post-meta {
  margin: 0 0 14px;
}

.prose {
  padding-top: 34px;
}

.prose h2 {
  font-size: 1.55rem;
  margin-top: 34px;
}

.prose h3 {
  font-size: 1.08rem;
  margin-top: 24px;
}

.prose p,
.prose li {
  color: var(--color-muted);
}

.prose p {
  margin: 0 0 18px;
}

.prose ul {
  margin: 14px 0 0;
  padding-left: 22px;
}

.prose li + li {
  margin-top: 8px;
}

.prose pre {
  background: var(--color-code);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  color: #E5E7EB;
  margin: 20px 0;
  overflow-x: auto;
  padding: 16px;
}

.prose code {
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.9rem;
}

@media (max-width: 940px) {
  h1 {
    font-size: 3.35rem;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 72px 0 64px;
  }

  .hero-copy {
    transform: none;
  }

  .system-panel {
    max-width: 560px;
    margin-top: 0;
  }

  .section {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 52px 0;
  }

  .section-heading h2 {
    position: static;
  }

  .experience-cards,
  .skill-list {
    grid-template-columns: 1fr;
  }

  .skill-list li:nth-child(2),
  .skill-list li:nth-child(4),
  .skill-list li:nth-child(3),
  .post-card:nth-child(2n) {
    margin-left: 0;
    transform: none;
  }

  .ai-section {
    margin-inline: 0;
    padding-inline: 0;
  }

  .ai-content {
    padding-left: 18px;
  }

  .skill-list li:nth-child(3) {
    grid-column: auto;
  }

  .experience-cards li {
    min-height: auto;
  }

  .experience-cards h3 {
    min-height: 0;
  }

  .experience-cards li:hover {
    transform: none;
  }

  .page-hero h1,
  .article-header h1 {
    font-size: 2.65rem;
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  nav a {
    padding-left: 0;
  }

  .language-link {
    padding-left: 10px;
  }

  h1 {
    font-size: 2.55rem;
  }

  .hero::before {
    display: none;
  }

  .panel-row:nth-child(2n + 1) {
    margin-left: 0;
  }

  .lead {
    font-size: 1.05rem;
  }

  .page-hero h1,
  .article-header h1 {
    font-size: 2.2rem;
  }
}
