:root {
  --bg: #f3faf7;
  --bg-deep: #dff3e9;
  --text: #1c3029;
  --muted: #7e9289;
  --muted-2: #91a59c;
  --accent: #31936e;
  --accent-bright: #22d873;
  --card: linear-gradient(135deg, rgba(255,255,255,.80), rgba(238,249,244,.74));
  --card-hover: linear-gradient(135deg, rgba(255,255,255,.92), rgba(235,248,242,.86));
  --card-border: rgba(56,118,95,.17);
  --glass: rgba(255,255,255,.74);
  --glass-strong: rgba(255,255,255,.90);
  --icon-bg: rgba(255,255,255,.74);
  --shadow: 0 14px 34px rgba(40,91,74,.10);
  --shadow-soft: 0 7px 22px rgba(40,91,74,.075);
  --focus: rgba(46,157,115,.32);
  --page-max: 650px;
  --radius-card: 18px;
  --ease: cubic-bezier(.2,.8,.2,1);
}


* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(78% 48% at 7% 17%, rgba(116,214,178,.18), transparent 67%),
    radial-gradient(64% 48% at 94% 7%, rgba(142,202,194,.19), transparent 66%),
    radial-gradient(74% 44% at 48% 52%, rgba(255,255,255,.52), transparent 72%),
    radial-gradient(76% 56% at 86% 92%, rgba(99,204,162,.15), transparent 71%),
    linear-gradient(155deg, var(--bg) 0%, var(--bg-deep) 100%);
  color: var(--text);
  font-family: "Poppins", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 280ms var(--ease), color 280ms var(--ease);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,.30), rgba(255,255,255,.03) 42%, transparent),
    radial-gradient(90% 25% at 50% 0%, rgba(255,255,255,.28), transparent 72%);
}

button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; }

.ambient {
  position: fixed;
  z-index: -2;
  border-radius: 50%;
  filter: blur(82px);
  pointer-events: none;
  opacity: .52;
  transform: translate3d(0,0,0);
}

.ambient--one {
  width: 300px;
  height: 300px;
  left: -120px;
  top: 27vh;
  background: rgba(102,211,171,.24);
  animation: drift-one 13s ease-in-out infinite alternate;
}

.ambient--two {
  width: 270px;
  height: 270px;
  right: -95px;
  top: 3vh;
  background: rgba(136,200,194,.24);
  animation: drift-two 15s ease-in-out infinite alternate;
}

.ambient--three {
  width: 330px;
  height: 330px;
  right: -30px;
  bottom: -145px;
  background: rgba(81,194,150,.18);
  animation: drift-one 17s ease-in-out infinite alternate-reverse;
}

@keyframes drift-one {
  from { transform: translate3d(-8px,-4px,0) scale(.98); }
  to { transform: translate3d(15px,13px,0) scale(1.05); }
}

@keyframes drift-two {
  from { transform: translate3d(7px,-10px,0) scale(1); }
  to { transform: translate3d(-13px,16px,0) scale(1.08); }
}

.page-shell {
  width: min(calc(100% - 32px), var(--page-max));
  min-height: 100dvh;
  margin: 0 auto;
  padding:
    max(clamp(22px, 4dvh, 44px), env(safe-area-inset-top))
    0
    max(92px, calc(env(safe-area-inset-bottom) + 82px));
}

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.avatar-wrap {
  position: relative;
  width: clamp(106px, 14dvh, 124px);
  height: clamp(106px, 14dvh, 124px);
  margin-bottom: clamp(12px, 1.8dvh, 16px);
}

.avatar-ring {
  width: 100%;
  height: 100%;
  padding: 4px;
  border-radius: 50%;
  background: linear-gradient(145deg, #39a77e, #278f64);
  box-shadow: 0 9px 25px rgba(42,138,101,.13), 0 0 0 1px rgba(255,255,255,.42);
}

.avatar {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 44%;
  border: 3px solid rgba(248,255,252,.97);
  border-radius: 50%;
}

.status-dot {
  position: absolute;
  right: 3px;
  bottom: 7px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--accent-bright);
  border: 3px solid rgba(242,252,247,.98);
  box-shadow: 0 0 0 2px rgba(48,171,117,.16), 0 3px 8px rgba(29,160,95,.28);
}

.profile-name {
  margin: 0;
  font-size: clamp(1.48rem, 5.55vw, 1.82rem);
  line-height: 1.15;
  letter-spacing: -.025em;
  font-weight: 600;
}

.profile-handle {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: clamp(.94rem, 4vw, 1.08rem);
  font-weight: 400;
  letter-spacing: -.012em;
}

.profile-headline {
  width: min(100%, 540px);
  margin: clamp(7px, 1.3dvh, 10px) auto 0;
  color: var(--muted);
  font-size: clamp(.87rem, 3.55vw, 1rem);
  line-height: 1.45;
  font-weight: 400;
}

.email-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: auto;
  max-width: 100%;
  margin-top: clamp(8px, 1.5dvh, 11px);
  min-width: 0;
}

.email-address {
  min-width: 0;
  color: var(--accent);
  font-size: clamp(.76rem, 3.30vw, .92rem);
  line-height: 1.35;
  font-weight: 400;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.email-address:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.copy-button {
  position: relative;
  flex: 0 0 auto;
  display: inline-grid;
  grid-template-columns: 1fr;
  place-items: center;
  min-width: 54px;
  height: 29px;
  padding: 0 10px;
  border: 1px solid rgba(96,143,124,.11);
  border-radius: 999px;
  color: var(--muted);
  background: var(--glass-strong);
  box-shadow: 0 4px 14px rgba(39,90,73,.065);
  cursor: pointer;
  transition: transform 180ms var(--ease), background 180ms var(--ease), color 180ms var(--ease), box-shadow 180ms var(--ease);
}

.copy-button:hover { transform: translateY(-1px); color: var(--accent); }
.copy-button:active { transform: scale(.97); }

.copy-label, .copy-check {
  grid-area: 1 / 1;
  transition: opacity 150ms var(--ease), transform 180ms var(--ease);
}

.copy-label { font-size: .72rem; }

.copy-check {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: scale(.55);
}

.copy-button.is-copied .copy-label { opacity: 0; transform: scale(.72); }
.copy-button.is-copied .copy-check { opacity: 1; transform: scale(1); }

.link-list {
  display: grid;
  gap: clamp(7px, 1.15dvh, 10px);
  width: 100%;
  margin-top: clamp(18px, 2.8dvh, 27px);
}

.link-card {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0,1fr) 26px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: clamp(62px, 8.2dvh, 70px);
  padding: 8px 14px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow:
    0 1px 0 rgba(255,255,255,.72) inset,
    0 1px 0 rgba(44,101,81,.035),
    0 9px 27px rgba(45,94,78,.075);
  color: var(--text);
  text-decoration: none;
  backdrop-filter: blur(19px) saturate(122%);
  -webkit-backdrop-filter: blur(19px) saturate(122%);
  overflow: hidden;
  cursor: pointer;
  transition: transform 220ms var(--ease), background 220ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms var(--ease);
}

.link-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.20), transparent 44%);
  opacity: .75;
}

.link-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 0 36%, rgba(255,255,255,.20) 50%, transparent 64%);
  transform: translateX(-120%);
  transition: transform 620ms var(--ease);
  pointer-events: none;
}

.link-card:hover {
  transform: translateY(-2px);
  background: var(--card-hover);
  border-color: rgba(45,145,105,.22);
  box-shadow: 0 12px 30px rgba(38,91,73,.105), 0 1px 0 rgba(255,255,255,.78) inset;
}

.link-card:hover::before { transform: translateX(120%); }
.link-card:active { transform: translateY(0) scale(.993); }
.link-card--button { text-align: left; font: inherit; }
.link-card--inactive { cursor: default; }
.link-card--inactive:hover { transform: none; box-shadow: 0 9px 27px rgba(45,94,78,.075); }
.link-card--inactive:hover::before { transform: translateX(-120%); }

.icon-box {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: var(--icon-bg);
  box-shadow: 0 4px 13px rgba(53,107,86,.065);
}

.icon-box svg { width: 27px; height: 27px; }
.icon-box--email { background: rgba(245,224,214,.76); color: #ef5549; }

.icon-box--email svg,
.icon-box--instagram svg,
.icon-box--resources svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-box--linkedin { background: rgba(211,235,245,.82); color: #1974b9; }
.icon-box--github { background: rgba(255,255,255,.90); color: #162a22; }
.icon-box--instagram { background: rgba(243,227,230,.82); color: #da3e72; }
.icon-box--resources { background: rgba(203,239,225,.82); color: #2b9c72; }
.brand-fill { fill: currentColor; }
.brand-cut { fill: #f7fbf9; }
.dot-fill { fill: currentColor; stroke: none; }

.link-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  gap: 1px;
}

.link-title {
  color: var(--text);
  font-size: clamp(.93rem, 3.78vw, 1.04rem);
  line-height: 1.24;
  font-weight: 500;
  letter-spacing: -.01em;
}

.link-subtitle {
  display: block;
  color: var(--muted-2);
  font-size: clamp(.73rem, 3.16vw, .87rem);
  line-height: 1.36;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-arrow {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  justify-self: end;
  width: 25px;
  height: 25px;
  color: var(--muted);
  transition: color 180ms var(--ease), transform 180ms var(--ease);
}

.link-arrow svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.link-card:hover .link-arrow { color: var(--accent); transform: translateX(3px); }
.link-card--inactive .link-arrow { opacity: .52; }

.social-footer {
  position: fixed;
  left: 50%;
  bottom: max(14px, calc(env(safe-area-inset-bottom) + 10px));
  z-index: 18;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 9px;
  width: max-content;
  margin: 0;
  padding: 0;
  transform: translateX(-50%);
}

.social-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(67,124,102,.12);
  border-radius: 50%;
  color: var(--muted);
  background: var(--glass);
  box-shadow: 0 6px 18px rgba(40,91,74,.075);
  text-decoration: none;
  backdrop-filter: blur(14px) saturate(118%);
  -webkit-backdrop-filter: blur(14px) saturate(118%);
  transition: transform 190ms var(--ease), color 190ms var(--ease), background 190ms var(--ease), box-shadow 190ms var(--ease);
}

.social-button:hover { transform: translateY(-2px); color: var(--accent); background: var(--glass-strong); box-shadow: var(--shadow); }
.social-button:active { transform: translateY(-1px) scale(.96); }

.social-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-button .brand-fill { fill: currentColor; stroke: none; }
.social-button .brand-cut { fill: var(--glass-strong); stroke: none; }





.toast {
  position: fixed;
  left: 50%;
  bottom: max(66px, calc(env(safe-area-inset-bottom) + 62px));
  z-index: 30;
  max-width: calc(100vw - 32px);
  padding: 9px 14px;
  border-radius: 999px;
  color: #effcf6;
  background: rgba(23,55,43,.92);
  box-shadow: 0 10px 30px rgba(11,34,25,.24);
  font-size: .78rem;
  font-weight: 500;
  opacity: 0;
  transform: translate(-50%,16px) scale(.94);
  pointer-events: none;
  transition: opacity 180ms var(--ease), transform 220ms var(--ease);
}

.toast.is-visible { opacity: 1; transform: translate(-50%,0) scale(1); }

.reveal { opacity: 0; transform: translateY(12px) scale(.994); }

body.is-ready .reveal {
  animation: reveal 520ms var(--ease) forwards;
  animation-delay: var(--delay,0ms);
}

.social-footer.reveal {
  opacity: 0;
  transform: translateX(-50%) translateY(10px) scale(.994);
}

body.is-ready .social-footer.reveal {
  animation: reveal-footer 520ms var(--ease) forwards;
  animation-delay: var(--delay,0ms);
}

@keyframes reveal {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes reveal-footer {
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

@media (max-width: 430px) {
  .page-shell {
    width: calc(100% - 28px);
    padding-left: 0;
    padding-right: 0;
  }

  .avatar-wrap {
    width: clamp(106px, 14dvh, 118px);
    height: clamp(106px, 14dvh, 118px);
  }

  .link-card {
    grid-template-columns: 46px minmax(0,1fr) 24px;
    min-height: clamp(60px, 8dvh, 68px);
    padding: 7px 13px;
    gap: 11px;
    border-radius: 17px;
  }

  .icon-box {
    width: 46px;
    height: 46px;
    border-radius: 12px;
  }

  .icon-box svg { width: 26px; height: 26px; }
}

@media (max-width: 355px) {
  .page-shell { width: calc(100% - 20px); }
  .email-line { gap: 5px; }
  .email-address { font-size: .70rem; }
  .copy-button { min-width: 51px; height: 28px; padding-inline: 9px; }
  .link-card { grid-template-columns: 43px minmax(0,1fr) 22px; gap: 9px; padding-inline: 10px; }
  .icon-box { width: 43px; height: 43px; }
  .link-subtitle { font-size: .70rem; }
  .social-button { width: 40px; height: 40px; }
}

@media (min-width: 720px) {
  .page-shell {
    padding-top: 58px;
    padding-bottom: 100px;
  }

  .avatar-wrap {
    width: 128px;
    height: 128px;
  }

  .link-list { margin-top: 32px; }

  .link-card {
    min-height: 78px;
    padding: 10px 17px;
    grid-template-columns: 52px minmax(0,1fr) 28px;
  }

  .icon-box { width: 52px; height: 52px; }
  .social-button { width: 44px; height: 44px; }
}

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

  .ambient { animation: none !important; }
  .reveal { opacity: 1; transform: none; }
  .social-footer.reveal { opacity: 1; transform: translateX(-50%); }
}
