@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-display: 'Inter', system-ui, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, monospace;
  --paper: #f5f3ed;
  --surface: #fffefa;
  --ink: #202a27;
  --muted: #626b65;
  --line: #d9ddd5;
  --accent: #16a34a;
  --accent-dark: #15803d;
  --green: #16a34a;
  --focus: #16a34a;
}

html[data-theme='dark'],
html.dark {
  color-scheme: dark;
  --paper: #030712;
  --surface: #0b1120;
  --ink: #f8fafc;
  --muted: #94a3b8;
  --line: #1e293b;
}

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body [class~="font-sans"] { font-family: var(--font-sans); }

body.bg-slate-950 { background-color: var(--paper); }
body.text-slate-100 { color: var(--ink); }

html[data-theme='dark'] body.bg-slate-950,
html.dark body.bg-slate-950,
body.bg-slate-950.proper-black {
  background-color: #030712 !important;
  color: #f8fafc !important;
}


code, pre { font-family: var(--font-mono); }

::selection { background: #bbf7d0; color: var(--ink); }

*:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

body [class~="focus:outline-none"]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

img { max-width: 100%; }

.project-image-button {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
  text-align: left;
}

.project-image-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-image-button:focus-visible {
  outline-offset: -3px;
}

.project-image-dialog {
  width: min(96vw, 1200px);
  max-width: none;
  max-height: 94dvh;
  padding: 0;
  overflow: visible;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.project-image-dialog::backdrop {
  background: rgb(0 0 0 / 82%);
}

.project-image-dialog-content {
  display: flex;
  max-height: 94dvh;
  flex-direction: column;
}

.project-image-dialog-toolbar {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: flex-end;
  padding: 4px 8px;
}

.project-image-dialog-close {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.25rem;
}

.album-intro h1 {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
}

.album-intro > p,
.album-story {
  color: var(--muted);
}

.album-intro > p:first-child {
  color: var(--accent);
}

.album-gallery {
  columns: 1;
  column-gap: 1.25rem;
}

.album-photo-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 1.25rem;
  overflow: hidden;
  break-inside: avoid;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.album-photo-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgb(32 42 39 / 10%);
}

.album-photo-card img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--paper);
}

.album-photo-card p {
  padding: 1rem 1.1rem 1.15rem;
  color: var(--ink);
  font-size: 0.925rem;
  line-height: 1.6;
}

.album-empty-state {
  padding: 3.5rem 1.5rem;
  border: 1px dashed var(--line);
  border-radius: 1rem;
  text-align: center;
}

.album-empty-state .text-white {
  color: var(--ink);
}

.album-empty-state .text-slate-400 {
  color: var(--muted);
}

@media (min-width: 640px) {
  .album-gallery { columns: 2; }
}

@media (min-width: 1024px) {
  .album-gallery { columns: 3; }
}

@media (prefers-reduced-motion: reduce) {
  .album-photo-card { transition: none; }
  .album-photo-card:hover { transform: none; }
}

.project-image-dialog-content > img {
  width: 100%;
  height: auto;
  max-height: calc(94dvh - 56px);
  object-fit: contain;
}

/* Keep Tailwind's layout utilities; replace its generic dark palette with the site palette. */
body [class~="bg-slate-950"],
body [class~="bg-slate-950/80"],
body [class~="bg-slate-950/95"] { background-color: var(--paper); }
body [class~="bg-slate-950/60"] { background-color: #eeece4; }
body [class~="bg-slate-900"],
body [class~="bg-slate-900/80"],
body [class~="bg-slate-900/60"],
body [class~="bg-slate-900/50"],
body [class~="bg-slate-900/40"],
body [class~="bg-slate-900/30"] { background-color: var(--surface); }
body [class~="bg-slate-800"],
body [class~="bg-slate-800/60"] { background-color: #e9e8e0; }
body [class~="bg-indigo-950"],
body [class~="bg-indigo-950/80"] { background-color: #dcfce7; }
body [class~="bg-indigo-600"],
body [class~="bg-indigo-500"] { background-color: var(--accent); }

body [class~="text-white"],
body [class~="text-slate-100"],
body [class~="text-slate-200"],
body [class~="text-slate-300"] { color: var(--ink); }
body [class~="text-slate-400"],
body [class~="text-slate-500"] { color: var(--muted); }
body [class~="text-slate-600"] { color: #515b55; }
body [class~="text-indigo-300"],
body [class~="text-indigo-400"],
body [class~="text-indigo-500"] { color: var(--accent); }
body [class~="text-emerald-400"] { color: var(--green); }
body [class~="text-rose-200"],
body [class~="text-rose-300"],
body [class~="text-rose-400"] { color: #963b2a; }
body [class~="text-emerald-200"] { color: #315d4c; }

body [class~="border-slate-800"],
body [class~="border-slate-800/80"],
body [class~="border-slate-800/60"],
body [class~="border-slate-800/90"],
body [class~="border-slate-700"],
body [class~="border-slate-700/80"] { border-color: var(--line); }
body [class~="border-indigo-700/40"],
body [class~="border-indigo-700/50"],
body [class~="border-indigo-500/30"] { border-color: #bbf7d0; }
body [class~="border-rose-700/50"] { border-color: #dfb6a8; }
body [class~="border-emerald-700/50"] { border-color: #b2cbb8; }

body [class~="rounded-3xl"],
body [class~="rounded-2xl"] { border-radius: 8px; }
body [class~="rounded-xl"],
body [class~="rounded-lg"] { border-radius: 5px; }

body [class~="shadow-xl"],
body [class~="shadow-2xl"],
body [class~="shadow-lg"],
body [class~="shadow-md"] { box-shadow: 0 8px 24px rgb(32 42 39 / 6%); }
body [class*="shadow-indigo-"] { box-shadow: none; }
body [class*="bg-gradient-to-"] { background-image: none; }
body [class*="blur-3xl"] { display: none; }
body [class~="bg-rose-950/80"] { background-color: #f6e7e2; }
body [class~="bg-rose-900/50"] { background-color: #f6e7e2; }
body [class~="bg-emerald-950/80"] { background-color: #e5eee8; }
body [class~="bg-indigo-600"][class~="text-white"],
body [class~="bg-indigo-500"][class~="text-white"] { color: #fffefa; }
body [class~="glass-panel"],
body [class~="glass-nav"] {
  background-color: var(--surface);
  border-color: var(--line);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

body [class~="hover:text-white"]:hover { color: var(--ink); }
body [class~="hover:text-indigo-300"]:hover,
body [class~="hover:text-indigo-400"]:hover { color: var(--accent-dark); }
body [class~="hover:bg-slate-800"]:hover,
body [class~="hover:bg-slate-800/60"]:hover { background-color: #e9e8e0; }
body [class~="hover:bg-indigo-500"]:hover,
body [class~="hover:bg-indigo-400"]:hover { background-color: var(--accent-dark); }
body [class~="hover:border-slate-700"]:hover { border-color: #aab2a9; }

body [class~="text-4xl"],
body [class~="text-5xl"],
body [class~="text-6xl"] {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
}
body [class~="text-4xl"] { font-size: clamp(2.15rem, 4.2vw, 3.45rem); }
body [class~="text-5xl"] { font-size: clamp(2.3rem, 4.8vw, 3.8rem); }
body [class~="text-6xl"] { font-size: clamp(2.55rem, 5.3vw, 4.25rem); }
body [class~="text-3xl"] { font-size: clamp(1.75rem, 3vw, 2.5rem); }

body a { text-underline-offset: 3px; }
body button, body input, body textarea, body select { font: inherit; }
body button:not(:disabled) { cursor: pointer; }
body button:disabled { cursor: not-allowed; opacity: .55; }
body input, body textarea, body select {
  max-width: 100%;
  min-height: 44px;
  color: var(--ink);
  background-color: var(--surface);
  border-color: #bdc5bc;
}
body input::placeholder, body textarea::placeholder { color: #788078; opacity: 1; }
body button { min-height: 44px; }
.category-pill { min-height: 44px; }
#pagination-container { flex-wrap: wrap; }

.public-header {
  background: rgb(255 254 250 / 96%);
  border-bottom: 1px solid var(--line);
}
.site-header-inner { min-height: 72px; }
.site-brand img { border-radius: 4px; box-shadow: none; }
.site-brand-mark,
.site-footer-mark {
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  color: var(--green);
  background: var(--surface);
  border: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: -.04em;
}
.site-footer-mark { width: 36px; height: 36px; flex-basis: 36px; }
.primary-navigation {
  gap: 2px;
  padding: 0;
  border: 0;
  background: transparent;
}
.primary-navigation a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  padding-inline: 13px;
}
.primary-navigation a[aria-current="page"] {
  color: var(--ink);
  background: #e9e8e0;
  box-shadow: none;
}
.header-contact {
  min-height: 44px;
  background: var(--green);
  border-radius: 4px;
  box-shadow: none;
  color: #fffefa;
}
.header-contact:hover { background: #254a3b; }
#hero-primary-cta, #contact-cta-btn {
  color: #fffefa;
  background-color: var(--accent);
  border-radius: 4px;
  box-shadow: none;
}
#hero-primary-cta:hover, #contact-cta-btn:hover { background-color: var(--accent-dark); }
.mobile-menu-toggle { min-width: 44px; min-height: 44px; }
.mobile-navigation :focus-visible { outline-offset: -3px; }
#contact-email-val { overflow-wrap: anywhere; }
.about-copy h3 {
  margin-top: 1.75rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.2;
}
.about-copy ul { list-style: disc; padding-left: 1.25rem; }
.about-copy li { padding-left: .2rem; }
.about-article { max-width: 70ch; }
.about-article h2 {
  margin: 2.75rem 0 .9rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 500;
  line-height: 1.2;
  scroll-margin-top: 6rem;
}
.about-article h2:first-child { margin-top: 0; }
.about-article p { margin: 0 0 1.25rem; }
.about-article ul { margin: 0 0 1.5rem; }
.about-read-more {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: 4px 0;
  color: var(--accent);
  background: transparent;
  border: 0;
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
}
.about-read-more:hover { color: var(--accent-dark); }
.about-read-more svg { transition: transform .18s ease; }
.about-read-more:hover svg { transform: translateX(3px); }
.footer-social-links { display: flex; flex-wrap: wrap; gap: 8px; }
#site-footer a[aria-label] {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
}
[data-scroll-reveal].reveal-pending {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .5s ease, transform .5s cubic-bezier(.2, .65, .3, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-scroll-reveal].reveal-pending.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.home-service-card {
  min-height: 100%;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: border-color .2s ease;
}
.home-service-card:hover { border-color: #aab2a9; }
.service-panel {
  padding: clamp(1.5rem, 4vw, 3rem) 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}
.service-index {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  background: #dcfce7;
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.service-feature-list { margin: 0; padding: 0; list-style: none; }
.service-feature-list li { line-height: 1.5; }
.service-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e9e8e0;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.service-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.service-panel:hover .service-media img { transform: scale(1.025); }
.service-consultation {
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  border-top: 1px solid var(--line);
}
.mobile-navigation:not(.hidden) {
  display: grid;
  gap: 4px;
  padding: 8px max(16px, calc((100vw - 1200px) / 2));
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.mobile-navigation > a:not(.hidden) {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding-inline: 12px;
  border-radius: 4px;
}
.mobile-navigation > a[aria-current="page"] { background: #e9e8e0; color: var(--ink); }
.skip-link {
  position: absolute;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  transform: translateY(-160%);
  background: var(--ink);
  color: white;
  border-radius: 4px;
}
.skip-link:focus { transform: translateY(0); }
body [class~="hover:-translate-y-1"]:hover,
body [class~="hover:scale-105"]:hover { transform: none; }

@media (max-width: 640px) {
  .site-header-inner { min-height: 64px; }
  .primary-navigation, .header-contact { display: none; }
  #nav-site-name { max-width: calc(100vw - 210px); }
  body [class~="text-4xl"], body [class~="text-5xl"], body [class~="text-6xl"] {
    overflow-wrap: anywhere;
  }
  #toast-container { right: 12px; bottom: 12px; width: calc(100% - 24px); }
  .project-image-dialog { width: calc(100vw - 16px); max-height: 90dvh; }
  .project-image-dialog-content { max-height: 90dvh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  [data-scroll-reveal].reveal-pending { opacity: 1; transform: none; }
  .service-media img { transition: none; }
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: #aeb6ad; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #7f8b80; }

.glow-indigo, .glow-emerald { box-shadow: none; }

/* Toast Notifications Container */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 420px;
  width: calc(100% - 48px);
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  animation: slideInRight 0.2s ease forwards;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast.toast-success {
  background: #064E3B;
  color: #A7F3D0;
  border: 1px solid #059669;
}

.toast.toast-error {
  background: #7F1D1D;
  color: #FECACA;
  border: 1px solid #DC2626;
}

.toast.toast-info {
  background: #e7eee9;
  color: #284b3c;
  border: 1px solid #aec3b6;
}

/* Rich Blog Article Typography */
.article-content {
  font-size: 1.125rem;
  line-height: 1.85;
  color: #46524b;
  max-width: 72ch;
  margin-inline: auto;
}

.article-content h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--ink);
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-weight: 500;
}

.article-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.article-content p {
  margin-bottom: 1.5rem;
}

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

.article-content ul {
  list-style-type: disc;
}

.article-content ol {
  list-style-type: decimal;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content pre {
  background: #ecebe4;
  border: 1px solid var(--line);
  padding: 1.25rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.article-content code {
  color: var(--accent-dark);
  font-size: 0.95em;
}

.article-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.25rem;
  font-style: italic;
  color: var(--muted);
  margin: 1.5rem 0;
}

/* Spinner */
.spinner {
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-left-color: #ffffff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.skills-marquee {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.skills-marquee-track {
  display: flex;
  width: max-content;
  animation: skills-marquee-scroll 32s linear infinite;
}
.skills-marquee:hover .skills-marquee-track { animation-play-state: paused; }
.skills-marquee-group {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 14px;
  padding-right: 14px;
}
.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: .9rem;
  font-weight: 600;
  white-space: nowrap;
}
.skill-chip img { width: 28px; height: 28px; object-fit: contain; }
@keyframes skills-marquee-scroll {
  to { transform: translateX(-50%); }
}

html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="dark"] body {
  --paper: #0b0f14;
  --surface: #111827;
  --ink: #f5f7fa;
  --muted: #9ca3af;
  --line: #1f2937;
  --accent: #16a34a;
  --accent-dark: #15803d;
  --green: #16a34a;
  --focus: #16a34a;
  background: var(--paper);
  color: var(--ink);
}
html[data-theme="dark"] body [class~="bg-slate-950"],
html[data-theme="dark"] body [class~="bg-slate-950/80"],
html[data-theme="dark"] body [class~="bg-slate-950/95"],
html[data-theme="dark"] body [class~="bg-slate-950/60"] { background-color: #0b0f14; }
html[data-theme="dark"] body [class~="bg-slate-900"],
html[data-theme="dark"] body [class~="bg-slate-900/80"],
html[data-theme="dark"] body [class~="bg-slate-900/60"],
html[data-theme="dark"] body [class~="bg-slate-900/50"],
html[data-theme="dark"] body [class~="bg-slate-900/40"],
html[data-theme="dark"] body [class~="bg-slate-900/30"] { background-color: #111827; }
html[data-theme="dark"] body [class~="bg-slate-800"],
html[data-theme="dark"] body [class~="bg-slate-800/60"],
html[data-theme="dark"] body [class~="bg-indigo-950"],
html[data-theme="dark"] body [class~="bg-indigo-950/80"] { background-color: #111827; }
html[data-theme="dark"] body [class~="bg-indigo-600"],
html[data-theme="dark"] body [class~="bg-indigo-500"] { background-color: #16a34a; }
html[data-theme="dark"] body [class~="text-white"],
html[data-theme="dark"] body [class~="text-slate-100"],
html[data-theme="dark"] body [class~="text-slate-200"],
html[data-theme="dark"] body [class~="text-slate-300"] { color: #f5f7fa; }
html[data-theme="dark"] body [class~="text-slate-400"],
html[data-theme="dark"] body [class~="text-slate-500"] { color: #9ca3af; }
html[data-theme="dark"] body [class~="text-indigo-300"],
html[data-theme="dark"] body [class~="text-indigo-400"],
html[data-theme="dark"] body [class~="text-indigo-500"] { color: #16a34a; }
html[data-theme="dark"] body [class~="border-slate-800"],
html[data-theme="dark"] body [class~="border-slate-800/80"],
html[data-theme="dark"] body [class~="border-slate-800/60"],
html[data-theme="dark"] body [class~="border-slate-800/90"],
html[data-theme="dark"] body [class~="border-slate-700"],
html[data-theme="dark"] body [class~="border-slate-700/80"] { border-color: #1f2937; }
html[data-theme="dark"] body [class~="bg-indigo-600"][class~="text-white"],
html[data-theme="dark"] body [class~="bg-indigo-500"][class~="text-white"] { color: #fff; }
html[data-theme="dark"] body [class~="glass-panel"],
html[data-theme="dark"] body [class~="glass-nav"] { background-color: #111827; border-color: #1f2937; }
html[data-theme="dark"] body .public-header { background-color: #0b0f14; border-color: #1f2937; }
html[data-theme="dark"] body .public-header { background: rgb(11 15 20 / 96%); }
html[data-theme="dark"] body [class~="hover:text-white"]:hover { color: #fff; }
html[data-theme="dark"] body [class~="hover:bg-slate-800"]:hover,
html[data-theme="dark"] body [class~="hover:bg-slate-800/60"]:hover { background-color: #1f2937; }
html[data-theme="dark"] body [class~="hover:bg-indigo-500"]:hover { background-color: #15803d; }
html[data-theme="dark"] body input,
html[data-theme="dark"] body textarea,
html[data-theme="dark"] body select { color: #f5f7fa; background-color: #111827; border-color: #1f2937; }
html[data-theme="dark"] body input::placeholder,
html[data-theme="dark"] body textarea::placeholder { color: #9ca3af; }
html[data-theme="dark"] body .article-content { color: #9ca3af; }
html[data-theme="dark"] body .article-content pre { background: #111827; }
html[data-theme="dark"] body .toast.toast-success {
  background: #111827;
  color: #16a34a;
  border-color: #16a34a;
}
html[data-theme="dark"] body .service-index { background: #111827; color: #16a34a; }
html[data-theme="dark"] body .primary-navigation a[aria-current="page"],
html[data-theme="dark"] body .mobile-navigation > a[aria-current="page"] { background: #111827; color: #f5f7fa; }
html[data-theme="dark"] body .skill-chip { background: #111827; color: #f5f7fa; }
html[data-theme="dark"] body .service-media { background: #111827; }

@media (prefers-reduced-motion: reduce) {
  .skills-marquee-track { animation: none; }
}

html[data-theme="light"] body,
html[data-theme="dark"] body {
  transition: background-color .18s ease, color .18s ease;
}
html[data-theme="dark"] body [class~="bg-indigo-950/80"],
html[data-theme="dark"] body [class~="bg-rose-950/80"],
html[data-theme="dark"] body [class~="bg-rose-900/50"],
html[data-theme="dark"] body [class~="bg-emerald-950/80"] { background-color: #111827; }
html[data-theme="dark"] body [class~="text-slate-600"] { color: #9ca3af; }
html[data-theme="dark"] body [class~="text-emerald-400"],
html[data-theme="dark"] body [class~="text-emerald-300"],
html[data-theme="dark"] body [class~="text-emerald-200"] { color: #16a34a; }
html[data-theme="dark"] body [class~="text-rose-200"],
html[data-theme="dark"] body [class~="text-rose-300"],
html[data-theme="dark"] body [class~="text-rose-400"] { color: #f09886; }
html[data-theme="dark"] body [class~="text-amber-300"] { color: #e9c477; }
html[data-theme="dark"] body [class~="text-blue-400"] { color: #86b9d5; }
html[data-theme="dark"] body [class~="border-indigo-700/40"],
html[data-theme="dark"] body [class~="border-indigo-700/50"],
html[data-theme="dark"] body [class~="border-indigo-500/30"] { border-color: #1f2937; }
html[data-theme="dark"] body [class~="border-rose-700/50"] { border-color: #68443d; }
html[data-theme="dark"] body [class~="border-emerald-700/50"] { border-color: #1f2937; }
html[data-theme="dark"] body [class~="bg-emerald-600"],
html[data-theme="dark"] body [class~="bg-emerald-700"] { background-color: #16a34a; }
html[data-theme="dark"] body [class~="bg-rose-600"],
html[data-theme="dark"] body [class~="bg-rose-700"] { background-color: #87463a; }
html[data-theme="dark"] body [class~="hover:bg-slate-900"]:hover { background-color: #111827; }
html[data-theme="dark"] body [class~="hover:bg-indigo-500"]:hover { background-color: #15803d; }
html[data-theme="dark"] body [class~="hover:bg-emerald-500"]:hover { background-color: #15803d; }
html[data-theme="dark"] body [class~="hover:text-indigo-300"]:hover,
html[data-theme="dark"] body [class~="hover:text-indigo-400"]:hover { color: #16a34a; }
html[data-theme="dark"] body [class~="shadow-xl"],
html[data-theme="dark"] body [class~="shadow-2xl"],
html[data-theme="dark"] body [class~="shadow-lg"],
html[data-theme="dark"] body [class~="shadow-md"] { box-shadow: 0 12px 32px rgb(0 0 0 / 22%); }
html[data-theme="dark"] body .header-contact {
  color: #f5f7fa;
  background-color: #16a34a;
}
html[data-theme="dark"] body .header-contact:hover { background-color: #15803d; }
html[data-theme="dark"] body #hero-primary-cta,
html[data-theme="dark"] body #contact-cta-btn { color: #f5f7fa; }
html[data-theme="dark"] body #hero-primary-cta:hover,
html[data-theme="dark"] body #contact-cta-btn:hover { background-color: #15803d; }
html[data-theme="dark"] body .article-content pre { color: #f5f7fa; border-color: #1f2937; }
html[data-theme="dark"] body .article-content code { color: #16a34a; }

.theme-toggle {
  display: inline-grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.theme-toggle:hover { transform: rotate(-8deg); background: #eeece4; }
.theme-toggle svg { width: 20px; height: 20px; }
html[data-theme="dark"] body .theme-toggle { color: #16a34a; background: #111827; border-color: #1f2937; }
html[data-theme="dark"] body .theme-toggle:hover { background: #1f2937; }

.not-found-main {
  min-height: min(760px, calc(100svh - 76px));
  padding-block: clamp(2.5rem, 6vw, 5rem);
}
.not-found-card {
  display: grid;
  max-width: 75rem;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.75rem);
  padding: clamp(1.25rem, 3vw, 2.5rem);
}
.not-found-art {
  width: 100%;
  max-width: 36rem;
  justify-self: center;
  margin: 0;
  overflow: hidden;
  background: #fffefa;
  border: 1px solid #d9ddd5;
  border-radius: 12px;
  box-shadow: 0 18px 48px rgb(32 42 39 / 8%);
}
.not-found-art img {
  display: block;
  width: 100%;
  height: auto;
}
.not-found-copy {
  min-width: 0;
  max-width: 30rem;
  padding-top: clamp(0rem, 2vw, 1.5rem);
}
.not-found-code {
  margin: 0;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: clamp(7.5rem, 15vw, 12rem);
  font-weight: 500;
  letter-spacing: -.085em;
  line-height: .95;
}
.not-found-copy h1 {
  margin: .85rem 0 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.4vw, 3rem);
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.08;
}
.not-found-description {
  max-width: 27rem;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: clamp(.98rem, 1.5vw, 1.05rem);
  line-height: 1.7;
}
.not-found-home {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: .7rem 1.05rem;
  color: #fffefa;
  background: var(--green);
  border: 1px solid var(--green);
  border-radius: 6px;
  font-size: .92rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.not-found-home:hover {
  color: #fffefa;
  background: #254a3b;
  border-color: #254a3b;
  box-shadow: 0 5px 14px rgb(37 74 59 / 18%);
  transform: translateY(-1px);
}
.not-found-home:active { transform: translateY(0); box-shadow: none; }
.not-found-home svg { width: 18px; height: 18px; transition: transform .18s ease; }
.not-found-home:hover svg { transform: translateX(3px); }
html[data-theme="dark"] body .not-found-art {
  background: #111827;
  border-color: #1f2937;
  box-shadow: 0 20px 52px rgb(0 0 0 / 22%);
}
html[data-theme="dark"] body .not-found-code { color: #16a34a; }
html[data-theme="dark"] body .not-found-home { color: #f5f7fa; background: #16a34a; border-color: #16a34a; }
html[data-theme="dark"] body .not-found-home:hover { background: #15803d; border-color: #15803d; }
html[data-theme="dark"] body .site-brand-mark,
html[data-theme="dark"] body .site-footer-mark { color: #16a34a; background: #111827; border-color: #1f2937; }

@media (max-width: 1023px) {
  .site-header-inner > div { gap: 12px; }
  .site-brand { min-width: 0; }
  .site-brand > div:last-child { min-width: 0; }
  #nav-site-name { display: block; max-width: min(55vw, 320px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .primary-navigation { display: none; }
  .header-contact { display: none; }
}
@media (max-width: 700px) {
  .not-found-main { min-height: 0; }
  .not-found-card {
    max-width: 34rem;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(1.5rem, 5vw, 2.25rem);
    padding: clamp(.75rem, 4vw, 1.5rem);
  }
  .not-found-art { width: min(100%, 30rem); }
  .not-found-copy {
    max-width: 30rem;
    padding: 0 clamp(.25rem, 2vw, 1rem) 1rem;
  }
}
@media (max-width: 640px) {
  .not-found-main { padding-block: 1.25rem; }
  .not-found-card { gap: 1.25rem; padding: .5rem; }
  .not-found-art { border-radius: 9px; }
  .not-found-copy { padding: 0 .5rem .5rem; }
  .not-found-code { font-size: clamp(6.5rem, 25vw, 9rem); }
  .not-found-copy h1 { margin-top: .6rem; font-size: clamp(1.9rem, 8vw, 2.5rem); }
  .not-found-description { margin-top: .75rem; font-size: .96rem; }
  .not-found-home { margin-top: 1rem; }
}
@media (max-width: 360px) {
  #nav-site-name { max-width: calc(100vw - 210px); }
  .not-found-main { padding-block: .75rem; }
  .not-found-card { gap: .9rem; padding: .25rem; }
  .not-found-code { font-size: 6rem; }
  .not-found-copy h1 { font-size: 1.85rem; }
  .not-found-description { font-size: .92rem; line-height: 1.6; }
}

.portfolio-assistant {
  position: fixed;
  z-index: 80;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  font-family: var(--font-sans);
}
.portfolio-assistant-panel {
  position: absolute;
  right: 0;
  bottom: 68px;
  display: flex;
  width: min(380px, calc(100vw - 32px));
  max-height: min(620px, calc(100dvh - 112px));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 20px 60px rgb(0 0 0 / 22%);
}
.portfolio-assistant-panel[hidden] { display: none; }
.portfolio-assistant-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 15px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.portfolio-assistant-header h2 { margin: 3px 0 0; color: var(--ink); font-size: 1rem; font-weight: 700; }
.portfolio-assistant-eyebrow { margin: 0; color: var(--accent); font-size: .65rem; font-weight: 700; letter-spacing: .12em; }
.portfolio-assistant-caption { margin: 4px 0 0; color: var(--muted); font-size: .75rem; }
.portfolio-assistant-close {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
}
.portfolio-assistant-messages {
  display: flex;
  min-height: 150px;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 16px;
  overscroll-behavior: contain;
}
.portfolio-assistant-message {
  width: fit-content;
  max-width: 92%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  font-size: .84rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.portfolio-assistant-message-bot { align-self: flex-start; background: var(--paper); color: var(--ink); }
.portfolio-assistant-message-user {
  align-self: flex-end;
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.portfolio-assistant-links { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.portfolio-assistant-links a {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent-dark);
  font-size: .72rem;
  font-weight: 600;
  text-decoration: none;
}
.portfolio-assistant-links a:hover { border-color: var(--accent); color: var(--accent); }
.portfolio-assistant-suggestions {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 0 14px 12px;
  scrollbar-width: thin;
}
.portfolio-assistant-suggestions button {
  min-height: 34px;
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: .7rem;
  cursor: pointer;
}
.portfolio-assistant-suggestions button:hover { border-color: var(--accent); color: var(--accent); }
.portfolio-assistant-form {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}
.portfolio-assistant-form input {
  min-width: 0;
  min-height: 44px;
  flex: 1;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: .85rem;
}
.portfolio-assistant-form input::placeholder { color: var(--muted); }
.portfolio-assistant-form button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
.portfolio-assistant-form button:hover { background: var(--accent-dark); }
.portfolio-assistant-form svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.portfolio-assistant-note { margin: 0; padding: 0 14px 12px; color: var(--muted); font-size: .65rem; }
.portfolio-assistant-launcher {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 28px rgb(22 163 74 / 28%);
  font: inherit;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .18s ease, background-color .18s ease;
}
.portfolio-assistant-launcher:hover { transform: translateY(-2px); background: var(--accent-dark); }
.portfolio-assistant-chat-icon { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.portfolio-assistant-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
html[data-theme="dark"] body .portfolio-assistant-panel { box-shadow: 0 20px 60px rgb(0 0 0 / 55%); }

@media (max-width: 480px) {
  .portfolio-assistant { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); }
  .portfolio-assistant-panel {
    position: fixed;
    right: max(8px, env(safe-area-inset-right));
    bottom: max(76px, calc(env(safe-area-inset-bottom) + 68px));
    width: calc(100vw - 16px);
    max-height: min(620px, calc(100dvh - 100px));
  }
}

.homepage-banner-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgb(2 6 23 / 68%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.homepage-banner-overlay.hidden { display: none; }
body.homepage-banner-open { overflow: hidden; }

.homepage-banner-card {
  position: relative;
  width: min(380px, 90vw);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  padding: 9px;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 14px;
  background: #202020;
  box-shadow: 0 24px 70px rgb(0 0 0 / 55%);
}

.homepage-banner-card img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 50px);
  max-height: calc(100dvh - 50px);
  border-radius: 9px;
  background: #fff;
  object-fit: contain;
}

.homepage-banner-card img.hidden { display: none; }

.homepage-banner-nav {
  position: absolute;
  top: 50%;
  z-index: 1;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 25%);
  border-radius: 50%;
  background: rgb(15 23 42 / 75%);
  color: #fff;
  font-size: 27px;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}

.homepage-banner-nav.hidden { display: none; }
.homepage-banner-previous { left: 16px; }
.homepage-banner-next { right: 16px; }

.homepage-banner-indicators {
  position: absolute;
  right: 52px;
  bottom: 18px;
  left: 52px;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.homepage-banner-indicators.hidden { display: none; }

.homepage-banner-indicator {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 1px solid #fff;
  border-radius: 50%;
  background: rgb(15 23 42 / 65%);
  cursor: pointer;
}

.homepage-banner-indicator.is-active { background: #fff; }
.homepage-banner-card img { touch-action: pan-y; }

.homepage-banner-close {
  position: absolute;
  top: 13px;
  right: 13px;
  z-index: 1;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #ff5b64;
  color: #fff;
  cursor: pointer;
  transition: background-color .18s ease, transform .18s ease;
}

.homepage-banner-close:hover {
  transform: scale(1.08);
  background: #ef4444;
}

.homepage-banner-close svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2.5;
}

@media (prefers-reduced-motion: reduce) {
  .homepage-banner-close { transition: none; }
}
