:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  scroll-behavior: smooth;

  --bg: #f5f7fa;
  --bg-strong: #e9eef5;
  --surface: #ffffff;
  --surface-muted: #eef3f7;
  --ink: #111827;
  --muted: #526071;
  --muted-strong: #334155;
  --line: #d6dde8;
  --line-strong: #b9c3d0;
  --teal: #0f766e;
  --blue: #1d4ed8;
  --amber: #b45309;
  --red: #b42318;
  --dark: #111827;
  --dark-2: #1f2937;
  --shadow: 0 22px 55px rgba(15, 23, 42, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(17, 24, 39, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, #f8fafc 0%, #eef3f7 48%, #f7f9fb 100%);
  background-size: 44px 44px, 44px 44px, auto;
  color: var(--ink);
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  min-height: 760px;
  padding: 18px 0 56px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.12), transparent 34%),
    linear-gradient(160deg, rgba(29, 78, 216, 0.10), transparent 56%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(245, 247, 250, 0.3));
  border-bottom: 1px solid var(--line);
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 10px;
  border: 1px solid rgba(214, 221, 232, 0.88);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 6px;
  background: var(--dark);
  color: #ffffff;
  font-size: 0.84rem;
}

.brand-name {
  font-size: 0.98rem;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.main-nav a,
.topbar-action {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--muted-strong);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.main-nav a:hover,
.topbar-action:hover {
  background: var(--surface-muted);
  color: var(--ink);
}

.topbar-action {
  border: 1px solid var(--line);
  background: #ffffff;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  align-items: center;
  gap: 48px;
  padding-top: 88px;
}

.hero-copy {
  max-width: 680px;
}

.eyebrow,
.section-kicker,
.featured-kicker {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: 4rem;
  line-height: 1.03;
  letter-spacing: 0;
}

.hero-role {
  margin: 16px 0 0;
  color: var(--dark-2);
  font-size: 1.35rem;
  font-weight: 800;
}

.hero-intro {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.06rem;
}

.hero-actions,
.card-actions,
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions {
  margin-top: 30px;
}

.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

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

.btn-primary {
  background: var(--ink);
  color: #ffffff;
  box-shadow: 0 15px 30px rgba(17, 24, 39, 0.18);
}

.btn-secondary {
  border-color: var(--line-strong);
  background: #ffffff;
  color: var(--ink);
}

.btn-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted-strong);
}

.card-actions .btn-ghost {
  border-color: var(--line-strong);
  background: #ffffff;
  color: var(--ink);
}

.btn-small {
  min-height: 38px;
  padding: 8px 10px;
  font-size: 0.92rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 34px 0 0;
}

.stat-item {
  min-height: 92px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.stat-item dt {
  margin: 0;
  color: var(--ink);
  font-size: 1.38rem;
  font-weight: 900;
}

.stat-item dd {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-visual {
  overflow: hidden;
  border: 1px solid #273244;
  border-radius: var(--radius);
  background: var(--dark);
  color: #f8fafc;
  box-shadow: var(--shadow);
}

.visual-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
  background: #0b1220;
  color: #cbd5e1;
  font-size: 0.86rem;
  font-weight: 800;
}

.visual-body {
  padding: 20px;
}

.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #dbeafe;
}

.metric-row strong {
  color: #5eead4;
  font-size: 0.86rem;
}

.risk-meter {
  height: 12px;
  margin: 18px 0 20px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.risk-meter-fill {
  display: block;
  width: 78%;
  height: 100%;
  background: linear-gradient(90deg, #14b8a6, #f59e0b 62%, #ef4444);
}

.visual-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.visual-grid div {
  min-height: 86px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
}

.visual-grid small {
  display: block;
  color: #94a3b8;
  font-weight: 800;
}

.visual-grid strong {
  display: block;
  margin-top: 8px;
  color: #ffffff;
}

.terminal-lines {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 14px;
  border-radius: var(--radius);
  background: #0b1220;
  color: #93c5fd;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.84rem;
}

.section {
  padding: 78px 0;
}

.section-muted {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.52);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading h2,
.contact-panel h2 {
  margin: 0;
  color: var(--ink);
  font-size: 2.2rem;
  line-height: 1.12;
  letter-spacing: 0;
}

.featured-card {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 28px;
  padding: 28px;
  border: 1px solid #263244;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #111827, #172033);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.featured-copy h3 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.14;
}

.featured-description,
.featured-impact {
  max-width: 760px;
  color: #cbd5e1;
}

.featured-highlights {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  padding-left: 20px;
  color: #e2e8f0;
}

.featured-card .chip {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}

.featured-card .btn-secondary,
.featured-card .btn-ghost {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.featured-panel {
  display: grid;
  align-content: center;
  gap: 12px;
  min-height: 300px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(11, 18, 32, 0.82);
}

.panel-label {
  color: #93c5fd;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
}

.panel-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: #cbd5e1;
}

.panel-row strong {
  color: #5eead4;
}

.project-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.project-count {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.project-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.filter-button {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--muted-strong);
  cursor: pointer;
  font-weight: 800;
}

.filter-button[aria-pressed="true"] {
  border-color: var(--dark);
  background: var(--dark);
  color: #ffffff;
}

.project-grid,
.stack-grid,
.cv-grid {
  display: grid;
  gap: 16px;
}

.project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card,
.stack-card,
.cv-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.08);
}

.project-card {
  display: flex;
  min-height: 520px;
  flex-direction: column;
  overflow: hidden;
}

.project-visual {
  display: grid;
  gap: 10px;
  min-height: 164px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.18), transparent 40%),
    linear-gradient(145deg, rgba(29, 78, 216, 0.15), transparent 70%),
    var(--surface-muted);
}

.project-kind {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 6px;
  background: #ffffff;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
}

.project-visual strong {
  color: var(--ink);
  font-size: 1.28rem;
  line-height: 1.2;
}

.visual-line {
  display: block;
  width: 84%;
  height: 8px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.18);
}

.visual-line-short {
  width: 56%;
}

.project-card h3,
.stack-card h3,
.cv-card h3 {
  margin: 18px 18px 8px;
  color: var(--ink);
  font-size: 1.16rem;
  line-height: 1.25;
}

.project-description,
.project-impact {
  margin: 0 18px 12px;
  color: var(--muted);
}

.project-impact {
  color: var(--muted-strong);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 16px 18px 0;
}

.chip {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--muted-strong);
  font-size: 0.82rem;
  font-weight: 800;
}

.card-actions {
  margin: auto 18px 18px;
  padding-top: 18px;
}

.stack-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stack-card {
  min-height: 190px;
  padding-bottom: 18px;
}

.cv-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.78fr) minmax(0, 1.22fr);
  gap: 36px;
  align-items: start;
}

.cv-grid {
  grid-template-columns: 1fr;
}

.cv-card {
  padding: 4px 0 18px;
}

.cv-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0 18px 0 38px;
  color: var(--muted);
}

.contact-section {
  padding-top: 28px;
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 28px;
  align-items: center;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.contact-message {
  max-width: 640px;
  margin: 16px 0 0;
  color: var(--muted);
}

.contact-actions {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.contact-email {
  overflow-wrap: anywhere;
  color: var(--blue);
  font-size: 1.2rem;
  font-weight: 900;
  text-decoration: none;
}

.social-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--muted-strong);
  font-weight: 800;
  text-decoration: none;
}

.footer {
  padding: 30px 0;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer p {
  margin: 0;
}

.footer a {
  color: var(--muted-strong);
  font-weight: 800;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(29, 78, 216, 0.35);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 980px) {
  .site-header {
    min-height: auto;
  }

  .topbar,
  .hero,
  .featured-card,
  .cv-layout,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .main-nav {
    order: 3;
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .hero {
    padding-top: 56px;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .project-grid,
  .stack-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .container {
    width: min(100% - 24px, 1120px);
  }

  .site-header {
    padding-top: 12px;
  }

  .topbar {
    top: 8px;
    gap: 10px;
  }

  .brand-name {
    display: none;
  }

  .topbar-action {
    justify-self: end;
  }

  .hero {
    gap: 30px;
    padding-top: 42px;
  }

  .hero h1 {
    font-size: 2.38rem;
  }

  .hero-role {
    font-size: 1.12rem;
  }

  .hero-stats,
  .visual-grid,
  .project-grid,
  .stack-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 58px 0;
  }

  .section-heading h2,
  .contact-panel h2 {
    font-size: 1.75rem;
  }

  .featured-card,
  .contact-panel {
    padding: 20px;
  }

  .project-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-filters {
    justify-content: flex-start;
  }

  .project-card {
    min-height: auto;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
