/* ═══════════════════════════════════════════
   Lord Bismark — v3 style.css
   Markmix Studios Limited
   • Dark / Light mode via [data-theme]
   • Performance: will-change only on animated,
     contain: layout style on cards
═══════════════════════════════════════════ */

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

/* ══════════════════════════════════════════
   DESIGN TOKENS — DARK (default)
══════════════════════════════════════════ */
:root,
[data-theme="dark"] {
  --bg:          #09090e;
  --surface:     #0f0f17;
  --surface2:    #161621;
  --border:      rgba(255, 255, 255, 0.07);
  --border-h:    rgba(207, 170, 90, 0.35);
  --gold:        #cfaa5a;
  --gold-soft:   rgba(207, 170, 90, 0.12);
  --gold-glow:   rgba(207, 170, 90, 0.25);
  --cyan:        #5ac8cf;
  --text:        #edeae2;
  --text-strong: #ffffff;
  --muted:       #5c5968;
  --muted2:      #7e7a8c;
  --radius:      14px;

  /* scanline / orb strengths */
  --scanline-opacity: 0.03;
  --orb1-color:  rgba(207,170,90,0.13);
  --orb2-color:  rgba(90,200,207,0.09);
  --orb3-color:  rgba(140,90,207,0.08);

  /* theme-color for <meta> (JS updates it too) */
  --meta-bg: #09090e;

  /* toggle button look */
  --toggle-bg:     rgba(255,255,255,0.07);
  --toggle-border: rgba(207,170,90,0.25);
  --toggle-color:  var(--gold);

  /* footer link color */
  --footer-link: var(--muted2);
}

/* ══════════════════════════════════════════
   DESIGN TOKENS — LIGHT
══════════════════════════════════════════ */
[data-theme="light"] {
  --bg:          #f5f3ee;
  --surface:     #ffffff;
  --surface2:    #ede9e1;
  --border:      rgba(0, 0, 0, 0.08);
  --border-h:    rgba(160, 120, 40, 0.4);
  --gold:        #9a6f1e;
  --gold-soft:   rgba(160, 120, 40, 0.1);
  --gold-glow:   rgba(160, 120, 40, 0.18);
  --cyan:        #1a8e96;
  --text:        #1c1a16;
  --text-strong: #000000;
  --muted:       #998f80;
  --muted2:      #6b6155;

  --scanline-opacity: 0;
  --orb1-color:  rgba(207,170,90,0.18);
  --orb2-color:  rgba(90,200,207,0.12);
  --orb3-color:  rgba(180,130,60,0.10);

  --toggle-bg:     rgba(0,0,0,0.06);
  --toggle-border: rgba(160,120,40,0.3);
  --toggle-color:  var(--gold);

  --footer-link: var(--muted2);
}

/* ── Fonts ── */
:root {
  --font-head:  'Syne', sans-serif;
  --font-serif: 'Instrument Serif', serif;
  --font-mono:  'JetBrains Mono', monospace;
}

html { scroll-behavior: auto; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-head);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ════════════════════════════════
   THEME TOGGLE BUTTON
════════════════════════════════ */
.theme-toggle {
  position: fixed;
  top: 1.1rem;
  right: 1.1rem;
  z-index: 1000;

  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--toggle-border);
  background: var(--toggle-bg);
  color: var(--toggle-color);
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  background: var(--gold-soft);
  border-color: var(--gold);
  transform: scale(1.08) rotate(15deg);
  box-shadow: 0 0 16px var(--gold-glow);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* Show/hide sun & moon based on current theme */
.theme-toggle__icon { display: flex; align-items: center; justify-content: center; }

[data-theme="dark"]  .theme-toggle__icon--sun  { display: none; }
[data-theme="dark"]  .theme-toggle__icon--moon { display: flex; }
[data-theme="light"] .theme-toggle__icon--sun  { display: flex; }
[data-theme="light"] .theme-toggle__icon--moon { display: none; }

/* Tablet / small desktop: nudge slightly left of edge */
@media (min-width: 640px) {
  .theme-toggle {
    top: 1.4rem;
    right: 1.4rem;
  }
}

/* ════════════════════════════════
   AMBIENT ORBS
════════════════════════════════ */
.orb {
  display: none;
}

.orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--orb1-color) 0%, transparent 70%);
  top: -150px; left: -150px;
}

.orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--orb2-color) 0%, transparent 70%);
  bottom: 0; right: -100px;
}

.orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, var(--orb3-color) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

/* ── Scanlines ── */
.scanlines {
  display: none;
}

/* ════════════════════════════════
   LAYOUT
════════════════════════════════ */
.container {
  position: relative;
  z-index: 2;
  max-width: 620px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}

/* ════════════════════════════════
   PROFILE HEADER
════════════════════════════════ */
.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.75rem;
  animation: fadeDown 0.7s ease both;
}

/* ── Avatar ── */
.avatar-ring {
  position: relative;
  width: 110px; height: 110px;
  flex-shrink: 0;
}

.avatar-spin {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--gold) 0%,
    transparent 40%,
    var(--cyan) 60%,
    transparent 80%,
    var(--gold) 100%
  );
  animation: spin 6s linear infinite;
  will-change: transform;
}

.avatar {
  position: relative;
  z-index: 1;
  width: 110px; height: 110px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 3px solid var(--bg);
  display: block;
}

.avatar-status {
  position: absolute;
  bottom: 4px; right: 4px;
  width: 20px; height: 20px;
  background: var(--bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.status-dot {
  width: 10px; height: 10px;
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 8px #4ade80;
  animation: pulse-green 2.5s ease-in-out infinite;
}

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 6px #4ade80;  transform: scale(1); }
  50%       { box-shadow: 0 0 14px #4ade80; transform: scale(1.15); }
}

/* ── Profile text ── */
.profile-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.profile-name {
  font-family: var(--font-head);
  font-size: clamp(2.6rem, 10vw, 4rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.02em;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.3em;
}

.name-line         { color: var(--text); }
.name-line.accent  { color: var(--gold); }
.name-ankh         { font-size: 0.6em; color: var(--muted2); opacity: 0.8; }

.profile-handle {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--muted2);
  margin-top: 0.25rem;
}

.profile-bio {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-style: italic;
  color: var(--muted2);
  letter-spacing: 0.01em;
  margin-top: 0.25rem;
}

.profile-studio {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-soft);
  border: 1px solid rgba(207,170,90,0.2);
  padding: 0.45rem 1rem;
  border-radius: 100px;
  margin-top: 0.5rem;
}

.studio-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: blink 2.2s ease-in-out infinite;
}

/* ════════════════════════════════
   LINK CARDS
════════════════════════════════ */
.links-grid {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.link-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  contain: layout style paint;

  opacity: 0;
  transform: translateY(20px);
}

.link-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.link-card:hover {
  border-color: var(--border-h);
  background: var(--surface2);
}

/* Featured */
.link-card--featured {
  border-color: rgba(207,170,90,0.25);
  background: linear-gradient(135deg, var(--surface) 60%, var(--gold-soft));
}

.link-card--featured:hover {
  border-color: rgba(207,170,90,0.6);
}

/* Glow blob */
.link-glow {
  display: none;
}

/* Icon */
.link-icon {
  flex-shrink: 0;
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--gold);
  position: relative;
  z-index: 1;
}

.link-card:hover .link-icon {
  background: var(--gold-soft);
  border-color: rgba(207,170,90,0.4);
}

/* Text body */
.link-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.link-label {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-card:hover .link-label { color: var(--text-strong); }

.link-url {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-card:hover .link-url { color: var(--muted2); }

/* Arrow */
.link-arrow {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.link-card:hover .link-arrow {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-soft);
}

/* ════════════════════════════════
   FOOTER
════════════════════════════════ */
.site-footer {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: fadeUp 0.7s ease 1.2s both;
}

.footer-brand {
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted2);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.footer-mark { color: var(--gold); font-size: 1rem; }

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.4rem;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.08em;
  color: var(--footer-link);
  text-decoration: none;
}

.footer-links a:hover { color: var(--gold); }

/* ════════════════════════════════
   KEYFRAMES
════════════════════════════════ */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

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

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════
   RESPONSIVE
════════════════════════════════ */
@media (max-width: 480px) {
  .container { padding: 2.5rem 1rem 3rem; }

  .profile-name { font-size: clamp(2.2rem, 12vw, 3rem); }

  .link-card { padding: 1rem 1rem; }
  .link-icon { width: 38px; height: 38px; font-size: 1rem; }
  .link-label { font-size: 0.88rem; }
  .link-url   { font-size: 0.62rem; }

  .theme-toggle { top: 0.8rem; right: 0.8rem; width: 38px; height: 38px; }
}

/* ── Reduce motion ── */
@media (prefers-reduced-motion: reduce) {
  .avatar-spin, .orb, .status-dot, .studio-dot { animation: none; }
  .link-card { transition: none; }
  .theme-toggle { transition: none; }
}

/* ════════════════════════════════
   GLOBAL CURSOR & FOCUS OVERRIDE
   (Applies across all HTML pages)
════════════════════════════════ */
html, body, *, *::before, *::after {
  cursor: auto !important;
}

a, a *, button, button *, [role="button"], [role="button"] *, label[for], select, input[type="submit"] {
  cursor: pointer !important;
}

input[type="text"], input[type="email"], input[type="search"], input[type="password"], textarea {
  cursor: text !important;
}

#cursor, [class*="cursor"], [id*="cursor"] {
  display: none !important;
  pointer-events: none !important;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none !important;
  box-shadow: none !important;
}
