/* ---------- reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ink: #111111;              /* black text */
  --muted: rgba(0,0,0,.5);     /* subtitle — dark so it reads on grey */
  --paper: #7d7d7d;            /* studio grey (matches the portrait backdrop) */
  --hair: rgba(0,0,0,.12);     /* hairlines */
}

html, body {
  height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  height: 100vh;
  width: 100%;
  /* the studio backdrop, extended across the whole page so the portrait's
     grey background melts into it seamlessly.
     matches the sampled image: #616161 (top) -> #8b8b8b (mid) -> #b5b5b5 (lower-right) */
  background:
    radial-gradient(75% 60% at 40% 100%, #bcbcbc 0%, rgba(188,188,188,0) 62%),
    linear-gradient(to bottom, #616161 0%, #8b8b8b 52%, #a9a9a9 100%);
  overflow: hidden;
}

/* portrait, anchored bottom-left and feathered into the grey */
.portrait {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 96vh;
  max-width: 55vw;
  object-fit: contain;
  object-position: bottom left;
  user-select: none;
  /* feather the right + top edges so the studio background
     melts into the page instead of showing a hard rectangle */
  -webkit-mask-image:
    linear-gradient(to right, #000 72%, transparent 100%),
    linear-gradient(to top,   #000 88%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
  mask-image:
    linear-gradient(to right, #000 72%, transparent 100%),
    linear-gradient(to top,   #000 88%, transparent 100%);
  animation: rise 1.1s cubic-bezier(.16,.84,.44,1) both;
}

/* content panel — vertically centered on the right, beside the face */
.panel {
  position: absolute;
  top: 50%;
  right: clamp(28px, 7vw, 110px);
  left: 56vw;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  animation: fade 1.2s ease .25s both;
}

.name {
  font-size: clamp(34px, 5vw, 68px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
}

/* tagline under the name */
.tagline {
  margin-top: .4em;
  font-size: clamp(15px, 1.6vw, 22px);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--muted);
}

/* circular icon button (X / socials) */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--hair);
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(8px);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease, transform .1s ease;
}
.icon-btn:hover { border-color: rgba(0,0,0,.28); background: rgba(255,255,255,.9); }
.icon-btn:active { transform: scale(.96); }

/* X icon pinned to the top-right of the page */
.x-top {
  position: fixed;
  top: clamp(18px, 3vw, 32px);
  right: clamp(18px, 3vw, 32px);
  z-index: 20;
  animation: fade 1.2s ease .6s both;
}

/* ---------- actions (contract + socials), stacked under the name ---------- */
.actions {
  margin-top: clamp(22px, 3vw, 34px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

/* contract chip */
.ca {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(8px);
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
  transition: border-color .2s ease, transform .1s ease;
}
.ca:hover { border-color: rgba(0,0,0,.22); }
.ca:active { transform: scale(.98); }
.ca-label {
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--muted);
}
.ca-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .02em;
  max-width: 42vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ca-copy { color: var(--muted); flex: none; }

/* links */
.links { display: flex; align-items: center; gap: 8px; }
.link {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--hair);
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(8px);
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: border-color .2s ease, background .2s ease, transform .1s ease;
}
.link:hover { border-color: rgba(0,0,0,.22); }
.link:active { transform: scale(.98); }
.link--primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.link--primary:hover { background: #000; }

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 78px;
  transform: translate(-50%, 12px);
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 10;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- animations ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- mobile: portrait at the bottom, panel on top ---------- */
@media (max-width: 720px) {
  .portrait {
    left: 50%;
    transform: translateX(-50%);
    height: 58vh;
    max-width: 100vw;
    object-position: bottom center;
    opacity: .96;
    -webkit-mask-image: linear-gradient(to top, #000 80%, transparent 100%);
            mask-image: linear-gradient(to top, #000 80%, transparent 100%);
    -webkit-mask-composite: source-over;
            mask-composite: add;
  }
  .panel {
    top: 8%;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    align-items: center;
    text-align: center;
    width: 100%;
    padding: 0 20px;
  }
  .actions { align-items: center; }
  .ca-value { max-width: 70vw; }
  .links { flex-wrap: wrap; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
}
