:root {
  --bg: #FBF7F0;
  --bg-elevated: #FFFFFF;
  --ink: #2A2119;
  --ink-soft: #5C5147;
  --ink-faint: #928678;
  --accent: #A65D1E;
  --accent-soft: #F5E7D2;
  --accent-deep: #82470F;
  --line: #EAE2D5;
  --line-soft: #F2ECE1;
  --radius: 14px;
  --radius-sm: 8px;
  --max: 1120px;
  --shadow-sm: 0 1px 2px rgba(60, 40, 20, 0.05);
  --shadow-md: 0 8px 24px rgba(60, 40, 20, 0.08);

  /* Neo-brutalist accents — dusty blue + warm apricot panels,
     thick ink borders, and hard (blur-free) offset shadows. */
  --brut-blue: #CDDBDF;
  --brut-blue-ink: #33606C;
  --brut-apricot: #F3D8BF;
  --brut-apricot-ink: #99541A;
  --brut-border: 2.5px solid var(--ink);
  --brut-shadow: 4px 4px 0 var(--ink);
  --brut-shadow-md: 6px 6px 0 var(--ink);
  --brut-shadow-lg: 8px 8px 0 var(--ink);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--ink);
}

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

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

/* ─── Header ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 247, 240, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 2.5px solid var(--ink);
}

.site-header > * {
  max-width: var(--max);
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px 32px;
}

/* Left-side social icons */
.header-social {
  display: flex;
  align-items: center;
  gap: 18px;
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}

.header-social a {
  display: inline-flex;
  align-items: center;
  color: var(--ink-soft);
}

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

.header-social svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
  display: block;
}

.site-header nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 20px;
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
}

.site-header nav a {
  color: var(--ink-soft);
  font-size: 0.94rem;
  font-weight: 500;
}

.site-header nav a:hover {
  color: var(--accent);
}

/* Active page / in-view section */
.site-header nav a.active {
  color: var(--accent);
  font-weight: 600;
}

/* ─── Layout ─── */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  padding: 96px 0;
  border-top: 1px solid var(--line-soft);
}

.section h2 {
  font-size: 2.25rem;
  margin-bottom: 12px;
}

.section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 6px;
  margin-top: 12px;
  background: var(--brut-apricot);
  border: 2px solid var(--ink);
  border-radius: 4px;
}

.section-contact h2::after {
  margin-left: auto;
  margin-right: auto;
}

.section-lede {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin-bottom: 48px;
  max-width: 640px;
}

/* ─── Hero ─── */
.hero {
  padding: 96px 0 64px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 64px;
  align-items: center;
}

.hero-text {
  min-width: 0;
}

.hero-role {
  text-transform: uppercase;
  font-weight: 700;
  font-size: clamp(0.92rem, 1.35vw, 1.02rem);
  letter-spacing: 0.055em;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 24px;
}

.hero-bio {
  font-size: 1.08rem;
  color: var(--ink-soft);
  line-height: 1.72;
  max-width: 52ch;
  margin-bottom: 34px;
}

.hero-photo {
  justify-self: end;
}

.hero-photo img {
  display: block;
  width: 360px;
  height: 440px;
  object-fit: cover;
  border-radius: 18px;
  border: 3px solid var(--ink);
  box-shadow: 12px 12px 0 var(--ink);
  background: var(--brut-apricot);
}

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.75rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  margin-bottom: 20px;
  max-width: none;
}

.hero h1 .accent {
  font-style: normal;
}

.accent {
  color: var(--accent);
  font-style: italic;
}

.lede {
  font-size: 1.18rem;
  color: var(--ink-soft);
  max-width: 64ch;
  margin-bottom: 36px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 13px 24px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
  border: var(--brut-border);
  box-shadow: var(--brut-shadow);
  cursor: pointer;
}

.btn:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

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

.btn-primary:hover {
  background: var(--accent-deep);
  color: white;
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--ink);
}

.btn-secondary:hover {
  color: var(--ink);
}

/* ─── About ─── */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-grid p {
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin-bottom: 16px;
}

.skills {
  background: var(--bg-elevated);
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.skills h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.skills ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skills li {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.skills strong {
  color: var(--accent);
  font-weight: 600;
}

/* ─── Projects ─── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--bg-elevated);
  border: var(--brut-border);
  border-radius: 14px;
  padding: 28px;
  box-shadow: var(--brut-shadow-md);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translate(3px, 3px);
  box-shadow: 3px 3px 0 var(--ink);
}

.project-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--brut-apricot);
  padding: 5px 12px;
  border: 2px solid var(--ink);
  border-radius: 100px;
  box-shadow: 2px 2px 0 var(--ink);
  margin-bottom: 16px;
  align-self: flex-start;
}

.project-card h3 {
  font-size: 1.35rem;
  margin-bottom: 6px;
}

.project-role {
  font-size: 0.88rem;
  color: var(--ink-faint);
  font-style: italic;
  margin-bottom: 14px;
}

.project-card > p:not(.project-role) {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 20px;
  flex: 1;
}

.metrics {
  list-style: none;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.metrics li {
  font-size: 0.82rem;
  color: var(--ink-faint);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metrics span {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--accent);
}

/* ─── Tech tags (personal projects) ─── */
.tech-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.tech-tags li {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--brut-blue);
  border: 2px solid var(--ink);
  padding: 4px 12px;
  border-radius: 100px;
}

/* ─── Card links ─── */
.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding-top: 16px;
  margin-top: auto;
  border-top: 1px solid var(--line-soft);
}

.card-links a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
}

.card-links a:hover {
  color: var(--accent-deep);
}

/* ─── Work: company cards ─── */
.company-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.company-card {
  background: var(--bg-elevated);
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--brut-shadow-lg);
}

.company-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 24px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line-soft);
}

.company-name {
  font-size: 1.55rem;
  margin-bottom: 4px;
}

.company-meta {
  font-size: 0.9rem;
  color: var(--ink-faint);
  font-weight: 500;
}

/* Role progression timeline (most recent first) */
.role-path {
  list-style: none;
  min-width: 260px;
}

.role-path li {
  position: relative;
  padding-left: 22px;
  padding-bottom: 16px;
  color: var(--ink-faint);
}

.role-path li:last-child {
  padding-bottom: 0;
}

.role-path li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
  box-shadow: 0 0 0 2px var(--bg-elevated), 0 0 0 3px var(--line);
}

.role-path li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 4.5px;
  top: 16px;
  bottom: 2px;
  width: 1px;
  background: var(--line);
}

.role-path li.current {
  color: var(--ink);
}

.role-path li.current::before {
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--bg-elevated), 0 0 0 3px var(--accent);
}

.role-title {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: inherit;
}

.role-detail {
  display: block;
  font-size: 0.82rem;
  color: var(--ink-faint);
}

.company-projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.mini-card {
  background: var(--bg);
  border: var(--brut-border);
  border-radius: 12px;
  padding: 22px;
  box-shadow: var(--brut-shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.mini-card:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.mini-card .project-tag {
  margin-bottom: 12px;
}

.mini-card h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 6px;
}

.mini-card > p:not(.project-role) {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 18px;
  flex: 1;
}

.mini-card .metrics {
  gap: 16px;
}

/* Clickable mini-card (links to a case study) */
a.mini-card {
  text-decoration: none;
  color: inherit;
}

a.mini-card:hover {
  transform: translate(2px, 2px);
}

.mini-card-cta {
  margin-top: 18px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--accent-deep);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

a.mini-card:hover .mini-card-cta {
  color: var(--accent);
}

.mini-card-cta svg {
  width: 13px;
  height: 13px;
  transition: transform 0.2s ease;
}

a.mini-card:hover .mini-card-cta svg {
  transform: translateX(3px);
}

/* ─── Case-study pages ─── */
.case-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
}

.case-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 36px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.case-back:hover {
  color: var(--accent);
}

.case-back svg {
  width: 15px;
  height: 15px;
}

.case-hero {
  padding: 36px 0 34px;
  border-bottom: 1px solid var(--line);
}

.case-hero h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 14px 0 18px;
}

.case-hero .lede {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 62ch;
}

.case-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 28px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}

.case-meta-item {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.case-meta-item .k {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--ink-faint);
}

.case-meta-item .v {
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--ink);
}

.case-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  padding: 36px 0 8px;
}

.case-metric {
  background: var(--brut-blue);
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  box-shadow: var(--brut-shadow);
  padding: 26px 24px;
}

.case-metric:nth-child(even) {
  background: var(--brut-apricot);
}

.case-metric .num {
  display: block;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 2.1rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 8px;
}

.case-metric .label {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.case-body {
  max-width: 760px;
  padding: 20px 0 8px;
}

.case-section {
  padding: 30px 0;
  border-top: 1px solid var(--line-soft);
}

.case-section:first-child {
  border-top: none;
}

.case-section h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 14px;
}

.case-section p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: 14px;
  max-width: 68ch;
}

.case-section p:last-child {
  margin-bottom: 0;
}

.case-section strong {
  color: var(--ink);
  font-weight: 600;
}

.case-list {
  list-style: none;
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.case-list li {
  position: relative;
  padding-left: 22px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 68ch;
}

.case-list li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.case-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 30px 0 80px;
  border-top: 1px solid var(--line);
  margin-top: 20px;
}

.case-nav a {
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--ink-soft);
  max-width: 45%;
}

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

.case-nav a.next {
  margin-left: auto;
  text-align: right;
}

.case-nav .np-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin-bottom: 4px;
}

/* ─── Certifications ─── */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.cert-card {
  background: var(--bg-elevated);
  border: var(--brut-border);
  border-radius: 14px;
  padding: 26px 28px;
  box-shadow: var(--brut-shadow-md);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  display: flex;
  flex-direction: column;
}

.cert-card:hover {
  transform: translate(3px, 3px);
  box-shadow: 3px 3px 0 var(--ink);
}

.cert-card h3 {
  font-size: 1.12rem;
  margin-bottom: 6px;
  line-height: 1.25;
}

.cert-issuer {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.cert-card > p:not(.cert-issuer) {
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* ─── Chat ─── */
.section-chat {
  position: relative;
}

.chat-container {
  background: var(--bg-elevated);
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  box-shadow: var(--brut-shadow-lg);
  max-width: 820px;
}

.chat-messages {
  padding: 28px 28px 8px;
  max-height: 480px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-message {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.96rem;
  line-height: 1.55;
  max-width: 88%;
  animation: fadeIn 0.3s ease;
}

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

.chat-message.assistant {
  background: var(--brut-apricot);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  align-self: flex-start;
}

.chat-message.user {
  background: var(--accent);
  color: white;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  align-self: flex-end;
}

.chat-message p + p {
  margin-top: 10px;
}

.chat-message.assistant.thinking {
  color: var(--ink-faint);
  font-style: italic;
}

.chat-message.assistant.thinking::after {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  margin-left: 4px;
  animation: pulse 1.2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.chat-suggestions {
  display: flex;
  gap: 8px;
  padding: 12px 28px 18px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line-soft);
}

.suggestion {
  background: var(--brut-blue);
  border: 2px solid var(--ink);
  border-radius: 100px;
  padding: 7px 15px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
  font-family: inherit;
}

.suggestion:hover {
  color: var(--ink);
  background: var(--brut-apricot);
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--ink);
}

.chat-form {
  display: flex;
  gap: 10px;
  padding: 18px 28px;
  background: var(--bg);
  border-top: 1px solid var(--line-soft);
}

#chat-input {
  flex: 1;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-family: inherit;
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  background: var(--bg-elevated);
  color: var(--ink);
  outline: none;
  transition: box-shadow 0.12s ease;
}

#chat-input:focus {
  box-shadow: 3px 3px 0 var(--ink);
}

#chat-send {
  padding: 0 22px;
  background: var(--accent);
  color: white;
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  box-shadow: 3px 3px 0 var(--ink);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.94rem;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
}

#chat-send:hover:not(:disabled) {
  background: var(--accent-deep);
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

#chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-disclaimer {
  text-align: center;
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin-top: 14px;
}

/* ─── Chat with Resume standalone page (/resume-chat) ─── */
.chat-page-main {
  min-height: calc(100vh - 190px);
}

.chat-hero {
  padding: 72px 0 28px;
}

.chat-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin-bottom: 16px;
  max-width: 18ch;
}

.chat-body {
  padding: 0 0 96px;
  border-top: none;
}

/* ─── Contact ─── */
.section-contact {
  text-align: center;
  padding-bottom: 80px;
}

.section-contact h2 {
  font-size: 2.25rem;
  margin-bottom: 16px;
}

.section-contact > p {
  color: var(--ink-soft);
  margin-bottom: 28px;
  font-size: 1.05rem;
}

.contact-links {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.contact-links a {
  font-size: 1rem;
  font-weight: 500;
}

.dot {
  color: var(--ink-faint);
}

/* ─── Footer ─── */
.site-footer {
  border-top: 2.5px solid var(--ink);
  padding: 32px;
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.86rem;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  main { padding: 0 20px; }
  .site-header { padding: 16px 20px; }
  .site-header nav { gap: 16px; }
  .site-header nav a { font-size: 0.86rem; }
  .section { padding: 64px 0; }
  .hero {
    padding: 48px 0 32px;
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .hero-photo { justify-self: start; }
  .hero-photo img { width: 240px; height: 300px; box-shadow: 12px 12px 0 rgba(42, 33, 25, 0.14); }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .projects-grid { grid-template-columns: 1fr; }
  .cert-grid { grid-template-columns: 1fr; }
  .company-card { padding: 24px; }
  .company-header { flex-direction: column; gap: 20px; }
  .role-path { min-width: 0; }
  .company-projects { grid-template-columns: 1fr; }
  .case-main { padding: 0 20px; }
  .case-meta { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .case-metrics { grid-template-columns: 1fr; }
  .chat-messages { padding: 20px 20px 8px; }
  .chat-suggestions { padding: 12px 20px 18px; }
  .chat-form { padding: 14px 20px; }
}

/* Small phones */
@media (max-width: 480px) {
  /* On small phones, drop the centered layout: icons left, nav right,
     so the nav has room and nothing overflows on ~320px screens. */
  .site-header { display: flex; flex-direction: row-reverse; justify-content: space-between; }
  .site-header nav { gap: 14px; }
  .site-header nav a { font-size: 0.82rem; }
  .header-social { gap: 13px; }
  .header-social svg { width: 18px; height: 18px; }
  /* Slightly smaller display headings so they don't dominate the viewport */
  .hero h1 { font-size: clamp(2.4rem, 12vw, 3.25rem); }
  .section h2,
  .section-contact h2 { font-size: 1.9rem; }
  .case-meta { grid-template-columns: 1fr; }
  /* Stack the hero CTAs full-width — easier to tap, cleaner on a phone */
  .hero-cta .btn { flex: 1 1 100%; justify-content: center; }
  /* Bigger touch targets for the chat suggestion chips */
  .suggestion { padding: 10px 16px; font-size: 0.85rem; }
  /* Let chat bubbles use a touch more width on a narrow screen */
  .chat-message { max-width: 92%; }
  .contact-links { gap: 10px 12px; }
}
