/* =====================================================
   alayouni.com — Sigil + Profile
   ===================================================== */

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

:root {
  --bg:      #04060a;
  --bg-1:    #080c14;
  --bg-2:    #0c1220;
  --line:    rgba(255,255,255,0.08);
  --line-2:  rgba(255,255,255,0.16);
  --text:    #e6ecf3;
  --dim:     #93a0b3;
  --mute:    #5b6878;
  --mint:    #88FFBB;
  --cyan:    #4FF4FF;
  --warn:    #ffaa44;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@supports (height: 100dvh) { html, body { height: 100dvh; } }

::selection { background: var(--mint); color: var(--bg); }

body {
  background:
    radial-gradient(60vmax 50vmax at 50% 30%, rgba(136,255,187,0.06), transparent 60%),
    radial-gradient(50vmax 40vmax at 50% 110%, rgba(79,244,255,0.05), transparent 70%),
    var(--bg);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.mono { font-family: var(--font-mono); font-size: 0.78em; letter-spacing: 0.04em; }
.dim  { color: var(--mute); }

/* ============ Scenes ============ */
.scene {
  position: fixed; inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}
.scene.active {
  opacity: 1;
  pointer-events: auto;
}

/* =====================================================
   SIGIL SCENE
   ===================================================== */
#sigil {
  position: fixed; inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

/* Whispers under the sigil */
.whispers {
  position: fixed; inset: 0;
  pointer-events: none;
}
.wh {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: clamp(11px, 1.05vw, 13px);
  line-height: 1.45;
  letter-spacing: 0.04em;
  color: var(--mint);
  text-shadow: 0 0 12px rgba(136,255,187,0.4);
  opacity: 0;
  transition: opacity 0.5s ease;
  max-width: 26ch;
  text-align: center;
  white-space: pre-line;
}
.wh.lit { opacity: 0.95; }

/* Corner blocks */
.corner {
  position: fixed;
  z-index: 10;
  padding: clamp(16px, 2.5vw, 28px);
  pointer-events: none;
}
.corner > * { pointer-events: auto; }
.corner-tl { top: 0; left: 0; }
.corner-tr { top: 0; right: 0; }
.corner-bl { bottom: 0; left: 0; }
.corner-br { bottom: 0; right: 0; display: flex; gap: 6px; }

.who { display: flex; flex-direction: column; gap: 2px; }
.who-name {
  font-size: clamp(13px, 1.1vw, 15px);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.who-role { font-size: 11px; color: var(--mint); letter-spacing: 0.04em; }
.who-loc  { font-size: 10.5px; color: var(--mute); }

.led {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 11px;
  font-size: 10.5px;
  color: var(--mint);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(136,255,187,0.05);
  border: 1px solid rgba(136,255,187,0.18);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.led i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.7); } }

.tag {
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.corner-br .ic {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(8,12,20,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: color .2s, border-color .2s, background .2s, transform .15s ease;
}
.corner-br .ic:hover {
  color: var(--mint);
  border-color: var(--mint);
  background: rgba(136,255,187,0.08);
  transform: translateY(-2px);
}
.corner-br .ic svg { width: 18px; height: 18px; }

/* The big reveal button */
.reveal-btn {
  position: fixed;
  left: 50%; bottom: clamp(20px, 4.5vw, 36px);
  transform: translateX(-50%);
  z-index: 11;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 22px 12px 20px;
  border: 1px solid var(--mint);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(136,255,187,0.12), rgba(79,244,255,0.08));
  color: var(--mint);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform .2s var(--ease), box-shadow .25s, background .2s;
  box-shadow: 0 8px 30px rgba(136,255,187,0.18);
}
.reveal-btn:hover {
  transform: translateX(-50%) translateY(-2px);
  background: linear-gradient(135deg, rgba(136,255,187,0.2), rgba(79,244,255,0.14));
  box-shadow: 0 14px 40px rgba(136,255,187,0.32);
}
.rb-line { width: 22px; height: 1px; background: var(--mint); display: inline-block; }
.rb-text { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mint); }
.rb-arrow { font-size: 14px; line-height: 1; }

.hint {
  position: fixed;
  left: 50%; bottom: 4px;
  transform: translateX(-50%);
  z-index: 9;
  font-size: 9.5px;
  color: var(--mute);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
  animation: hint-in 1.2s ease 1.8s forwards, bob 2.6s ease-in-out 3s infinite;
}
.hint.gone { opacity: 0 !important; animation: none; }
@keyframes hint-in { to { opacity: 0.55; } }
@keyframes bob {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%     { transform: translateX(-50%) translateY(-3px); }
}

/* =====================================================
   CV SCENE — the site IS the CV
   ===================================================== */
#scene-profile {
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

/* Top bar */
.cv-top {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px clamp(14px, 2.4vw, 28px);
  border-bottom: 1px solid var(--line);
  background: rgba(8,12,20,0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 5;
}
.cv-back {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: all .2s;
}
.cv-back:hover { color: var(--mint); border-color: var(--mint); }
.cb-arrow { font-size: 14px; line-height: 1; }
.cb-text { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; }

.cv-top-id {
  display: flex; align-items: center; gap: 10px;
  justify-self: center;
  min-width: 0;
}
.cv-top-logo {
  width: 26px; height: 26px;
  filter: drop-shadow(0 0 6px rgba(136,255,187,0.3));
  flex-shrink: 0;
}
.cv-top-id > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cv-top-name { font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; }
.cv-top-role { font-size: 10px; color: var(--mint); letter-spacing: 0.04em; }

.cv-save {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px;
  font-size: 10.5px;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: all .2s;
}
.cv-save:hover { color: var(--mint); border-color: var(--mint); }

/* Scroll container — only this scrolls */
.cv-scroll {
  flex: 1; min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
  background:
    radial-gradient(800px 500px at 80% -10%, rgba(79,244,255,0.05), transparent 70%),
    radial-gradient(700px 500px at -10% 30%, rgba(136,255,187,0.04), transparent 70%);
}
.cv-scroll::-webkit-scrollbar { width: 8px; }
.cv-scroll::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }

.cv {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 64px) clamp(20px, 4vw, 56px);
}

/* Section eyebrow + heading */
.cv-eyebrow {
  display: inline-block;
  color: var(--mint);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.cv-h { margin-bottom: 22px; }
.cv-h h2 {
  font-size: clamp(22px, 3.4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.cv-h-sub { color: var(--dim); font-size: 14.5px; margin-top: 8px; max-width: 60ch; }

.cv-block { padding-top: clamp(36px, 5vw, 60px); }
.cv-block:not(:last-child) {
  border-bottom: 1px dashed var(--line);
  padding-bottom: clamp(28px, 4vw, 48px);
}

/* HERO */
.cv-hero {
  padding-bottom: 18px;
}
.cv-name {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.98;
  margin-bottom: 10px;
  background: linear-gradient(110deg, var(--text) 30%, var(--mint) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cv-title {
  font-family: var(--font-mono);
  font-size: clamp(12px, 1.3vw, 15px);
  color: var(--mint);
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}
.cv-sum {
  font-size: clamp(15px, 1.5vw, 18px);
  color: var(--dim);
  max-width: 62ch;
  line-height: 1.6;
  margin-bottom: 20px;
}
.cv-meta {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
  margin-bottom: 24px;
}
.cm {
  display: inline-flex; align-items: baseline; gap: 8px;
  font-size: 13px;
  color: var(--text);
}
.cm-k {
  color: var(--mute);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.cv-badge {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 18px;
  background: linear-gradient(90deg, rgba(136,255,187,0.10), rgba(79,244,255,0.04));
  border: 1px solid var(--mint-d, rgba(136,255,187,0.2));
  border-left: 3px solid var(--mint);
  border-radius: 10px;
}
.cv-badge-star {
  font-size: 22px;
  color: var(--mint);
  line-height: 1;
  text-shadow: 0 0 12px rgba(136,255,187,0.6);
}
.cv-badge-t { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.cv-badge-s { display: block; color: var(--dim); font-size: 13px; line-height: 1.55; }

/* EXPERIENCE PATH */
.cv-path {
  list-style: none;
  position: relative;
  padding-left: 26px;
}
.cv-path::before {
  content: '';
  position: absolute; left: 6px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--mint), rgba(136,255,187,0.05));
  border-radius: 2px;
}
.cp { position: relative; padding: 0 0 26px 0; }
.cp:last-child { padding-bottom: 0; }
.cp-dot {
  position: absolute; left: -26px; top: 7px;
  width: 14px; height: 14px;
  background: var(--bg);
  border: 2px solid var(--mute);
  border-radius: 50%;
}
.cp.current .cp-dot {
  background: var(--mint);
  border-color: var(--mint);
  box-shadow: 0 0 0 5px rgba(136,255,187,0.15), 0 0 14px var(--mint);
}
.cp-body header {
  display: flex; flex-wrap: wrap; gap: 4px 18px;
  align-items: baseline; justify-content: space-between;
  margin-bottom: 4px;
}
.cp-body h3 { font-size: clamp(16px, 1.9vw, 19px); font-weight: 700; letter-spacing: -0.015em; }
.cp-when { color: var(--mute); font-size: 11px; letter-spacing: 0.06em; white-space: nowrap; }
.cp-org { color: var(--mint); font-family: var(--font-mono); font-size: 12.5px; margin-bottom: 8px; }
.cp-points { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.cp-points li {
  position: relative; padding-left: 16px;
  font-size: 14px; color: var(--dim); line-height: 1.55;
}
.cp-points li::before {
  content: '›'; position: absolute; left: 0;
  color: var(--mint); opacity: 0.7; font-weight: 700;
}

/* BUILT TOOLS */
.cv-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.ct {
  padding: 18px 20px;
  background: rgba(12,18,32,0.55);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color .2s, transform .15s var(--ease);
}
.ct:hover { transform: translateY(-2px); border-color: var(--line-2); }
.ct-tag {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.ct-tag.int { color: var(--cyan); }
.ct-tag.obs { color: var(--mint); }
.ct-tag.ops { color: var(--warn); }
.ct h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; letter-spacing: -0.01em; }
.ct p { font-size: 13.5px; color: var(--dim); line-height: 1.55; margin-bottom: 12px; }
.ct-stack {
  font-size: 11px;
  color: var(--mute);
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

/* STACK MATRIX */
.cv-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.mx {
  padding: 16px;
  background: rgba(12,18,32,0.4);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.mx h4 {
  font-size: 11px;
  color: var(--mint);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 10px;
}
.mx ul { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.mx li {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--dim);
  padding-left: 10px;
  position: relative;
}
.mx li::before { content: '·'; position: absolute; left: 0; color: var(--mint); font-weight: 700; }

/* TRUST LOGOS */
.cv-logos { display: flex; flex-wrap: wrap; gap: 7px; }
.cv-logos span {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 6px 11px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--dim);
  transition: all .2s;
}
.cv-logos span:hover { color: var(--mint); border-color: var(--mint-d, rgba(136,255,187,0.3)); }

/* CREDENTIALS */
.cv-creds { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.cv-creds li {
  display: flex; flex-direction: column;
  gap: 3px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.cv-creds li strong { font-size: 14px; font-weight: 600; color: var(--text); letter-spacing: 0.02em; }
.cv-creds li span { font-size: 12.5px; color: var(--dim); }

/* REACH */
.cv-reach-block { padding-bottom: 24px; }
.cv-reach {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}
.rr {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px; align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(12,18,32,0.4);
  transition: all .2s var(--ease);
}
.rr:hover { border-color: var(--mint); background: rgba(136,255,187,0.04); transform: translateY(-1px); }
.rr-k { color: var(--mute); font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; }
.rr-v { color: var(--text); font-size: 13.5px; word-break: break-all; user-select: all; }

/* Footer */
.cv-foot {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 11px;
}

/* =====================================================
   MOBILE
   ===================================================== */
@media (max-width: 900px) {
  .cv-top { grid-template-columns: auto 1fr auto; padding: 10px 14px; gap: 10px; }
  .cv-top-id { gap: 8px; }
  .cv-top-logo { width: 22px; height: 22px; }
  .cv-top-name { font-size: 12.5px; }
  .cv-top-role { display: none; }
  .cb-text { display: none; }
  .cv-back { padding: 6px 10px; }
  .cv-save { padding: 6px 10px; font-size: 10px; }

  .cv { padding: 24px 18px; }
  .cv-name { font-size: clamp(32px, 9vw, 48px); }
  .cv-meta { gap: 6px 14px; }
  .cm { font-size: 12.5px; }
  .cv-badge { gap: 12px; padding: 14px; }
  .cv-badge-star { font-size: 18px; }
  .cv-badge-t { font-size: 13px; }
  .cv-badge-s { font-size: 12.5px; }

  .cv-tools { grid-template-columns: 1fr; }
  .cv-matrix { grid-template-columns: repeat(2, 1fr); }
  .cv-reach { grid-template-columns: 1fr; }

  .cp-body header { gap: 4px 12px; }
  .cp-when { font-size: 10.5px; }
}
@media (max-width: 720px) {
  .corner { padding: 14px; }
  .corner-br { gap: 5px; }
  .corner-br .ic { width: 36px; height: 36px; border-radius: 9px; }
  .corner-br .ic svg { width: 16px; height: 16px; }
  .who-name { font-size: 12.5px; }
  .who-role { font-size: 10px; }
  .who-loc  { font-size: 9.5px; }
  .tag { font-size: 9.5px; letter-spacing: 0.16em; }
  .led { font-size: 9.5px; padding: 6px 10px; }
  .reveal-btn { padding: 10px 18px 10px 16px; }
  .rb-line { width: 16px; }
  .rb-text { font-size: 10px; letter-spacing: 0.14em; }
  .wh { font-size: 11px; max-width: 22ch; }
}

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