/* Resul Kılınç — portfolio (dark + burgundy accent, light theme via data-theme) */

:root {
  --bg: #0a0a0c;
  --bg-elevated: #12121a;
  --bg-card: #18181f;
  --text: #f0ebe6;
  --muted: #a39e98;
  --line: #2e2e38;
  --accent: #722f3d;
  --accent-soft: rgba(114, 47, 61, 0.28);
  --accent-bright: #c75d6e;
  --accent-glow: rgba(199, 93, 110, 0.15);
  --focus: #f0b8c2;
  --radius: 12px;
  --sidebar-w: 260px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --body-leading: 1.72;
  --heading-leading: 1.28;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --spot-x: 50%;
  --spot-y: 35%;
  --font-size-base: clamp(15px, 0.25vw + 15px, 17px);
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #faf6f1;
  --bg-elevated: #fffdfb;
  --bg-card: #ffffff;
  --text: #1c1618;
  --muted: #5c5652;
  --line: #e8e0d8;
  --accent: #7a2434;
  --accent-soft: rgba(122, 36, 52, 0.1);
  --accent-bright: #9c3045;
  --accent-glow: rgba(156, 48, 69, 0.08);
  --focus: #7a2434;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--font-size-base);
  line-height: var(--body-leading);
  letter-spacing: -0.011em;
  font-feature-settings: "kern" 1, "liga" 1;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.35s var(--ease-out), color 0.25s ease;
}

body.contact-modal-active,
body.res-ai-active {
  overflow: hidden;
}

::selection {
  background: rgba(199, 93, 110, 0.35);
  color: var(--text);
}

html[data-theme="light"] ::selection {
  background: rgba(122, 36, 52, 0.22);
}

/* Cursor-following ambient light (Brittany-style subtle glow) */
.ambient-spotlight {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    950px circle at var(--spot-x, 50%) var(--spot-y, 35%),
    rgba(199, 93, 110, 0.11) 0%,
    transparent 52%
  );
}

html[data-theme="light"] .ambient-spotlight {
  background: radial-gradient(
    950px circle at var(--spot-x, 50%) var(--spot-y, 35%),
    rgba(156, 48, 69, 0.09) 0%,
    transparent 52%
  );
}

/* Ultra-subtle film grain (depth, hides banding) */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

html[data-theme="light"] .grain {
  opacity: 0.035;
  mix-blend-mode: multiply;
}

a {
  color: var(--accent-bright);
  text-decoration: none;
  transition: color 0.2s var(--ease-out), opacity 0.2s ease;
}

a:hover {
  color: #e895a3;
}

html[data-theme="light"] a:hover {
  color: #b83850;
}

a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: #fff;
  z-index: 1000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.res-ai-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 2;
}

/* Sidebar */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-w);
  height: 100vh;
  padding: 2.5rem 1.75rem 2rem;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg) 100%);
  display: flex;
  flex-direction: column;
  z-index: 50;
  transition: border-color 0.35s var(--ease-out), background 0.35s var(--ease-out);
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.25rem;
  color: var(--text);
}

.brand-title {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 2rem;
  line-height: 1.4;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list li {
  margin-bottom: 0.35rem;
}

.nav-list a {
  display: block;
  padding: 0.45rem 0.55rem 0.45rem 0.65rem;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.25s var(--ease-out), transform 0.2s ease;
}

.nav-list a:hover,
.nav-list a.is-active {
  color: var(--text);
  background: var(--accent-soft);
}

.nav-list a.is-active {
  box-shadow: inset 3px 0 0 var(--accent-bright);
}

.nav-list a:active {
  transform: translateX(1px);
}

.social-block {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.social-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}

.social-links a {
  font-size: 0.82rem;
  color: var(--muted);
}

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

.social-links__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.5rem 0.25rem 0.4rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.social-links__pill svg,
.contact-ig-chip svg,
.contact-wa-chip svg {
  pointer-events: none;
}

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

.social-links__pill--instagram:hover {
  border-color: #e4405f;
  color: #f0a0b0;
  background: rgba(228, 64, 95, 0.1);
}

.social-links__pill--whatsapp:hover {
  border-color: #25d366;
  color: #7fe8b5;
  background: rgba(37, 211, 102, 0.12);
}

.social-links__icon {
  flex-shrink: 0;
}

/* Main */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 3rem 3rem 5rem;
  max-width: 760px;
}

/* In-content text links: animated underline */
.main p a:not([class]),
.main li a:not([class]),
.timeline a,
.contact-list a:not(.contact-wa-chip):not(.contact-ig-chip),
.site-footer a,
.course-highlights a {
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 1px;
  transition: background-size 0.3s var(--ease-out), color 0.2s ease;
}

.main p a:not([class]):hover,
.main li a:not([class]):hover,
.timeline a:hover,
.contact-list a:not(.contact-wa-chip):not(.contact-ig-chip):hover,
.site-footer a:hover,
.course-highlights a:hover {
  background-size: 100% 1px;
}

.note-text {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.note-text code {
  color: var(--accent-bright);
  font-size: 0.9em;
}

/* Interactive surfaces: hover lift + press feedback */
.surface {
  transition: border-color 0.3s ease, transform 0.35s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.surface:hover {
  border-color: rgba(199, 93, 110, 0.28) !important;
}

.intro-block.surface:active {
  transform: scale(0.997);
  transition-duration: 0.1s;
}

.skill-card.surface:active,
.project-card.surface:active {
  transform: translateY(-1px) scale(0.992);
  transition-duration: 0.1s;
}

.surface--hero {
  position: relative;
  overflow: hidden;
}

.surface--hero::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(
    circle at 70% 20%,
    rgba(199, 93, 110, 0.09) 0%,
    transparent 45%
  );
  pointer-events: none;
  opacity: 0.9;
}

.intro-block.surface--hero > * {
  position: relative;
  z-index: 1;
}

html[data-theme="light"] .surface--hero::after {
  background: radial-gradient(circle at 70% 20%, rgba(156, 48, 69, 0.06) 0%, transparent 45%);
}

section {
  margin-bottom: 4.5rem;
  scroll-margin-top: 2rem;
  opacity: 0;
  transform: translateY(14px);
  animation: section-in 0.62s var(--ease-out) both;
}

section:nth-of-type(1) {
  animation-delay: 0.04s;
}
section:nth-of-type(2) {
  animation-delay: 0.1s;
}
section:nth-of-type(3) {
  animation-delay: 0.16s;
}
section:nth-of-type(4) {
  animation-delay: 0.22s;
}
section:nth-of-type(5) {
  animation-delay: 0.28s;
}
section:nth-of-type(6) {
  animation-delay: 0.34s;
}
section:nth-of-type(7) {
  animation-delay: 0.4s;
}

@keyframes section-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  section {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-bright);
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: var(--heading-leading);
  margin: 0 0 1.25rem;
  color: var(--text);
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: var(--text);
}

p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.lead {
  font-size: 1.05rem;
  color: var(--text);
  font-weight: 500;
}

.intro-block {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 0 var(--accent-glow);
  transition: border-color 0.3s ease, box-shadow 0.35s var(--ease-out);
}

.intro-block h1 {
  font-size: 1.5rem;
  margin: 0 0 0.75rem;
  letter-spacing: -0.03em;
}

.intro-block .subtitle {
  font-size: 0.95rem;
  color: var(--accent-bright);
  font-weight: 600;
  margin: 0 0 1rem;
}

/* Hero image strip */
.hero-visual {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 1.5rem 0 0;
}

.hero-visual img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  transition: transform 0.45s var(--ease-out), border-color 0.3s ease, box-shadow 0.35s ease;
}

.hero-visual img:hover {
  transform: scale(1.015);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

html[data-theme="light"] .hero-visual img:hover {
  box-shadow: 0 12px 36px rgba(122, 36, 52, 0.12);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 0;
  list-style: none;
  margin: 0;
}

.timeline-item {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 2rem;
  border-left: 2px solid var(--line);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--bg);
}

.timeline-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.timeline-role {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.course-highlights {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.course-highlights li {
  margin-bottom: 0.65rem;
}

.course-highlights li:last-child {
  margin-bottom: 0;
}

.tag {
  font-size: 0.72rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #f0d0d6;
  border: 1px solid rgba(122, 38, 51, 0.45);
  transition: transform 0.2s var(--ease-out), border-color 0.2s ease;
}

html[data-theme="light"] .tag {
  color: #6b2835;
  border-color: rgba(122, 36, 52, 0.25);
}

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

/* Skills grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

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

.skill-card:hover {
  border-color: rgba(199, 93, 110, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 12px 36px var(--accent-glow);
}

.skill-card h3 {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
}

.skill-card p,
.skill-card ul {
  font-size: 0.85rem;
  margin: 0;
  color: var(--muted);
}

.skill-card ul {
  padding-left: 1.1rem;
}

/* Projects */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
}

.project-card:hover {
  border-color: rgba(199, 93, 110, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 14px 40px var(--accent-glow);
}

.project-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.project-card--featured {
  border-color: rgba(34, 211, 238, 0.35);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.12), 0 12px 40px rgba(0, 0, 0, 0.18), 0 0 24px rgba(34, 211, 238, 0.08);
}

html[data-theme="light"] .project-card--featured {
  box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.25), 0 8px 28px rgba(6, 182, 212, 0.1);
}

.project-card__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.project-card__cta .btn {
  margin: 0;
}

/* Res AI section */
.res-ai-points {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.res-ai-points li {
  margin-bottom: 0.45rem;
}

.res-ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

/* Contact */
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.wa-templates {
  margin-top: 1.5rem;
  padding: 1.15rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-elevated);
}

.wa-templates__title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
  color: var(--text);
}

.wa-templates__hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 1rem;
  line-height: 1.45;
}

.wa-templates__group {
  margin-bottom: 1rem;
}

.wa-templates__group:last-of-type {
  margin-bottom: 0.35rem;
}

.wa-templates__group-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 0.45rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid var(--line);
}

.wa-templates__grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.6rem;
}

.wa-templates__grid--single {
  grid-template-columns: 1fr;
}

.wa-templates__grid li {
  margin: 0;
}

.wa-templates__chip {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.wa-templates__chip:hover {
  border-color: #25d366;
  background: rgba(37, 211, 102, 0.08);
  transform: translateY(-1px);
}

.wa-templates__chip:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

.wa-templates__chip--en {
  border-left: 3px solid rgba(130, 170, 220, 0.45);
}

.wa-templates__chip-label {
  font-size: 0.86rem;
  font-weight: 600;
}

.wa-templates__chip-desc {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 400;
}

.wa-templates__footer {
  margin: 1rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.wa-templates__footer a {
  color: var(--accent-bright);
}

html[data-theme="light"] .wa-templates__chip {
  background: rgba(0, 0, 0, 0.02);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: #f5e6e8;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s var(--ease-out), background 0.25s ease, border-color 0.25s ease;
}

.btn:hover {
  background: rgba(122, 38, 51, 0.45);
  color: #fff;
  transform: translateY(-1px);
}

html[data-theme="light"] .btn {
  color: #fff5f6;
}

html[data-theme="light"] .btn:hover {
  background: rgba(122, 36, 52, 0.85);
}

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

.btn-secondary:hover {
  border-color: var(--accent-bright);
  color: var(--accent-bright);
}

.btn-whatsapp {
  background: rgba(37, 211, 102, 0.15);
  border-color: rgba(37, 211, 102, 0.55);
  color: #b8f5d0;
  gap: 0.45rem;
}

.btn-whatsapp:hover {
  background: rgba(37, 211, 102, 0.28);
  border-color: #25d366;
  color: #fff;
}

html[data-theme="light"] .btn-whatsapp {
  color: #0d5c2e;
  background: rgba(37, 211, 102, 0.12);
}

html[data-theme="light"] .btn-whatsapp:hover {
  background: rgba(37, 211, 102, 0.22);
  color: #064d24;
}

.btn-whatsapp__icon {
  display: block;
}

.contact-list__phone-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
}

.contact-list__phone-text {
  flex: 1 1 auto;
  min-width: 0;
}

.contact-wa-chip,
.contact-ig-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.contact-wa-chip:hover {
  border-color: #25d366;
  color: #b8f5d0;
  background: rgba(37, 211, 102, 0.12);
}

html[data-theme="light"] .contact-wa-chip:hover {
  color: #0d5c2e;
}

.contact-ig-chip:hover {
  border-color: #e4405f;
  color: #f5b8c8;
  background: rgba(228, 64, 95, 0.1);
}

html[data-theme="light"] .contact-ig-chip:hover {
  color: #c13552;
}

.contact-list__instagram-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.contact-list li {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.contact-list strong {
  color: var(--text);
  font-weight: 600;
  margin-right: 0.35rem;
}

/* Footer note */
.site-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-tech {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  line-height: 1.5;
  opacity: 0.92;
}

/* Mobile header */
.mobile-header {
  display: none;
  position: sticky;
  top: 0;
  z-index: 60;
  padding: 0.85rem 1rem;
  background: var(--bg-elevated);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  align-items: center;
  justify-content: space-between;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.mobile-header__tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mobile-header__res-ai-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.2rem;
}

.mobile-header__res-ai-hint {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.12rem;
}

.mobile-header__res-ai-hint-text {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #67e8f9;
  line-height: 1;
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.55), 0 0 20px rgba(34, 211, 238, 0.25);
}

.mobile-header__res-ai-arrow {
  flex-shrink: 0;
  color: #22d3ee;
  opacity: 0.95;
  filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.5));
  animation: res-ai-arrow-nudge 1.15s ease-in-out infinite;
}

.mobile-header__res-ai-btn-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
}

.mobile-header__res-ai-caption {
  font-size: 0.55rem;
  color: #5eead4;
  line-height: 1.15;
  max-width: 4.5rem;
  text-align: center;
  text-shadow: 0 0 8px rgba(45, 212, 191, 0.35);
}

html[data-theme="light"] .mobile-header__res-ai-hint-text {
  color: #06b6d4;
  text-shadow: 0 0 12px rgba(6, 182, 212, 0.35);
}

html[data-theme="light"] .mobile-header__res-ai-arrow {
  color: #0891b2;
  filter: drop-shadow(0 0 4px rgba(8, 145, 178, 0.35));
  opacity: 0.95;
}

html[data-theme="light"] .mobile-header__res-ai-caption {
  color: #0d9488;
  text-shadow: none;
}

@keyframes res-ai-arrow-nudge {
  0%,
  100% {
    transform: translateX(0);
    opacity: 0.55;
  }
  50% {
    transform: translateX(5px);
    opacity: 1;
  }
}

.mobile-header .brand-name {
  font-size: 1rem;
  margin: 0;
}

.menu-toggle {
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
}

.menu-toggle:focus-visible {
  outline: 2px solid var(--focus);
}

body.nav-open .sidebar {
  transform: translateX(0);
}

@media (max-width: 960px) {
  .mobile-header {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.5);
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  .main {
    margin-left: 0;
    padding: 1.25rem 1.25rem 4rem;
    max-width: none;
  }

  .hero-visual {
    grid-template-columns: 1fr;
  }

  .hero-visual img {
    height: 200px;
  }
}

@media (min-width: 961px) {
  .sidebar {
    transform: none !important;
  }
}

/* Theme control — toolbar (mobile) + floating (desktop) */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.65rem 0.4rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--text);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  transition: border-color 0.25s ease, background 0.3s ease, transform 0.2s var(--ease-out), box-shadow 0.3s ease;
}

.theme-toggle--toolbar {
  padding: 0.35rem 0.55rem 0.35rem 0.45rem;
  font-size: 0.68rem;
  box-shadow: none;
}

.floating-toolbar {
  position: fixed;
  top: 1rem;
  right: 1.25rem;
  z-index: 80;
  display: none;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.floating-toolbar__res-ai {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.floating-toolbar__res-ai-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #67e8f9;
  line-height: 1;
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.55), 0 0 22px rgba(34, 211, 238, 0.3), 0 1px 8px rgba(0, 0, 0, 0.35);
}

html[data-theme="light"] .floating-toolbar__res-ai-label {
  color: #06b6d4;
  text-shadow: 0 0 14px rgba(6, 182, 212, 0.35);
}

.floating-toolbar .theme-toggle--floating {
  position: static;
}

.theme-toggle--floating {
  display: inline-flex;
}

.theme-toggle:hover {
  border-color: rgba(199, 93, 110, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 6px 28px var(--accent-glow);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.theme-toggle__inner {
  position: relative;
  width: 2.25rem;
  height: 1.15rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(199, 93, 110, 0.35);
  flex-shrink: 0;
}

.theme-toggle__icon {
  position: absolute;
  top: 50%;
  font-size: 0.65rem;
  line-height: 1;
  transition: opacity 0.25s ease, transform 0.3s var(--ease-out);
}

.theme-toggle__icon--sun {
  left: 0.35rem;
  transform: translateY(-50%);
  opacity: 0.35;
}

.theme-toggle__icon--moon {
  right: 0.35rem;
  transform: translateY(-50%);
  opacity: 1;
}

html[data-theme="light"] .theme-toggle__icon--sun {
  opacity: 1;
}

html[data-theme="light"] .theme-toggle__icon--moon {
  opacity: 0.35;
}

.theme-toggle__text {
  min-width: 2.75rem;
  text-align: left;
}

@media (min-width: 961px) {
  .floating-toolbar {
    display: flex;
  }

  .theme-toggle--toolbar {
    display: none;
  }
}

@media (max-width: 960px) {
  .floating-toolbar {
    display: none !important;
  }
}

.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.35rem;
  z-index: 85;
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--accent-bright);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.22);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.96);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out), visibility 0.4s,
    border-color 0.25s ease, color 0.2s ease, box-shadow 0.3s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.back-to-top:hover {
  border-color: rgba(199, 93, 110, 0.5);
  color: var(--text);
  box-shadow: 0 12px 40px var(--accent-glow);
}

.back-to-top:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

@media (max-width: 960px) {
  .back-to-top {
    bottom: 1.25rem;
    right: 1rem;
  }
}

/* Contact FAB */
.contact-fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  height: 2.65rem;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--accent-bright);
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  transition: border-color 0.25s ease, transform 0.2s var(--ease-out), box-shadow 0.3s ease, color 0.2s ease;
}

.contact-fab:hover {
  border-color: rgba(199, 93, 110, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--accent-glow);
  color: var(--text);
}

.contact-fab:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.contact-fab--toolbar {
  width: 2.45rem;
  height: 2.45rem;
  box-shadow: none;
}

.contact-fab__icon {
  display: block;
}

/* Res AI floating / toolbar button — LED / florasan cyan */
.res-ai-fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  height: 2.65rem;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(103, 232, 249, 0.55);
  background: radial-gradient(ellipse 100% 85% at 50% 32%, #0c1822 0%, #0a121a 45%, #060b10 100%);
  color: #67e8f9;
  cursor: pointer;
  font-family: inherit;
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.12),
    0 2px 0 rgba(0, 0, 0, 0.5),
    0 6px 22px rgba(0, 0, 0, 0.4),
    0 0 18px rgba(34, 211, 238, 0.4),
    0 0 32px rgba(34, 211, 238, 0.18),
    inset 0 1px 0 rgba(103, 232, 249, 0.14);
  transition: border-color 0.25s ease, transform 0.2s var(--ease-out), box-shadow 0.3s ease, color 0.2s ease;
}

.res-ai-fab:hover {
  border-color: rgba(165, 243, 252, 0.95);
  color: #a5f3fc;
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(103, 232, 249, 0.35),
    0 4px 0 rgba(0, 0, 0, 0.35),
    0 10px 36px rgba(0, 0, 0, 0.35),
    0 0 26px rgba(34, 211, 238, 0.55),
    0 0 48px rgba(34, 211, 238, 0.28),
    inset 0 1px 0 rgba(165, 243, 252, 0.22);
}

.res-ai-fab:focus-visible {
  outline: 2px solid #22d3ee;
  outline-offset: 3px;
}

.res-ai-fab--toolbar {
  width: 2.45rem;
  height: 2.45rem;
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.1),
    0 0 14px rgba(34, 211, 238, 0.35),
    inset 0 1px 0 rgba(103, 232, 249, 0.12);
}

.res-ai-fab__icon {
  display: block;
}

.res-ai-icon-deer {
  overflow: visible;
}

html[data-theme="light"] .res-ai-fab {
  color: #0891b2;
  border-color: rgba(6, 182, 212, 0.55);
  background: radial-gradient(ellipse 100% 90% at 50% 28%, #f0fdff 0%, #ecfeff 50%, #e0f2fe 100%);
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.2),
    0 2px 0 rgba(0, 0, 0, 0.04),
    0 6px 20px rgba(6, 182, 212, 0.15),
    0 0 20px rgba(34, 211, 238, 0.25),
    inset 0 1px 0 #fff;
}

html[data-theme="light"] .res-ai-fab:hover {
  color: #0e7490;
  border-color: rgba(8, 145, 178, 0.75);
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.35),
    0 4px 16px rgba(6, 182, 212, 0.2),
    0 0 28px rgba(34, 211, 238, 0.35),
    inset 0 1px 0 #fff;
}

html[data-theme="light"] .res-ai-fab--toolbar {
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.18),
    0 0 16px rgba(6, 182, 212, 0.22),
    inset 0 1px 0 #fff;
}

.btn-res-ai {
  border: 1px solid rgba(103, 232, 249, 0.55) !important;
  background: linear-gradient(135deg, rgba(8, 47, 73, 0.85), rgba(12, 74, 110, 0.65)) !important;
  color: #e0fafe !important;
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.25), inset 0 1px 0 rgba(103, 232, 249, 0.12) !important;
}

.btn-res-ai:hover {
  border-color: rgba(165, 243, 252, 0.9) !important;
  color: #fff !important;
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.9), rgba(8, 145, 178, 0.75)) !important;
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.4), inset 0 1px 0 rgba(165, 243, 252, 0.2) !important;
}

html[data-theme="light"] .btn-res-ai {
  color: #f0fdff !important;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.9), rgba(14, 165, 233, 0.75)) !important;
  border-color: rgba(34, 211, 238, 0.65) !important;
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.3) !important;
}

html[data-theme="light"] .btn-res-ai:hover {
  color: #fff !important;
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.95), rgba(2, 132, 199, 0.85)) !important;
}

/* Res AI modal */
.res-ai-modal {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease-out), visibility 0.35s;
}

.res-ai-modal.is-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.res-ai-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 12, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.35s var(--ease-out);
}

.res-ai-modal.is-open .res-ai-modal__backdrop {
  opacity: 1;
}

html[data-theme="light"] .res-ai-modal__backdrop {
  background: rgba(28, 24, 22, 0.45);
}

.res-ai-modal__panel {
  position: relative;
  width: min(100%, 440px);
  max-height: min(88vh, 640px);
  display: flex;
  flex-direction: column;
  padding: 1.1rem 1.15rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: var(--bg-elevated);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(34, 211, 238, 0.12), 0 0 40px rgba(34, 211, 238, 0.08);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.4s var(--ease-out);
}

.res-ai-modal.is-open .res-ai-modal__panel {
  transform: translateY(0) scale(1);
}

.res-ai-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.res-ai-modal__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.res-ai-modal__glyph {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 11px;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem;
  box-sizing: border-box;
  background: radial-gradient(ellipse 90% 75% at 50% 38%, #1e1a22 0%, #121018 45%, #0a090c 100%);
  border: 1px solid rgba(103, 232, 249, 0.45);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.55), 0 8px 28px rgba(0, 0, 0, 0.45), 0 0 20px rgba(34, 211, 238, 0.15), inset 0 1px 0 rgba(103, 232, 249, 0.08), inset 0 -1px 0 rgba(0, 0, 0, 0.35);
}

.res-ai-modal__glyph::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 8px;
  border: 1px solid rgba(10, 10, 12, 0.85);
  pointer-events: none;
  opacity: 0.95;
}

.res-ai-modal__deer {
  display: block;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.65));
}

html[data-theme="light"] .res-ai-modal__glyph {
  background: radial-gradient(ellipse 90% 80% at 50% 35%, #fffdfb 0%, #faf6f1 55%, #f2ebe4 100%);
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.06), 0 6px 20px rgba(6, 182, 212, 0.15), inset 0 1px 0 #fff;
}

html[data-theme="light"] .res-ai-modal__glyph::before {
  border-color: rgba(0, 0, 0, 0.12);
}

html[data-theme="light"] .res-ai-modal__deer {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

.res-ai-modal__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #a5f3fc, #22d3ee, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 12px rgba(34, 211, 238, 0.35));
}

html[data-theme="light"] .res-ai-modal__title {
  background: linear-gradient(90deg, #0891b2, #06b6d4, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.25));
}

.res-ai-modal__subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.35;
}

.res-ai-modal__tagline {
  margin: 0.25rem 0 0;
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.35;
  opacity: 0.95;
}

.res-ai-modal__close {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s ease, background 0.2s ease;
}

.res-ai-modal__close:hover {
  color: #a5f3fc;
  background: rgba(6, 182, 212, 0.12);
}

.res-ai-modal__close:focus-visible {
  outline: 2px solid rgba(34, 211, 238, 0.75);
  outline-offset: 2px;
}

.res-ai-pipeline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.45rem 0.5rem;
  margin-bottom: 0.5rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

html[data-theme="light"] .res-ai-pipeline {
  background: rgba(0, 0, 0, 0.04);
}

.res-ai-pipeline__step {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 1;
  justify-content: center;
  opacity: 0.45;
  transition: opacity 0.25s ease, color 0.25s ease;
}

.res-ai-pipeline__step.is-active {
  opacity: 1;
  color: #67e8f9;
}

.res-ai-pipeline__step.is-done {
  opacity: 0.85;
  color: var(--muted);
}

.res-ai-pipeline__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.res-ai-chat {
  flex: 1;
  min-height: 180px;
  max-height: 42vh;
  overflow-y: auto;
  padding: 0.35rem 0.15rem;
  margin-bottom: 0.5rem;
  scroll-behavior: smooth;
}

.res-ai-bubble {
  display: flex;
  margin-bottom: 0.65rem;
}

.res-ai-bubble--user {
  justify-content: flex-end;
}

.res-ai-bubble--assistant {
  justify-content: flex-start;
}

.res-ai-bubble__inner {
  max-width: 92%;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  font-size: 0.86rem;
  line-height: 1.55;
}

.res-ai-bubble--user .res-ai-bubble__inner {
  background: rgba(8, 145, 178, 0.22);
  border: 1px solid rgba(34, 211, 238, 0.4);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.08);
  color: var(--text);
}

.res-ai-bubble--assistant .res-ai-bubble__inner {
  background: rgba(14, 116, 144, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.22);
}

html[data-theme="light"] .res-ai-bubble--assistant .res-ai-bubble__inner {
  background: rgba(6, 182, 212, 0.08);
}

.res-ai-bubble__text {
  margin: 0;
}

.res-ai-bubble__text strong {
  color: #67e8f9;
  font-weight: 600;
}

.res-ai-bubble__text a {
  color: #67e8f9;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.res-ai-bubble__text a:hover {
  color: #fff;
}

html[data-theme="light"] .res-ai-bubble__text a {
  color: #0891b2;
}

html[data-theme="light"] .res-ai-bubble__text strong {
  color: #0e7490;
}

.res-ai-meta {
  margin-top: 0.55rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--line);
}

.res-ai-meta__label {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.res-ai-meta__bar {
  height: 4px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}

.res-ai-meta__fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #0891b2, #22d3ee, #67e8f9);
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.35);
  transition: width 0.5s var(--ease-out);
}

.res-ai-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}

.res-ai-chip {
  padding: 0.3rem 0.55rem;
  font-size: 0.72rem;
  font-family: inherit;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.res-ai-chip:hover {
  border-color: rgba(34, 211, 238, 0.5);
  color: #67e8f9;
  background: rgba(6, 182, 212, 0.1);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.12);
}

.res-ai-chip:focus-visible {
  outline: 2px solid rgba(34, 211, 238, 0.75);
  outline-offset: 2px;
}

.res-ai-form {
  display: flex;
  gap: 0.45rem;
  align-items: stretch;
}

.res-ai-form__input {
  flex: 1;
  min-width: 0;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
}

.res-ai-form__input::placeholder {
  color: var(--muted);
  opacity: 0.85;
}

.res-ai-form__input:focus {
  outline: none;
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.15), 0 0 14px rgba(34, 211, 238, 0.12);
}

.res-ai-form__submit {
  flex-shrink: 0;
  padding-left: 1rem;
  padding-right: 1rem;
}

.res-ai-modal__footnote {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  margin: 0.65rem 0 0;
  font-size: 0.68rem;
  line-height: 1.45;
  color: var(--muted);
}

.res-ai-modal__footnote-text {
  flex: 1 1 12rem;
  min-width: 0;
}

.res-ai-modal__clear {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.2rem 0.45rem;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent-bright);
  background: rgba(199, 93, 110, 0.12);
  border: 1px solid rgba(199, 93, 110, 0.35);
  border-radius: 6px;
  cursor: pointer;
}

.res-ai-modal__clear:hover {
  background: rgba(199, 93, 110, 0.2);
}

.res-ai-modal__clear:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

html[data-theme="light"] .res-ai-modal__clear {
  background: rgba(122, 38, 51, 0.08);
  border-color: rgba(122, 38, 51, 0.25);
}

.res-ai-error-banner {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.65rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text);
  background: rgba(180, 60, 60, 0.18);
  border: 1px solid rgba(180, 60, 60, 0.45);
  border-radius: 8px;
}

.res-ai-modal__footnote a {
  color: #67e8f9;
}

html[data-theme="light"] .res-ai-modal__footnote a {
  color: #0891b2;
}

/* Contact modal (chat-style panel) */
.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  pointer-events: none;
  visibility: hidden;
}

.contact-modal.is-open {
  pointer-events: auto;
  visibility: visible;
}

.contact-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.35s var(--ease-out);
}

.contact-modal.is-open .contact-modal__backdrop {
  opacity: 1;
}

.contact-modal__panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: min(88vh, 640px);
  overflow-y: auto;
  margin-bottom: env(safe-area-inset-bottom, 0);
  padding: 1.35rem 1.4rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 -8px 48px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(199, 93, 110, 0.12);
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.42s var(--ease-out), opacity 0.32s ease;
}

.contact-modal.is-open .contact-modal__panel {
  transform: translateY(0);
  opacity: 1;
}

@media (min-width: 520px) {
  .contact-modal {
    align-items: center;
    padding: 1.5rem;
  }

  .contact-modal__panel {
    margin-bottom: 0;
    transform: translateY(16px) scale(0.96);
  }

  .contact-modal.is-open .contact-modal__panel {
    transform: translateY(0) scale(1);
  }
}

.contact-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.contact-modal__title {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.contact-modal__subtitle {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
}

.contact-modal__close {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease, color 0.2s ease;
}

.contact-modal__close:hover {
  background: rgba(199, 93, 110, 0.25);
  color: var(--accent-bright);
}

.contact-modal__close:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.contact-form__row {
  margin-bottom: 0.9rem;
}

.contact-form__label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.contact-form__optional {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.85;
}

.contact-form__input,
.contact-form__textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form__input::placeholder,
.contact-form__textarea::placeholder {
  color: var(--muted);
  opacity: 0.65;
}

.contact-form__input:focus,
.contact-form__textarea:focus {
  outline: none;
  border-color: rgba(199, 93, 110, 0.55);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.contact-form__textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.contact-form {
  position: relative;
}

.contact-form__status {
  font-size: 0.85rem;
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  line-height: 1.45;
}

.contact-form__status--pending {
  background: var(--accent-soft);
  color: var(--text);
}

.contact-form__status--success {
  background: rgba(80, 140, 90, 0.2);
  color: var(--text);
  border: 1px solid rgba(80, 140, 90, 0.35);
}

.contact-form__status--error {
  background: rgba(180, 60, 60, 0.15);
  color: var(--text);
  border: 1px solid rgba(180, 60, 60, 0.35);
}

.contact-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.contact-modal__wa {
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.contact-modal__wa-label {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
}

.contact-modal__wa-hint {
  margin: 0 0 0.65rem;
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.45;
}

.contact-modal__wa-groups {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.contact-modal__wa-group-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 0.35rem;
}

.contact-modal__wa-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.contact-modal__wa-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(37, 211, 102, 0.08);
  color: #b8f5d0;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.contact-modal__wa-chip:hover {
  border-color: #25d366;
  background: rgba(37, 211, 102, 0.16);
  color: #d8ffe6;
}

.contact-modal__wa-chip:focus-visible {
  outline: 2px solid rgba(37, 211, 102, 0.65);
  outline-offset: 2px;
}

html[data-theme="light"] .contact-modal__wa-chip {
  color: #166534;
  background: rgba(37, 211, 102, 0.12);
}

html[data-theme="light"] .contact-modal__wa-chip:hover {
  color: #14532d;
  background: rgba(37, 211, 102, 0.2);
}

.contact-modal__wa-chip--plain {
  background: transparent !important;
  border-color: var(--line) !important;
  color: var(--muted) !important;
  font-weight: 500 !important;
}

.contact-modal__wa-chip--plain:hover {
  border-color: var(--accent-bright) !important;
  color: var(--accent-bright) !important;
}

@media print {
  .ambient-spotlight,
  .grain,
  .theme-toggle,
  .floating-toolbar,
  .contact-fab,
  .res-ai-fab,
  .contact-modal,
  .res-ai-modal,
  .back-to-top,
  .mobile-header,
  .skip-link {
    display: none !important;
  }

  body,
  html[data-theme="light"] body {
    background: #fff !important;
    color: #111 !important;
  }

  .sidebar {
    position: static;
    border: none;
    width: auto;
    height: auto;
    page-break-after: always;
  }

  .main {
    margin-left: 0;
    max-width: none;
  }

  a {
    color: #000 !important;
    text-decoration: underline;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-header__res-ai-arrow {
    animation: none !important;
  }

  .ambient-spotlight,
  .grain {
    display: none !important;
  }

  .contact-modal__backdrop,
  .contact-modal__panel {
    transition: none !important;
  }

  .contact-modal.is-open .contact-modal__panel {
    transform: none !important;
  }

  .res-ai-modal__backdrop,
  .res-ai-modal__panel {
    transition: none !important;
  }

  .res-ai-modal.is-open .res-ai-modal__panel {
    transform: none !important;
  }

  .theme-toggle,
  .theme-toggle__icon,
  .hero-visual img,
  .skill-card,
  .project-card,
  .btn,
  .tag,
  .surface,
  .back-to-top {
    transition: none !important;
  }

  .hero-visual img:hover,
  .skill-card:hover,
  .project-card:hover,
  .btn:hover,
  .tag:hover,
  .surface:hover,
  .surface:active {
    transform: none !important;
  }
}
