:root {
  --bg: #0c0c0c;
  --surface: #141414;
  --text: #f2f2f2;
  --muted: #9a9a9a;
  --accent: #2dd4bf;
  --accent-soft: #14352f;
  --accent-rgb: 45, 212, 191;
  --line: rgba(255, 255, 255, 0.1);
  --radius: 8px;
  --button-text: #04110e;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.24);
  scrollbar-color: rgba(var(--accent-rgb), 0.45) transparent;
  scrollbar-width: thin;
}

:root[data-theme="light"] {
  --bg: #f7f8f8;
  --surface: #ffffff;
  --text: #171717;
  --muted: #5c5c5c;
  --accent: #14b8a6;
  --accent-soft: #ccfbf1;
  --accent-rgb: 20, 184, 166;
  --line: rgba(23, 23, 23, 0.12);
  --button-text: #ffffff;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  scrollbar-color: rgba(var(--accent-rgb), 0.4) transparent;
}

* {
  box-sizing: border-box;
}

html {
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.45) transparent;
  scroll-padding-top: 72px;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: rgba(var(--accent-rgb), 0.35);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--accent-rgb), 0.55);
  border: 2px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

:root[data-theme="light"] *::-webkit-scrollbar-thumb {
  background: rgba(var(--accent-rgb), 0.32);
  border: 2px solid transparent;
  background-clip: padding-box;
}

:root[data-theme="light"] *::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--accent-rgb), 0.5);
  border: 2px solid transparent;
  background-clip: padding-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

:root[data-theme="light"] body,
body[data-theme="light"] {
  background: var(--bg);
}

.ambient {
  position: fixed;
  width: min(320px, 45vw);
  height: min(320px, 45vw);
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
}

.ambient-one {
  background: var(--accent);
  top: -80px;
  left: -60px;
}

.ambient-two {
  background: var(--accent);
  right: -80px;
  bottom: -100px;
  opacity: 0.08;
}

:root[data-theme="light"] .ambient-one {
  opacity: 0.2;
}

:root[data-theme="light"] .ambient-two {
  opacity: 0.14;
}

.site-nav {
  position: sticky;
  top: 12px;
  z-index: 50;
  width: min(960px, 92vw);
  margin: 16px auto 0;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(12, 12, 12, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-nav:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.35), var(--shadow);
}

:root[data-theme="light"] .site-nav {
  background: rgba(247, 248, 248, 0.86);
}

.site-nav-inner {
  width: 100%;
  padding: 0 20px;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-nav-brand {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.site-nav-logo {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--text);
}

.site-nav-dot {
  display: block;
  width: 7px;
  height: 7px;
  margin-bottom: 2px;
  border-radius: 1.5px;
  background: var(--accent);
  flex-shrink: 0;
}

.site-nav-brand:hover,
.site-nav-brand:focus-visible {
  opacity: 0.85;
}

.site-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.site-nav-links a:hover,
.site-nav-links a:focus-visible {
  color: var(--text);
  background: rgba(var(--accent-rgb), 0.1);
}

.site-nav-links a.is-active {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.12);
}

.site-nav-links .site-nav-cta {
  margin-left: 4px;
  color: var(--button-text);
  background: var(--accent);
  border: 1px solid transparent;
}

.site-nav-links .site-nav-cta:hover,
.site-nav-links .site-nav-cta:focus-visible,
.site-nav-links .site-nav-cta.is-active {
  color: var(--button-text);
  background: color-mix(in srgb, var(--accent) 85%, #000);
}

.nav-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
}

:root[data-theme="light"] .nav-menu-toggle {
  background: rgba(31, 41, 55, 0.06);
}

.nav-menu-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-menu-toggle[aria-expanded="true"] .nav-menu-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-menu-toggle[aria-expanded="true"] .nav-menu-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-menu-toggle[aria-expanded="true"] .nav-menu-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

.hero-body {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 52px);
  align-items: center;
}

.hero-content {
  min-width: 0;
  margin: 0;
}

.hero-content .lead {
  margin-top: 0;
}

.hero-portrait {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 5px;
  border: 1px solid rgba(var(--accent-rgb), 0.5);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(var(--accent-rgb), 0.14), rgba(255, 255, 255, 0.03));
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(var(--accent-rgb), 0.08);
}

.hero-portrait img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

:root[data-theme="light"] .hero-portrait {
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(var(--accent-rgb), 0.1);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.hero-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.15);
}

.theme-toggle-track {
  display: inline-flex;
  width: 42px;
  height: 22px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  position: relative;
  flex-shrink: 0;
}

.theme-toggle-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text);
  position: absolute;
  top: 50%;
  left: 4px;
  transform: translateY(-50%);
  transition: left 0.25s ease, background-color 0.25s ease;
}

.theme-toggle[data-theme="dark"] .theme-toggle-thumb {
  left: calc(100% - 18px);
}

.theme-toggle .theme-label {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.theme-toggle.scrolling .theme-toggle-thumb {
  animation: theme-thumb-bounce 0.25s ease;
}

@keyframes theme-thumb-bounce {
  0%, 100% { transform: translateY(-50%); }
  50% { transform: translateY(-45%); }
}

.chat-toggle {
  min-width: 48px;
  padding: 10px 12px;
  position: relative;
}

.chat-toggle .bot-icon {
  width: 20px;
  height: 20px;
  display: block;
}

.chat-toggle.crossed {
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
}

.chat-toggle.crossed::before,
.chat-toggle.crossed::after {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  top: 50%;
  height: 2px;
  background: var(--accent);
  border-radius: 999px;
}

.chat-toggle.crossed::before {
  transform: translateY(-50%) rotate(45deg);
}

.chat-toggle.crossed::after {
  transform: translateY(-50%) rotate(-45deg);
}

:root[data-theme="light"] .theme-toggle {
  background: rgba(31, 41, 55, 0.09);
  border-color: rgba(31, 41, 55, 0.14);
}

:root[data-theme="light"] .theme-toggle-track {
  background: rgba(31, 41, 55, 0.16);
  border: 1px solid rgba(31, 41, 55, 0.2);
}

:root[data-theme="light"] .theme-toggle-thumb {
  background: #fff;
  box-shadow: 0 2px 4px rgba(31, 41, 55, 0.12);
}

:root[data-theme="light"] .form-row input,
:root[data-theme="light"] .form-row textarea {
  border: 1px solid var(--line);
  background: rgba(31, 41, 55, 0.04);
}

:root[data-theme="light"] .form-row input:focus,
:root[data-theme="light"] .form-row textarea:focus {
  background: rgba(31, 41, 55, 0.08);
}

.layout {
  position: relative;
  z-index: 1;
  width: min(960px, 92vw);
  margin: 16px auto 48px;
  display: grid;
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.layout > .card {
  scroll-margin-top: 80px;
}

.layout > .card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.35), var(--shadow);
}

.hero h1 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.05;
}

.tag {
  margin: 0;
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 10px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.1);
}

.lead {
  margin: 12px 0 0;
  max-width: 70ch;
  color: var(--muted);
  line-height: 1.6;
}

.contact-info {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 14px 0;
  font-size: 0.9rem;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
}

.contact-info span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.contact-info a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--accent);
  transition: all 0.2s ease;
}

.contact-info a:hover {
  color: var(--bg);
  background: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  border-bottom: none;
}

:root[data-theme="light"] .contact-info a:hover {
  color: #04110e;
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.35);
}

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: var(--accent);
  color: var(--button-text);
  border-color: var(--accent);
}

:root[data-theme="light"] .social-links a:hover {
  color: #04110e;
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.3);
  transform: translateY(-1px);
}

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

.download-button {
  gap: 8px;
}

.download-button svg {
  flex-shrink: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.button-primary {
  background: var(--accent);
  color: #ffffff;
  border: 1px solid transparent;
}

.button-primary:hover,
.button-primary:focus-visible {
  filter: brightness(1.05);
}

.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;
}

h2 {
  margin: 0 0 18px;
  font-size: 1.3rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
}

h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.55), transparent);
}

.chatbot-panel h2 {
  display: block;
}

.chatbot-panel h2::after {
  display: none;
}

h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: var(--text);
}

.contact-card {
  display: grid;
  gap: 20px;
}

.contact-heading {
  display: grid;
  gap: 18px;
}

.contact-heading > div {
  display: grid;
  gap: 8px;
}

.contact-intro {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  max-width: 72ch;
}

.contact-intro a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent);
}

.contact-intro a:hover,
.contact-intro a:focus-visible {
  text-decoration: underline;
}

.contact-body {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.4fr);
  gap: 28px;
  align-items: start;
}

.contact-details {
  display: grid;
  gap: 20px;
}

.contact-detail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.contact-detail-list li {
  display: grid;
  gap: 6px;
}

.contact-detail-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-detail-label svg {
  color: var(--accent);
  flex-shrink: 0;
}

.contact-detail-value {
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  word-break: break-word;
}

a.contact-detail-value {
  color: var(--accent);
  border-bottom: 1px solid transparent;
  width: fit-content;
  transition: border-color 0.2s ease;
}

a.contact-detail-value:hover,
a.contact-detail-value:focus-visible {
  border-bottom-color: var(--accent);
}

.contact-socials {
  margin-top: 0;
  flex-wrap: wrap;
}

.contact-form-panel {
  min-width: 0;
}

.contact-form {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-row {
  display: grid;
  gap: 10px;
}

.form-row label {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.form-row input,
.form-row textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 16px 18px;
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-row input::placeholder,
.form-row textarea::placeholder {
  color: var(--muted);
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

.form-message {
  grid-column: 1 / -1;
}

.contact-field-wrap {
  position: relative;
}

.contact-field-wrap:has(textarea.is-invalid) {
  padding-bottom: 44px;
}

.form-message textarea {
  min-height: 170px;
  resize: vertical;
}

.form-row textarea.is-invalid,
.form-row input.is-invalid {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.22);
  animation: chat-input-shake 0.32s ease;
}

.field-error {
  z-index: 3;
  margin: 0;
  max-width: min(260px, 90%);
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  background: var(--surface);
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.35;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(var(--accent-rgb), 0.12);
  pointer-events: none;
}

.field-error-below {
  position: absolute;
  left: 12px;
  top: calc(100% + 8px);
}

.field-error-below::before {
  content: "";
  position: absolute;
  left: 16px;
  bottom: 100%;
  border: 6px solid transparent;
  border-bottom-color: rgba(var(--accent-rgb), 0.45);
}

.field-error-below::after {
  content: "";
  position: absolute;
  left: 17px;
  bottom: calc(100% - 1px);
  border: 5px solid transparent;
  border-bottom-color: var(--surface);
}

:root[data-theme="light"] .field-error {
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(var(--accent-rgb), 0.16);
}

.send-button {
  width: fit-content;
  min-width: 180px;
  justify-self: start;
}

.privacy-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  grid-column: 1 / -1;
}

.privacy-note a {
  color: var(--accent);
  text-decoration: none;
}

.privacy-note a:hover {
  text-decoration: underline;
}

/* Timeline */
.timeline {
  display: grid;
  gap: 16px;
}

.timeline-item {
  border-left: 2px solid var(--accent);
  padding-left: 18px;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
}

.timeline-marker {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 4px;
}

.company {
  margin: 4px 0 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  transition: color 0.2s ease;
}

.timeline-item:hover .company {
  color: var(--accent);
}

.timeline-item:hover .company-header h3 {
  color: var(--accent);
}

:root[data-theme="light"] .timeline-item:hover .company,
:root[data-theme="light"] .timeline-item:hover .company-header h3 {
  color: #0f766e;
}

:root[data-theme="light"] .timeline-item:hover {
  background: rgba(var(--accent-rgb), 0.06);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.timeline-item ul {
  margin: 8px 0;
  padding-left: 20px;
  color: var(--muted);
}

.timeline-item li {
  margin: 4px 0;
  line-height: 1.5;
  font-size: 0.9rem;
}

.company-header {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.company-header h3 {
  margin: 0 0 4px;
  font-weight: 700;
  transition: color 0.2s ease;
}

.company-logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.company-header div h3 {
  margin: 0 0 4px;
}

/* Chatbot */
.chat-widget {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  display: grid;
  justify-items: end;
  gap: 10px;
}

.chat-launcher {
  position: relative;
  isolation: isolate;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--accent);
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow:
    0 0 0 0 rgba(var(--accent-rgb), 0.4),
    0 8px 24px rgba(var(--accent-rgb), 0.28),
    var(--shadow);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: visible;
  animation: chat-launcher-glow 2.6s ease-in-out infinite;
}

.chat-launcher-rings {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.chat-launcher-ring {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.35);
  opacity: 0;
  animation: chat-launcher-pulse 2.6s cubic-bezier(0.15, 0.6, 0.3, 1) infinite;
}

.chat-launcher-ring:nth-child(2) {
  animation-delay: 1.3s;
}

@keyframes chat-launcher-pulse {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

@keyframes chat-launcher-glow {
  0%, 100% {
    box-shadow:
      0 0 0 0 rgba(var(--accent-rgb), 0.35),
      0 8px 24px rgba(var(--accent-rgb), 0.22),
      var(--shadow);
  }
  50% {
    box-shadow:
      0 0 0 8px rgba(var(--accent-rgb), 0),
      0 10px 28px rgba(var(--accent-rgb), 0.38),
      var(--shadow);
  }
}

.chat-launcher-icon {
  display: inline-block;
  width: 1.05rem;
  height: 1.05rem;
  object-fit: contain;
}

.hero-actions .button-primary,
.chat-launcher,
.send-button,
.chat-form button {
  color: #ffffff;
}

:root[data-theme="light"] .hero-actions .button-primary,
:root[data-theme="light"] .chat-launcher,
:root[data-theme="light"] .send-button,
:root[data-theme="light"] .chat-form button {
  color: #000000;
}


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

.chatbot-panel {
  width: min(390px, calc(100vw - 26px));
  height: min(620px, calc(100vh - 100px));
  display: grid;
  gap: 12px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transform-origin: bottom right;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.chat-widget.open .chatbot-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.chat-widget.open .chat-launcher {
  opacity: 0;
  pointer-events: none;
  display: none;
}

.chat-widget.open .chat-launcher-ring {
  animation: none;
}

.chat-widget.closed .chatbot-panel,
.chat-widget[data-chat-state="closed"] .chatbot-panel {
  display: none;
}

.chatbot-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.chatbot-header h2 {
  margin: 8px 0 0;
  font-size: 1.15rem;
}

.chat-close {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent);
  border-radius: var(--radius);
  width: 30px;
  height: 30px;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.chat-messages {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.4) transparent;
}

.chat-messages::-webkit-scrollbar {
  width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(var(--accent-rgb), 0.35);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--accent-rgb), 0.55);
}

.message {
  max-width: min(100%, 720px);
  padding: 11px 13px;
  border-radius: 14px;
  line-height: 1.5;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.message p {
  margin: 0;
  color: inherit;
}

.message p + p,
.message p + ul,
.message ul + p {
  margin-top: 0.55em;
}

.message ul {
  margin: 0.35em 0 0;
  padding-left: 1.15em;
}

.message li {
  margin: 0.2em 0;
}

.message li + li {
  margin-top: 0.35em;
}

.message strong {
  font-weight: 700;
  color: inherit;
}

.message em {
  font-style: italic;
}

.message code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.86em;
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.message-user {
  justify-self: end;
  background: var(--accent);
  color: white;
}

.message-bot {
  justify-self: start;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

.message-typing {
  display: inline-flex;
  align-items: center;
  min-height: 1.5em;
  padding-block: 14px;
}

.typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.typing-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  animation: typing-bounce 1.1s ease-in-out infinite;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typing-bounce {
  0%,
  60%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

:root[data-theme="dark"] .message-bot {
  background: rgba(0, 0, 0, 0.3);
}

:root[data-theme="light"] .chatbot-panel {
  box-shadow: var(--shadow);
}

:root[data-theme="light"] .chat-messages {
  background: rgba(0, 0, 0, 0.04);
}

:root[data-theme="light"] .message-bot {
  background: #ffffff;
  border-color: rgba(31, 41, 55, 0.1);
}

:root[data-theme="light"] .message code {
  background: rgba(15, 23, 42, 0.06);
}

:root[data-theme="light"] .chat-form input {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.2);
}

:root[data-theme="light"] .chat-field-error {
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(var(--accent-rgb), 0.16);
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
}

.chat-input-wrap {
  position: relative;
  min-width: 0;
}

.chat-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  font: inherit;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.chat-form input:focus {
  outline: 2px solid rgba(var(--accent-rgb), 0.3);
  border-color: var(--accent);
}

.chat-form input.is-invalid {
  border-color: var(--accent);
  outline: 2px solid rgba(var(--accent-rgb), 0.25);
  animation: chat-input-shake 0.32s ease;
}

.chat-field-error {
  position: absolute;
  left: 8px;
  bottom: calc(100% + 8px);
  z-index: 3;
  margin: 0;
  max-width: min(240px, 80vw);
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  background: var(--surface);
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.35;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(var(--accent-rgb), 0.12);
  pointer-events: none;
}

.chat-field-error::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 100%;
  border: 6px solid transparent;
  border-top-color: rgba(var(--accent-rgb), 0.45);
}

.chat-field-error::before {
  content: "";
  position: absolute;
  left: 17px;
  top: calc(100% - 1px);
  border: 5px solid transparent;
  border-top-color: var(--surface);
}

@keyframes chat-input-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-3px);
  }
  75% {
    transform: translateX(3px);
  }
}

.chat-form button {
  border: 0;
  border-radius: 12px;
  padding: 0 16px;
  min-height: 46px;
  background: var(--accent);
  color: #ffffff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.chat-form button:hover {
  filter: brightness(0.94);
}

.chat-form button:disabled {
  opacity: 0.7;
  cursor: wait;
}

/* Skills List */
.skills-list {
  margin: 0;
  display: grid;
  gap: 0;
}

.skills-row {
  display: grid;
  grid-template-columns: minmax(140px, 200px) 1fr;
  gap: 16px 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.skills-row:first-child {
  padding-top: 0;
}

.skills-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.skills-row dt {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
}

.skills-row dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.95rem;
}

.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.06);
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.2;
  cursor: default;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.skill-chip:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.14);
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.18);
}

.skill-chip:hover img {
  opacity: 1;
}

:root[data-theme="light"] .skill-chip:hover {
  background: rgba(var(--accent-rgb), 0.22);
  box-shadow: 0 6px 16px rgba(var(--accent-rgb), 0.28);
  border-color: var(--accent);
}

.skill-chip img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.92;
}

:root:not([data-theme="light"]) .skill-chip img {
  filter: invert(1) brightness(1.15);
}

:root[data-theme="light"] .skill-chip img {
  opacity: 0.88;
}

.skills-row-chips dd {
  color: var(--text);
}

/* Education Grid */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.edu-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: transparent;
  transition: border-color 0.2s ease;
}

.edu-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 4px;
}

.edu-logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 4px;
}

.edu-header .company {
  margin: 4px 0 0;
}

.edu-item:hover {
  border-color: var(--accent);
}

:root[data-theme="light"] .edu-item:hover {
  background: rgba(var(--accent-rgb), 0.08);
  box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.16);
}

.edu-item h3 {
  margin-bottom: 4px;
}

.period {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  color: var(--accent);
  margin: 8px 0 4px;
}

.detail {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Projects */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.project-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: transparent;
  transition: border-color 0.2s ease;
}

.project-card:hover {
  border-color: var(--accent);
}

:root[data-theme="light"] .project-card:hover {
  background: rgba(var(--accent-rgb), 0.06);
  box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.16);
}

.project-card h3 {
  margin-bottom: 6px;
}

.tech-stack {
  margin: 0 0 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  display: inline-block;
  padding: 4px 8px;
  background: rgba(var(--accent-rgb), 0.1);
  border-radius: 4px;
}

.project-card p:not(.tech-stack) {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.9rem;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.project-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.project-links a:hover {
  background: var(--accent);
  color: var(--button-text);
  border-color: var(--accent);
}

:root[data-theme="light"] .project-links a:hover {
  color: #04110e;
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.3);
  transform: translateY(-1px);
}

/* Achievements */
.achievements {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.achievements li {
  border-left: 2px solid var(--accent);
  padding: 12px 14px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.9rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: rgba(var(--accent-rgb), 0.06);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.achievements li:hover {
  background: rgba(var(--accent-rgb), 0.1);
}

:root[data-theme="light"] .achievements li:hover {
  background: rgba(var(--accent-rgb), 0.16);
  box-shadow: 0 2px 10px rgba(var(--accent-rgb), 0.18);
}

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

.achievement-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted var(--accent);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.achievement-link:hover,
.achievement-link:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.achievement-link strong {
  color: inherit;
}

/* General */
section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.reveal {
  animation: slideIn 0.65s ease both;
  animation-delay: var(--delay, 0s);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  .hero-body {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-portrait {
    width: min(300px, 82vw);
  }

  .nav-menu-toggle {
    display: inline-flex;
  }

  .site-nav-inner {
    flex-wrap: wrap;
    min-height: 56px;
    padding: 6px 16px;
  }

  .site-nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 8px 0 12px;
    border-top: 1px solid var(--line);
  }

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

  .site-nav-links a {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 14px;
    border-radius: var(--radius);
  }

  .site-nav-links .site-nav-cta {
    margin-left: 0;
    margin-top: 4px;
    justify-content: center;
  }

  .contact-body {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 640px) {
  .layout {
    margin: 12px auto 28px;
    gap: 14px;
  }

  .site-nav {
    top: 8px;
    margin-top: 12px;
  }

  .site-nav-inner {
    padding: 0 14px;
  }

  .card {
    padding: 18px;
  }

  .hero-portrait {
    width: min(280px, 82vw);
    margin: 0;
  }

  .contact-info {
    flex-direction: column;
    gap: 8px;
  }

  .skills-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

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

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

  .chat-widget {
    left: auto;
    right: 10px;
    bottom: 10px;
    justify-items: end;
    width: auto;
  }

  .chat-launcher {
    width: 48px;
    height: 48px;
    padding: 0;
    text-align: center;
    border-radius: 999px;
  }

  .chat-launcher .chat-launcher-text {
    display: none;
  }

  .chatbot-panel {
    width: 100%;
    height: min(78vh, 640px);
    transform-origin: bottom center;
  }

  .chat-form {
    grid-template-columns: 1fr auto;
  }
}

/* QA Animations */

/* Typing Effect */
.cursor {
  animation: blink 1s infinite;
}
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}
#typing-text {
  border-right: 2px solid var(--accent);
}

/* Accessibility: Reduce Motion */
@media (prefers-reduced-motion: reduce) {
  .cursor, #typing-text, .typing-dots span {
    animation: none;
  }

  .ambient {
    opacity: 0.06;
  }

  .site-nav-links a,
  .site-nav-brand,
  .nav-menu-toggle-bar {
    transition: none;
  }

  .chat-launcher-ring {
    animation: none;
    opacity: 0;
  }

  .chat-launcher {
    animation: none;
  }
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 24px;
  padding: 16px;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer p {
  margin: 0 0 8px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--text);
}

:root[data-theme="light"] .footer-links a:hover,
:root[data-theme="light"] a:hover {
  color: #0f766e;
}

