:root {
  color-scheme: light;
  font-family: "Vazirmatn", "DM Sans", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --navy: #102a43;
  --navy-soft: #214760;
  --aqua: #13b9ca;
  --aqua-bright: #53dce2;
  --aqua-soft: #e8f9fa;
  --ink: #17324b;
  --muted: #71869a;
  --muted-strong: #506a80;
  --border: #e3edf1;
  --page: #f6fafb;
  --surface: #ffffff;
  --surface-soft: #fbfdfe;
  --shadow: 0 22px 55px rgb(16 42 67 / 9%);
  --subtle-shadow: 0 8px 22px rgb(16 42 67 / 6%);
}

[data-theme="dark"] {
  color-scheme: dark;
  --navy: #e9f6fa;
  --navy-soft: #a9d9e4;
  --aqua: #46d9e0;
  --aqua-bright: #75eff0;
  --aqua-soft: #14333d;
  --ink: #e8f2f6;
  --muted: #9bb0bf;
  --muted-strong: #b7c9d3;
  --border: #27404e;
  --page: #0b1721;
  --surface: #11222f;
  --surface-soft: #162a38;
  --shadow: 0 24px 60px rgb(0 0 0 / 28%);
  --subtle-shadow: 0 9px 24px rgb(0 0 0 / 18%);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 78% 4%, rgb(19 185 202 / 10%), transparent 28rem),
    radial-gradient(ellipse at 0% 78%, rgb(19 185 202 / 7%), transparent 24rem),
    var(--page);
  transition: color 220ms ease, background-color 220ms ease;
}

button,
a {
  color: inherit;
  font: inherit;
}

a {
  -webkit-tap-highlight-color: transparent;
}

.ambient {
  position: fixed;
  z-index: -1;
  pointer-events: none;
  border: 1px solid rgb(19 185 202 / 16%);
  border-radius: 50%;
}

.ambient--top {
  top: 25%;
  right: -18rem;
  width: 32rem;
  height: 32rem;
  box-shadow:
    0 0 0 2.5rem rgb(19 185 202 / 2%),
    0 0 0 5rem rgb(19 185 202 / 2%);
}

.ambient--side {
  top: 7%;
  left: -11rem;
  width: 22rem;
  height: 22rem;
  background: rgb(19 185 202 / 4%);
  filter: blur(1px);
}

.page-shell {
  width: min(100% - 3rem, 70rem);
  margin-inline: auto;
}

.topbar {
  display: flex;
  height: 5.5rem;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgb(112 134 154 / 14%);
  direction: ltr;
}

.wordmark {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  text-decoration: none;
}

.wordmark__dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 0 0.3rem rgb(19 185 202 / 12%);
}

.wordmark__text {
  font: 700 0.7rem/1 "DM Sans", sans-serif;
  letter-spacing: 0.17em;
}

.theme-toggle {
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--navy);
  background: var(--surface);
  box-shadow: var(--subtle-shadow);
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 220ms ease,
    color 220ms ease;
}

.theme-toggle:hover {
  transform: translateY(-2px) rotate(-7deg);
  border-color: var(--aqua);
}

.theme-toggle:focus-visible,
.contact-cta:focus-visible,
.contact-link:focus-visible {
  outline: 3px solid rgb(19 185 202 / 40%);
  outline-offset: 3px;
}

.theme-toggle svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.theme-toggle__sun {
  display: none;
}

[data-theme="dark"] .theme-toggle__moon {
  display: none;
}

[data-theme="dark"] .theme-toggle__sun {
  display: block;
}

.profile-layout {
  display: grid;
  min-height: 40rem;
  grid-template-columns: 0.92fr 1.08fr;
  align-items: center;
  gap: clamp(2.5rem, 7vw, 5.25rem);
  padding-block: 3.2rem 3.6rem;
  direction: ltr;
}

.intro-panel {
  position: relative;
  padding: 0.75rem 0 0.75rem 1.25rem;
  direction: ltr;
}

.eyebrow {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1.4rem auto;
  color: var(--muted);
  direction: rtl;
  font-size: 0.9rem;
  font-weight: 600;
}

.eyebrow span {
  width: 1.4rem;
  height: 2px;
  border-radius: 3px;
  background: var(--aqua);
}

.logo-wrap {
  position: relative;
  display: grid;
  width: 7.25rem;
  height: 7.25rem;
  place-items: center;
  margin: 0 0 1.5rem;
  overflow: visible;
  border: 1px solid rgb(19 185 202 / 22%);
  border-radius: 2rem;
  background: var(--surface);
  box-shadow: var(--subtle-shadow);
}

.logo-wrap__orbit {
  position: absolute;
  inset: -0.55rem;
  border: 1px solid rgb(19 185 202 / 16%);
  border-radius: 2.3rem;
  pointer-events: none;
}

.logo {
  width: 94%;
  height: 94%;
  border-radius: 1.75rem;
  object-fit: contain;
  mix-blend-mode: multiply;
}

[data-theme="dark"] .logo {
  mix-blend-mode: normal;
}

.hello {
  margin: 0 0 0.35rem;
  color: var(--muted);
  direction: rtl;
  font-size: 0.95rem;
  text-align: left;
}

.profile-name {
  margin: 0;
  color: var(--navy);
  direction: ltr;
  font: 800 clamp(2.65rem, 5.2vw, 3.8rem) / 1.03 "DM Sans", sans-serif;
  letter-spacing: -0.065em;
}

.profile-name span {
  display: block;
  color: #21889a;
}

[data-theme="dark"] .profile-name span {
  color: var(--aqua);
}

.role {
  margin: 1rem 0 0;
  color: var(--muted-strong);
  direction: ltr;
  font: 500 1.15rem/1.45 "DM Sans", sans-serif;
  letter-spacing: 0.01em;
}

.role span {
  color: var(--aqua);
}

.intro-rule {
  display: flex;
  width: 8.2rem;
  align-items: center;
  gap: 0.55rem;
  margin: 1.5rem 0 1rem;
}

.intro-rule span {
  height: 1px;
  flex: 1;
  background: var(--border);
}

.intro-rule b {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 0 0.3rem rgb(19 185 202 / 10%);
}

.intro-copy {
  max-width: 22rem;
  margin: 0 0 1.25rem;
  color: var(--muted);
  direction: rtl;
  font-size: 0.95rem;
  line-height: 1.9;
  text-align: left;
}

.contact-cta {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.85rem;
  color: #fff;
  background: var(--navy-soft);
  box-shadow: 0 0.5rem 1.4rem rgb(16 42 67 / 18%);
  direction: rtl;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.contact-cta:hover {
  transform: translateY(-2px);
  background: var(--navy);
  box-shadow: 0 0.7rem 1.6rem rgb(16 42 67 / 24%);
}

.contact-cta__icon {
  display: grid;
  width: 1.6rem;
  height: 1.6rem;
  place-items: center;
  border-radius: 50%;
  color: var(--navy);
  background: var(--aqua-bright);
  direction: ltr;
  font: 700 0.7rem/1 "DM Sans", sans-serif;
}

.signature {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 2.5rem;
  color: var(--muted);
  direction: ltr;
  font: 600 0.7rem/1.5 "DM Sans", sans-serif;
  letter-spacing: 0.14em;
}

.signature span {
  width: 2.4rem;
  height: 1px;
  background: var(--border);
}

.links-panel {
  position: relative;
  overflow: hidden;
  padding: 1.8rem;
  border: 1px solid var(--border);
  border-radius: 1.65rem;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.links-panel::before {
  position: absolute;
  top: -7rem;
  right: -6rem;
  width: 13rem;
  height: 13rem;
  border: 1px solid rgb(19 185 202 / 15%);
  border-radius: 50%;
  box-shadow: 0 0 0 1.8rem rgb(19 185 202 / 3%);
  content: "";
  pointer-events: none;
}

.links-heading {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 1.2rem;
  direction: rtl;
}

.section-kicker {
  display: block;
  color: var(--muted);
  direction: ltr;
  font: 700 0.7rem/1.4 "DM Sans", sans-serif;
  letter-spacing: 0.16em;
  text-align: right;
}

.links-heading h2 {
  margin: 0.4rem 0 0;
  color: var(--navy);
  font-size: 1.35rem;
  font-weight: 700;
}

.link-count {
  color: var(--aqua);
  direction: ltr;
  text-align: center;
}

.link-count b {
  display: block;
  font: 700 1.2rem/1 "DM Sans", sans-serif;
}

.link-count small {
  display: block;
  margin-top: 0.3rem;
  color: var(--muted);
  font: 700 0.6rem/1 "DM Sans", sans-serif;
  letter-spacing: 0.13em;
}

.link-list {
  position: relative;
  display: grid;
  gap: 0.65rem;
}

.contact-link {
  display: flex;
  min-height: 4.6rem;
  align-items: center;
  gap: 0.9rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface-soft);
  direction: ltr;
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 220ms ease,
    box-shadow 180ms ease;
}

.contact-link:not(.is-disabled):hover {
  transform: translateY(-2px);
  border-color: rgb(19 185 202 / 50%);
  background: var(--surface);
  box-shadow: var(--subtle-shadow);
}

.contact-link.is-disabled {
  cursor: pointer;
}

.link-icon {
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 0.8rem;
  color: #087e8d;
  background: var(--aqua-soft);
}

.link-icon svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.link-icon--instagram {
  color: #fff;
  background: linear-gradient(145deg, #635bdb, #dd4484 58%, #ffae54);
}

.link-icon--linkedin {
  color: #0877b5;
  background: #e7f3fb;
}

.link-icon--resume {
  color: #365b76;
  background: #edf2f6;
}

[data-theme="dark"] .link-icon--linkedin,
[data-theme="dark"] .link-icon--resume {
  color: var(--aqua-bright);
  background: #1a3644;
}

.link-copy {
  display: grid;
  min-width: 0;
  gap: 0.18rem;
  text-align: left;
}

.link-title {
  overflow: hidden;
  color: var(--ink);
  font: 700 0.98rem/1.3 "DM Sans", sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-caption {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-status {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 0.35rem 0.5rem;
  border-radius: 999px;
  color: var(--muted);
  background: var(--page);
  font-size: 0.7rem;
  white-space: nowrap;
}

.contact-link:not(.is-disabled) .link-status {
  width: 0.45rem;
  height: 0.45rem;
  margin-left: auto;
  padding: 0;
  border-radius: 50%;
  background: var(--aqua);
}

.panel-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin: 1.2rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.panel-note__dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 0 0.25rem rgb(19 185 202 / 10%);
}

.footer {
  display: flex;
  min-height: 4.25rem;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgb(112 134 154 / 14%);
  color: var(--muted);
  direction: ltr;
  font: 600 0.7rem/1.4 "DM Sans", sans-serif;
  letter-spacing: 0.1em;
}

.footer-mark {
  color: var(--muted-strong);
  font: 800 1.2rem/1 "DM Sans", sans-serif;
  letter-spacing: -0.07em;
}

.footer-mark span {
  color: var(--aqua);
}

.toast {
  position: fixed;
  z-index: 5;
  right: 50%;
  bottom: 1.5rem;
  max-width: calc(100vw - 2rem);
  padding: 0.75rem 1rem;
  transform: translate(50%, 1rem);
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    background-color 220ms ease,
    color 220ms ease;
}

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

@media (max-width: 850px) {
  .page-shell {
    width: min(100% - 2.25rem, 37rem);
  }

  .topbar {
    height: 4.5rem;
  }

  .profile-layout {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-block: 2.25rem 2.5rem;
  }

  .intro-panel {
    padding: 0.25rem 0 0;
    text-align: center;
  }

  .eyebrow {
    margin: 0 auto 1.25rem;
  }

  .logo-wrap {
    width: 6.4rem;
    height: 6.4rem;
    margin: 0 auto 1.2rem;
    border-radius: 1.8rem;
  }

  .logo-wrap__orbit {
    border-radius: 2.1rem;
  }

  .hello {
    text-align: center;
  }

  .profile-name {
    font-size: clamp(2.65rem, 9vw, 3.5rem);
  }

  .role {
    margin-top: 0.7rem;
    font-size: 1.05rem;
  }

  .intro-rule {
    margin: 1.15rem auto 0.8rem;
  }

  .intro-copy {
    margin: 0 auto 1.1rem;
    text-align: center;
  }

  .signature {
    justify-content: center;
    margin-top: 1.45rem;
  }

  .links-panel {
    padding: 1.4rem;
    border-radius: 1.4rem;
  }
}

@media (max-width: 420px) {
  .page-shell {
    width: min(100% - 1.5rem, 37rem);
  }

  .wordmark__text {
    font-size: 0.63rem;
  }

  .contact-link {
    min-height: 4.25rem;
    gap: 0.65rem;
    padding: 0.6rem;
  }

  .link-icon {
    width: 2.55rem;
    height: 2.55rem;
  }

  .link-title {
    font-size: 0.9rem;
  }

  .link-caption {
    font-size: 0.73rem;
  }

  .link-status {
    padding: 0.3rem 0.4rem;
    font-size: 0.65rem;
  }

  .footer {
    min-height: 3.8rem;
    font-size: 0.58rem;
    letter-spacing: 0.04em;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
