.portrait{position:relative;margin:0;padding:0}.portrait-frame{position:relative;isolation:isolate}.portrait img.portrait-cutout{position:absolute;bottom:0;height:100%;object-fit:contain;object-position:center bottom;max-width:none;mask-image:linear-gradient(#000 90%,transparent);-webkit-mask-image:linear-gradient(#000 90%,transparent)}.portrait-light{position:absolute;inset:15% 5% 1% 3%;z-index:-1;background:radial-gradient(ellipse,#9dccff22,transparent 65%)}
/* Real section links, with enough space to read and tap each label. */
.portrait figcaption {
  position: relative;
  inset: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-top: -8px;
  padding: 18px 0 24px;
  font-size: 12px;
  border-top-color: #9dcfff66;
  z-index: 4;
}
.portrait figcaption > .portrait-name { display: block; margin: 0; letter-spacing: .12em; }
.portrait-links { display: flex; flex-wrap: wrap; gap: 8px; }
.portrait-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 13px;
  border: 1px solid #9dcfff70;
  border-radius: 2px;
  background: #0d1820e6;
  color: #b9f5fa;
  font: 700 clamp(13px, 1.15vw, 16px) / 1.3 var(--display);
  letter-spacing: .08em;
  white-space: nowrap;
  transition: color .2s, border-color .2s, background .2s, box-shadow .2s;
}
.portrait-links a:hover, .portrait-links a:focus-visible {
  color: #ffe1b5;
  border-color: #9ebde5;
  background: #30241a;
  box-shadow: 0 0 20px #9ebde524;
}
.portrait-links a:focus-visible { outline: 2px solid #a2f6ff; outline-offset: 4px; }
.portrait-links a:active { background: #493321; }

/* A supporting portrait beside the copy, rather than an oversized hero.
   Resizing one shared stage keeps the photo, masks and SVG effects aligned. */
.about-grid { min-height: 0; }
.portrait {
  width: 100%;
  max-width: 520px;
  align-self: center;
  justify-self: center;
}
.portrait-frame {
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: 4 / 5;
  margin: 0;
  overflow: visible;
}

/* The outer layer owns the scroll entrance; the inner layer owns the loop. */
.portrait-entrance {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  bottom: 0;
}
.portrait-loop {
  position: absolute;
  inset: 0;
  isolation: isolate;
  animation: portrait-hover 6.8s ease-in-out infinite;
  animation-play-state: paused;
}
.portrait .portrait-entrance .portrait-cutout {
  width: 100%;
  left: 0;
  z-index: 1;
  filter: drop-shadow(-3px 0 3px #9dcfffbb) drop-shadow(3px 1px 4px #9ebde5aa) drop-shadow(0 0 12px #9dcfff55) drop-shadow(8px 7px 24px #02081288);
}
.portrait-aura, .portrait-hologram, .portrait-circuits, .portrait-lightning {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.portrait-aura {
  z-index: 0;
  background: radial-gradient(ellipse at 38% 38%, #9dcfff50, transparent 57%), radial-gradient(ellipse at 70% 65%, #9ebde538, transparent 49%);
  opacity: .75;
  animation: portrait-aura 6.8s ease-in-out infinite;
  animation-play-state: paused;
}
.portrait-hologram, .portrait-lightning {
  z-index: 2;
  overflow: hidden;
  mask: url('../images/mustafa-cutout.webp') center bottom / contain no-repeat;
  -webkit-mask: url('../images/mustafa-cutout.webp') center bottom / contain no-repeat;
}
.portrait-hologram:before {
  content: '';
  position: absolute;
  inset: -55% 0;
  background: linear-gradient(173deg, transparent 42%, #9dcfff00 47%, #9dcfff45 49.7%, #d4fbff80 50%, #9dcfff24 50.5%, transparent 54%, #9ebde528 55%, transparent 57%);
  opacity: 0;
  transform: translateY(-38%);
  animation: portrait-scan 6.8s ease-in-out infinite;
  animation-play-state: paused;
}
.portrait-hologram:after {
  content: '';
  position: absolute;
  inset: 25% 0 0;
  background: repeating-linear-gradient(0deg, transparent 0 7px, #a1f6ff12 7px 8px);
  opacity: .28;
}
.portrait-circuits { z-index: 4; overflow: visible; }
.portrait-trace {
  fill: none;
  stroke: #9dcfff;
  stroke-width: 3;
  opacity: .55;
}
.portrait-trace.is-amber { stroke: #9ebde5; }
.portrait-packet {
  fill: none;
  stroke: #8cf4ff;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 10 90;
  filter: drop-shadow(0 0 8px #9dcfff);
  animation: portrait-current 6.8s linear infinite;
  animation-play-state: paused;
}
.portrait-packet.is-amber { stroke: #d5e5fb; filter: drop-shadow(0 0 8px #9ebde5); animation-delay: -3.4s; }
.portrait-node {
  fill: #a7f6ff;
  stroke: #9dcfff;
  stroke-width: 3;
  filter: drop-shadow(0 0 8px #9dcfff);
  animation: portrait-node 3.4s ease-in-out infinite;
  animation-play-state: paused;
}
.portrait-node.is-amber { fill: #e4efff; stroke: #9ebde5; filter: drop-shadow(0 0 8px #9ebde5); animation-delay: -1.7s; }
.portrait-arc {
  fill: none;
  stroke: #b9f8ff;
  stroke-width: 4;
  stroke-linejoin: round;
  opacity: 0;
  filter: drop-shadow(0 0 8px #9dcfff);
  animation: portrait-arc 6.8s ease-in-out infinite;
  animation-play-state: paused;
}
.portrait-arc.is-amber { stroke: #ddeaff; filter: drop-shadow(0 0 8px #9ebde5); animation-delay: -3.4s; }

/* Each path is authored from head to hands. A single dash travels down it.
   The alpha mask keeps the bolts inside the photograph, including branches. */
.portrait-lightning {
  z-index: 3;
  -webkit-mask-image: url('../images/mustafa-cutout.webp'), linear-gradient(#000 90%, transparent);
  mask-image: url('../images/mustafa-cutout.webp'), linear-gradient(#000 90%, transparent);
  -webkit-mask-size: contain, 100% 100%;
  mask-size: contain, 100% 100%;
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
.portrait-bolt { color: #9dcfff; }
.portrait-bolt.is-amber { color: #9ebde5; }
.portrait-bolt use {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 28 104;
  stroke-dashoffset: 28;
  opacity: 0;
  animation: portrait-lightning-down 6s linear infinite;
  animation-delay: var(--bolt-delay);
  animation-play-state: paused;
}
.portrait-bolt .bolt-halo { stroke-width: 16; stroke-opacity: .4; filter: blur(2px); }
.portrait-bolt .bolt-core { stroke: #d5fcff; stroke-width: 4.5; filter: drop-shadow(0 0 6px #9dcfff); }
.portrait-bolt.is-amber .bolt-core { stroke: #f1f6ff; filter: drop-shadow(0 0 6px #9ebde5); }
.portrait-bolt .bolt-branch { animation-delay: calc(var(--bolt-delay) + .8s); }
.portrait-bolt .bolt-branch.bolt-core { stroke-width: 3; }
.portrait.is-looping .portrait-loop,
.portrait.is-looping .portrait-aura,
.portrait.is-looping .portrait-hologram:before,
.portrait.is-looping .portrait-packet,
.portrait.is-looping .portrait-node,
.portrait.is-looping .portrait-arc,
.portrait.is-looping .portrait-bolt use { animation-play-state: running; }

@keyframes portrait-hover {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes portrait-aura {
  0%, 100% { opacity: .6; }
  50% { opacity: 1; }
}
@keyframes portrait-scan {
  0%, 8% { transform: translateY(-38%); opacity: 0; }
  18% { opacity: .85; }
  62% { opacity: .65; }
  76%, 100% { transform: translateY(38%); opacity: 0; }
}
@keyframes portrait-current { to { stroke-dashoffset: -100; } }
@keyframes portrait-node {
  0%, 100% { opacity: .55; }
  50% { opacity: 1; }
}
@keyframes portrait-arc {
  0%, 24%, 43%, 100% { opacity: 0; }
  32% { opacity: 1; }
  37% { opacity: .4; }
}
@keyframes portrait-lightning-down {
  0% { stroke-dashoffset: 28; opacity: 0; }
  4% { opacity: .95; }
  38% { stroke-dashoffset: -100; opacity: .95; }
  43%, 100% { stroke-dashoffset: -100; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .portrait-entrance { transform: none !important; opacity: 1 !important; filter: none !important; clip-path: none !important; }
  .portrait-loop, .portrait-aura, .portrait-packet, .portrait-node, .portrait-arc,
  .portrait-hologram:before, .portrait-bolt use { animation: none !important; }
  .portrait-hologram, .portrait-circuits, .portrait-lightning { display: none; }
}
@media print {
  .portrait-loop { animation: none; transform: none; }
  .portrait-aura, .portrait-hologram, .portrait-circuits, .portrait-lightning { display: none; }
}
