﻿:root {
  --paper: #eaecf3;
  --paper-strong: #dde1ea;
  --card: rgba(249, 248, 251, 0.86);
  --card-strong: #f7f8fc;
  --ink: #17161c;
  --muted: #666b7c;
  --line: rgba(43, 46, 58, 0.12);
  --line-strong: rgba(43, 46, 58, 0.22);
  --accent: #ab6f62;
  --accent-soft: rgba(171, 111, 98, 0.12);
  --accent-strong: #8e5a4e;
  --teal: #6d7ea0;
  --teal-soft: rgba(109, 126, 160, 0.14);
  --shadow: 0 28px 72px rgba(34, 37, 49, 0.11);
  --shadow-soft: 0 16px 38px rgba(34, 37, 49, 0.08);
  --radius-xl: 2rem;
  --radius-lg: 1.5rem;
  --radius-md: 1.1rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

.private-pending [data-private-body] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Space Grotesk", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(171, 111, 98, 0.12), transparent 26rem),
    radial-gradient(circle at bottom left, rgba(109, 126, 160, 0.16), transparent 30rem),
    radial-gradient(circle at center right, rgba(255, 255, 255, 0.65), transparent 24rem),
    var(--paper);
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(60, 68, 92, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(60, 68, 92, 0.028) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at center, black 20%, transparent 82%);
  opacity: 0.34;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

:focus-visible {
  outline: 3px solid rgba(171, 111, 98, 0.34);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  transform: translateY(-200%);
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  z-index: 200;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  width: min(1120px, calc(100vw - 2rem));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: rgba(235, 238, 246, 0.84);
  border-bottom: 1px solid var(--line);
}

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

.brand {
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  font-size: 0.95rem;
}

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

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
}

.site-nav a,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.site-nav a:hover,
.pill:hover,
.site-nav a.active,
.pill.active {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.45);
  color: var(--ink);
}

.pill {
  appearance: none;
  cursor: pointer;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.32);
}

.lang-pill {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.5rem 0.75rem;
}

main {
  padding: clamp(2.25rem, 5vw, 4rem) 0 4rem;
}

.hero-grid,
.page-grid,
.cv-grid,
.private-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: clamp(1rem, 4vw, 2rem);
  align-items: start;
}

.hero-grid {
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-title,
.section-title {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.96;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6.2rem);
  max-width: 12ch;
}

.section-title {
  font-size: clamp(2.2rem, 5vw, 4.1rem);
}

.hero-title em,
.section-title em {
  color: var(--accent);
  font-style: italic;
}

.lead,
.muted {
  color: var(--muted);
}

.playful-line {
  margin: 1rem 0 0;
  max-width: 34rem;
}

.lead {
  font-size: clamp(1rem, 2vw, 1.18rem);
  max-width: 58ch;
  margin: 1.25rem 0 0;
}

.button-row,
.project-actions,
.chip-row,
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button-row {
  margin-top: 1.8rem;
}

.button {
  appearance: none;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 0.92rem 1.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
  box-shadow: var(--shadow-soft);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.button.secondary {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
  box-shadow: none;
}

.button.ghost {
  background: rgba(255, 255, 255, 0.45);
  border-color: transparent;
  color: var(--ink);
  box-shadow: none;
}

.button.small {
  padding: 0.72rem 1rem;
  font-size: 0.94rem;
}

.button[disabled] {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
}

.card,
.route-card,
.project-card,
.detail-card,
.cv-card,
.private-card,
.media-panel,
.note {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.media-panel {
  padding: 1.1rem;
  overflow: hidden;
}

.media-panel img {
  border-radius: calc(var(--radius-lg) - 0.2rem);
  background: var(--paper-strong);
}

.media-panel .media-caption {
  margin-top: 1rem;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-md);
  background: var(--card-strong);
  border: 1px solid var(--line);
  color: var(--muted);
}

.section-block + .section-block {
  margin-top: 1rem;
}

.route-grid,
.stat-grid,
.detail-grid,
.project-grid,
.mini-grid {
  display: grid;
  gap: 1rem;
}

.route-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 2rem;
}

.stat-grid,
.detail-grid,
.mini-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.route-card,
.detail-card,
.cv-card,
.private-card {
  padding: 1.35rem;
}

.route-card h2,
.detail-card h3,
.cv-card h3,
.private-card h3,
.project-card h3,
.media-panel h3 {
  margin: 0 0 0.65rem;
  line-height: 1.12;
}

.route-card p,
.detail-card p,
.cv-card p,
.private-card p,
.project-card p {
  margin: 0;
  color: var(--muted);
}

.route-card .route-index {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.route-card .button {
  margin-top: 1rem;
  width: fit-content;
}

.stat-card {
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.34);
}

.stat-card strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 1.3rem;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 0.94rem;
}

.list-clean,
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list-clean {
  display: grid;
  gap: 0.7rem;
}

.list-clean li {
  position: relative;
  padding-left: 1rem;
  color: var(--muted);
}

.list-clean li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62rem;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--accent);
}

.timeline {
  display: grid;
  gap: 1rem;
}

.timeline-item {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.timeline-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.timeline-item .meta {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.chip-row {
  margin-top: 0.9rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.38rem 0.78rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--line);
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge.live {
  background: var(--teal-soft);
  color: var(--teal);
}

.badge.demo {
  background: rgba(171, 111, 98, 0.14);
  color: var(--accent);
}

.project-card {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 250px;
}

.project-thumb {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 1.2rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow-soft);
}

.project-thumb img {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  object-fit: cover;
  object-position: top center;
  transition: transform 180ms ease;
}

.project-thumb:hover img,
.project-thumb:focus-visible img {
  transform: scale(1.02);
}

.project-thumb.personal-os-thumb {
  background: linear-gradient(160deg, #f1ede4, #e9e2d3);
}

.project-thumb.personal-os-thumb img {
  object-fit: contain;
  object-position: center;
  aspect-ratio: 16 / 10;
  padding: 1rem 1.25rem;
  background: transparent;
}

.thumb-note {
  position: absolute;
  left: 0.8rem;
  bottom: 0.8rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(21, 21, 21, 0.72);
  color: #fff;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}

.project-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.project-actions {
  margin-top: auto;
}

.note {
  padding: 1rem 1.15rem;
  color: var(--muted);
}

.note.strong {
  border-color: rgba(109, 126, 160, 0.22);
  background: rgba(109, 126, 160, 0.08);
}

/* ==============================
   Work-with-Tobias block + CTAs
   ============================== */
.work-block {
  padding: clamp(1.5rem, 4vw, 2.4rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.6), rgba(233, 235, 243, 0.8));
  box-shadow: var(--shadow-soft);
}

.work-head {
  max-width: 52ch;
  margin-bottom: 1.5rem;
}

.work-lead {
  margin-top: 0.75rem;
}

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

.work-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card-strong);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 220px;
  box-shadow: var(--shadow-soft);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.work-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.work-card h3 {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.45rem;
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.work-card p {
  color: var(--muted);
  margin: 0;
  font-size: 0.98rem;
}

.work-card .button {
  margin-top: auto;
  align-self: flex-start;
}

.work-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.work-card.accent {
  background: linear-gradient(160deg, rgba(171, 111, 98, 0.12), rgba(171, 111, 98, 0.04));
  border-color: rgba(171, 111, 98, 0.22);
}

.work-card.accent .work-tag {
  color: var(--accent-strong);
}

.work-card.accent h3 em {
  color: var(--accent);
}

.work-footnote {
  margin-top: 1.2rem;
  font-size: 0.94rem;
}

/* ==============================
   Working-with-AI section
   ============================== */
.ai-block {
  padding: clamp(1.5rem, 4vw, 2.4rem);
  border: 1px solid rgba(21, 21, 21, 0.7);
  border-radius: var(--radius-xl);
  background: linear-gradient(165deg, #17161c 0%, #26242e 55%, #31303b 100%);
  color: #fff;
  box-shadow: var(--shadow);
}

.ai-block .eyebrow {
  color: rgba(255, 255, 255, 0.55);
}

.ai-block .section-title {
  color: #fff;
  max-width: 22ch;
}

.ai-block .section-title em {
  display: inline-flex;
  align-items: center;
  padding: 0.06em 0.34em 0.08em;
  margin: 0 0.05em;
  border-radius: 0.38em;
  background: linear-gradient(135deg, rgba(239, 211, 204, 0.98), rgba(255, 233, 228, 0.9));
  color: #1d1614;
  box-shadow: 0 0 0 1px rgba(239, 211, 204, 0.28);
}

.ai-lead {
  color: rgba(255, 255, 255, 0.75);
  max-width: 60ch;
  margin-top: 1rem;
}

.ai-grid {
  margin-top: 1.8rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.ai-pillar {
  padding: 1.2rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.ai-pillar .ai-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(239, 211, 204, 0.14);
  display: inline-flex;
  align-items: center;
  padding: 0.06em 0.34em 0.08em;
  margin: 0 0.05em;
  border-radius: 0.38em;
  background: linear-gradient(135deg, rgba(239, 211, 204, 0.98), rgba(255, 233, 228, 0.9));
  color: #1d1614;
  box-shadow: 0 0 0 1px rgba(239, 211, 204, 0.28);
  font-size: 1rem;
  border: 1px solid rgba(239, 211, 204, 0.22);
}

.ai-pillar h3 {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  color: #fff;
}

.ai-pillar p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.94rem;
  line-height: 1.55;
}

.ai-footer {
  margin-top: 1.4rem;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.94rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.ai-footer strong {
  display: inline-flex;
  align-items: center;
  padding: 0.06em 0.34em 0.08em;
  margin: 0 0.05em;
  border-radius: 0.38em;
  background: linear-gradient(135deg, rgba(239, 211, 204, 0.98), rgba(255, 233, 228, 0.9));
  color: #1d1614;
  box-shadow: 0 0 0 1px rgba(239, 211, 204, 0.28);
  font-weight: 700;
}

.ai-schedule {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.ai-schedule-item {
  padding: 0.95rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-schedule-item .meta {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(239, 211, 204, 0.85);
  margin-bottom: 0.35rem;
}

.ai-schedule-item p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.94rem;
  line-height: 1.5;
}

/* ==============================
   Intent modal
   ============================== */
.intent-modal {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.intent-modal[hidden] {
  display: none;
}

.intent-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 21, 28, 0.52);
  backdrop-filter: blur(10px);
}

.intent-card {
  position: relative;
  z-index: 1;
  width: min(34rem, 100%);
  background: var(--card-strong);
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  padding: 1.6rem;
  box-shadow: var(--shadow);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
}

.intent-title {
  margin: 0 0 0.5rem;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.intent-close {
  position: absolute;
  top: 0.75rem;
  right: 0.9rem;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
}

.intent-close:hover {
  background: rgba(21, 21, 21, 0.05);
  color: var(--ink);
}

.intent-form {
  display: grid;
  gap: 0.9rem;
  margin-top: 1rem;
}

.intent-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.intent-field .eyebrow {
  margin-bottom: 0;
}

.intent-textarea {
  resize: vertical;
  min-height: 8rem;
  font-family: inherit;
  line-height: 1.5;
}

.intent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.intent-note {
  font-size: 0.88rem;
  margin: 0.3rem 0 0;
}

body.intent-open {
  overflow: hidden;
}

/* ==============================
   TobAIs card
   ============================== */
 .tobais-card {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(320px, 1.22fr);
  gap: 1.35rem;
  padding: 1.5rem;
  align-items: start;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top right, rgba(239, 211, 204, 0.12), transparent 18rem),
    linear-gradient(145deg, rgba(28, 28, 36, 0.96), rgba(66, 76, 99, 0.94));
  color: #fff;
  box-shadow: var(--shadow);
}

.tobais-card .eyebrow,
.tobais-card .muted {
  color: rgba(255, 255, 255, 0.78);
}

.tobais-card .section-title,
.tobais-card h3 {
  color: #fff;
}

.tobais-card .section-title {
  max-width: 12ch;
}

.assistant-name {
  display: inline-block;
}

.assistant-ai {
  display: inline-flex;
  align-items: center;
  padding: 0.06em 0.34em 0.08em;
  margin: 0 0.05em;
  border-radius: 0.38em;
  background: linear-gradient(135deg, rgba(239, 211, 204, 0.98), rgba(255, 233, 228, 0.9));
  color: #1d1614;
  box-shadow: 0 0 0 1px rgba(239, 211, 204, 0.28);
}

.tobais-copy {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.tobais-copy p {
  margin: 0;
  max-width: 46ch;
}

.tobais-chat {
  display: flex;
  flex-direction: column;
}

.tobais-messages {
  min-height: 180px;
  max-height: 280px;
  overflow-y: auto;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: grid;
  gap: 0.75rem;
}

.tobais-messages[hidden] {
  display: none;
}

.tobais-message {
  max-width: 90%;
  padding: 0.8rem 0.9rem;
  border-radius: 1rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.tobais-message::before {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
}

.tobais-message.user {
  justify-self: end;
  background: rgba(171, 111, 98, 0.2);
  border: 1px solid rgba(171, 111, 98, 0.34);
  color: #fff;
}

.tobais-message.user::before {
  content: "You";
}

.tobais-message.bot {
  justify-self: start;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.92);
}

.tobais-message.bot::before {
  content: "TobAIs";
  display: inline-flex;
  align-items: center;
  padding: 0.06em 0.34em 0.08em;
  margin: 0 0.05em;
  border-radius: 0.38em;
  background: linear-gradient(135deg, rgba(239, 211, 204, 0.98), rgba(255, 233, 228, 0.9));
  color: #1d1614;
  box-shadow: 0 0 0 1px rgba(239, 211, 204, 0.28);
}

.tobais-form {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.tobais-input {
  background: rgba(250, 248, 252, 0.96);
  border-color: rgba(255, 255, 255, 0.34);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.tobais-input::placeholder {
  color: rgba(36, 38, 49, 0.48);
}

.tobais-input:focus {
  border-color: rgba(239, 211, 204, 0.96);
  box-shadow: 0 0 0 4px rgba(239, 211, 204, 0.16);
}

.tobais-status {
  margin-top: 0.75rem;
  color: rgba(255, 255, 255, 0.78);
  text-align: right;
}

.locked-shell {
  padding: 1.4rem;
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, rgba(21, 21, 21, 0.95), rgba(50, 53, 56, 0.92));
  color: #fff;
  box-shadow: var(--shadow);
}

.locked-shell p,
.locked-shell .muted-light {
  color: rgba(255, 255, 255, 0.76);
}

.input,
select.input,
textarea.input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  padding: 0.9rem 1rem;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23666b7c'%3E%3Cpath d='M5 7l5 6 5-6H5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 14px 14px;
  padding-right: 2.2rem;
}

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(203, 90, 52, 0.12);
}

.feedback {
  min-height: 1.35rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.feedback.error {
  color: #915247;
}

.feedback.success {
  color: var(--teal);
}

.private-gate-form {
  display: grid;
  gap: 0.9rem;
}

.private-intro-unlocked .locked-shell {
  opacity: 0.9;
}

.footer {
  padding: 0 0 3rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 1080px) {
  .ai-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .page-grid,
  .cv-grid,
  .private-layout {
    grid-template-columns: 1fr;
  }

  .tobais-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header {
    position: static;
    top: auto;
  }

  body::before {
    opacity: 0.14;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }

  .site-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    gap: 0.5rem;
  }

  .site-nav a,
  .pill {
    width: 100%;
    flex: none;
    padding: 0.62rem 0.75rem;
    font-size: 0.88rem;
    white-space: nowrap;
  }

  .lang-pill {
    grid-column: 2;
    justify-self: stretch;
  }

  .hero-title {
    max-width: none;
  }

  .hero-grid,
  .page-grid,
  .cv-grid,
  .private-layout {
    gap: 1.1rem;
  }

  .route-grid,
  .stat-grid,
  .detail-grid,
  .project-grid,
  .mini-grid,
  .work-grid,
  .ai-grid {
    grid-template-columns: 1fr;
  }

  .button-row,
  .project-actions,
  .form-row,
  .tobais-form,
  .intent-actions {
    flex-direction: column;
  }

  .button,
  .route-card .button,
  .work-card .button {
    width: 100%;
  }

  .project-card,
  .detail-card,
  .cv-card,
  .private-card,
  .route-card,
  .work-card {
    padding: 1.05rem;
  }

  .work-card .button {
    align-self: stretch;
  }

  .work-card {
    min-height: auto;
  }

  .tobais-card {
    padding: 1.15rem;
    gap: 1rem;
  }

  .tobais-status {
    margin-top: 0.75rem;
    color: rgba(255, 255, 255, 0.78);
    text-align: right;
  }
}

@media (max-width: 560px) {
  .site-nav {
    grid-template-columns: 1fr 1fr;
  }

  .brand {
    font-size: 0.88rem;
  }

  .site-nav a,
  .pill {
    padding: 0.58rem 0.62rem;
    font-size: 0.8rem;
  }

  .lang-pill {
    grid-column: 2;
  }

  .button-row,
  .project-actions {
    gap: 0.55rem;
  }

  .tobais-card .section-title {
    max-width: none;
  }

  .tobais-messages {
    min-height: 150px;
    max-height: 240px;
    padding: 0.85rem;
  }

  .tobais-message {
    max-width: 100%;
  }

  .hero-grid,
  .page-grid,
  .cv-grid,
  .private-layout {
    gap: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
