/* ============================================================
   DIGITALUKA — Monochrome black & white
   ============================================================ */

:root {
  color-scheme: dark;

  --bg: #000000;
  --bg-2: #080808;
  --ink: #f5f5f5;
  --ink-soft: #a3a3a3;
  --ink-mute: #666666;

  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.18);

  --radius: 14px;
  --radius-sm: 10px;

  --mx: 50vw;
  --my: 30vh;

  --shadow-lg: 0 40px 120px rgba(0, 0, 0, 0.7);
  --shadow-md: 0 24px 60px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

html {
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "ss01", "ss02", "cv11";
  color: var(--ink);
  background: var(--bg);
  letter-spacing: -0.01em;
  overflow-x: hidden;
}

/* ============================================================
   BACKGROUND LAYERS — minimal monochrome
   ============================================================ */

.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* Dot grid that drifts slowly */
.bg-dots {
  background-image: radial-gradient(rgba(255, 255, 255, 0.10) 1px, transparent 1.4px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 80%);
  opacity: 0.5;
  animation: dots-drift 28s linear infinite;
}

@keyframes dots-drift {
  to { background-position: 24px 24px; }
}

/* Soft white spotlight that follows cursor */
.bg-spotlight {
  background: radial-gradient(
    560px circle at var(--mx) var(--my),
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02) 35%,
    transparent 60%
  );
  transition: background 80ms linear;
}

/* Film grain */
.bg-grain {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.6'/></svg>");
  opacity: 0.05;
  mix-blend-mode: overlay;
}

/* Edge vignette */
.bg-vignette {
  background:
    radial-gradient(ellipse at 50% 0%, transparent 30%, rgba(0, 0, 0, 0.5) 78%),
    radial-gradient(ellipse at 50% 100%, transparent 30%, rgba(0, 0, 0, 0.6) 80%);
}

/* ============================================================
   TOPBAR
   ============================================================ */

.topbar {
  position: relative;
  z-index: 5;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.4));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 12px 18px;
}

.brand-strip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #fff;
  color: #000;
  font-family: "Inter", sans-serif;
  font-weight: 900;
  font-size: 0.86rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.brand-text { color: var(--ink); }
.brand-divider {
  width: 1px;
  height: 12px;
  background: var(--line-strong);
}
.brand-tag { color: var(--ink-mute); }

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  position: relative;
}

.live-dot__core {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
  position: relative;
  z-index: 2;
}

.live-dot__pulse {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translate(0, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  animation: pulse-ring 1.8s ease-out infinite;
  z-index: 1;
}

@keyframes pulse-ring {
  0%   { transform: translate(0, -50%) scale(1);   opacity: 0.55; }
  100% { transform: translate(0, -50%) scale(3.4); opacity: 0;    }
}

/* ============================================================
   LAYOUT
   ============================================================ */

.experience {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 24px;
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 22px 18px 44px;
}

/* ============================================================
   HERO / PORTRAIT
   ============================================================ */

.hero { display: grid; gap: 16px; }

.portrait-stage {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: #060606;
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}

/* Inner darken overlay for legibility */
.portrait-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.05) 30%, rgba(0, 0, 0, 0.85)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.5), transparent 40%);
}

.portrait {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  filter: grayscale(0.15) contrast(1.06);
  transform: scale(1.02);
  transition: transform 1.2s ease;
}

.portrait-stage:hover .portrait { transform: scale(1.06); }

/* Subtle scanline shimmer (white) */
.scanline {
  position: absolute;
  top: -120%;
  left: 0;
  right: 0;
  height: 60%;
  z-index: 3;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(255, 255, 255, 0.04) 45%,
    rgba(255, 255, 255, 0.10) 50%,
    rgba(255, 255, 255, 0.04) 55%,
    transparent
  );
  animation: scan 9s ease-in-out infinite;
  pointer-events: none;
  mix-blend-mode: overlay;
}

@keyframes scan {
  0%, 30% { top: -120%; }
  70%, 100% { top: 130%; }
}

/* Corner brackets */
.corner {
  position: absolute;
  z-index: 5;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  pointer-events: none;
}
.corner--tl { top: 14px; left: 14px; border-right: 0; border-bottom: 0; }
.corner--tr { top: 14px; right: 14px; border-left: 0; border-bottom: 0; }
.corner--bl { bottom: 14px; left: 14px; border-right: 0; border-top: 0; }
.corner--br { bottom: 14px; right: 14px; border-left: 0; border-top: 0; }

/* Top-right badge */
.badge {
  position: absolute;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--ink);
}
.badge--top-right { top: 22px; right: 22px; }

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
  animation: blink 1.6s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

/* Identity panel */
.identity-panel {
  position: absolute;
  z-index: 5;
  right: 22px;
  bottom: 22px;
  left: 22px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.kicker-line {
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--ink-soft);
  opacity: 0.6;
}

.display {
  margin: 0;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: clamp(3rem, 11vw, 6rem);
  line-height: 0.92;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #fff;
  text-wrap: balance;
  text-shadow: 0 16px 60px rgba(0, 0, 0, 0.55);
}

.lede {
  margin: 16px 0 0;
  max-width: 28ch;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.45;
  font-weight: 500;
}
.lede-accent {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-weight: 600;
}

.proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.chip--accent {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.chip-num {
  font-weight: 800;
  color: #fff;
  letter-spacing: 0;
}

/* ============================================================
   LINKS SECTION
   ============================================================ */

.links {
  display: grid;
  align-content: start;
  gap: 14px;
}

.links-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 4px;
  border-bottom: 1px dashed var(--line);
}

.links-kicker {
  margin: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.links-sub {
  margin: 0;
  font-size: 0.84rem;
  color: var(--ink-mute);
  font-weight: 500;
}

/* ============================================================
   LINK CARDS
   ============================================================ */

.link-card {
  position: relative;
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) 46px;
  align-items: center;
  gap: 14px;
  min-height: 132px;
  overflow: hidden;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #060606;
  text-decoration: none;
  color: inherit;
  isolation: isolate;
  transform: translateZ(0);
  transition:
    transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 200ms ease,
    background 200ms ease;

  --cx: 50%;
  --cy: 50%;
}

/* Subtle white border glow on hover, no rotating gradient */
.card-border {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 3;
  border: 1px solid transparent;
  transition: border-color 240ms ease;
}

.link-card:hover .card-border {
  border-color: rgba(255, 255, 255, 0.35);
}

/* Cursor-following white glow */
.card-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 280ms ease;
  background: radial-gradient(
    300px circle at var(--cx) var(--cy),
    rgba(255, 255, 255, 0.10),
    rgba(255, 255, 255, 0.03) 30%,
    transparent 60%
  );
}

.link-card:hover .card-glow { opacity: 1; }

.link-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.22);
  background: #0a0a0a;
}

.link-card:active { transform: translateY(0); }

.link-card:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

/* Visual frame */
.visual-frame {
  position: relative;
  z-index: 2;
  display: block;
  width: 108px;
  height: 100px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #000;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.card-visual {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) brightness(0.95) contrast(1.05);
  transition: transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 400ms ease;
}
.link-card:hover .card-visual {
  transform: scale(1.06);
  filter: grayscale(1) brightness(1.05) contrast(1.1);
}

.visual-frame__shine {
  position: absolute;
  top: 0;
  left: -120%;
  width: 80%;
  height: 100%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255, 255, 255, 0.14) 50%,
    transparent 100%
  );
  transform: skewX(-20deg);
  transition: left 700ms ease;
}
.link-card:hover .visual-frame__shine { left: 140%; }

/* Copy */
.card-copy {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.card-type {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.card-label {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: 1.18rem;
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
}

.card-meta {
  font-size: 0.86rem;
  line-height: 1.35;
  color: var(--ink-soft);
  font-weight: 500;
}

/* CTA arrow */
.card-action {
  position: relative;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  justify-self: end;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.card-action__ring {
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 240ms ease, transform 240ms ease;
}
.link-card:hover .card-action__ring {
  opacity: 1;
  transform: scale(1);
}

.link-card:hover .card-action {
  background: #fff;
  color: #000;
  border-color: #fff;
}

.card-action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 200ms ease;
}

.link-card:hover .card-action svg {
  transform: translate(1px, -1px);
}

/* ============================================================
   FOOTER
   ============================================================ */

.foot {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--ink-mute);
  text-transform: uppercase;
}
.foot-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  filter: blur(6px);
  transition:
    opacity 700ms cubic-bezier(0.2, 0.8, 0.2, 1) var(--reveal-delay, 0ms),
    transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1) var(--reveal-delay, 0ms),
    filter 700ms cubic-bezier(0.2, 0.8, 0.2, 1) var(--reveal-delay, 0ms);
}

.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* ============================================================
   DESKTOP
   ============================================================ */

@media (min-width: 880px) {
  .experience {
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.85fr);
    gap: 32px;
    padding: 38px 28px 60px;
  }

  .hero { position: relative; align-self: start; }

  .portrait-stage { min-height: 660px; }

  .identity-panel { right: 32px; bottom: 32px; left: 32px; }

  .display { font-size: clamp(4rem, 7vw, 6.5rem); }

  .links { align-self: start; gap: 16px; }

  .link-card {
    grid-template-columns: 152px minmax(0, 1fr) 50px;
    min-height: 178px;
    padding: 18px;
  }

  .visual-frame { width: 152px; height: 124px; }

  .card-label { font-size: 1.32rem; }

  .card-meta { font-size: 0.94rem; }

  .card-action { width: 46px; height: 46px; }
}

/* ============================================================
   SMALL PHONES
   ============================================================ */

@media (max-width: 420px) {
  .topbar-inner { padding: 10px 14px; }
  .live-dot__label { display: none; }

  .experience { padding: 16px 14px 36px; gap: 18px; }

  .portrait-stage { min-height: 380px; border-radius: 12px; }

  .identity-panel { right: 16px; bottom: 16px; left: 16px; }

  .display { font-size: clamp(2.6rem, 13vw, 4.2rem); }

  .lede { font-size: 0.88rem; }

  .link-card {
    grid-template-columns: 84px minmax(0, 1fr) 38px;
    gap: 11px;
    min-height: 122px;
    padding: 11px;
    border-radius: 12px;
  }

  .visual-frame { width: 84px; height: 84px; }

  .card-label { font-size: 1.02rem; }
  .card-meta  { font-size: 0.78rem; }

  .card-action { width: 38px; height: 38px; }

  .badge--top-right { top: 12px; right: 12px; padding: 4px 9px; font-size: 0.6rem; }
}

@media (max-width: 360px) {
  .display { font-size: 2.4rem; }
  .card-meta { display: none; }
}

/* ============================================================
   MOTION-SAFE
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; filter: none; }
}
