:root {
  color-scheme: light;
  --background: #f5f7fa;
  --surface: #ffffff;
  --ink: #27343d;
  --muted: #576671;
  --line: #dce3e8;
  --accent: #276582;
  --chip: #edf2f5;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100svh;
  padding: clamp(24px, 7vh, 64px) 24px 32px;
  background: var(--background);
  color: var(--ink);
  font: 14px/1.55 'Segoe UI', Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.page { width: min(100%, 820px); margin: 0 auto; }
.masthead { text-align: center; margin-bottom: 20px; }
h1 { margin: 0; font-size: 26px; font-weight: 400; line-height: 1.25; letter-spacing: -.7px; overflow-wrap: anywhere; }
.title-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 12px; }
.visit-counter { display: block; max-width: 100%; height: auto; }
.tagline { margin: 6px 0 0; color: var(--ink); font-size: 18px; }
.tagline-divider { margin: 5px 0 0; color: var(--muted); font-size: 16px; line-height: 1; letter-spacing: 2px; }
.profile { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: stretch; }
.identity, .details { min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 26px; }
.identity { margin: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 14px; text-align: center; }
.portrait { display: block; width: 190px; max-width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
.identity figcaption { font-size: 14px; font-weight: 650; }
.details { display: flex; flex-direction: column; justify-content: center; gap: 16px; text-align: center; }
.social { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.social a { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; font-size: 13px; font-weight: 600; }
.social a { transition: transform 0.3s ease; }
.social a:hover { transform: translateY(-3px); }
.social svg { width: 24px; height: 24px; fill: currentColor; flex: none; }
.bio { margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted); text-wrap: pretty; }

.skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; list-style: none; padding: 0; margin: 0; }
.skills li { padding: 5px 6px; border-radius: 6px; background: var(--chip); font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Original, refined */
body { --background: #c5e3db; --line: #e0e7e5; --chip: #edf3f1; background: linear-gradient(110deg, #a7d5e6, #b6dec1); }
.page { max-width: 860px; }
.profile { grid-template-columns: 300px minmax(0, 1fr); gap: 12px; }
.identity, .details { box-shadow: 0 3px 14px #254c4810; }
.portrait { width: 210px; border: 5px solid #edf2f0; }
.social a { border-style: dashed; border-color: #87abb4; }
.skills li { border-radius: 20px; }

/* One responsive page: retain natural document scrolling and readable content. */
@media (max-width: 760px) {
  .page { max-width: 650px; }
  body { padding-top: 12px; }
  .profile { grid-template-columns: 190px minmax(0, 1fr); gap: 16px; }
  .identity, .details { padding: 20px; }
  .portrait { width: 145px; }
  body.horizontal .profile { padding: 22px; grid-template-columns: 140px minmax(0, 1fr); }
  body.horizontal .identity, body.horizontal .details { padding: 0; }
  body.horizontal .details { display: flex; text-align: center; gap: 14px; }
  body.horizontal .social { justify-content: center; }
  body.horizontal .skills { width: 100%; }
  body.centered .page { max-width: 480px; }
  body.centered .identity { padding: 0; }
  body.centered .portrait { width: 112px; }
  body.centered .details { padding: 18px 0 0; }
  body.borderless .masthead { margin-left: 206px; }
  body.borderless .identity, body.borderless .details { padding: 0; }
  body.business-card .profile, body.mono-console .profile { padding: 22px; }
  body.business-card .identity, body.business-card .details, body.mono-console .identity, body.mono-console .details { padding: 0; }
  body.business-card .identity { padding-right: 20px; }
  body.mono-console .masthead { flex-wrap: wrap; }
}
@media (max-width: 560px) {
  body { padding: 12px 16px 24px; }
  .page { max-width: 420px; }
  .masthead { margin-bottom: 16px; }
  h1 { font-size: 24px; }
  .profile { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .identity, .details { padding: 20px; }
  .identity { gap: 10px; }
  .portrait { width: 118px; }
  .details { gap: 15px; }
  .skills { gap: 6px; }
  .skills li { font-size: 12px; }
  body.borderless .masthead { margin-left: 0; text-align: center; }
  body.borderless .identity { padding: 0 0 10px; }
  body.borderless .details { text-align: center; }
  body.borderless .social, body.borderless .skills { justify-content: center; }
  body.business-card .profile, body.mono-console .profile { padding: 22px; }
  body.business-card .identity { border: 0; padding: 0 0 18px; border-bottom: 1px solid var(--line); }
  body.business-card .details { padding-top: 8px; text-align: center; }
  body.business-card .social { justify-content: center; }
  body.centered .page { max-width: 380px; }
  body.centered .skills { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.centered .masthead { margin: 16px 0 0; }
  body.horizontal .masthead { text-align: center; }
  body.horizontal .profile { grid-template-columns: minmax(0, 1fr); padding: 22px; }
  body.fine-lines .profile { padding: 20px 0; }
  body.fine-lines .identity { border: 0; padding: 0; }
  body.fine-lines .details { padding: 10px 0 0; }
  body.dark-slate .profile { gap: 0; }
  body.dark-slate .identity { padding-bottom: 0; }
  body.mono-console h1 { font-size: 18px; }
  body.mono-console .masthead { margin-bottom: 0; padding: 12px 18px; gap: 5px; }
  body.mono-console .details { text-align: center; padding-top: 8px; }
  body.mono-console .social { justify-content: center; }
  body.mono-console .skills { text-align: left; }
  body.outline .identity { border: 0; padding: 0 0 6px; }
  body.outline .details { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  .social a { transition: none; }
  .social a:hover { transform: none; }
}
