:root {
  color-scheme: dark;
  --bg: #0b100e;
  --surface: #101b17;
  --text: #f0f0e8;
  --muted: #a8b4ac;
  --accent: #a9cbb5;
  --line: rgba(192, 211, 197, 0.16);
  --font-serif: Georgia, "Times New Roman", serif;
  --save-bar-space: 80px;
}
* {
  box-sizing: border-box;
  font-family: var(--font-serif);
}
html {
  min-width: 280px;
  scroll-behavior: smooth;
  scroll-padding-bottom: calc(var(--save-bar-space) + env(safe-area-inset-bottom));
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px 16px;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 20% 15%, #203228 0, transparent 55%), var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.icon-definitions {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.icon,
.social-icon {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
/* The same phone-shaped card is used at every breakpoint.
   Its image fills the room left by the content, without clipping enlarged text. */
.profile-card {
  --content-gutter: clamp(18px, 6cqw, 32px);
  container-type: inline-size;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(140px, 1fr) auto;
  width: min(420px, 100%);
  min-height: min(900px, calc(100vh - 48px));
  min-height: min(900px, calc(100dvh - 48px));
  padding-bottom: calc(var(--save-bar-space) + env(safe-area-inset-bottom));
  background: var(--surface);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 80px #0005;
}
.portrait-panel {
  position: relative;
  min-height: 140px;
  background: #293028;
  isolation: isolate;
}
.portrait {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 15%;
  z-index: -2;
}
.portrait-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 21, 15, 0.2), transparent 36%, transparent 65%, var(--surface) 100%);
  z-index: -1;
}
.profile-content {
  position: relative;
  min-width: 0;
  padding: 0 var(--content-gutter) clamp(10px, 1.8svh, 16px);
  display: flex;
  flex-direction: column;
}
h1 {
  margin: 4px 0 8px;
  font-size: clamp(34px, 10.8cqw, 48px);
  font-weight: 400;
  font-style: normal;
  line-height: 1.08;
  letter-spacing: -1.7px;
}
h1 .surname {
  font-weight: inherit;
  font-style: normal;
}
.name-dot { color: var(--accent); }
.intro {
  margin: 0;
  font-size: clamp(12px, 3.2cqw, 14px);
  line-height: 1.4;
  letter-spacing: 0.15px;
  color: var(--muted);
}
.social-links {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  margin-top: clamp(10px, 1.8svh, 16px);
  padding: clamp(9px, 1.8svh, 16px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.social-links a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 56px;
  color: #dce4dc;
}
.social-links span {
  font-size: 10px;
  color: #c0ccc4;
}
.social-icon {
  width: clamp(36px, 10cqw, 42px);
  height: clamp(36px, 10cqw, 42px);
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(169, 203, 181, 0.04);
  transition: background 0.18s, border-color 0.18s;
}
.social-links a:hover .social-icon {
  background: rgba(169, 203, 181, 0.1);
  border-color: rgba(169, 203, 181, 0.42);
}
.panel { padding-top: clamp(12px, 2svh, 18px); }
.panel p {
  margin: 0;
  font-size: clamp(12.5px, 3.5cqw, 14px);
  line-height: 1.65;
  color: #c5d0c7;
  text-wrap: pretty;
}
.profile-footer { margin-top: clamp(10px, 2svh, 18px); }
.footer-signature {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
  font-size: 8px;
  letter-spacing: 1.3px;
  color: #8f9f94;
}
.footer-signature > span:last-child {
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0;
  color: #a8b8ac;
  white-space: nowrap;
}
.footer-rule {
  height: 1px;
  background: var(--line);
  flex: 1;
}
.save-contact-bar {
  position: absolute;
  z-index: 10;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px var(--content-gutter) calc(22px + env(safe-area-inset-bottom));
  border-radius: 0 0 24px 24px;
  background: linear-gradient(180deg, transparent 0%, rgba(11, 16, 14, 0.18) 28%, rgba(11, 16, 14, 0.48) 100%);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  isolation: isolate;
}
.save-contact-bar::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  bottom: calc(8px + env(safe-area-inset-bottom));
  width: 112px;
  height: 4px;
  transform: translateX(-50%);
  border-radius: 99px;
  background: rgba(240, 240, 232, 0.34);
}
.profile-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.save-contact,
.visit-website {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 48px;
  padding: 12px 8px;
  border: 1px solid rgba(205, 231, 213, 0.62);
  border-radius: 12px;
  background: rgba(169, 203, 181, 0.88);
  color: #12241a;
  font-size: clamp(12px, 3.2cqw, 14px);
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  transition: background 0.18s, transform 0.18s;
}
.profile-actions .icon { width: 18px; height: 18px; }
.save-contact:hover { background: #bddbc7; transform: translateY(-1px); }
.visit-website {
  background: rgba(16, 27, 23, 0.8);
  border-color: rgba(169, 203, 181, 0.65);
  color: var(--accent);
}
.visit-website:hover { background: rgba(169, 203, 181, 0.1); transform: translateY(-1px); }
@media (max-width: 520px) {
  body {
    display: block;
    padding: 0;
    background: var(--surface);
  }
  .profile-card {
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }
  .save-contact-bar {
    position: fixed;
    border-radius: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
@media print {
  body { display: block; padding: 0; background: white; color: #111; }
  .profile-card { min-height: 0; margin: 0 auto; padding-bottom: 0; background: white; box-shadow: none; }
  .portrait-panel { height: 300px; }
  .save-contact-bar { display: none; }
  .panel p, .intro, .social-links a, .social-links span, .footer-signature, .footer-signature > span:last-child { color: #444; }
}
