:root {
  --ink: #111214;
  --muted: #55575c;
  --line: #dedede;
  --paper: #f7f6f3;
  --soft: #efeeeb;
  --white: #ffffff;
  --header-offset: 112px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-offset);
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.is-loading {
  overflow-x: hidden;
}

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

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

::selection {
  background: var(--ink);
  color: var(--white);
}

#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  width: 0;
  height: 3px;
  background: var(--ink);
  transition: width 0.15s ease;
}

.portfolio-shell {
  width: min(1260px, 100%);
  margin: 0 auto 28px;
  border: 0;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  overflow: hidden;
  background: var(--white);
  box-shadow: none;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  min-height: 96px;
  padding: 0 clamp(32px, 6.5vw, 82px);
  background: var(--white);
  color: var(--ink);
  border-bottom: 0;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  backdrop-filter: none;
  animation: headerReveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(24px, 3.8vw, 54px);
}

.nav-brand,
.nav-toggle {
  display: none;
}

.top-nav .nav-links a {
  font-size: 0.88rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s ease, transform 0.2s ease;
}

.top-nav .nav-links a::after {
  content: "";
  display: block;
  width: 0;
  height: 2px;
  margin-top: 8px;
  background: var(--ink);
  transition: width 0.2s ease;
}

.top-nav .nav-links a:hover {
  color: var(--ink);
  transform: translateY(-1px);
}

.top-nav .nav-links a:hover::after {
  width: 100%;
}

.section-panel {
  border-bottom: 0;
  background: var(--white);
  scroll-margin-top: var(--header-offset);
  overflow: hidden;
}

.hero-panel {
  padding: 36px 4% 48px;
  animation: landingFade 0.95s ease both;
}

.hero-card {
  display: grid;
  justify-items: center;
  min-height: 485px;
  padding: 74px 28px 58px;
  border: 0;
  border-radius: var(--radius-xl);
  background: var(--white);
  text-align: center;
}

.hero-card > * {
  animation: fadeLift 0.95s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-card .eyebrow {
  animation-delay: 0.12s;
}

.hero-card h1 {
  animation-delay: 0.22s;
}

.hero-card .signature {
  animation-delay: 0.36s;
}

.hero-card .hero-role {
  animation-delay: 0.48s;
}

.hero-card .year-pill {
  animation-delay: 0.58s;
  min-width: 8.3rem;
  min-height: 3.25rem;
  padding: 0 1.7rem;
  border-width: 2px;
  font-size: 1.08rem;
  letter-spacing: 0;
  white-space: nowrap;
}

.eyebrow {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.hero-card h1 {
  margin: 0;
  max-width: 100%;
  font-size: clamp(4.3rem, 15vw, 9.8rem);
  line-height: 0.78;
  font-weight: 900;
  text-transform: uppercase;
}

.signature {
  margin: -2px 0 20px;
  font-family: "Great Vibes", cursive;
  font-size: clamp(3.6rem, 8vw, 7.1rem);
  line-height: 0.8;
}

.hero-role {
  margin: 0 0 42px;
  font-size: clamp(0.9rem, 1.8vw, 1.05rem);
  font-weight: 500;
}

.year-pill,
.outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 30px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

button.outline-button {
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
}

button.outline-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.year-pill:hover,
.outline-button:hover {
  transform: translateY(-2px);
  background: var(--ink);
  color: var(--white);
}

.split-panel {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1fr);
  min-height: 350px;
  border-radius: var(--radius-lg);
}

.section-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(42px, 7vw, 84px);
}

.section-kicker,
.section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1;
  font-weight: 900;
  text-transform: uppercase;
}

.section-copy h2 {
  margin: 8px 0 18px;
  font-family: "Great Vibes", cursive;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400;
}

.section-copy p {
  max-width: 440px;
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.55;
}

.section-copy .outline-button {
  width: max-content;
  margin-top: 20px;
}

.image-panel {
  position: relative;
  min-height: 350px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
}

.image-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08);
}

.about-image {
  border-left: 0;
}

.experience-panel,
.skills-panel,
.certifications-panel,
.projects-panel {
  padding: 26px clamp(24px, 7vw, 84px) 34px;
}

.experience-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.78fr) minmax(320px, 1.6fr);
  gap: clamp(24px, 6vw, 72px);
  max-width: 1060px;
  margin: 0 auto;
  padding: 24px;
  border-radius: var(--radius-lg);
}

.experience-period {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
}

.experience-card h3 {
  margin: 0 0 6px;
  font-size: clamp(1.4rem, 3vw, 2.15rem);
  line-height: 1.05;
  font-weight: 900;
}

.experience-card span {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.experience-card ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 18px;
  font-size: 0.96rem;
  line-height: 1.48;
}

.section-heading {
  display: grid;
  justify-items: center;
  margin-bottom: 24px;
  text-align: center;
}

.section-heading h2::after {
  content: "";
  display: block;
  width: 42px;
  height: 1px;
  margin: 12px auto 0;
  background: var(--ink);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  width: min(100%, 1180px);
  gap: 24px 18px;
  margin: 0 auto;
  align-items: end;
}

.skill-item {
  display: grid;
  justify-items: center;
  gap: 12px;
  min-height: 104px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.skill-item--interactive {
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.skill-item--interactive:hover {
  transform: translateY(-4px);
}

.skill-item--interactive:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 6px;
}

.skill-item i {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

.skill-logo-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(44px, 5vw, 58px);
  height: clamp(44px, 5vw, 58px);
  border: 3px solid var(--ink);
  border-radius: 12px;
  color: var(--ink);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 900;
  line-height: 1;
}

.skill-logo-text--compact {
  font-size: clamp(0.64rem, 1.4vw, 0.82rem);
  letter-spacing: 0;
}

.skill-item span {
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
}

.certification-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.6vw, 28px);
}

.certification-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.certification-card img {
  width: 100%;
  height: clamp(210px, 19vw, 300px);
  object-fit: contain;
  background: var(--white);
  filter: grayscale(0.16) contrast(1.04);
  transform: scale(1);
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), filter 0.24s ease;
}

.certification-card > div {
  display: grid;
  grid-template-rows: auto minmax(3.3em, auto) minmax(1.2em, auto) minmax(6.1em, 1fr) auto;
  padding: 22px 24px 24px;
}

.certification-card img {
  width: 100%;
  aspect-ratio: 16 / 8.2;
  object-fit: contain;
  background: var(--white);
  filter: grayscale(0.16) contrast(1.04);
}

.certification-card > div {
  display: grid;
  grid-template-rows: auto minmax(3.3em, auto) minmax(1.2em, auto) minmax(6.1em, 1fr) auto;
  padding: 22px 24px 24px;
}

.certification-date {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.certification-card h3 {
  margin: 0 0 8px;
  min-height: 3.3em;
  font-size: clamp(1.18rem, 2.4vw, 1.55rem);
  line-height: 1.08;
  font-weight: 900;
}

.certification-card span {
  min-height: 1.2em;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.certification-description {
  margin: 18px 0 22px;
  min-height: 6.1em;
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.45;
}

.certification-link {
  align-self: flex-start;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  transition: transform 0.2s ease;
}

.certification-link:hover {
  transform: translateX(3px);
  text-decoration: underline;
}

.certification-link[hidden] {
  display: none;
}

.certification-card--empty {
  grid-column: 1 / -1;
  justify-items: center;
  min-height: 160px;
  text-align: center;
}

.certification-card--empty img {
  width: min(420px, 100%);
  border-radius: var(--radius-sm);
}

.certification-card--empty h3 {
  margin-top: 22px;
}

.certification-card--empty p {
  max-width: 420px;
  margin: 8px 0 0;
  color: var(--muted);
}

.certification-card:hover {
  border-color: rgba(17, 18, 20, 0.32);
  transform: translateY(-5px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.08);
}

.certification-card:hover img {
  filter: grayscale(0) contrast(1.06);
  transform: scale(1.02);
}

.certification-card.reveal-on-scroll:nth-child(2) {
  transition-delay: 0.08s;
}

.certification-card.reveal-on-scroll:nth-child(3) {
  transition-delay: 0.16s;
}

.certification-card.reveal-on-scroll:nth-child(4) {
  transition-delay: 0.24s;
}

.certification-card.reveal-on-scroll.is-visible:hover {
  transition-delay: 0s;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 34px);
  align-items: stretch;
}

.project-actions,
.certification-actions {
  display: flex;
  justify-content: center;
  margin-top: clamp(26px, 4vw, 42px);
}

.project-actions[hidden],
.certification-actions[hidden] {
  display: none;
}

.project-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--white);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.09);
}

.project-card:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}

.project-media {
  position: relative;
  aspect-ratio: 16 / 8.2;
  overflow: hidden;
  background: #f3f3f1;
}

.project-card img,
.project-card video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(0.2) contrast(1.04);
}

.project-card .project-media-fallback {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.project-media.is-unavailable img,
.project-media.is-unavailable video {
  display: none;
}

.project-media.is-unavailable .project-media-fallback {
  display: flex;
}

.project-card-content {
  display: flex;
  flex-direction: column;
  padding: 15px 16px 17px;
}

.project-card h3 {
  margin: 0 0 12px;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.26;
}

.project-card p {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.26;
}

.project-card-content > span {
  display: block;
  margin: 0 0 16px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.28;
}

.project-trigger {
  margin-top: auto;
  align-self: flex-start;
  padding: 0;
  color: var(--ink);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
}

.project-card:hover .project-trigger {
  text-decoration: underline;
}

.blogs-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(54px, 9vw, 112px) clamp(24px, 7vw, 84px) clamp(32px, 5vw, 60px);
}

.blogs-kicker {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.blogs-hero h1 {
  margin: 0;
  font-size: clamp(3.5rem, 9vw, 7.5rem);
  line-height: 0.82;
  font-weight: 900;
  text-transform: uppercase;
}

.blogs-hero > div > p:last-child {
  max-width: 490px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.add-blog-button {
  display: inline-grid;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.add-blog-button[hidden] {
  display: none;
}

.add-blog-button:hover {
  transform: rotate(90deg);
  background: var(--white);
  color: var(--ink);
}

.blogs-section {
  padding: 0 clamp(24px, 7vw, 84px) 76px;
}

.blog-status {
  min-height: 1.25rem;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.86rem;
}

.blog-status.is-error,
.blog-form__status {
  color: #a31919;
}

.admin-page { background: var(--soft); }
.admin-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 72px; }
.admin-header, .admin-dashboard__heading, .admin-section__header { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.admin-header { margin-bottom: 56px; font-weight: 700; }
.admin-header a:last-child { color: var(--ink); }
.admin-login, .admin-section { border: 1px solid var(--line); border-radius: 8px; background: var(--white); padding: clamp(24px, 4vw, 42px); }
.admin-login { max-width: 520px; margin: 8vh auto; }
.admin-login h1, .admin-dashboard h1, .admin-section h2 { margin: 0; }
.admin-login form { display: grid; gap: 16px; margin-top: 28px; }
.admin-login label, .admin-section label { display: grid; gap: 8px; font-weight: 700; }
.admin-login input, .admin-section input, .admin-section textarea { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 12px; background: var(--white); color: var(--ink); font: inherit; }
.admin-login button, .admin-dashboard__heading > button, .admin-section__header > button { min-height: 42px; border: 1px solid var(--ink); border-radius: 6px; padding: 0 16px; background: var(--ink); color: var(--white); font: inherit; font-weight: 700; cursor: pointer; }
.admin-dashboard { display: grid; gap: 20px; }
.admin-status, [data-admin-login-status] { min-height: 1.25rem; margin: 0; color: #197048; font-weight: 600; }
.admin-status.is-error, [data-admin-login-status].is-error { color: #a31919; }
.admin-section { display: grid; gap: 14px; }
.admin-fields, .admin-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.admin-item { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: 6px; }
.admin-item label:has(textarea), .admin-item label:has(input[type="url"]) { grid-column: 1 / -1; }
.admin-remove { justify-self: end; border: 0; background: transparent; color: #a31919; font: inherit; font-size: 0.82rem; font-weight: 700; cursor: pointer; }
.admin-section p { margin: 0; color: var(--muted); line-height: 1.45; }
.admin-section textarea { min-height: 250px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.82rem; line-height: 1.45; }

@media (max-width: 640px) {
  .admin-shell { width: min(100% - 28px, 1180px); padding-top: 18px; }
  .admin-header, .admin-dashboard__heading, .admin-section__header { align-items: flex-start; flex-direction: column; }
  .admin-fields, .admin-items, .admin-item { grid-template-columns: 1fr; }
  .admin-dashboard__heading > button { width: 100%; }
}

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  width: min(1040px, 100%);
  margin: 0 auto;
}

.blog-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.blog-card__edit {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  padding: 7px 10px;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
}

.blog-card__edit:hover {
  background: var(--ink);
  color: #fff;
}

.blog-card:hover {
  transform: translateY(-3px);
  border-color: var(--ink);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.08);
}

.blog-card__surface {
  display: grid;
  grid-template-columns: minmax(260px, 38%) minmax(0, 1fr);
  min-height: 248px;
  color: var(--ink);
  text-decoration: none;
}

.blog-card img,
.blog-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card__surface > div {
  padding: 28px 32px;
}

.blog-card h2 {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.12;
}

.blog-card__subheader {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
}

.blog-card__meta {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.blog-card__description {
  margin: 16px 0 0;
  font-size: 0.94rem;
  line-height: 1.52;
}

.blog-card__link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.blog-card:hover .blog-card__link {
  text-decoration: underline;
}

.article-shell {
  width: min(840px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(64px, 10vw, 128px) 0 100px;
}

.article-back {
  display: inline-flex;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.article-back:hover {
  text-decoration: underline;
}

.article-shell .blogs-kicker {
  margin: 56px 0 0;
}

.article-shell h1 {
  max-width: 780px;
  margin: 16px 0 0;
  font-size: clamp(2.6rem, 6vw, 5.8rem);
  line-height: 0.95;
}

.article-subtitle {
  max-width: 660px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.5;
}

.article-media {
  margin: clamp(32px, 6vw, 64px) 0;
}

.article-media[hidden] {
  display: none;
}

.article-media img,
.article-media video {
  display: block;
  width: 100%;
  max-height: 720px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.article-body {
  max-width: 680px;
}

.article-body p {
  margin: 0 0 1.25rem;
  font-size: 1.08rem;
  line-height: 1.8;
}

.article-body h2 {
  margin: 3rem 0 1rem;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.08;
}

.article-contact-cta {
  max-width: 680px;
  margin-top: clamp(56px, 9vw, 96px);
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.article-contact-cta p:not(.section-kicker) {
  margin: 12px 0 20px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.5;
}

.article-contact-cta button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0 17px;
  text-transform: uppercase;
}

.article-contact-cta button:hover {
  transform: translateY(-2px);
}

.article-contact-cta blockquote {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
  font-style: italic;
  line-height: 1.6;
}

.blog-empty {
  margin: 0;
  color: var(--muted);
}

.blog-dialog {
  width: min(620px, calc(100% - 32px));
  max-height: min(90vh, 760px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
}

.blog-dialog::backdrop {
  background: rgba(17, 18, 20, 0.42);
  backdrop-filter: blur(4px);
}

.blog-form {
  display: grid;
  gap: 16px;
  padding: clamp(24px, 5vw, 42px);
}

.blog-dialog__heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 8px;
}

.blog-dialog h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1;
}

.blog-dialog__close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--soft);
  color: var(--ink);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.blog-form label {
  display: grid;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.blog-form input,
.blog-form select,
.blog-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  text-transform: none;
}

.blog-form textarea {
  resize: vertical;
}

.blog-form input:focus,
.blog-form select:focus,
.blog-form textarea:focus {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}

.blog-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 4px;
}

.blog-publish-button {
  min-height: 38px;
  padding: 0 22px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
}

.blog-form__status {
  min-height: 1.2rem;
  margin: 0;
  font-size: 0.86rem;
}

.project-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.project-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.project-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 18, 20, 0.42);
  backdrop-filter: blur(6px);
}

.project-modal__dialog {
  position: relative;
  width: min(620px, 100%);
  padding: clamp(28px, 5vw, 46px);
  border-radius: var(--radius-xl);
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.24s ease;
}

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

.project-modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.project-modal__close:hover {
  background: var(--soft);
}

.project-modal__eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.project-modal h2 {
  margin: 0 0 14px;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1;
  font-weight: 900;
}

.project-modal p:not(.project-modal__eyebrow) {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.58;
}

.project-modal span {
  display: block;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.project-modal__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.project-modal__links[hidden],
.project-modal__links a[hidden] {
  display: none;
}

.project-modal__links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 22px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.project-modal__links a:first-child {
  background: var(--ink);
  color: var(--white);
}

.project-modal__links a.is-placeholder {
  opacity: 0.48;
  cursor: not-allowed;
}

.skill-modal {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.skill-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.skill-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 18, 20, 0.42);
  backdrop-filter: blur(6px);
}

.skill-modal__dialog {
  position: relative;
  width: min(580px, 100%);
  padding: clamp(26px, 5vw, 42px);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.24s ease;
}

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

.skill-modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
}

.skill-modal__close:hover {
  background: var(--soft);
}

.skill-modal h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1;
}

.skill-modal__intro {
  margin: 12px 0 20px;
  color: var(--muted);
  font-size: 0.92rem;
}

.skill-modal__projects {
  display: grid;
  gap: 10px;
}

.skill-modal__projects button {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.skill-modal__projects button:hover,
.skill-modal__projects button:focus-visible {
  border-color: var(--ink);
  background: var(--soft);
}

.skill-modal__projects strong {
  font-size: 0.98rem;
}

.skill-modal__projects span {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.resume-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.resume-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.resume-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 18, 20, 0.5);
  backdrop-filter: blur(6px);
}

.resume-modal__dialog {
  position: relative;
  width: min(1060px, 100%);
  max-height: min(860px, calc(100dvh - 48px));
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.24s ease;
}

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

.resume-modal__header,
.resume-modal__actions,
.resume-modal__zoom {
  display: flex;
  align-items: center;
}

.resume-modal__header {
  justify-content: space-between;
  gap: 18px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
}

.resume-modal__header p,
.resume-modal__header h2 {
  margin: 0;
}

.resume-modal__header p {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.resume-modal__header h2 {
  margin-top: 3px;
  font-size: 1.1rem;
  font-weight: 800;
}

.resume-modal__actions {
  justify-content: flex-end;
  gap: 10px;
}

.resume-modal__zoom {
  gap: 6px;
}

.resume-modal__zoom button,
.resume-modal__close {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 1.2rem;
  font-weight: 800;
}

.resume-modal__zoom output {
  min-width: 44px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-align: center;
}

.resume-modal__actions > a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 13px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.resume-modal__actions > a:hover,
.resume-modal__zoom button:hover,
.resume-modal__close:hover {
  background: var(--soft);
}

.resume-modal__viewport {
  height: min(720px, calc(100dvh - 140px));
  overflow: auto;
  background: #f3f3f1;
}

.resume-modal__stage {
  --resume-zoom: 1;
  width: calc(100% * var(--resume-zoom));
  height: calc(100% * var(--resume-zoom));
}

.resume-modal__stage iframe {
  display: block;
  width: calc(100% / var(--resume-zoom));
  height: calc(100% / var(--resume-zoom));
  border: 0;
  background: var(--white);
  transform: scale(var(--resume-zoom));
  transform-origin: top left;
}

.contact-panel {
  grid-template-columns: minmax(0, 720px);
  min-height: 0;
  border-bottom: 0;
}

.contact-list {
  display: grid;
  gap: 9px;
  margin: 12px 0 22px;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
}

.contact-list span {
  display: inline-flex;
  width: 24px;
  font-weight: 800;
}

.social-links {
  display: flex;
  gap: 18px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 900;
  transition: transform 0.2s ease;
}

.social-links a:hover {
  transform: translateY(-2px);
}

.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;
}

.contact-chat {
  display: grid;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
}

.contact-chat__intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(34px, 6vw, 70px);
}

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

.contact-chat__intro.is-hidden {
  display: none !important;
}

.contact-chat__eyebrow,
.contact-chat__bar p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-chat__intro h3 {
  max-width: 400px;
  margin: 14px 0 12px;
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  line-height: 1.02;
}

.contact-chat__intro > p:not(.contact-chat__eyebrow) {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.contact-chat__start,
.contact-chat__composer button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0 18px;
  text-transform: uppercase;
  transition: transform 180ms ease, opacity 180ms ease;
}

.contact-chat__start {
  gap: 10px;
  margin-top: 28px;
}

.contact-chat__start span {
  font-size: 1.05rem;
}

.contact-chat__start:hover,
.contact-chat__composer button:hover {
  transform: translateY(-2px);
}

.contact-chat__quote {
  max-width: 340px;
  margin: 34px 0 0;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.02rem;
  font-style: italic;
  line-height: 1.42;
}

.contact-chat__conversation {
  display: grid;
  grid-template-rows: auto minmax(230px, 1fr) auto auto;
  min-height: 430px;
  animation: chatReveal 380ms ease both;
}

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

.contact-chat__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.contact-chat__bar p {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.contact-chat__bar p span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1d8e55;
}

.contact-chat__bar button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-chat__messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 330px;
  padding: 24px;
  overflow-y: auto;
}

.contact-chat__message {
  width: fit-content;
  max-width: 88%;
  margin: 0;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.42;
  animation: chatMessageIn 260ms ease both;
}

.contact-chat__message--assistant {
  background: var(--soft);
}

.contact-chat__message--visitor {
  align-self: flex-end;
  background: var(--ink);
  color: var(--white);
}

.contact-chat__composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 16px 24px 10px;
  border-top: 1px solid var(--line);
}

.contact-chat__input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  padding: 11px 12px;
  outline: none;
  resize: vertical;
}

.contact-chat__input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}

.contact-chat__composer button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.contact-chat__composer button {
  align-self: end;
  height: 44px;
}

.contact-chat__status {
  min-height: 20px;
  margin: 0;
  padding: 0 24px 16px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.contact-chat__status.is-error {
  color: #b3261e;
}

.chatbot-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 220ms ease, transform 220ms ease;
  visibility: hidden;
}

.chatbot-widget.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.chatbot-widget__launcher {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0 18px;
  text-transform: uppercase;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
  animation: chatbotLift 2.4s ease-in-out infinite;
}

.chatbot-widget__launcher[hidden] {
  display: none;
}

.chatbot-widget__signal {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #80e0a7;
}

.chatbot-widget__signal::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid #80e0a7;
  border-radius: 50%;
  animation: chatbotPulse 1.8s ease-out infinite;
}

.chatbot-widget__window {
  display: flex;
  flex-direction: column;
  width: min(380px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
  animation: chatbotOpen 280ms ease both;
}

.chatbot-widget__window[hidden] {
  display: none;
}

.chatbot-widget__window header {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.chatbot-widget__window header p,
.chatbot-widget__window header span {
  display: block;
  margin: 0;
}

.chatbot-widget__window header p {
  font-size: 0.84rem;
  font-weight: 800;
}

.chatbot-widget__window header span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.7rem;
}

.chatbot-widget__window header button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

.chatbot-widget__window form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
}

.chatbot-widget__messages {
  display: flex;
  flex-direction: column;
  flex: 1 1 270px;
  gap: 9px;
  height: 270px;
  min-height: 100px;
  padding: 18px;
  overflow-y: auto;
}

.chatbot-widget__message {
  width: fit-content;
  max-width: 88%;
  margin: 0;
  padding: 10px 12px;
  border-radius: 7px;
  background: var(--soft);
  font-size: 0.84rem;
  line-height: 1.42;
  overflow-wrap: anywhere;
  animation: chatMessageIn 220ms ease both;
}

.chatbot-widget__message--visitor {
  align-self: flex-end;
  background: var(--ink);
  color: var(--white);
}

.chatbot-widget__choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 14px;
}

.chatbot-widget__choices button {
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 9px 11px;
  overflow-wrap: anywhere;
}

.chatbot-widget__choices button:hover {
  border-color: var(--ink);
}

.chatbot-widget__composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  padding: 12px 18px 8px;
  border-top: 1px solid var(--line);
}

.chatbot-widget__composer [data-chatbot-input-slot] {
  min-width: 0;
}

.chatbot-widget__input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 0.86rem;
  padding: 10px;
  outline: none;
  resize: vertical;
}

.chatbot-widget__input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}

.chatbot-widget__composer button {
  align-self: end;
  height: 42px;
  min-height: 42px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0 13px;
  text-transform: uppercase;
}

.chatbot-widget__status {
  min-height: 20px;
  margin: 0;
  padding: 0 18px 14px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.chatbot-widget__status.is-error {
  color: #b3261e;
}

@keyframes chatbotLift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes chatbotPulse {
  0% { opacity: 0.7; transform: scale(0.7); }
  100% { opacity: 0; transform: scale(1.6); }
}

@keyframes chatbotOpen {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes chatReveal {
  from { opacity: 0; transform: translateY(14px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

@keyframes headerReveal {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes landingFade {
  from {
    opacity: 0;
    transform: scale(0.985);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

@media (prefers-color-scheme: dark) {
  body,
  .portfolio-shell,
  .section-panel,
  .hero-card {
    background: var(--white);
    color: var(--ink);
  }

  .top-nav {
    background: var(--white);
    color: var(--ink);
  }
}

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

  .reveal-on-scroll {
    opacity: 1;
    transform: none;
  }

  .certification-card.reveal-on-scroll {
    transition-delay: 0s;
  }
}

@media (max-width: 900px) {
  :root {
    --header-offset: 74px;
  }

  .top-nav {
    position: sticky;
    min-height: auto;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 0;
    box-shadow: 0 1px 0 rgba(17, 18, 20, 0.08);
  }

  .resume-modal {
    padding: 12px;
  }

  .resume-modal__dialog {
    max-height: calc(100dvh - 24px);
  }

  .resume-modal__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .resume-modal__actions {
    width: 100%;
    justify-content: space-between;
  }

  .resume-modal__viewport {
    height: calc(100dvh - 206px);
  }

  .nav-brand {
    display: inline-flex;
    align-items: center;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .nav-toggle {
    display: inline-flex;
    position: relative;
    z-index: 12;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--white);
    cursor: pointer;
  }

  .nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 0 auto;
    border-radius: 999px;
    background: var(--ink);
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .top-nav.is-open .nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .top-nav.is-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .top-nav.is-open .nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    right: 12px;
    left: 12px;
    z-index: 11;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--white);
    box-shadow: 0 18px 40px rgba(17, 18, 20, 0.14);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .top-nav.is-open .nav-links {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .top-nav .nav-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--white);
    color: var(--ink);
    font-size: 0.72rem;
    line-height: 1;
    white-space: nowrap;
  }

  .top-nav .nav-links a::after {
    display: none;
  }

  .hero-panel {
    padding: 18px 12px 32px;
  }

  .hero-card {
    min-height: min(560px, calc(100svh - var(--header-offset)));
    padding: clamp(48px, 12vw, 68px) 16px 44px;
  }

  .hero-card h1 {
    max-width: 100%;
    font-size: clamp(3.6rem, 15.5vw, 7rem);
    line-height: 0.82;
    overflow-wrap: anywhere;
  }

  .split-panel,
  .experience-card,
  .certification-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .about-image {
    border-left: 0;
    border-top: 0;
  }

  .contact-chat {
    min-height: 400px;
  }

  .skills-grid {
    grid-template-columns: repeat(4, minmax(70px, 1fr));
  }

  .project-card p {
    min-height: 0;
  }

  .project-media {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .project-card-content {
    grid-template-rows: auto;
  }

  .project-card h3,
  .project-card-content > span {
    min-height: 0;
  }

  .blogs-hero {
    align-items: start;
    padding: 48px 24px 30px;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-card__surface {
    grid-template-columns: 1fr;
  }

  .blog-card img,
  .blog-card video {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .certification-card > div {
    grid-template-rows: auto;
  }

  .certification-card img {
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
  }

  .certification-card h3,
  .certification-card span,
  .certification-description {
    min-height: 0;
  }
}

@media (max-width: 560px) {
  :root {
    --header-offset: 58px;
  }

  .portfolio-shell {
    width: 100%;
    margin-top: 0;
  }

  .top-nav {
    padding: 9px 12px;
  }

  .chatbot-widget {
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    display: flex;
    justify-content: flex-end;
  }

  .chatbot-widget__window {
    width: 100%;
    max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }

  .chatbot-widget__input {
    font-size: 16px;
  }

  .chatbot-widget__launcher {
    min-height: 44px;
    font-size: 0.69rem;
    padding: 0 14px;
  }

  .nav-links {
    grid-template-columns: 1fr;
    right: 10px;
    left: 10px;
  }

  .top-nav .nav-links a {
    min-height: 34px;
    padding: 0 11px;
    font-size: 0.68rem;
  }

  .hero-card {
    min-height: min(550px, calc(100svh - var(--header-offset)));
    padding: 46px 14px 42px;
  }

  .hero-card h1 {
    font-size: clamp(3rem, 15vw, 4.25rem);
  }

  .signature {
    margin-top: 0;
    font-size: clamp(2.85rem, 14vw, 4rem);
  }

  .hero-role {
    max-width: 310px;
    margin-bottom: 30px;
    font-size: 1rem;
    line-height: 1.28;
  }

  .hero-card .year-pill {
    min-width: 9.15rem;
    min-height: 4.55rem;
    padding: 0 2.05rem;
    border-radius: 999px;
    font-size: 1.24rem;
  }

  .contact-chat__intro,
  .contact-chat__messages {
    padding: 24px;
  }

  .contact-chat__composer {
    grid-template-columns: 1fr;
    padding: 14px 24px 10px;
  }

  .contact-chat__composer button {
    width: 100%;
  }

  .section-copy {
    padding: 38px 24px;
  }

  .blog-card__surface > div {
    padding: 24px;
  }

  .skills-grid {
    grid-template-columns: repeat(2, minmax(90px, 1fr));
  }
}
