:root {
  color-scheme: light;
  --bg: #f1eeec;
  --bg-soft: #f8f6f3;
  --surface: rgba(255, 255, 255, 0.64);
  --surface-strong: rgba(255, 255, 255, 0.82);
  --text: #1d1819;
  --muted: #706a6a;
  --line: rgba(40, 33, 34, 0.12);
  --accent: #352d2d;
  --accent-ink: #ffffff;
  --accent-2: #8d6f65;
  --rose: #d9c5bf;
  --blue: #d9e9f4;
  --gold: #c89d45;
  --shadow: 0 24px 70px rgba(66, 48, 43, 0.16);
  --radius: 18px;
  --pill: 999px;
  --font: Inter, "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  --font-zh-sans: "Source Han Sans SC", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei UI", "Hiragino Sans GB", Arial, sans-serif;
  --font-zh-serif: "Source Han Sans SC", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei UI", "Hiragino Sans GB", Arial, sans-serif;
  --font-en-sans: "Avenir Next", Avenir, "Gill Sans", "Trebuchet MS", Arial, sans-serif;
  --font-en-serif: "Bodoni 72", Didot, Baskerville, "Libre Baskerville", Georgia, "Times New Roman", serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171414;
  --bg-soft: #211d1c;
  --surface: rgba(45, 39, 38, 0.68);
  --surface-strong: rgba(55, 48, 46, 0.88);
  --text: #f4eeee;
  --muted: #bfb5b3;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #f4eeee;
  --accent-ink: #171414;
  --accent-2: #d2b4a7;
  --rose: #4b3d3a;
  --blue: #273847;
  --gold: #d1aa57;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] .case-meta span,
html[data-theme="dark"] .metric-token,
html[data-theme="dark"] .skill-tab,
html[data-theme="dark"] .contact-links button,
html[data-theme="dark"] .resume-link,
html[data-theme="dark"] .text-action {
  color: rgba(244, 238, 238, 0.86);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

html[data-theme="dark"] .contact-links button:hover,
html[data-theme="dark"] .contact-links button.is-copied,
html[data-theme="dark"] .resume-link:hover,
html[data-theme="dark"] .skill-tab:hover,
html[data-theme="dark"] .skill-tab.is-active {
  color: #171414;
  background: #f4eeee;
}

html[data-theme="dark"] .contact-form input,
html[data-theme="dark"] .contact-form textarea {
  color: #f4eeee;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

html[data-theme="dark"] .contact-form input::placeholder,
html[data-theme="dark"] .contact-form textarea::placeholder {
  color: rgba(244, 238, 238, 0.58);
}

html[data-theme="dark"] .skill-icon {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  font-family: var(--font);
  background:
    radial-gradient(circle at 70% 10%, var(--blue), transparent 29rem),
    radial-gradient(circle at 18% 32%, var(--rose), transparent 25rem),
    linear-gradient(135deg, var(--bg), var(--bg-soft));
}

html[lang="zh-CN"] body {
  font-family: var(--font-zh-sans);
  font-weight: 400;
}

html[lang="zh-CN"] .typewriter-name,
html[lang="zh-CN"] .section h2,
html[lang="zh-CN"] .case-content h3,
html[lang="zh-CN"] .dialog-hero h2,
html[lang="zh-CN"] .contact-section h2 {
  font-family: var(--font-zh-sans);
  font-weight: 700;
}

html[lang="zh-CN"] .nav-links,
html[lang="zh-CN"] .hero-intro,
html[lang="zh-CN"] .section-body p,
html[lang="zh-CN"] .case-content p,
html[lang="zh-CN"] .detail-block p,
html[lang="zh-CN"] .detail-block li {
  font-weight: 400;
}

html[lang="zh-CN"] .section-kicker,
html[lang="zh-CN"] .skill-tab,
html[lang="zh-CN"] .case-meta,
html[lang="zh-CN"] .metric-token,
html[lang="zh-CN"] .contact-links,
html[lang="zh-CN"] .contact-form input,
html[lang="zh-CN"] .contact-form textarea {
  font-family: var(--font-en-sans);
}

html[lang="en"] body {
  font-family: var(--font-en-sans);
}

html[lang="en"] .typewriter-name,
html[lang="en"] .section h2,
html[lang="en"] .case-content h3,
html[lang="en"] .dialog-hero h2,
html[lang="en"] .metric-strip strong {
  font-family: var(--font-en-serif);
}

html[lang="en"] .typewriter-name {
  font-weight: 700;
  line-height: 1.05;
}

html[lang="en"] .case-content h3,
html[lang="en"] .dialog-hero h2 {
  font-weight: 700;
  line-height: 1.08;
}

html[lang="en"] .nav-links,
html[lang="en"] .hero-intro,
html[lang="en"] .case-content p,
html[lang="en"] .section-body p,
html[lang="en"] .detail-block p,
html[lang="en"] .detail-block li {
  font-weight: 400;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 100% 4px;
  opacity: 0.2;
}

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

button {
  font: inherit;
}

.page-shell {
  width: min(1360px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.topbar {
  position: sticky;
  top: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 74px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.12));
  box-shadow: 0 20px 60px rgba(80, 62, 58, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(30px) saturate(1.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 42px);
  color: var(--muted);
  font-size: 15px;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-actions {
  position: absolute;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chip-button,
.icon-button,
.tab,
.dialog-close {
  border: 1px solid var(--line);
  cursor: pointer;
}

.chip-button {
  min-width: 54px;
  height: 48px;
  border-radius: var(--pill);
  color: var(--text);
  background: var(--surface-strong);
  font-weight: 800;
}

.icon-button {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
}

.theme-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid currentColor;
  box-shadow: inset -5px -4px 0 0 currentColor;
}

.section {
  margin-top: 96px;
}

html.reveal-ready .section,
html.reveal-ready .metric-strip article,
html.reveal-ready .case-card {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 760ms ease, transform 760ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

html.reveal-ready .section.is-visible,
html.reveal-ready .metric-strip article.is-visible,
html.reveal-ready .case-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero {
  opacity: 1;
  transform: none;
  min-height: min(640px, calc(100svh - 190px));
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.72fr);
  align-items: center;
  gap: clamp(34px, 6vw, 92px);
  padding: 28px 0 12px;
}

.hero.section {
  margin-top: 24px;
}

.hero-copy,
.portrait-card {
  min-width: 0;
  max-width: 100%;
}

.eyebrow,
.section-kicker {
  margin: 0 0 24px;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.hero h1,
.bilingual-name {
  margin: 0;
  color: var(--text);
  font-size: 60px;
  line-height: 0.98;
  letter-spacing: 0;
}

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

.typewriter-name {
  width: max-content;
  max-width: 100%;
  overflow: hidden;
  white-space: normal;
  border-right: 2px solid currentColor;
  animation: typing 2.2s steps(var(--typing-chars, 8), end) both, caretBlink 760ms step-end infinite;
}

.typewriter-name span {
  display: block;
}

.typewriter-name .greeting-line {
  font-size: clamp(34px, 4.8vw, 58px);
  font-weight: 650;
  line-height: 1.02;
  color: var(--muted);
}

.typewriter-name .name-line {
  margin-top: 2px;
  font-size: clamp(46px, 5vw, 60px);
  font-weight: 780;
  line-height: 0.96;
  color: var(--text);
}

html[lang="zh-CN"] .typewriter-name {
  white-space: nowrap;
}

html[lang="zh-CN"] .typewriter-name span {
  display: inline;
  font-size: clamp(46px, 5vw, 60px);
}

.hero h2 {
  max-width: 760px;
  margin: 22px 0 0;
  font-size: clamp(34px, 5.6vw, 82px);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero-intro {
  max-width: 680px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero-actions {
  font-size: 15px;
}

.primary-action,
.secondary-action,
.text-action,
.copy-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 24px;
  border-radius: var(--pill);
  font-weight: 800;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.copy-action {
  cursor: pointer;
  color: var(--text);
}

.copy-action.is-copied {
  color: var(--accent-ink);
  background: var(--gold);
}

.primary-action {
  color: var(--accent-ink);
  background: var(--accent);
  box-shadow: 0 16px 34px rgba(53, 45, 45, 0.2);
}

.secondary-action {
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(18px);
}

.text-action {
  color: var(--muted);
  border: 1px solid transparent;
}

.text-action:hover {
  color: var(--text);
  border-color: var(--line);
  background: var(--surface);
}

.portrait-card {
  align-self: center;
  justify-self: end;
  width: min(100%, 420px);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 36px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.portrait-frame {
  overflow: hidden;
  aspect-ratio: 0.78;
  border-radius: 28px;
  background: #d8d2ce;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 24%;
  display: block;
}

.portrait-caption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 8px 4px;
}

.portrait-caption strong,
.portrait-caption span {
  display: block;
}

.portrait-caption span {
  color: var(--muted);
  text-align: right;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.metric-strip article,
.skills-grid article,
.education-grid article,
.case-card,
.detail-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0.18));
  box-shadow: 0 20px 54px rgba(70, 52, 47, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(26px) saturate(1.18);
}

.metric-strip article {
  min-height: 132px;
  padding: 28px;
}

.metric-strip strong {
  display: block;
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
}

.metric-strip span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
}

.split-section {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.section h2 {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: 0;
}

.section-body p,
.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.8;
}

.education-grid {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.education-grid article {
  padding: 22px;
}

.education-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
}

.section-heading {
  max-width: 840px;
}

.section-heading.wide {
  max-width: 960px;
}

.skills-grid {
  display: block;
  margin-top: 32px;
}

.skill-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
}

.skill-tab {
  min-height: 42px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.skill-tab:hover,
.skill-tab.is-active {
  color: var(--accent-ink);
  background: var(--accent);
  transform: translateY(-2px);
}

.skill-panels {
  position: relative;
  min-height: 300px;
}

.skills-grid article {
  display: none;
  padding: 0;
  overflow: hidden;
  position: relative;
  min-height: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  transition: transform 260ms ease, box-shadow 260ms ease;
}

.skills-grid article.is-active {
  display: block;
}

.skills-grid article::before {
  display: none;
}

.skills-grid article:hover {
  transform: translateY(-5px);
}

.skills-grid article:hover::before {
  transform: translateX(110%);
}

.skills-grid h3 {
  margin: 0 0 28px;
  text-align: center;
  font-size: 24px;
}

.skill-subgroup + .skill-subgroup {
  margin-top: 28px;
}

.skill-subgroup > p {
  margin: 0 0 18px;
  color: var(--muted);
  font-family: var(--font-en-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
}

.skills-grid ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  max-width: 860px;
  gap: 28px 24px;
  align-items: start;
  list-style: none;
  margin: 0 auto;
  padding: 0;
}

.skill-group[data-skill-kind="language"] ul {
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  max-width: 420px;
  gap: 24px;
}

.skill-group[data-skill-kind="software"] ul {
  grid-template-columns: repeat(4, minmax(92px, 1fr));
  max-width: 860px;
  gap: 24px 28px;
}

.skill-group[data-skill-kind="ai"] ul {
  grid-template-columns: repeat(6, minmax(86px, 1fr));
  max-width: 760px;
}

.skills-grid li {
  display: grid;
  justify-items: center;
  align-items: center;
  gap: 10px;
  min-height: 104px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  text-align: center;
  transition: opacity 520ms ease var(--delay), transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1) var(--delay), color 180ms ease;
}

html.reveal-ready .skills-grid li {
  opacity: 0;
  transform: translateY(18px) scale(0.94);
}

.skills-grid li:hover {
  color: var(--text);
  transform: translateY(-6px) scale(1.02);
}

html.reveal-ready .skills-grid li.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.skill-icon {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: 0 10px 22px rgba(70, 52, 47, 0.08);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.skill-icon img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: none;
}

.skill-icon img + span {
  display: none;
}

.skill-app:hover .skill-icon {
  transform: translateY(-3px) rotate(-2deg);
  box-shadow: 0 18px 34px rgba(70, 52, 47, 0.16);
}

.brand-office,
.brand-ppt,
.brand-excel,
.brand-word,
.brand-xiumi,
.brand-editor,
.brand-canva,
.brand-jianying,
.brand-ps,
.brand-chatgpt,
.brand-claude,
.brand-gemini,
.brand-codex,
.brand-midjourney,
.brand-deepseek,
.brand-language,
.brand-ielts,
.brand-writing,
.brand-mandarin {
  background: rgba(255, 255, 255, 0.34);
}

.brand-ppt {
  background: rgba(255, 255, 255, 0.34);
}

.brand-excel {
  background: rgba(255, 255, 255, 0.34);
}

.brand-word {
  background: rgba(255, 255, 255, 0.34);
}

.brand-codex {
  color: #fff;
  background: #6d4aff;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.tab {
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--pill);
  color: var(--muted);
  background: var(--surface);
}

.tab.is-active {
  color: var(--accent-ink);
  background: var(--accent);
}

.tab:focus-visible,
.chip-button:focus-visible,
.icon-button:focus-visible,
.case-card:focus-visible,
.primary-action:focus-visible,
.secondary-action:focus-visible,
.text-action:focus-visible,
.dialog-close:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 22px;
  align-items: stretch;
}

.case-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  padding: 0;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}

.case-card:hover {
  transform: translateY(-4px);
  transition: transform 180ms ease;
}

.case-card:hover img {
  transform: scale(1.04);
}

.case-image {
  flex: 0 0 250px;
  height: 250px;
  overflow: hidden;
  background: var(--rose);
}

.case-image.is-contain {
  background: #ffffff;
}

.case-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 300ms ease;
}

.case-content {
  flex: 1;
  padding: 22px;
}

.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.case-meta span,
.metric-token {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: var(--pill);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.36);
  border: 1px solid var(--line);
  font-size: 13px;
}

.case-content h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.18;
}

.case-content p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.contact-section {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  align-items: center;
  gap: clamp(32px, 6vw, 90px);
  padding: clamp(42px, 7vw, 84px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.2));
  backdrop-filter: blur(24px);
}

.contact-section h2 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(42px, 5vw, 68px);
  line-height: 1.02;
}

.contact-copy > p:not(.section-kicker) {
  max-width: 560px;
  margin: 22px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.contact-section .section-kicker {
  margin-bottom: 18px;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.contact-links button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.contact-links button:hover,
.contact-links button.is-copied {
  color: var(--text);
  background: rgba(255, 255, 255, 0.64);
  transform: translateY(-2px);
}

.contact-icon {
  display: block;
  width: 19px;
  height: 19px;
  color: currentColor;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.46);
  box-shadow: 0 24px 70px rgba(70, 52, 47, 0.1);
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.62);
  outline: none;
  font: inherit;
  font-weight: 500;
  resize: vertical;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 72%, transparent);
  font-weight: 500;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(29, 24, 25, 0.32);
  box-shadow: 0 0 0 4px rgba(200, 157, 69, 0.14);
}

.message-field {
  grid-column: 1 / -1;
}

.send-button {
  grid-column: 1 / -1;
  min-height: 50px;
  border: 0;
  border-radius: var(--pill);
  color: var(--accent-ink);
  background: var(--accent);
  cursor: pointer;
  font-weight: 800;
}

.resume-link {
  grid-column: 1 / -1;
  justify-self: center;
  color: var(--muted);
  font-weight: 700;
}

.case-dialog {
  width: min(1080px, calc(100% - 30px));
  max-height: min(86vh, 900px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 28px;
  color: var(--text);
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}

.case-dialog::backdrop {
  background: rgba(20, 16, 16, 0.48);
  backdrop-filter: blur(8px);
}

.dialog-close {
  position: sticky;
  top: 16px;
  left: calc(100% - 62px);
  z-index: 3;
  width: 44px;
  height: 44px;
  margin: 16px 16px 0 0;
  border-radius: 50%;
  color: var(--text);
  background: var(--surface-strong);
}

.dialog-content {
  padding: 0 28px 34px;
}

.dialog-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: end;
}

.dialog-hero img {
  width: 100%;
  aspect-ratio: 1.42;
  object-fit: cover;
  border-radius: var(--radius);
}

.dialog-hero h2 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 56px);
  line-height: 1.05;
}

.dialog-hero p {
  color: var(--muted);
  line-height: 1.8;
}

.metric-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 26px;
}

.detail-block {
  padding: 22px;
}

.detail-block h3 {
  margin: 0 0 12px;
}

.detail-block p,
.detail-block li {
  color: var(--muted);
  line-height: 1.75;
}

.detail-block ul {
  margin: 0;
  padding-left: 18px;
}

.image-evidence {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-top: 26px;
  overflow: visible;
  padding: 4px 0 0;
}

.image-evidence img {
  width: 100%;
  min-width: 0;
  grid-column: span 2;
  height: 226px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.34);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.image-evidence img:nth-last-child(2):nth-child(3n + 1),
.image-evidence img:nth-last-child(2):nth-child(3n + 1) + img {
  grid-column: span 3;
}

.image-evidence img:nth-last-child(1):nth-child(1) {
  grid-column: 1 / -1;
}

.image-evidence img:nth-child(5n + 2),
.image-evidence img:nth-child(5n + 4) {
  transform: translateY(10px);
}

.image-evidence img:nth-child(5n + 3) {
  transform: translateY(-6px);
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes typing {
  from {
    max-width: 0;
  }
  to {
    max-width: 100%;
  }
}

@keyframes caretBlink {
  50% {
    border-color: transparent;
  }
}

.image-evidence img:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(70, 52, 47, 0.16);
}

@media (max-width: 1020px) {
  .nav-links {
    display: none;
  }

  .hero,
  .split-section,
  .dialog-hero {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
    padding-top: 34px;
  }

  .portrait-card {
    justify-self: start;
    max-width: 520px;
    width: 100%;
  }

  .metric-strip,
  .portfolio-grid,
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-section {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .page-shell {
    width: min(100% - 24px, 1360px);
    padding-top: 12px;
  }

  .topbar {
    top: 10px;
    min-height: 64px;
    padding: 8px;
  }

  .chip-button {
    min-width: 48px;
    height: 44px;
  }

  .icon-button {
    width: 48px;
    height: 48px;
  }

  .section {
    margin-top: 72px;
  }

  .hero h1 {
    font-size: 52px;
  }

  .hero h2 {
    font-size: 36px;
  }

  .hero-intro,
  .section-body p,
  .section-heading p {
    font-size: 17px;
  }

  .hero-intro {
    font-size: 16px;
  }

  .skills-grid,
  .metric-strip,
  .portfolio-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .metric-strip article {
    min-height: 108px;
  }

  .portrait-caption {
    display: block;
  }

  .portrait-caption span {
    margin-top: 6px;
    text-align: left;
  }

  .case-image {
    height: 220px;
  }

  .contact-section {
    padding: 28px;
  }

  .contact-form {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .dialog-content {
    padding: 0 16px 24px;
  }

  .image-evidence img {
    grid-column: 1 / -1 !important;
    margin-top: 0 !important;
    height: 230px;
  }
}
