/* ---------- Fonts (self-hosted) ---------- */
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-normal.woff2") format("woff2");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-italic.woff2") format("woff2");
  font-weight: 300 600;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #0d0716;          /* deep purple-black */
  --ink: #f3ecff;         /* near-white lavender */
  --ink-soft: #bcaedb;    /* muted lavender */
  --violet: #7a46dc;
  --yellow: #ffd447;      /* main accent */
  --turq: #3fe0d0;        /* quiet second accent */
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pad: clamp(1.5rem, 5vw, 4.5rem);
}

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

html {
  background: var(--bg);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100svh;
  background:
    radial-gradient(60rem 40rem at 85% 8%, rgba(90, 46, 166, 0.32), transparent 62%),
    radial-gradient(38rem 28rem at 0% 100%, rgba(63, 224, 208, 0.07), transparent 62%),
    var(--bg);
  color: var(--ink);
  font: 400 1rem/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--yellow); color: #1a0b33; }

a { color: inherit; }
a:focus-visible {
  outline: 2px solid var(--turq);
  outline-offset: 4px;
  border-radius: 6px;
}

/* ---------- Layout: mobile first ---------- */
.stage {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}

/* soft purple glow behind the photo; shows through its faded edges */
.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(34rem 26rem at 55% 22%, rgba(122, 70, 220, 0.38), transparent 66%);
  pointer-events: none;
}

.photo {
  position: relative;
  width: 100%;
  height: min(100vw, 62svh);
  min-height: 18rem;
  -webkit-mask-image: linear-gradient(to bottom, #000 58%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 58%, transparent 100%);
}
.photo picture { display: block; height: 100%; }
.photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 45% 30%;
}

.content {
  position: relative;
  z-index: 1;
  margin-top: -3.25rem;
  padding: 0 var(--pad) 2rem;
}

/* ---------- Name ---------- */
.name {
  font-family: var(--serif);
  font-weight: 380;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  font-size: clamp(3rem, 13.5vw, 4.9rem);
  line-height: 0.93;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-shadow: 0 0 2.5rem rgba(122, 70, 220, 0.55);
}
.name span { display: block; }
.name span:last-child {
  font-style: italic;
  padding-right: 0.1em; /* keeps italic overhang from clipping the gradient */
  background: linear-gradient(100deg, #f3ecff 8%, #cdb9ff 55%, #8ef3e6 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: none;
}

/* ---------- Roles ---------- */
.roles {
  list-style: none;
  padding: 0;
  margin-top: 1.6rem;
  display: grid;
  gap: 0.5rem;
  font: 500 clamp(0.95rem, 3.6vw, 1.15rem) / 1.25 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.roles li {
  display: flex;
  align-items: center;
  gap: 0.95rem;
}
.roles li::before {
  content: "";
  flex: none;
  width: 0.48rem;
  height: 0.48rem;
  background: var(--yellow);
  transform: rotate(45deg);
  box-shadow: 0 0 0.9rem rgba(255, 212, 71, 0.65);
}

/* ---------- Links ---------- */
.links {
  margin-top: 2.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.95rem 1.4rem;
  border-radius: 999px;
  font: 600 1rem/1.2 var(--sans);
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease,
    border-color 0.25s ease;
}
.btn svg {
  flex: none;
  width: 1.05em;
  height: 1.05em;
  transition: transform 0.25s ease;
}
.btn:hover svg { transform: translate(2px, -2px); }

.btn-primary {
  background: var(--yellow);
  color: #1a0b33;
  box-shadow: 0 10px 30px -12px rgba(255, 212, 71, 0.5);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 4px rgba(255, 212, 71, 0.18), 0 16px 38px -12px rgba(255, 212, 71, 0.65);
}

.btn-ghost {
  color: var(--ink);
  border: 1px solid rgba(63, 224, 208, 0.45);
  background: rgba(63, 224, 208, 0.06);
}
.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: var(--turq);
  background: rgba(63, 224, 208, 0.14);
}

/* ---------- Contact ---------- */
.contact {
  margin-top: 2.4rem;
  padding-top: 1.5rem;
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, rgba(167, 139, 250, 0.5), transparent 85%) 1;
}
.contact h2 {
  font: 600 0.72rem/1 var(--sans);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.95rem;
}

.mail {
  display: inline-block;
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(63, 224, 208, 0.5);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
.mail:hover { color: var(--turq); text-decoration-color: var(--turq); }

.phone {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}
.num {
  font-weight: 500;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.chips { display: flex; gap: 0.4rem; }
.chip {
  font: 600 0.78rem/1 var(--sans);
  letter-spacing: 0.06em;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(188, 174, 219, 0.32);
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.chip:hover {
  color: var(--yellow);
  border-color: var(--yellow);
  background: rgba(255, 212, 71, 0.08);
}

.foot {
  margin-top: auto;
  padding: 0.5rem var(--pad) 1.6rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: rgba(188, 174, 219, 0.62);
}

/* ---------- Desktop ---------- */
@media (min-width: 860px) {
  .stage {
    display: block;
  }
  .stage::before {
    background: radial-gradient(46rem 34rem at 66% 40%, rgba(122, 70, 220, 0.4), transparent 66%);
  }

  .photo {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 66%;
    height: auto;
    min-height: 0;
    -webkit-mask-image:
      linear-gradient(to right, transparent 0%, #000 34%),
      linear-gradient(to bottom, #000 82%, transparent 100%);
            mask-image:
      linear-gradient(to right, transparent 0%, #000 34%),
      linear-gradient(to bottom, #000 82%, transparent 100%);
    -webkit-mask-composite: source-in;
            mask-composite: intersect;
  }
  .photo img { object-position: 50% 28%; }

  .content {
    margin-top: 0;
    width: 44%;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem var(--pad) 5rem;
  }
  .name { font-size: clamp(3rem, 6.3vw, 6.1rem); }
  .roles { font-size: clamp(0.9rem, 1.25vw, 1.15rem); }

  .links { align-items: flex-start; }
  .btn { justify-content: flex-start; }

  .foot {
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 2;
    padding-top: 0;
  }
}

@media (min-width: 860px) and (max-height: 780px) {
  .content { padding-top: 2.5rem; padding-bottom: 4rem; }
  .roles { margin-top: 1.2rem; gap: 0.35rem; }
  .links { margin-top: 1.5rem; }
  .contact { margin-top: 1.7rem; padding-top: 1.2rem; }
}

/* ---------- Gentle motion (off for reduced-motion users) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .photo img {
    transform-origin: 45% 35%;
    animation: drift 50s ease-in-out infinite alternate;
  }
  .stage::before { animation: breathe 10s ease-in-out infinite alternate; }

  .content > * {
    animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .content > :nth-child(2) { animation-delay: 0.12s; }
  .content > :nth-child(3) { animation-delay: 0.24s; }
  .content > :nth-child(4) { animation-delay: 0.36s; }

  @keyframes drift {
    from { transform: scale(1) translate3d(0, 0, 0); }
    to   { transform: scale(1.05) translate3d(-0.8%, -0.5%, 0); }
  }
  @keyframes breathe {
    from { opacity: 0.65; }
    to   { opacity: 1; }
  }
  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
  }
}
