/* Xin Huang — portfolio (redesign v2) */

:root {
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --bg: #f3efe6;
  --bg-elevated: #faf7f0;
  --surface: #fffcf7;
  --text: #14121a;
  --muted: #4a4658;
  --faint: #8a8494;
  --border: rgba(20, 18, 26, 0.09);
  --border-strong: rgba(20, 18, 26, 0.14);

  --accent: #1a3a52;
  --accent-hover: #0f2840;
  --accent-soft: rgba(26, 58, 82, 0.1);
  --gold: #b8860b;
  --gold-soft: rgba(184, 134, 11, 0.12);

  --radius: 14px;
  --radius-lg: 22px;
  --container: 70rem;
  --space: 1.35rem;
  --header-offset: 4rem;

  --shadow-sm: 0 2px 8px rgba(20, 18, 26, 0.06);
  --shadow-md: 0 12px 40px rgba(20, 18, 26, 0.1);
  --shadow-glow: 0 0 0 1px rgba(26, 58, 82, 0.06);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --segment-height: 1.9rem;
  --segment-pad-x: 0.45rem;
}

[data-theme="dark"] {
  --bg: #0d0c10;
  --bg-elevated: #121118;
  --surface: #18171f;
  --text: #f2f0f7;
  --muted: #a8a3b5;
  --faint: #6e6a78;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --accent: #7eb8d4;
  --accent-hover: #a8d4ea;
  --accent-soft: rgba(126, 184, 212, 0.12);
  --gold: #d4a84b;
  --gold-soft: rgba(212, 168, 75, 0.12);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 16px 48px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 0 1px rgba(126, 184, 212, 0.1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0d0c10;
    --bg-elevated: #121118;
    --surface: #18171f;
    --text: #f2f0f7;
    --muted: #a8a3b5;
    --faint: #6e6a78;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);
    --accent: #7eb8d4;
    --accent-hover: #a8d4ea;
    --accent-soft: rgba(126, 184, 212, 0.12);
    --gold: #d4a84b;
    --gold-soft: rgba(212, 168, 75, 0.12);
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 16px 48px rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 0 0 1px rgba(126, 184, 212, 0.1);
  }
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  font-size: 112.5%;
}

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

.site-backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 80% at 10% -20%, var(--gold-soft), transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 0%, var(--accent-soft), transparent 45%),
    var(--bg);
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: transparent;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

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

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 300;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--surface);
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: max(var(--space), env(safe-area-inset-left));
  padding-right: max(var(--space), env(safe-area-inset-right));
}

/* ----- Top bar ----- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

@supports not (background: color-mix(in srgb, white 50%, black)) {
  .topbar {
    background: var(--bg);
    opacity: 0.97;
  }
}

.topbar__inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.65rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.topbar__nav {
  display: none;
  flex: 1;
  justify-content: center;
  gap: 0.15rem;
  flex-wrap: wrap;
}

@media (min-width: 900px) {
  .topbar__nav {
    display: flex;
  }
}

.topbar__link {
  padding: 0.5rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-radius: 10px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.topbar__link:hover {
  color: var(--text);
  background: var(--accent-soft);
  text-decoration: none;
}

.topbar__tools {
  display: none;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 900px) {
  .topbar__tools {
    display: flex;
  }
}

.segmented {
  display: inline-flex;
  padding: 2px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.segmented--lang .segment {
  min-width: 2.2rem;
  min-height: var(--segment-height);
  padding: 0 var(--segment-pad-x);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  line-height: 1;
}

.segmented--theme .segment.segment--icon {
  flex: 0 0 var(--segment-height);
  width: var(--segment-height);
  min-height: var(--segment-height);
  padding: 0;
}

.segment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
  box-sizing: border-box;
}

.segment[aria-pressed="true"] {
  color: var(--surface);
  background: var(--accent);
}

[data-theme="dark"] .segment[aria-pressed="true"] {
  color: #0d0c10;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .segment[aria-pressed="true"] {
    color: #0d0c10;
  }
}

.segmented--theme .segment[data-theme-mode="light"] svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.segmented--theme .segment[data-theme-mode="dark"] svg {
  fill: currentColor;
  stroke: none;
}

.segment svg {
  width: 0.92rem;
  height: 0.92rem;
  display: block;
}

.nav-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  margin-inline-start: auto;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 900px) {
  .nav-toggle {
    display: none;
    margin-inline-start: 0;
  }
}

.nav-toggle__lines {
  display: block;
  width: 1.125rem;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}

.nav-mobile {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 1rem var(--space) 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.nav-mobile.is-open {
  display: block;
}

.nav-mobile__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 900px) {
  .nav-mobile__tools {
    display: none;
  }
}

.nav-mobile__link {
  display: block;
  padding: 0.75rem 0.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  border-radius: 10px;
}

.nav-mobile__link:hover {
  background: var(--accent-soft);
  text-decoration: none;
}

body.nav-open {
  overflow: hidden;
}

/* ----- Main ----- */
.main {
  padding-top: calc(var(--header-offset) + 1.75rem);
  padding-bottom: clamp(3rem, 8vw, 5rem);
}

.slice {
  padding-top: clamp(2.75rem, 7vw, 4.5rem);
  padding-bottom: clamp(2.75rem, 7vw, 4.5rem);
  scroll-margin-top: calc(var(--header-offset) + 0.75rem);
}

.slice--about {
  padding-top: clamp(2rem, 5vw, 3.5rem);
}

.slice--tint {
  margin-top: 0.75rem;
  background: linear-gradient(180deg, var(--bg-elevated) 0%, transparent 96%);
  border-radius: 0 0 28px 28px;
}

@media (min-width: 768px) {
  .slice--tint {
    border-radius: 0 0 36px 36px;
  }
}

/* Selected Projects — cool accent band (distinct from Publications tint) */
.slice--projects {
  margin-top: 0.75rem;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--accent) 10%, var(--bg)) 0%,
    transparent 96%
  );
  border-radius: 0 0 28px 28px;
}

@media (min-width: 768px) {
  .slice--projects {
    border-radius: 0 0 36px 36px;
  }
}

.slice--projects .slice-head__rule {
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--gold)));
  opacity: 1;
}

.eyebrow {
  margin: 0 0 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

/* About hero: name + bio | photo; photo nudged up slightly on wide screens */
.about-hero {
  display: grid;
  gap: clamp(1.75rem, 4vw, 2.5rem);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

@media (min-width: 900px) {
  .about-hero {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.55fr);
    gap: clamp(2rem, 4vw, 3rem);
  }
}

.display-name {
  margin: 0 0 1.1rem;
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 5vw, 3.35rem);
  font-weight: 600;
  font-variation-settings: "opsz" 72;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text);
}

@keyframes hero-name-char-bounce {
  0% {
    transform: translateY(0);
  }
  32% {
    transform: translateY(-0.45em);
  }
  52% {
    transform: translateY(-0.1em);
  }
  72% {
    transform: translateY(-0.26em);
  }
  100% {
    transform: translateY(0);
  }
}

.about-hero .display-name {
  display: inline-block;
}

.about-hero .display-name .hero-name__char {
  display: inline-block;
  transform-origin: 50% 100%;
}

.about-hero .display-name .hero-name__char--space {
  width: 0.35em;
}

.about-hero .display-name .hero-name__char:hover {
  animation: hero-name-char-bounce 0.5s var(--ease) both;
}

@media (prefers-reduced-motion: reduce) {
  .about-hero .display-name .hero-name__char:hover {
    animation: none;
  }
}

/* Invisible suffix keeps line breaks identical to the final string so the last
   word does not jump when wrapping (prefix-only layout would reflow differently). */
.lede__suffix {
  visibility: hidden;
  user-select: none;
  pointer-events: none;
}

#about-lede {
  position: relative;
}

.lede {
  margin: 0;
  max-width: 38rem;
  font-size: 1.08rem;
  line-height: 1.78;
  color: var(--muted);
}

/* Out-of-flow caret does not affect line breaking. */
.lede__caret {
  display: none;
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 1px;
  background: var(--accent);
  pointer-events: none;
  z-index: 2;
}

.lede.lede--typing .lede__caret {
  display: block;
  animation: lede-caret-blink 0.85s steps(1, end) infinite;
}

@keyframes lede-caret-blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lede.lede--typing .lede__caret {
    animation: none;
    opacity: 1;
  }
}

.about-hero__text {
  min-width: 0;
}

.about-hero__photo {
  margin: 0;
  min-width: 0;
}

@media (min-width: 900px) {
  .about-hero__photo {
    margin-top: -2rem;
  }
}

@media (max-width: 899px) {
  .about-hero__photo {
    display: none;
  }
}

/* Hero portrait: shorter than default photo-frame */
.about-hero .photo-frame {
  max-width: min(11rem, 100%);
}

.about-hero .photo-frame img {
  aspect-ratio: 4 / 4.5;
}

/* Frame hugs the image: gradient ring is never wider than the photo */
.photo-frame {
  display: block;
  width: fit-content;
  max-width: min(14rem, 100%);
  margin-inline: auto;
  border-radius: var(--radius-lg);
  padding: 3px;
  background: linear-gradient(145deg, var(--gold-soft), var(--accent-soft), transparent 60%);
  box-shadow: var(--shadow-md), var(--shadow-glow);
  overflow: hidden;
}

@media (min-width: 900px) {
  .photo-frame {
    margin-inline: 0;
    margin-left: auto;
  }
}

.photo-frame img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  border-radius: calc(var(--radius-lg) - 3px);
  border: 1px solid var(--border-strong);
  background: var(--surface);
}

/* Skills + Education row under hero */
.about-skills-edu {
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-top: clamp(1.5rem, 3vw, 2rem);
  border-top: 1px solid var(--border);
  max-width: none;
}

.about-skills-edu__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 2.75rem);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

@media (min-width: 900px) {
  .about-skills-edu__grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    column-gap: clamp(2rem, 5vw, 3rem);
  }
}

.about-skills {
  margin: 0;
  padding: 0;
  border: none;
  max-width: none;
}

.about-education {
  min-width: 0;
}

.education-mount {
  display: block;
}

.education-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.education-list__item {
  margin: 0;
  padding: 0 0 1.65rem;
  border-bottom: 1px solid var(--border);
}

.education-list__item:not(:first-child) {
  padding-top: 1.35rem;
}

.education-list__item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.education-list__degree {
  margin: 0 0 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
}

.education-list__school {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
}

.education-list__period {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--faint);
}

.about-skills__label {
  margin: 0 0 clamp(1rem, 2.5vw, 1.35rem);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  line-height: 1.3;
}

.skills-mount {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.skill-block {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.skill-block__title {
  margin: 0 0 0.55rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1.35;
  color: var(--text);
}

.skill-list {
  margin: 0;
  padding: 0 0 0 1.15rem;
  list-style: disc;
  color: var(--muted);
}

.skill-list__item {
  margin: 0.35rem 0;
  font-size: 1.02rem;
  line-height: 1.68;
  padding-left: 0.25rem;
}

.skill-list__item::marker {
  color: var(--accent);
}

.slice-head {
  margin-bottom: 1.75rem;
}

.slice-head__title {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.2vw, 2.25rem);
  font-weight: 600;
  font-variation-settings: "opsz" 60;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

.slice-head__rule {
  width: 4rem;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  opacity: 0.85;
}

.projects-mount {
  max-width: 52rem;
  margin-inline: auto;
}

.project-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-list__item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  margin: 0;
  padding: 1.15rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--muted);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

.project-list__item:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.slice--projects .project-list__item {
  background: color-mix(in srgb, var(--surface) 94%, var(--accent));
  border: 1px solid color-mix(in srgb, var(--border) 75%, var(--accent));
  border-left: 3px solid var(--accent);
  padding-left: calc(1.35rem - 2px);
}

.slice--projects .project-list__item:hover {
  border-color: color-mix(in srgb, var(--border-strong) 70%, var(--accent));
  border-left-color: var(--gold);
}

.project-list__item--soon {
  align-self: center;
  width: 100%;
  max-width: 42rem;
  align-items: center;
  text-align: center;
  padding: clamp(1.75rem, 4vw, 2.35rem) 1.35rem;
  cursor: default;
}

.project-list__item--soon:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}

.slice--projects .project-list__item--soon {
  border: 1px dashed color-mix(in srgb, var(--border) 65%, var(--accent));
  border-left-width: 1px;
  padding-left: 1.35rem;
  background: color-mix(in srgb, var(--surface) 96%, var(--accent));
}

.slice--projects .project-list__item--soon:hover {
  border-color: color-mix(in srgb, var(--accent) 22%, var(--border));
  border-left-color: color-mix(in srgb, var(--accent) 22%, var(--border));
}

.project-list__title-soon {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-list__item--soon .project-list__summary {
  max-width: 28rem;
}

.project-list__link {
  display: inline-block;
  align-self: flex-start;
  max-width: 100%;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 2px;
  transition: color 0.2s var(--ease), background-size 0.35s var(--ease);
}

.project-list__link:hover {
  color: var(--accent);
  text-decoration: none;
  background-size: 100% 2px;
}

.project-list__summary {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.98rem;
  line-height: 1.6;
}

.pub-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  max-width: 58rem;
  margin-inline: auto;
}

.pub-item {
  position: relative;
  padding: 1.65rem 0 1.65rem 1.15rem;
  border-bottom: 1px solid var(--border);
}

.pub-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.5rem;
  bottom: 1.5rem;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--gold));
  opacity: 0.65;
}

.pub-item:first-child {
  padding-top: 0.25rem;
}

.pub-item:first-child::before {
  top: 0.15rem;
}

.pub-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Last row has no bottom padding; keep accent bar flush with content */
.pub-item:last-child::before {
  bottom: 0;
}

.pub-item h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.pub-item h3 a {
  color: var(--text);
  text-decoration: none;
}

.pub-item h3 a:hover {
  color: var(--accent);
}

.pub-item__meta {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
}

.pub-item__meta a {
  color: var(--muted);
}

.pub-item__meta a:hover {
  color: var(--accent);
}

.pub-item__note {
  margin: 0.6rem 0 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--muted);
}

.scholar-out {
  margin: 1.75rem auto 0;
  max-width: 58rem;
  text-align: center;
}

.scholar-out__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ----- Footer ----- */
.site-footer {
  margin-top: 0.5rem;
  padding: clamp(1.35rem, 3.5vw, 2rem) 0 clamp(1.15rem, 3vw, 1.65rem);
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.contact-panel {
  max-width: 40rem;
  margin-inline: auto;
  text-align: center;
}

.contact-panel__row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1rem;
}

.contact-panel__icons-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.85rem;
  min-width: 0;
}

.contact-panel__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

.contact-panel__social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.45rem;
  height: 2.45rem;
  border-radius: var(--radius);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.social-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.social-btn__icon {
  width: 1.2rem;
  height: 1.2rem;
  display: block;
}

.contact-panel__tagline {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.45;
  color: var(--muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
