/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0a0a0f;
  --bg-secondary: #111118;
  --text: #e8e8f0;
  --text-muted: #7a7a9a;
  --accent: #7c6aff;
  --accent-hover: #6357e0;
  --accent-glow: rgba(124, 106, 255, 0.12);
  --border: #1e1e2e;
  --card-bg: #111118;
  --teal: #00d2b4;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

a:hover {
  color: var(--accent-hover);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: var(--accent);
  margin-top: 0.5rem;
}

section {
  padding: 6rem 0;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-outline {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
}

.btn-outline:hover {
  background: var(--accent);
  color: #fff;
}

/* ===== Navigation ===== */
body > nav {
  position: fixed;
  top: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 3rem;
  background: rgba(15, 15, 15, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
}

.logo-mark {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.logo-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}


.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a.nav-admin-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal);
  background: rgba(0, 210, 180, 0.1);
  border: 1px solid rgba(0, 210, 180, 0.25);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.nav-links a.nav-admin-badge:hover {
  background: rgba(0, 210, 180, 0.2);
  color: var(--teal);
}

/* ===== Hero ===== */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 3rem;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.hero-greeting {
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.hero-role {
  font-size: clamp(1.2rem, 3vw, 2rem);
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 500px;
  margin-bottom: 2rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ===== Expertise ===== */
#expertise {
  background: var(--bg-secondary);
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
}

.expertise-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.expertise-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 4px 24px var(--accent-glow);
}

.expertise-icon {
  width: 44px;
  height: 44px;
  color: var(--accent);
  margin-bottom: 1rem;
}

.expertise-icon svg {
  width: 100%;
  height: 100%;
}

.expertise-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.expertise-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ===== About ===== */
#about {
  background: var(--bg);
}

.about-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 4rem;
  align-items: center;
}

.image-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: var(--card-bg);
  border: 2px dashed var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.about-text .btn {
  margin-top: 0.5rem;
}

/* ===== Projects ===== */
#projects {
  background: var(--bg-secondary);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.project-image {
  height: 180px;
  position: relative;
  overflow: hidden;
  background: #0d0b1e;
}

.project-thumb {
  position: absolute;
  top: -8%;
  left: -6%;
  width: 118%;
  height: 118%;
  object-fit: cover;
  object-position: top center;
  transform: rotate(10deg);
  transform-origin: top center;
  display: block;
}

.project-image--icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 60% 40%, rgba(124,106,255,0.18) 0%, rgba(0,210,180,0.10) 60%, transparent 100%),
              #0d0b1e;
}

.project-image--icon .project-icon {
  width: 100%;
  height: 100%;
}

.project-label {
  position: absolute;
  bottom: 0.75rem;
  left: 1rem;
  z-index: 1;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  backdrop-filter: blur(6px);
}

.project-info {
  padding: 1.5rem;
}

.project-info h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.project-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.project-tags span {
  background: rgba(108, 99, 255, 0.15);
  color: var(--accent);
  font-size: 0.78rem;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  font-weight: 500;
}

.project-links {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  align-items: center;
}

.btn-demo-request {
  background: transparent;
  border: 1.5px solid #00d2b4;
  color: #00d2b4;
  padding: 0.35rem 0.9rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  line-height: 1.4;
}

.btn-demo-request:hover {
  background: rgba(0, 210, 180, 0.12);
  color: #00d2b4;
}

/* Demo request banner above contact form */
#demo-request-banner[hidden] { display: none !important; }
#demo-request-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(0, 210, 180, 0.08);
  border: 1px solid rgba(0, 210, 180, 0.25);
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1.5rem;
  color: #e8e8f0;
  font-size: 0.95rem;
}

#demo-request-banner strong {
  color: #00d2b4;
}

.demo-cancel-btn {
  background: transparent;
  border: none;
  color: #7a7a9a;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  white-space: nowrap;
  transition: color 0.2s;
}

.demo-cancel-btn:hover {
  color: #e8e8f0;
}

/* ===== Skills ===== */
#skills {
  background: var(--bg);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

.skill-category {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
}

.skill-category h3 {
  color: var(--accent);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
}

.skill-category ul {
  list-style: none;
}

.skill-category li {
  color: var(--text-muted);
  padding: 0.4rem 0;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
}

.skill-category li:last-child {
  border-bottom: none;
}

/* ===== Contact ===== */
#contact {
  background: var(--bg-secondary);
}
.contact-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  margin-top: -1.5rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 640px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.85rem 1rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
  width: 100%;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

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

.contact-form textarea {
  resize: vertical;
}

.contact-form[hidden] { display: none; }

.contact-form .btn {
  align-self: flex-start;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.field-group input.invalid,
.field-group textarea.invalid {
  border-color: #ff5a5a;
}

.field-msg {
  font-size: 0.78rem;
  color: #ff5a5a;
  min-height: 1em;
}

.dsgvo-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1.5;
}

.dsgvo-label input[type="checkbox"] {
  margin-top: 0.15rem;
  accent-color: var(--accent);
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.dsgvo-label a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-error {
  font-size: 0.85rem;
  color: #ff5a5a;
  padding: 0.6rem 0.9rem;
  background: rgba(255, 90, 90, 0.08);
  border: 1px solid rgba(255, 90, 90, 0.25);
  border-radius: 6px;
}

/* Success state */
#contact-success[hidden] { display: none; }

#contact-success {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 2rem 0;
}

.success-icon svg {
  width: 52px;
  height: 52px;
  stroke: var(--teal);
}

#contact-success h3 {
  font-size: 1.5rem;
  font-weight: 700;
}

#contact-success p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 480px;
}

/* Fade transitions */
@keyframes contact-fade-out {
  to { opacity: 0; transform: translateY(-8px); }
}

@keyframes contact-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0);   }
}

.contact-fade-out {
  animation: contact-fade-out 0.35s ease forwards;
}

.contact-fade-in {
  animation: contact-fade-in 0.35s ease forwards;
}

/* DSGVO notice below form */
.dsgvo-notice {
  margin-top: 2rem;
  max-width: 640px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--border);
  opacity: 0.75;
}

.dsgvo-notice a { color: var(--text-muted); text-decoration: underline; }

.social-links {
  display: flex;
  gap: 2rem;
  margin-top: 3rem;
}

.social-links a {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
}

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

/* ===== Chatbot Widget ===== */
#chat-widget {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#chat-widget.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Toggle button */
#chat-toggle {
  width: 56px;
  pointer-events: all;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(124, 106, 255, 0.45);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  flex-shrink: 0;
}

#chat-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(124, 106, 255, 0.6);
}

#chat-toggle svg {
  width: 24px;
  height: 24px;
  color: #fff;
  position: absolute;
  transition: opacity 0.2s, transform 0.2s;
}

#chat-toggle .icon-chat  { opacity: 1;  transform: scale(1);    }
#chat-toggle .icon-close { opacity: 0;  transform: scale(0.6);  }

#chat-widget.open #chat-toggle .icon-chat  { opacity: 0;  transform: scale(0.6); }
#chat-widget.open #chat-toggle .icon-close { opacity: 1;  transform: scale(1);   }

.chat-toggle-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 9px;
  height: 9px;
  background: var(--teal);
  border-radius: 50%;
  border: 2px solid var(--bg);
  animation: chat-dot-pulse 2.5s ease-in-out infinite;
}

@keyframes chat-dot-pulse {
  0%, 100% { opacity: 1;   transform: scale(1);   }
  50%       { opacity: 0.5; transform: scale(0.85); }
}

/* Chat window */
#chat-window {
  width: 380px;
  max-height: 560px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  /* hidden by default */
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

#chat-widget.open #chat-window {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* Header */
#chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-hex-logo {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.chat-header-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.chat-header-status {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  display: inline-block;
  flex-shrink: 0;
}

#chat-clear {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.3rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: color 0.2s, background 0.2s;
}

#chat-clear:hover {
  color: var(--text);
  background: var(--border);
}

#chat-clear svg {
  width: 16px;
  height: 16px;
}

/* Messages */
#chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 82%;
  gap: 0.2rem;
  animation: msg-in 0.2s ease;
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0);   }
}

.chat-msg.user {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-msg.bot {
  align-self: flex-start;
  align-items: flex-start;
}

.chat-bubble {
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.55;
  word-break: break-word;
}

.chat-msg.user .chat-bubble {
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-msg.bot .chat-bubble {
  background: var(--bg-secondary);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

/* ── Rendered Markdown inside bot bubbles ── */
.chat-msg.bot .chat-bubble > *:first-child { margin-top: 0; }
.chat-msg.bot .chat-bubble > *:last-child  { margin-bottom: 0; }

.chat-msg.bot .chat-bubble p {
  margin: 0 0 0.55rem;
  line-height: 1.6;
}

.chat-msg.bot .chat-bubble h3,
.chat-msg.bot .chat-bubble h4,
.chat-msg.bot .chat-bubble h5 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0.85rem 0 0.3rem;
  letter-spacing: 0.01em;
}

.chat-msg.bot .chat-bubble ul,
.chat-msg.bot .chat-bubble ol {
  margin: 0.35rem 0 0.55rem 1.1rem;
  padding: 0;
}

.chat-msg.bot .chat-bubble li {
  margin-bottom: 0.2rem;
  line-height: 1.5;
}

.chat-msg.bot .chat-bubble code {
  background: rgba(124, 106, 255, 0.12);
  color: var(--teal);
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.8rem;
  padding: 0.1em 0.4em;
  border-radius: 4px;
}

.chat-msg.bot .chat-bubble pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem;
  overflow-x: auto;
  margin: 0.5rem 0;
}

.chat-msg.bot .chat-bubble pre code {
  background: none;
  color: var(--text);
  padding: 0;
  font-size: 0.78rem;
  line-height: 1.6;
}

.chat-msg.bot .chat-bubble blockquote {
  border-left: 3px solid var(--accent);
  margin: 0.5rem 0;
  padding: 0.3rem 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

.chat-msg.bot .chat-bubble strong { color: var(--text); }

.chat-msg.bot .chat-bubble a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.chat-msg.bot .chat-bubble hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.6rem 0;
}

/* Table support */
.chat-msg.bot .chat-bubble table {
  border-collapse: collapse;
  font-size: 0.82rem;
  width: 100%;
  margin: 0.5rem 0;
}

.chat-msg.bot .chat-bubble th,
.chat-msg.bot .chat-bubble td {
  border: 1px solid var(--border);
  padding: 0.35rem 0.6rem;
  text-align: left;
}

.chat-msg.bot .chat-bubble th {
  background: var(--bg);
  color: var(--accent);
  font-weight: 700;
}

.chat-msg-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  padding: 0 0.25rem;
}

/* Typing indicator */
.chat-msg.bot .chat-bubble.typing {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 0.75rem 1rem;
}

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

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
  0%, 80%, 100% { transform: translateY(0);    opacity: 0.4; }
  40%            { transform: translateY(-6px); opacity: 1;   }
}

/* Input area */
#chat-input-area {
  display: flex;
  align-items: flex-end;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

#chat-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  resize: none;
  max-height: 120px;
  overflow-y: auto;
  transition: border-color 0.2s;
  scrollbar-width: none;
  line-height: 1.5;
}

#chat-input:focus {
  outline: none;
  border-color: var(--accent);
}

#chat-input::placeholder {
  color: var(--text-muted);
}

#chat-send {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--accent);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
}

#chat-send:hover  { background: var(--accent-hover); }
#chat-send:active { transform: scale(0.92); }
#chat-send:disabled { background: var(--border); cursor: default; }

#chat-send svg {
  width: 17px;
  height: 17px;
}

.chat-disclaimer {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0 1rem 0.6rem;
  opacity: 0.6;
}

/* Mobile */
/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 2rem 2rem;
  background: var(--bg-secondary);
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
}
.footer-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
}
.footer-brand .footer-tagline { color: var(--text-muted); font-size: 0.9rem; margin: 0.5rem 0 0; }
.footer-brand .footer-copy    { color: var(--text-muted); font-size: 0.8rem; margin-top: 1rem; }
.footer-nav h4, .footer-legal h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.footer-nav ul, .footer-legal ul { list-style: none; padding: 0; margin: 0; }
.footer-nav li, .footer-legal li { margin-bottom: 0.4rem; }
.footer-nav a, .footer-legal a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer-nav a:hover, .footer-legal a:hover { color: var(--teal); }
.footer-social { display: flex; gap: 1rem; margin-top: 1.25rem; }
.footer-social a { color: var(--text-muted); transition: color 0.2s; }
.footer-social a:hover { color: var(--teal); }

@media (max-width: 640px) {
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
}

/* ── Hamburger button (base — hidden on desktop) ── */
.nav-hamburger {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 36px; height: 36px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-hamburger span {
  display: block; height: 2px; width: 22px;
  background: var(--text); border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  body > nav      { padding: 1rem 1.5rem; }
  #hero           { padding: 0 1.5rem; }
  .about-grid     { grid-template-columns: 1fr; }
  .image-placeholder { max-width: 240px; margin: 0 auto; }
  .form-row       { grid-template-columns: 1fr; }
  .section-title  { font-size: 1.6rem; }
  /* hamburger replaces nav links on all mobile/tablet */
  .nav-hamburger  { display: flex; }
  .nav-links {
    display: none; flex-direction: column; gap: 0;
    position: fixed; top: 60px; left: 0; right: 0;
    background: rgba(15,15,15,0.97); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: .5rem 0; z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-links li   { list-style: none; }
  .nav-links a    { display: block; padding: .85rem 1.5rem; font-size: 1rem; }
}

@media (max-width: 480px) {
  .hero-cta       { flex-direction: column; }
  .btn            { text-align: center; }
  #chat-widget    { bottom: 1rem; right: 1rem; }
  #chat-window    { width: calc(100vw - 2rem); max-height: 70vh; }
}

/* ===== Light theme (Silk) ===== */
html[data-theme="light"] {
  --bg:           #ffffff;
  --bg-secondary: #f6f5ff;
  --text:         #0c0c1e;
  --text-muted:   #64637a;
  --accent:       #7c6aff;
  --accent-hover: #6857f5;
  --accent-glow:  rgba(124, 106, 255, 0.10);
  --border:       #eceaf6;
  --card-bg:      #ffffff;
  --teal:         #00c4a8;
}

html[data-theme="light"] body > nav {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid #eceaf6;
  box-shadow: 0 1px 20px rgba(124, 106, 255, 0.06);
}

html[data-theme="light"] .nav-links {
  background: rgba(255, 255, 255, 0.98);
}

html[data-theme="light"] .expertise-card,
html[data-theme="light"] .project-card,
html[data-theme="light"] .skill-card {
  box-shadow: 0 2px 16px rgba(124, 106, 255, 0.07);
  border-color: #eceaf6;
}

html[data-theme="light"] .expertise-card:hover,
html[data-theme="light"] .project-card:hover {
  box-shadow: 0 6px 28px rgba(124, 106, 255, 0.14);
}

/* ===== Theme toggle button ===== */
#theme-toggle {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  display: flex;
  align-items: center;
  transition: border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}
#theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* Show moon in dark mode, sun in light mode */
#theme-toggle .icon-sun  { display: none; }
#theme-toggle .icon-moon { display: block; }
html[data-theme="light"] #theme-toggle .icon-sun  { display: block; }
html[data-theme="light"] #theme-toggle .icon-moon { display: none; }
