/* ============================================================
   V3 — MEMENTOS : the darkest, most alive version
   fog, particles, scanlines, glitch, Joker in shadow
   ============================================================ */
@import url('core.css');
@import url('joker.css');

/* ---------- deep fog backdrop ---------- */
#fog {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse at 70% 30%, rgba(255,28,28,.16), transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(66,0,9,.55), transparent 65%),
    linear-gradient(180deg, #060606 0%, #0B0203 50%, #020202 100%);
}
/* drifting fog layers */
.fog-layer {
  position: absolute; left: -50%; right: -50%; height: 100%;
  background: radial-gradient(ellipse at 50% 50%, rgba(255,28,28,.05), transparent 60%);
  animation: fog-drift 34s linear infinite;
}
.fog-layer.l2 { animation-duration: 52s; animation-direction: reverse; opacity: .6; }
.fog-layer.l3 { animation-duration: 71s; opacity: .4; }
@keyframes fog-drift {
  0%   { transform: translateX(-12%) translateY(0) scale(1); }
  50%  { transform: translateX(12%) translateY(-3%) scale(1.12); }
  100% { transform: translateX(-12%) translateY(0) scale(1); }
}

/* particle canvas */
#particles {
  position: absolute; inset: 0;
  z-index: 3;
  pointer-events: none;
}

/* ---------- heavy scanlines + CRT ---------- */
.crt {
  position: absolute; inset: 0;
  z-index: 8000;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    rgba(0,0,0,.30) 0 1px,
    rgba(0,0,0,0) 1px 3px
  );
  mix-blend-mode: multiply;
}
.crt::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,28,28,.05), transparent 30%, transparent 70%, rgba(255,28,28,.05));
  animation: crt-roll 7s linear infinite;
}
@keyframes crt-roll {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

/* ---------- glitch title ---------- */
.glitch {
  position: relative;
  font-family: var(--font-display);
  text-transform: uppercase;
  color: #F2F2F2;
}
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute; left: 0; top: 0;
  width: 100%;
  overflow: hidden;
}
.glitch::before {
  color: var(--red);
  animation: gl-a 3.4s infinite steps(1);
  clip-path: inset(0 0 62% 0);
}
.glitch::after {
  color: var(--cyan);
  animation: gl-b 2.8s infinite steps(1);
  clip-path: inset(58% 0 0 0);
}
@keyframes gl-a {
  0%, 92%, 100% { transform: translate(0,0); opacity: 0; }
  93%  { transform: translate(-4px,-2px); opacity: .9; }
  95%  { transform: translate(3px,1px); opacity: .9; }
  97%  { transform: translate(-2px,2px); opacity: .9; }
}
@keyframes gl-b {
  0%, 90%, 100% { transform: translate(0,0); opacity: 0; }
  91%  { transform: translate(4px,2px); opacity: .8; }
  94%  { transform: translate(-3px,-1px); opacity: .8; }
  96%  { transform: translate(2px,-2px); opacity: .8; }
}

/* ---------- character: mostly shadow, red rim ---------- */
#char {
  right: 6%; bottom: 0;
  height: 90%;
  z-index: 5;
  opacity: .55;
  filter: drop-shadow(0 0 34px rgba(255,28,28,.35)) brightness(.85);
  animation: char-flicker 9s ease-in-out infinite;
}
@keyframes char-flicker {
  0%, 100% { opacity: .55; }
  43%      { opacity: .62; }
  47%      { opacity: .38; }
  49%      { opacity: .66; }
  53%      { opacity: .5; }
}

/* ---------- menu ---------- */
.menu-block {
  position: absolute;
  left: 76px; top: 50%;
  transform: translateY(-50%);
  z-index: 20;
}
.menu-block .menu-list { gap: 12px; }
.menu-block .menu-item {
  font-size: 56px;
  color: rgba(242,242,242,.82);
  text-shadow: 3px 3px 0 rgba(0,0,0,.95);
}
.menu-block .menu-item:hover,
.menu-block .menu-item:focus {
  color: var(--red);
  text-shadow: 3px 3px 0 #0B0B0B, 0 0 28px rgba(255,28,28,.6);
  transform: skewX(var(--skew)) translateX(14px);
}
.menu-block .menu-item::before { left: -28px; height: 4px; }
.menu-block .menu-item:hover::before,
.menu-block .menu-item:focus::before { width: 20px; }

/* ---------- header with glitch word ---------- */
.head-bar {
  position: absolute; left: 76px; top: 52px; right: 76px;
  z-index: 20;
  display: flex; justify-content: space-between; align-items: flex-start;
}
.head-title {
  font-family: var(--font-display);
  font-size: 40px;
  text-transform: uppercase;
  line-height: .95;
  color: #F2F2F2;
  text-shadow: 4px 4px 0 rgba(0,0,0,.9);
}
.head-title em { font-style: normal; color: var(--red); }
.head-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--cyan);
  margin-top: 8px;
  text-transform: uppercase;
}
.head-clock {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--cyan);
  text-align: right;
}
.head-clock b {
  display: block;
  font-family: var(--font-display);
  font-size: 32px;
  color: #F2F2F2;
}

/* ---------- bottom status line ---------- */
.status-line {
  position: absolute;
  left: 76px; right: 76px; bottom: 56px;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(235,235,235,.38);
}
.status-line b { color: var(--red); }

/* ---------- sub screens ---------- */
.sub-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; }
.sub-head h2 {
  font-family: var(--font-display);
  font-size: 84px;
  line-height: .85;
  text-transform: uppercase;
  color: #F2F2F2;
  text-shadow: 5px 5px 0 rgba(0,0,0,.9);
}
.sub-head h2 em { font-style: normal; color: var(--red); }
.sub-head .no { font-family: var(--font-mono); font-size: 13px; letter-spacing: 3px; color: var(--cyan); }

/* profile */
.prof-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 44px; align-items: center; height: 76%; }
.prof-big { font-family: var(--font-display); font-size: 68px; line-height: .92; text-transform: uppercase; color: #F2F2F2; }
.prof-big em { font-style: normal; color: var(--red); }
.prof-body { font-size: 14px; line-height: 1.8; color: #bdbdbd; margin-top: 20px; max-width: 540px; }
.prof-card {
  background: rgba(14,14,14,.94);
  border: 3px solid var(--black-pure);
  box-shadow: 8px 8px 0 var(--black-pure);
  padding: 24px;
}
.prof-ava {
  width: 100%; aspect-ratio: 1;
  background:
    radial-gradient(circle at 50% 38%, rgba(255,28,28,.45), transparent 62%),
    repeating-linear-gradient(45deg, #0C0C0C 0 8px, #111 8px 16px);
  border: 3px solid var(--black-pure);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.prof-ava span { font-family: var(--font-display); font-size: 84px; color: var(--red); text-shadow: 4px 4px 0 #0B0B0B; }
.prof-name { font-family: var(--font-display); font-size: 30px; text-transform: uppercase; }
.prof-title { font-family: var(--font-mono); font-size: 11px; letter-spacing: 2px; color: var(--cyan); margin-top: 5px; text-transform: uppercase; }
.prof-meta { font-family: var(--font-mono); font-size: 11px; line-height: 2; color: #a9a9a9; margin-top: 12px; }
.prof-meta b { color: var(--red); }

/* skill */
.skill-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 56px; }
.statbar-label { font-size: 14px; }
.statbar-label b { font-size: 24px; }
.statbar-track { height: 20px; }

/* project */
.proj-row { grid-template-columns: 64px 1fr auto; padding: 16px 20px; }
.proj-no { font-size: 36px; }
.proj-row h3 { font-size: 25px; }
.proj-row p { font-size: 12px; }

/* contact */
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; height: 76%; }
.calling-card {
  background: linear-gradient(150deg, #B8141A, #6B0C10);
  border: 4px solid var(--black-pure);
  box-shadow: 12px 12px 0 var(--black-pure);
  padding: 34px 38px;
  transform: rotate(-2deg);
  position: relative;
  overflow: hidden;
}
.calling-card::after {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(0,0,0,.26) 1.2px, transparent 1.2px);
  background-size: 6px 6px; opacity: .55; pointer-events: none;
}
.cc-star { font-family: var(--font-display); font-size: 56px; color: #F2F2F2; text-shadow: 4px 4px 0 #0B0B0B; line-height: 1; }
.cc-line { font-family: var(--font-mono); font-size: 14px; letter-spacing: 2px; color: #F2F2F2; margin-top: 15px; }
.cc-line b { color: #0B0B0B; }
.cc-foot { font-family: var(--font-display); font-size: 16px; text-transform: uppercase; letter-spacing: 2px; color: rgba(255,255,255,.72); margin-top: 24px; }
.contact-cta { font-family: var(--font-display); font-size: 58px; line-height: .9; text-transform: uppercase; color: #F2F2F2; }
.contact-cta em { font-style: normal; color: var(--red); }
.contact-body { font-size: 14px; line-height: 1.8; color: #bdbdbd; margin: 18px 0 24px; max-width: 430px; }

/* config */
.cfg-list { max-width: 600px; }
.cfg-row { padding: 16px 20px; }
.cfg-row .lbl { font-size: 24px; }
.cfg-row .val { width: 38px; height: 38px; }
