/* =========================================================
   Rasheed Gonga | rasheedgonga.com
   andtechgroup
   ---------------------------------------------------------
   1. Tokens
   2. Reset
   3. Layout shell
   4. Left column: masthead, bio, nav
   5. Right column: portrait
   6. Linktree panel
   7. Story overlay
   8. Footer
   9. Breakpoints
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root{
  --ink:        #0a0a0b;
  --ink-soft:   #16161a;
  --paper:      #f4f3f1;
  --paper-dim:  rgba(244,243,241,.62);
  --accent:     #e451f0;   /* the [+] magenta */
  --accent-dim: rgba(228,81,240,.18);
  --line:       rgba(244,243,241,.16);

  --card-bg:    rgba(18,18,21,.72);
  --card-line:  rgba(255,255,255,.12);

  --col-text:   46vw;      /* left column width on desktop */
  --pad:        clamp(1.5rem, 4vw, 4.25rem);

  --f-display:  clamp(3.25rem, 8.35vw, 9.5rem);   /* 120px at 1440 */
  --f-wordmark: clamp(.95rem, 1.9vw, 1.7rem);      /* 27px at 1440 */
  --f-body:     clamp(.95rem, 1.05vw, 1.0625rem);

  --card-x:     59%;      /* Linktree card, horizontal anchor */
  --card-y:     22%;      /* ...and vertical, measured from the bottom */
  --card-h:     593px;
  --hero-ratio: 1 / 1;    /* the headshot's aspect; update if the file changes */

  --ease:       cubic-bezier(.22,.61,.36,1);
  --vh:         1vh;       /* set by js on mobile */
}

/* ---------- 2. Reset ---------- */
*,*::before,*::after{box-sizing:border-box;}
html{-webkit-text-size-adjust:100%;}
body{
  margin:0;
  background:var(--ink);
  color:var(--paper);
  font-family:"Archivo","Helvetica Neue",Arial,sans-serif;
  font-size:var(--f-body);
  line-height:1.62;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
img{display:block;max-width:100%;}
a{color:inherit;text-decoration:none;}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer;}
:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:2px;}

.skip-link{
  position:absolute;left:-9999px;top:0;z-index:99;
  padding:.65rem 1rem;background:var(--accent);color:#fff;font-weight:700;
}
.skip-link:focus{left:.5rem;top:.5rem;}

/* ---------- 3. Layout shell ---------- */
.cover{
  position:relative;
  display:grid;
  grid-template-columns:var(--col-text) 1fr;
  min-height:calc(var(--vh,1vh) * 100);
}

.col{position:relative;}

/* ---------- 4. Left column ---------- */
.col--text{
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  padding:var(--pad);
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(228,81,240,.09) 0%, transparent 58%),
    var(--ink);
  z-index:2;
}

/* Wide enough for the wordmark to sit on one line; the name breaks on its
   own spans, so it does not need the cap. */
.masthead{max-width:none;}

.name{
  margin:0;
  font-size:var(--f-display);
  font-weight:900;
  line-height:.86;
  letter-spacing:-.035em;
  text-transform:uppercase;
}
.name__line{display:block;}

.wordmark{
  margin:1.1rem 0 0;
  white-space:nowrap;
  font-size:var(--f-wordmark);
  font-weight:700;
  letter-spacing:.2em;
  color:var(--paper-dim);
  text-transform:uppercase;
}
.wordmark__plus{color:var(--accent);}

/* bottom-left block */
.bio{max-width:460px;}

.bio__eyebrow{
  display:flex;
  flex-wrap:wrap;
  gap:.45rem .85rem;
  margin:0 0 1.1rem;
  font-size:.72rem;
  font-weight:600;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--paper-dim);
}
.bio__eyebrow span{display:inline-flex;align-items:center;}
.bio__eyebrow span + span::before{
  content:"";
  width:4px;height:4px;margin-right:.85rem;
  border-radius:50%;
  background:var(--accent);
  opacity:.7;
}

.bio__title{
  margin:0 0 .6rem;
  font-size:clamp(1.15rem,1.7vw,1.6rem);
  font-weight:800;
  letter-spacing:-.015em;
  line-height:1.15;
}

.bio__body{
  margin:0 0 1.6rem;
  color:var(--paper-dim);
}
.bio__body em{color:var(--paper);font-style:italic;}

.nav{
  display:flex;
  flex-wrap:wrap;
  gap:.55rem;
  padding-top:1.35rem;
  border-top:1px solid var(--line);
}
.nav__slot{display:contents;}
.nav__link{
  position:relative;
  padding:.42rem .95rem;
  border:1px solid var(--line);
  border-radius:100px;
  font-size:.78rem;
  font-weight:600;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--paper-dim);
  transition:color .25s var(--ease),border-color .25s var(--ease),background-color .25s var(--ease);
}
.nav__link:hover{
  color:var(--paper);
  border-color:var(--accent);
  background:var(--accent-dim);
}

/* ---------- 5. Right column ---------- */
.col--image{overflow:hidden;background:var(--ink-soft);}

.portrait{display:block;height:100%;}
.portrait__img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center 30%;
}
/* Softened for the lighter studio portrait: seats the text column
   without smudging the photo. */
.portrait__veil{
  position:absolute;inset:0;
  pointer-events:none;
  background:linear-gradient(90deg, rgba(10,10,11,.98) 0%, rgba(10,10,11,.10) 38%, transparent 100%);
}

/* ---------- 6. Linktree panel ---------- */
.links{
  position:absolute;
  left:var(--card-x);
  bottom:var(--card-y);
  transform:translate(-50%,50%);
  z-index:5;
  width:min(24rem,84vw);
}

/* Hugs its content, with --card-h as the ceiling: a short list looks
   deliberate, a long one scrolls inside at the height set on the canvas. */
.links__card{
  display:flex;
  flex-direction:column;
  height:auto;
  max-height:min(var(--card-h), calc(var(--vh,1vh) * 82));
  padding:1.1rem;
  border:1px solid var(--card-line);
  border-radius:20px;
  background:var(--card-bg);
  backdrop-filter:blur(22px) saturate(140%);
  -webkit-backdrop-filter:blur(22px) saturate(140%);
  box-shadow:0 30px 70px -20px rgba(0,0,0,.72);
}

.links__head{display:flex;align-items:center;gap:.8rem;padding:0 .3rem .95rem;}
.links__avatar{width:44px;height:44px;border-radius:50%;object-fit:cover;flex:none;background:var(--ink-soft);}
.links__id{min-width:0;}
.links__handle{margin:0;font-size:.85rem;font-weight:700;letter-spacing:-.01em;}
.links__tag{
  margin:.15rem 0 0;
  font-size:.72rem;
  line-height:1.4;
  color:var(--paper-dim);
}

.links__scroll{
  flex:0 1 auto;
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  border-radius:12px;
  background:rgba(0,0,0,.28);
  scrollbar-width:thin;
  scrollbar-color:var(--accent) transparent;
}
.links__scroll::-webkit-scrollbar{width:6px;}
.links__scroll::-webkit-scrollbar-thumb{background:rgba(228,81,240,.55);border-radius:8px;}

.links__list{list-style:none;margin:0;padding:.85rem;display:grid;gap:.6rem;}
.links__item{
  display:block;
  padding:.85rem 1rem;
  border:1px solid var(--card-line);
  border-radius:12px;
  background:rgba(255,255,255,.05);
  font-size:.85rem;
  font-weight:600;
  text-align:center;
  transition:transform .2s var(--ease),background-color .2s var(--ease),border-color .2s var(--ease);
}
.links__item:hover{
  transform:translateY(-2px);
  background:var(--accent-dim);
  border-color:var(--accent);
}
.links__item--ghost{background:transparent;}

.links__out{
  display:block;
  margin-top:.85rem;
  padding:.6rem;
  border-radius:100px;
  background:var(--accent);
  color:#fff;
  font-size:.74rem;
  font-weight:700;
  letter-spacing:.1em;
  text-transform:uppercase;
  text-align:center;
  transition:filter .2s var(--ease);
}
.links__out:hover{filter:brightness(1.12);}

/* ---------- 7. Story overlay ---------- */
.story{position:fixed;inset:0;z-index:40;display:grid;place-items:center;padding:1.25rem;}
.story[hidden]{display:none;}

.story__backdrop{
  position:absolute;inset:0;
  background:rgba(6,6,8,.82);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  animation:fade .3s var(--ease);
}

/* Wider than the text: the Chicago Marathon frame fills the panel and the
   copy sits in a readable column on the right, so his face stays clear.
   The background only loads when the dialog is shown, since a hidden
   dialog is display:none. */
.story__panel{
  position:relative;
  display:flex;
  width:min(74rem,100%);
  max-height:min(46rem, calc(var(--vh,1vh) * 86));
  overflow:hidden;
  border:1px solid var(--card-line);
  border-radius:20px;
  background:#0b0b0d;
  box-shadow:0 40px 90px -24px rgba(0,0,0,.85);
  animation:rise .38s var(--ease);
}

.story__bg{
  position:absolute;inset:0;
  background:url("../images/mystory-bkgrnd.webp") center 32% / cover no-repeat;
}
.story__veil{
  position:absolute;inset:0;
  background:linear-gradient(270deg,
    rgba(10,10,11,.97) 0%,
    rgba(10,10,11,.93) 34%,
    rgba(10,10,11,.55) 62%,
    rgba(10,10,11,.15) 88%,
    rgba(10,10,11,.05) 100%);
}

.story__inner{
  position:relative;
  margin-left:auto;
  width:min(40rem,100%);
  max-height:inherit;
  padding:clamp(1.6rem,4vw,3rem);
  overflow-y:auto;
  overscroll-behavior:contain;
}

.story__close{
  position:absolute;top:1rem;right:1rem;z-index:2;
  background:rgba(10,10,11,.55);
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
  display:grid;place-items:center;
  width:38px;height:38px;
  border:1px solid var(--card-line);
  border-radius:50%;
  color:var(--paper-dim);
  transition:color .2s var(--ease),border-color .2s var(--ease);
}
.story__close:hover{color:var(--paper);border-color:var(--accent);}

.story__title{
  margin:0 0 1.4rem;
  font-size:clamp(1.6rem,3.4vw,2.5rem);
  font-weight:900;
  letter-spacing:-.03em;
  text-transform:uppercase;
}
.story__body p{margin:0 0 1.1rem;color:var(--paper-dim);}
.story__sign{
  margin-top:1.8rem !important;
  font-size:1.2rem;
  font-weight:800;
  color:var(--paper) !important;
}

@keyframes fade{from{opacity:0}to{opacity:1}}
@keyframes rise{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}

/* ---------- 8. Footer ---------- */
.foot{
  padding:2.5rem var(--pad) 3rem;
  border-top:1px solid var(--line);
  background:var(--ink);
  text-align:center;
}
.foot__copy{margin:0 0 .5rem;font-size:.8rem;color:var(--paper-dim);}
.foot__credit{margin:0;font-size:.75rem;color:var(--paper-dim);}
.foot__credit a{transition:color .2s var(--ease);}
.foot__credit a:hover{color:var(--accent);}
.foot__credit b{font-weight:700;}
.foot__credit i{font-style:italic;}

/* ---------- 9. Breakpoints ---------- */

/* Laptop: give the text column a little more room */
@media (max-width:1180px){
  :root{--col-text:50vw;--card-x:58%;--card-h:540px;}
  .links{width:min(21rem,86vw);}
}

/* Tablet: stack, portrait becomes a banner, panel joins the flow */
@media (max-width:900px){
  .cover{
    grid-template-columns:1fr;
    min-height:0;
  }

  /* The portrait is pinned to the viewport and keeps its own proportions,
     so the text column slides up over a photo that stays put. Three things
     follow from that and are handled here:
       1. a fixed box leaves the flow, so .col--image becomes a spacer sized
          by --hero-ratio, otherwise the banner collapses to nothing;
       2. the veil has to be pinned to the same box, or the gradient scrolls
          away from the photo it is meant to sit on;
       3. .col--text stays opaque and above (z-index 2), which is what makes
          the photo disappear cleanly rather than ghosting behind the copy. */
  .col--image{
    order:-1;
    height:auto;
    aspect-ratio:var(--hero-ratio);
  }
  .portrait{height:auto;}
  .portrait__img{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:auto;
    object-fit:fill;          /* height:auto already gives the true ratio */
  }
  .portrait__veil{
    position:fixed;
    top:0;
    left:0;
    right:auto;
    bottom:auto;
    width:100%;
    height:auto;
    aspect-ratio:var(--hero-ratio);
    background:linear-gradient(180deg, rgba(10,10,11,.55) 0%, transparent 32%, rgba(10,10,11,.96) 100%);
  }

  .col--text{
    gap:2.75rem;
    padding-top:2.25rem;
  }
  .masthead,.bio{max-width:none;}

  .links{
    position:static;
    transform:none;
    width:100%;
    margin:0 auto;
    padding:0 var(--pad) 3rem;
  }
  .links__card{
    max-width:30rem;
    margin:0 auto;
    height:auto;
    max-height:none;
  }
  .links__scroll{max-height:26rem;min-height:0;}

  /* No room for a side-by-side split: the photo runs across the top and the
     copy sits under it, with the gradient turned vertical to match. */
  .story__panel{width:min(38rem,100%);}
  .story__bg{background-position:32% 26%;}
  .story__veil{
    background:linear-gradient(180deg,
      rgba(10,10,11,.40) 0%,
      rgba(10,10,11,.80) 34%,
      rgba(10,10,11,.96) 56%,
      rgba(10,10,11,.99) 100%);
  }
  .story__inner{
    margin-left:0;
    width:100%;
    padding-top:clamp(8rem,24vh,13rem);
  }
}

/* Phone */
@media (max-width:560px){
  :root{--pad:1.35rem;}
  /* height and crop now come from --hero-ratio above */
  .name{letter-spacing:-.045em;}
  .wordmark{font-size:.8rem;letter-spacing:.3em;}
  .nav{gap:.45rem;}
  .nav__link{padding:.4rem .8rem;font-size:.72rem;}
  .links__scroll{max-height:22rem;}
  .story{padding:0;}
  .story__panel{
    max-height:calc(var(--vh,1vh) * 100);
    height:calc(var(--vh,1vh) * 100);
    border-radius:0;
    border:0;
  }
  /* Clear his face before the heading starts. */
  .story__inner{padding-top:clamp(9rem,36vh,15rem);}
  .story__bg{background-position:38% 22%;}
  .story__veil{
    background:linear-gradient(180deg,
      rgba(10,10,11,.28) 0%,
      rgba(10,10,11,.62) 26%,
      rgba(10,10,11,.95) 46%,
      rgba(10,10,11,.99) 100%);
  }
}

/* Short landscape phones */
@media (max-height:520px) and (orientation:landscape){
  .col--image{height:auto;}
  .links__scroll{max-height:16rem;}
}

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