:root {
  --bg: #0f1115;
  --surface: #1b1d24;
  --text: #eaeaea;
  --muted: #a4aab8;
  --line: #2a2d36;
  --brand: #3ecf6c;
  --brand-soft: #2faf58;
  --accent: #8d5df3;
  --shadow: 0 18px 32px rgba(0, 0, 0, 0.24);
  --container: 1150px;
}

html[data-theme="light"] {
  --bg: #eaeaea;
  --surface: #dcdcdc;
  --text: #0f1115;
  --muted: #464a54;
  --line: #9ea1a8;
  --brand: #3ecf6c;
  --brand-soft: #2faf58;
  --accent: #8d5df3;
  --shadow: 0 16px 28px rgba(15, 17, 21, 0.1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Bricolage Grotesque", sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  transition: background-color 250ms ease, color 250ms ease;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.noise,
.orb {
  display: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  background: rgba(15, 17, 21, 0.94);
  border-bottom: 1px solid var(--line);
}

html[data-theme="light"] .site-header {
  background: rgba(234, 234, 234, 0.94);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  min-width: 0;
}

.brand-mark {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.brand-mark-light {
  display: none;
}

html[data-theme="light"] .brand-mark-dark,
html[data-theme="light"] .motif-dark {
  display: none;
}

html[data-theme="light"] .brand-mark-light,
html[data-theme="light"] .motif-light {
  display: block;
}

.brand-wordmark {
  font-family: "Montserrat Alternates", sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.42rem;
  text-transform: lowercase;
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.site-nav a {
  font-weight: 500;
  text-transform: lowercase;
  color: var(--text);
  opacity: 0.78;
  transition: opacity 160ms ease, color 160ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  opacity: 1;
  color: var(--brand);
}

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.4rem;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
}

.theme-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--brand);
  color: var(--brand);
}

html[data-theme="light"] .theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-moon {
  fill: currentColor;
  stroke: none;
}

.icon-sun {
  display: none;
}

html[data-theme="light"] .icon-moon {
  display: none;
}

html[data-theme="light"] .icon-sun {
  display: block;
}

.hero {
  min-height: calc(100vh - 75px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 2.5rem;
  padding-top: 3.5rem;
  padding-bottom: 3rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.77rem;
  color: var(--muted);
  margin: 0 0 1.2rem;
}

h1 {
  font-size: clamp(2.2rem, 6.4vw, 5.25rem);
  line-height: 1;
  margin: 0;
  max-width: 13ch;
  letter-spacing: -0.02em;
}

.accent {
  color: var(--brand);
}

.subcopy {
  margin: 1.7rem 0 0;
  max-width: 48ch;
  color: var(--muted);
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0.7rem 1.35rem;
  border-radius: 0.75rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

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

.btn-primary {
  background: var(--brand);
  color: #0f1115;
  box-shadow: var(--shadow);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: transparent;
}

.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.motif {
  width: min(100%, 560px);
  opacity: 0.13;
}

.motif-light {
  display: none;
}

.section {
  padding: 5rem 0;
}

.page-hero {
  padding-top: 5.3rem;
  padding-bottom: 2.2rem;
}

.page-hero h1 {
  max-width: 16ch;
}

.section-header h2 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.6rem, 2.7vw, 2.6rem);
  line-height: 1.1;
}

.grid {
  display: grid;
  gap: 1.3rem;
}

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

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

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.card,
.note,
.work-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.2rem;
}

.card h3,
.note h3,
.work-item h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.card p,
.note p,
.work-item p,
.two-col p,
.contact p {
  margin: 0;
  color: var(--muted);
}

.work-list {
  display: grid;
  gap: 0.9rem;
}

.case-groups {
  display: grid;
  gap: 0.9rem;
}

.case-group {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  overflow: hidden;
}

.case-group summary {
  cursor: pointer;
  font-weight: 600;
  padding: 1rem 1.1rem;
  list-style: none;
}

.case-group summary::-webkit-details-marker {
  display: none;
}

.case-group summary::after {
  content: '+';
  float: right;
  color: var(--brand);
}

.case-group[open] summary::after {
  content: '-';
}

.case-body {
  padding: 0 1rem 1rem;
  display: grid;
  gap: 0.8rem;
}

.blog-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.blog-controls label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.blog-controls select {
  min-width: 180px;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  background: var(--surface);
  color: var(--text);
  padding: 0.55rem 0.7rem;
  font: inherit;
}

.blog-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.blog-card {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  overflow: hidden;
  display: grid;
}

.blog-card-image {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  object-position: center 22%;
  background: #111;
}

.blog-card-body {
  padding: 1rem;
  display: grid;
  gap: 0.55rem;
}

.blog-meta {
  margin: 0;
}

.blog-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.blog-card p {
  margin: 0;
  color: var(--muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag {
  font-size: 0.77rem;
  border: 1px solid var(--brand);
  border-radius: 999px;
  padding: 0.35rem 0.6rem;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  line-height: 1;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

html[data-theme="light"] .tag {
  border-color: #55cd6e;
  color: #101114;
  background: #55cd6e;
}

.blog-card .btn {
  width: 100%;
}

.tech-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.tech-pill {
  font-size: 0.82rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.34rem 0.62rem;
  background: var(--surface);
  color: var(--muted);
  white-space: nowrap;
}

.article-content {
  display: grid;
  gap: 0.6rem;
  color: var(--muted);
  margin-top: 1rem;
}

.article-content > * {
  margin: 0;
}

.article-content h2,
.article-content h3,
.article-content h4 {
  color: var(--text);
  line-height: 1.15;
}

.article-content h2:not(:first-child),
.article-content h3:not(:first-child),
.article-content h4:not(:first-child) {
  margin-top: 0.6rem;
}

.article-content h2 {
  font-size: clamp(1.4rem, 2vw, 1.8rem);
}

.article-content h3 {
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
}

.article-content p,
.article-content li {
  font-size: 1rem;
  line-height: 1.5;
}

.article-content ul,
.article-content ol {
  padding-left: 1.3rem;
  display: grid;
  gap: 0.2rem;
}

.article-content hr {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0.2rem 0;
}

.article-content a {
  color: var(--brand);
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  overflow: hidden;
  background: var(--surface);
}

.article-content thead {
  background: color-mix(in srgb, var(--brand) 10%, var(--surface));
}

.article-content th,
.article-content td {
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0.65rem;
  vertical-align: top;
  font-size: 0.95rem;
  line-height: 1.45;
}

.article-content tbody tr:last-child td {
  border-bottom: 0;
}

.article-content strong {
  color: var(--text);
}

.article-content em {
  color: var(--text);
  font-style: italic;
}

.article-content code {
  font-family: Consolas, "Courier New", monospace;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  padding: 0.1rem 0.35rem;
}

.article-content pre {
  margin: 0;
  background: #111318;
  color: #eaeaea;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem 1.1rem;
  overflow-x: auto;
}

html[data-theme="light"] .article-content pre {
  background: #d4d4d4;
  color: #111318;
}

.article-content pre code {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  border-radius: 0;
}

.article-content blockquote {
  padding: 0.1rem 0 0.1rem 1rem;
  border-left: 3px solid var(--brand);
  color: var(--text);
}

.section-cta {
  margin-top: 1.3rem;
}

.contact {
  text-align: left;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.contact .contact-actions {
  margin-top: 1.5rem;
}

.profile-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.6rem;
}

.profile-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: var(--surface);
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.stack-item {
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  padding: 0.7rem 0.8rem;
  background: var(--surface);
  font-size: 0.94rem;
}

.identity-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.cert-grid .stack-item {
  min-height: 100%;
}

.list-clean {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  display: grid;
  gap: 0.55rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.2rem 0 2.2rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer-content p {
  margin: 0;
  color: var(--muted);
}

.footer-content a {
  color: var(--brand);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 1.3rem;
    min-height: 0;
    padding-top: 1.6rem;
    padding-bottom: 1.6rem;
  }

  .hero-art {
    display: none;
  }

  .motif {
    display: none;
  }

  .section {
    padding: 3.2rem 0;
  }

  .page-hero {
    padding-top: 3.6rem;
    padding-bottom: 1.4rem;
  }

  h1 {
    font-size: clamp(2rem, 8vw, 3.1rem);
    max-width: 18ch;
  }

  .subcopy {
    margin-top: 1.1rem;
    font-size: 1rem;
    max-width: 60ch;
  }

  .hero-actions {
    margin-top: 1.2rem;
    gap: 0.75rem;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .two-col,
  .three-col,
  .cards,
  .profile-layout,
  .stack-grid,
  .blog-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav-wrap {
    flex-wrap: wrap;
    padding: 0.7rem 0;
  }

  .menu-toggle {
    display: inline-block;
    order: 2;
  }

  .theme-toggle {
    order: 1;
    margin-left: auto;
  }

  .site-nav {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    border-top: 1px solid var(--line);
    padding: 0.8rem 0 0.2rem;
    gap: 0.75rem;
  }

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

  .brand-wordmark {
    letter-spacing: 0.28rem;
    font-size: 1rem;
  }

  .container {
    width: min(100% - 1.6rem, var(--container));
  }

  h1 {
    line-height: 1.06;
  }

  .subcopy {
    font-size: 1rem;
  }

  .btn {
    min-height: 46px;
    padding: 0.66rem 1rem;
  }

  .site-header {
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }

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