/* ═══════════════════════════════════════════════════════
   TOKENS
═══════════════════════════════════════════════════════ */
:root {
  --font-display: 'Cabinet Grotesk', 'Inter', sans-serif;
  --font-body: 'Satoshi', 'Inter', sans-serif;

  --text-xs: clamp(0.72rem, 0.7rem + 0.12vw, 0.82rem);
  --text-sm: clamp(0.82rem, 0.8rem + 0.16vw, 0.95rem);
  --text-base: clamp(0.94rem, 0.92rem + 0.18vw, 1.04rem);
  --text-lg: clamp(1.04rem, 0.98rem + 0.38vw, 1.28rem);
  --text-xl: clamp(1.3rem, 1.08rem + 0.8vw, 1.9rem);

  --color-bg: #101114;
  --color-surface: #17191d;
  --color-surface-2: #1c2026;
  --color-surface-3: #222730;
  --color-surface-soft: rgba(255, 255, 255, 0.028);
  --color-surface-softer: rgba(255, 255, 255, 0.04);

  --color-text: #f5f7fb;
  --color-text-muted: #b6bfce;
  --color-text-faint: #7e8797;
  --color-divider: rgba(255, 255, 255, 0.06);

  --color-purple: #c7b7ff;
  --color-blue: #9fd8ff;
  --color-orange: #ffc89b;

  --color-primary: linear-gradient(
    135deg,
    rgba(199, 183, 255, 0.96),
    rgba(159, 216, 255, 0.92)
  );

  --radius-sm: 0.9rem;
  --radius-md: 1.15rem;
  --radius-lg: 1.45rem;
  --radius-xl: 1.9rem;
  --radius-full: 999px;

  --shadow-sm: 0 10px 28px rgba(0, 0, 0, 0.16);
  --shadow-md: 0 18px 48px rgba(0, 0, 0, 0.22);
  --shadow-lg: 0 24px 80px rgba(0, 0, 0, 0.32);

  --transition-fast: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 420ms cubic-bezier(0.16, 1, 0.3, 1);

  --gradient-page:
    radial-gradient(circle at 10% 12%, rgba(199, 183, 255, 0.08), transparent 24%),
    radial-gradient(circle at 88% 18%, rgba(159, 216, 255, 0.08), transparent 24%),
    radial-gradient(circle at 76% 84%, rgba(255, 200, 155, 0.06), transparent 26%),
    linear-gradient(180deg, #0f1013 0%, #111216 52%, #0f1013 100%);

  --content-max: 1600px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--color-text);
  background: var(--gradient-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -0.04em;
  line-height: 1.04;
  text-wrap: balance;
}

p,
li {
  margin: 0;
  text-wrap: pretty;
}

ul {
  margin: 0;
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: 3px;
}

::selection {
  background: rgba(199, 183, 255, 0.22);
  color: var(--color-text);
}

/* ═══════════════════════════════════════════════════════
   ACCESSIBILITY
═══════════════════════════════════════════════════════ */
.skip-link,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  top: 1rem;
  left: 1rem;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-full);
  background: #fff;
  color: #101114;
  z-index: 5000;
}

/* ═══════════════════════════════════════════════════════
   BACKGROUND & AMBIENCE
═══════════════════════════════════════════════════════ */
.site-background {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.site-noise {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.24) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.2) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: radial-gradient(circle at center, black 42%, transparent 88%);
}

.ambient {
  position: absolute;
  border-radius: 50%;
  filter: blur(88px);
  opacity: 0.26;
}

.ambient-lilac {
  width: 30rem;
  height: 30rem;
  top: -8rem;
  left: -8rem;
  background: rgba(199, 183, 255, 0.16);
}

.ambient-blue {
  width: 24rem;
  height: 24rem;
  top: 8rem;
  right: -4rem;
  background: rgba(159, 216, 255, 0.14);
}

.ambient-orange {
  width: 21rem;
  height: 21rem;
  right: 10%;
  bottom: -8rem;
  background: rgba(255, 200, 155, 0.1);
}

/* ═══════════════════════════════════════════════════════
   LAYOUT SHELL
═══════════════════════════════════════════════════════ */
.app-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  padding: clamp(0.9rem, 1.5vw, 1.35rem);
  display: grid;
  place-items: center;
}

.portfolio-grid {
  width: 100%;
  height: 100%;
  max-width: var(--content-max);
  display: grid;
  grid-template-columns: minmax(230px, 290px) minmax(0, 1fr) minmax(250px, 310px);
  gap: clamp(0.8rem, 1vw, 1rem);
  padding: clamp(0.8rem, 1vw, 1rem);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.024);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════
   COLUMNS
═══════════════════════════════════════════════════════ */
.col {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    rgba(23, 25, 29, 0.86);
  box-shadow: var(--shadow-sm);
}

.col-left {
  align-items: center;
  padding: 0.9rem 0.95rem;
  gap: 1.4rem;
  text-align: center;
  container-type: inline-size;
}

.col-center {
  padding: 0.95rem 1rem;
  gap: 0.8rem;
  background: transparent;
  box-shadow: none;
}

/* ─── AI Chat column — liquid animated background ─── */
.col-right {
  position: relative;
  padding: 0.95rem;
  gap: 0.75rem;
  isolation: isolate;
  background: #12131a;
}

/*
  Layer 1 (::before) — two large slow blobs: purple top-left + blue bottom-right.
*/
.col-right::before {
  content: '';
  position: absolute;
  inset: -30%;
  z-index: -2;
  border-radius: 50%;
  background:
    radial-gradient(
      ellipse 55% 55% at 30% 28%,
      rgba(199, 183, 255, 0.38) 0%,
      transparent 68%
    ),
    radial-gradient(
      ellipse 50% 52% at 72% 74%,
      rgba(159, 216, 255, 0.30) 0%,
      transparent 65%
    );
  filter: blur(52px);
  animation:
    liquidDriftX  2.7s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate,
    liquidDriftY  3.7s cubic-bezier(0.37, 0, 0.63, 1)        infinite alternate,
    liquidPulse   2.0s ease-in-out                             infinite alternate;
}

/* Calm speed when conversation is active */
.col-right.chat-active::before {
  animation-duration: 8s, 11s, 6s;
}

/*
  Layer 2 (::after) — warm orange/amber blob on a different rhythm.
*/
.col-right::after {
  content: '';
  position: absolute;
  inset: -25%;
  z-index: -1;
  border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%;
  background: radial-gradient(
    ellipse 60% 55% at 55% 50%,
    rgba(255, 200, 155, 0.22) 0%,
    rgba(199, 183, 255, 0.10) 45%,
    transparent 70%
  );
  filter: blur(48px);
  animation:
    liquidWanderX  4.0s cubic-bezier(0.33, 1, 0.68, 1) infinite alternate,
    liquidWanderY  3.0s cubic-bezier(0.65, 0, 0.35, 1) infinite alternate,
    liquidMorph    5.0s ease-in-out                      infinite alternate;
}

/* Calm speed when conversation is active */
.col-right.chat-active::after {
  animation-duration: 12s, 9s, 15s;
}

/* ═══════════════════════════════════════════════════════
   LEFT COLUMN — PROFILE
═══════════════════════════════════════════════════════ */

/* Logo + photo in the same top row */
.left-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.brand-mark {
  display: inline-flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex: 0 0 auto;
}

.brand-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.profile-photo-wrap {
  position: relative;
  cursor: pointer;
  flex: 0 0 auto;
}

.profile-photo {
  width: clamp(96px, 50cqi, 128px);
  height: clamp(96px, 50cqi, 128px);
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.26);
  transition: transform var(--transition-fast), filter var(--transition-fast);
}

.profile-photo-wrap:hover .profile-photo,
.profile-photo-wrap:focus-visible .profile-photo {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.04);
}

.profile-name {
  font-size: clamp(1.2rem, 0.9vw + 0.9rem, 1.7rem);
  max-width: none;
}

.profile-name-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
}

#profile-name-linkedin,
.profile-name-linkedin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  padding: 0.2rem;
  background: transparent;
  border: 2px solid #7e8797;
  border-radius: 24px;
  box-shadow: none;
  color: var(--color-text);
  line-height: 0;
  transform: none;
  transition:
    color var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast);
}

#profile-name-linkedin:hover,
#profile-name-linkedin:focus-visible,
.profile-name-linkedin:hover,
.profile-name-linkedin:focus-visible {
  color: var(--color-blue);
  border-color: var(--color-blue);
  transform: translateY(-1px);
}

#profile-name-linkedin svg,
.profile-name-linkedin svg {
  width: 1.28rem;
  height: 1.28rem;
}

.profile-location {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.svg-text-muted {
  color: var(--color-text-faint);
  flex-shrink: 0;
}

.profile-role {
  max-width: 24ch;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.45;
}

.profile-currently {
  width: 100%;
  display: grid;
  gap: 0.2rem;
  padding: 0.78rem 0.9rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(199, 183, 255, 0.1), rgba(255, 255, 255, 0.03));
  color: var(--color-text-faint);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-currently span {
  color: var(--color-text);
  font-size: var(--text-sm);
  letter-spacing: normal;
  text-transform: none;
  line-height: 1.4;
}

.left-action-row,
.doc-buttons,
.profile-contact {
  width: 100%;
}

.left-action-row-main,
.doc-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.profile-contact {
  display: grid;
  gap: 0.55rem;
}

.contact-item {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 2.45rem;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.035);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  transition:
    transform var(--transition-fast),
    background var(--transition-fast),
    color var(--transition-fast);
}

.contact-item:hover,
.contact-item:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.07);
  color: var(--color-text);
}

/* Hide icons inside contact items — text only */
.profile-contact svg {
  display: none !important;
}

.contact-item-email {
  justify-content: flex-start;
  padding-inline: 0.9rem;
  min-width: 0;
}

.contact-item-email span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════
   CENTER COLUMN — WORK
═══════════════════════════════════════════════════════ */
.work-featured {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.7rem;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}

.featured-cards {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

/* Card base */
.card {
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 1.4rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.038);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  transition:
    transform var(--transition-fast),
    background var(--transition-fast),
    box-shadow var(--transition-fast);
}

.card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.05);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 14px 34px rgba(0, 0, 0, 0.14);
}

/* Work card inner layout */
.work-card {
  display: grid;
  align-content: start;
  gap: 1.6rem;
}

.work-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}

.work-card-title {
  font-size: clamp(0.98rem, 0.62vw + 0.82rem, 1.2rem);
  line-height: 1.08;
}

.work-card-outcome {
  color: var(--color-text);
  font-size: var(--text-sm);
  line-height: 1.4;
}

.work-card-bullets,
.modal-prose ul,
.accordion-work-bullets {
  padding-left: 1rem;
  display: grid;
  gap: 0.55rem;
  color: var(--color-text-muted);
}

.work-card-bullets li {
  font-size: var(--text-sm);
  line-height: 1.4;
}

.work-card-footer {
  margin-top: auto;
}

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 1.65rem;
  padding: 0.28rem 0.55rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-muted);
  font-size: 0.7rem;
  font-weight: 600;
}

/* Deck teaser */
#deck-teaser {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.5;
  padding-inline: 0.1rem;
}

.deck-teaser-text {
  margin: 0;
}

/* ═══════════════════════════════════════════════════════
   RIGHT COLUMN — AI CHAT
═══════════════════════════════════════════════════════ */
.chat-header {
  display: grid;
  gap: 0.15rem;
}

.chat-title {
  font-family: var(--font-display);
  font-size: clamp(1.08rem, 0.78vw + 0.85rem, 1.45rem);
}

.chat-subtitle {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.chat-thread {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 0.65rem;
  padding-right: 0.12rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
  justify-items: stretch;
}

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

.chat-thread::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

/* Chat messages */
.chat-msg {
  max-width: 88%;
  padding: 0.88rem 0.95rem;
  border-radius: 1.1rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.chat-msg.assistant {
  justify-self: start;
  background: rgba(255, 255, 255, 0.045);
  color: var(--color-text);
}

.chat-msg.user {
  justify-self: end;
  background: rgba(199, 183, 255, 0.16);
  color: var(--color-text);
  text-align: left;
}

.chat-msg.system-notice {
  justify-self: center;
  max-width: 100%;
  padding: 0.2rem 0;
  background: transparent;
  color: var(--color-text-faint);
  font-size: var(--text-sm);
  font-style: italic;
  text-align: center;
}

/* Typing indicator */
.chat-typing {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.5rem 0.1rem;
}

.chat-typing span {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: var(--color-blue);
  opacity: 0.4;
  animation: typingDot 1.1s ease-in-out infinite;
}

.chat-typing span:nth-child(2) { animation-delay: 0.14s; }
.chat-typing span:nth-child(3) { animation-delay: 0.28s; }

/* Chat form */
.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
}

.chat-input {
  width: 100%;
  min-width: 0;
  min-height: 2.7rem;
  padding: 0.78rem 0.92rem;
  border: 0;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.chat-input::placeholder {
  color: var(--color-text-faint);
}

.chat-input:focus-visible {
  outline: none;
  box-shadow:
    inset 0 0 0 1px rgba(199, 183, 255, 0.35),
    0 0 0 4px rgba(199, 183, 255, 0.12);
}

/* ═══════════════════════════════════════════════════════
   BUTTONS
   .btn is the single source of truth for sizing/layout.
   Variants (.primary, .secondary, .link) only set colors.
═══════════════════════════════════════════════════════ */
.btn,
.panel-link,
.topbar-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  min-height: 2.45rem;
  padding: 0.65rem 0.82rem;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  text-align: center;
  transition:
    transform var(--transition-fast),
    background var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.btn:hover,
.panel-link:hover,
.topbar-cta:hover {
  transform: translateY(-2px);
}

/* Default / ghost */
.btn {
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-text);
}

.btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Primary — gradient fill */
.btn.primary,
.topbar-cta {
  background: var(--color-primary);
  color: #111217;
  box-shadow: 0 8px 26px rgba(159, 216, 255, 0.14);
}

/* Secondary / link */
.btn.secondary,
.btn.link,
.panel-link {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text);
}

/* Full-width helper */
.full-width {
  width: 100%;
}

/* Send button — square icon button */
.chat-send {
  width: 2.7rem;
  min-width: 2.7rem;
  min-height: 2.7rem;
  padding: 0;
  flex: 0 0 auto;
}

.chat-send svg {
  width: 0.92rem;
  height: 0.92rem;
  display: block;
  flex: 0 0 auto;
}

/* Action button wrapper — plain shell, no chat-msg styles */
.chat-action-msg {
  justify-self: start;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  line-height: 1;
}

.chat-action-btn {
  align-self: flex-start;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.chat-action-btn svg {
  width: 0.92rem;
  height: 0.92rem;
  display: block;
  flex: 0 0 auto;
}

/* ═══════════════════════════════════════════════════════
   PHOTO OVERLAY
═══════════════════════════════════════════════════════ */
.photo-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 8, 12, 0.82);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.photo-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.photo-overlay img {
  width: auto;
  height: min(82vh, 860px);
  max-width: 90vw;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  transform: scale(0.94);
  transition: transform var(--transition-slow);
}

.photo-overlay.open img {
  transform: scale(1);
}

/* ═══════════════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════════════ */
.modal {
  padding: 0;
  border: 0;
  background: transparent;
}

.modal::backdrop {
  background: rgba(8, 9, 12, 0.74);
  backdrop-filter: blur(10px);
}

.modal-shell {
  width: min(92vw, 56rem);
  max-height: 88vh;
  max-height: 88dvh;
  margin: auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.028)),
    rgba(23, 25, 29, 0.96);
  box-shadow: var(--shadow-lg);
  padding: 1rem 1rem 1.1rem;
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.modal-header {
  margin-bottom: 1rem;
}

.modal-footer {
  padding-top: 1rem;
  flex-wrap: wrap;
}

.modal-footer .btn,
.modal-footer .panel-link,
.modal-footer .topbar-cta {
  max-width: 100%;
}

.modal-title {
  font-size: var(--text-xl);
  color: var(--color-text);
}

.modal-close {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 50%;
}

.modal-body {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 2rem;
  color: var(--color-text-muted);
  align-content: start;
}

.modal-section {
  display: grid;
  gap: 1.5rem;
}

.modal-section-title {
  font-size: var(--text-lg);
  color: var(--color-text);
}

.modal-prose {
  display: grid;
  gap: 0.75rem;
}

.modal-prose ul {
  padding-left: 1rem;
  gap: 0.45rem;
}

.modal-tags {
  margin-bottom: 0.2rem;
}

.modal-outcome {
  color: var(--color-text);
}

/* iFrame viewer (deck / résumé) */
.modal-iframe-wrap {
  width: 100%;
  height: min(76vh, 820px);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.modal-iframe-wrap--tall {
  height: min(84vh, 960px);
}

.modal-iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ═══════════════════════════════════════════════════════
   MODAL — ABOUT
═══════════════════════════════════════════════════════ */
.about-summary {
  color: var(--color-text-muted);
  line-height: 1.6;
}

.strength-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
  background: rgba(199, 183, 255, 0.12);
  color: var(--color-purple);
  font-size: var(--text-sm);
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════
   MODAL — PROCESS STEPS
═══════════════════════════════════════════════════════ */
.process-steps {
  display: grid;
  gap: 0.75rem;
}

.process-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  align-items: start;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
}

.process-step-num {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(199, 183, 255, 0.15);
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════
   MODAL — TESTIMONIALS
═══════════════════════════════════════════════════════ */
.testimonial-list {
  display: grid;
  gap: 0.75rem;
}

.testimonial-intro {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.testimonial-card {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
}

.testimonial-quote {
  color: var(--color-text);
  line-height: 1.6;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.testimonial-avatar {
  width: 2.1rem;
  height: 2.1rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(199, 183, 255, 0.15);
  color: var(--color-purple);
  font-size: var(--text-sm);
  font-weight: 700;
  font-family: var(--font-display);
}

.testimonial-avatar--1 { background: rgba(159, 216, 255, 0.15); color: var(--color-blue); }
.testimonial-avatar--2 { background: rgba(255, 200, 155, 0.15); color: var(--color-orange); }
.testimonial-avatar--3 { background: rgba(199, 183, 255, 0.15); color: var(--color-purple); }
.testimonial-avatar--4 { background: rgba(159, 216, 255, 0.15); color: var(--color-blue); }
.testimonial-avatar--5 { background: rgba(255, 200, 155, 0.15); color: var(--color-orange); }

.testimonial-name {
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: 600;
}

.testimonial-role-label {
  color: var(--color-text-faint);
  font-size: var(--text-xs);
}

/* ═══════════════════════════════════════════════════════
   MODAL — DECK ACCESS FORM
═══════════════════════════════════════════════════════ */
.deck-access-note {
  color: var(--color-text-muted);
}

.deck-access-form,
.deck-access-top,
.deck-access-bottom {
  display: grid;
  gap: 0.7rem;
}

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

.deck-access-bottom {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.deck-field {
  display: grid;
}

.deck-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.8rem;
  color: var(--color-text-faint);
  font-size: var(--text-xs);
}

.deck-divider span {
  height: 1px;
  background: var(--color-divider);
  display: block;
}

.deck-request-btn {
  text-align: center;
}

.deck-email-inline {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.deck-email-inline a {
  color: var(--color-blue);
}

.deck-access-status {
  min-height: 1.4rem;
  font-size: var(--text-sm);
}

.deck-access-status.is-error   { color: #ffb0b8; }
.deck-access-status.is-success { color: #9de3b2; }
.deck-access-status.is-loading { color: var(--color-text-muted); }

/* ═══════════════════════════════════════════════════════
   MOBILE — ACCORDION
═══════════════════════════════════════════════════════ */
.accordion-list {
  display: grid;
  gap: 0.75rem;
}

.accordion-item {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
  align-self: start;
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  text-align: left;
  color: var(--color-text);
}

.accordion-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  transition: transform var(--transition-fast);
}

.accordion-trigger[aria-expanded='true'] .accordion-icon {
  transform: rotate(180deg);
}

.accordion-panel {
  display: none;
  padding: 0 1rem 1rem;
}

.accordion-panel.open {
  display: block;
}

.accordion-work-tags {
  margin-bottom: 0.5rem;
}

.accordion-work-outcome {
  margin-bottom: 0.75rem;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.accordion-case-section {
  display: grid;
  gap: 0.45rem;
}

.accordion-case-title {
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════
   MOBILE NAV CARDS
═══════════════════════════════════════════════════════ */
.mobile-nav-cards {
  display: none;
  flex-direction: row;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem 0.9rem;
}

.mobile-nav-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem 0.75rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  font-family: var(--font-body);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.mobile-nav-card:hover,
.mobile-nav-card:focus-visible {
  border-color: rgba(159, 216, 255, 0.35);
  box-shadow: 0 0 0 1px rgba(159, 216, 255, 0.12), var(--shadow-sm);
  transform: translateY(-2px);
}

.mobile-nav-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(159, 216, 255, 0.08);
  border: 1.5px solid rgba(159, 216, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-blue);
}

.mobile-nav-card-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

/* Chat card — purple accent to match col-right palette */
#mobile-btn-chat {
  border-color: rgba(199, 183, 255, 0.18);
}

#mobile-btn-chat:hover,
#mobile-btn-chat:focus-visible {
  border-color: rgba(199, 183, 255, 0.45);
  box-shadow: 0 0 0 1px rgba(199, 183, 255, 0.15), var(--shadow-sm);
}

#mobile-btn-chat .mobile-nav-card-icon {
  background: rgba(199, 183, 255, 0.08);
  border-color: rgba(199, 183, 255, 0.22);
  color: var(--color-purple);
}

#mobile-btn-chat .mobile-nav-card-label {
  color: var(--color-purple);
}

/* ── Mobile chat panel — fills modal body as full chat UI ── */
.mobile-chat-panel {
  display: none;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.mobile-chat-panel.active {
  display: flex;
}

/* ═══════════════════════════════════════════════════════
   KEYFRAMES
═══════════════════════════════════════════════════════ */
@keyframes liquidDriftX {
  0%   { transform: translateX(-6%); }
  100% { transform: translateX(6%);  }
}
@keyframes liquidDriftY {
  0%   { transform: translateY(-5%); }
  100% { transform: translateY(8%);  }
}
@keyframes liquidPulse {
  0%   { opacity: 0.82; filter: blur(52px) saturate(1.0); }
  50%  { opacity: 1.00; filter: blur(44px) saturate(1.15); }
  100% { opacity: 0.88; filter: blur(58px) saturate(0.95); }
}

@keyframes liquidWanderX {
  0%   { transform: translateX(10%); }
  100% { transform: translateX(-8%); }
}
@keyframes liquidWanderY {
  0%   { transform: translateY(8%);   }
  100% { transform: translateY(-10%); }
}
@keyframes liquidMorph {
  0%   { border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%; opacity: 0.90; filter: blur(48px); }
  33%  { border-radius: 55% 45% 40% 60% / 45% 55% 45% 55%; opacity: 1.00; filter: blur(40px); }
  66%  { border-radius: 48% 52% 60% 40% / 55% 48% 52% 45%; opacity: 0.85; filter: blur(54px); }
  100% { border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%; opacity: 0.90; filter: blur(48px); }
}

@keyframes typingDot {
  0%, 80%, 100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — 1360px
═══════════════════════════════════════════════════════ */
@media (max-width: 1360px) {
  .portfolio-grid {
    grid-template-columns: minmax(220px, 275px) minmax(0, 1fr) minmax(240px, 295px);
  }

  .featured-cards {
    gap: 0.72rem;
  }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — 1180px
═══════════════════════════════════════════════════════ */
@media (max-width: 1180px) {
  .portfolio-grid {
    grid-template-columns: minmax(210px, 260px) minmax(0, 1fr) minmax(220px, 275px);
  }

  .featured-cards {
    grid-template-columns: 1fr;
  }

  .brand-logo {
    width: 58px;
    height: 58px;
  }

  .profile-photo {
    width: 108px;
    height: 108px;
  }
}

/* ═══════════════════════════════════════════════════════
   MOBILE — 1024px and below
   Pattern: show only left column + nav cards.
   Work and chat open as full-screen modals.
═══════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  html, body {
    height: auto;
    overflow: auto;
    overflow-x: hidden;
  }

  .app-shell {
    height: auto;
    min-height: 100dvh;
    padding: 0;
  }

  .portfolio-grid {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100dvh;
    width: 100%;
    gap: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    overflow: visible;
  }

  /* Hide center and right — accessible via nav card modals */
  .col-center,
  .col-right {
    display: none;
  }

  .col-left {
    height: auto;
    overflow: visible;
    border-radius: 0;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
      rgba(23, 25, 29, 0.96);
    box-shadow: none;
    padding: 1.5rem 1rem 1rem;
    gap: 1.2rem;
  }

  /* Larger photo on mobile */
  .profile-photo {
    width: clamp(80px, 22cqi, 110px);
    height: clamp(80px, 22cqi, 110px);
  }

  /* Nav cards row visible */
  .mobile-nav-cards {
    display: flex;
  }

  /* Full-screen modals */
  .modal {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
    margin: 0;
    inset: 0;
  }

  .modal-shell {
    width: 100%;
    height: 100%;          /* fill the full-screen modal */
    max-height: 100dvh;
    border-radius: 0;
    padding: 1rem 1rem 1.25rem;
  }

  .accordion-trigger {
    padding: 1rem;
    font-size: var(--text-base);
  }

  .accordion-panel {
    padding: 0 1rem 1.25rem;
  }

  .doc-buttons {
    flex-wrap: wrap;
  }

  /* Chat modal — body fills the remaining grid row */
  .modal-body.is-chat {
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
    gap: 0;
  }

  /* Panel fills body, thread scrolls */
  .modal-body.is-chat .mobile-chat-panel {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0 1rem 1rem;
    gap: 0.75rem;
  }

  .modal-body.is-chat .chat-thread {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal-body.is-chat .chat-form {
    flex: 0 0 auto;
  }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — 680px
═══════════════════════════════════════════════════════ */
@media (max-width: 680px) {
  .col-left {
    padding: 1.2rem 0.9rem 0.9rem;
  }

  .brand-logo {
    width: 50px;
    height: 50px;
  }

  .left-action-row-main,
  .doc-buttons,
  .deck-access-top,
  .deck-access-bottom {
    grid-template-columns: 1fr;
  }

  .btn,
  .panel-link,
  .topbar-cta,
  .chat-input,
  .chat-send {
    min-height: 2.9rem;
  }

  #profile-name-linkedin svg,
  .profile-name-linkedin svg {
    width: 1.18rem;
    height: 1.18rem;
  }

  .mobile-nav-card-icon {
    width: 60px;
    height: 60px;
  }

  .mobile-nav-card {
    padding: 1.75rem 0.75rem;
    gap: 0.85rem;
  }
}

/* ═══════════════════════════════════════════════════════
   REDUCED MOTION
═══════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
