/* ============================================================
   MGR Design — sci-fi theme
   Palette: black #000 · steel #7D838C · lime #C8E94A
            magenta #E83AF0 · indigo #2C1191
   ============================================================ */
@font-face {
  font-family: 'Glitch';
  src: url('/resources/Glitch-Demo.ttf') format('truetype');
  font-display: swap;
}

:root {
  --black: #05060a;
  --panel: #0b0d16;
  --steel: #7d838c;
  --lime: #c8e94a;
  --magenta: #e83af0;
  --indigo: #2c1191;
  --indigo-bright: #4a24d6;
  --text: #e9ecf2;
  --muted: #8b93a4;
  --line: rgba(200, 233, 74, 0.18);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--black);
  color: var(--text);
  font-family: 'Rajdhani', 'Segoe UI', system-ui, sans-serif;
  min-height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Scanline / grid backdrop */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(transparent 95%, rgba(200, 233, 74, 0.04) 100%),
    linear-gradient(90deg, transparent 95%, rgba(232, 58, 240, 0.03) 100%),
    radial-gradient(circle at 20% -10%, rgba(44, 17, 145, 0.55), transparent 45%),
    radial-gradient(circle at 90% 110%, rgba(232, 58, 240, 0.15), transparent 40%);
  background-size: 100% 3px, 3px 100%, 100% 100%, 100% 100%;
}

.glitch-font { font-family: 'Glitch', monospace; }

/* ---------- Top nav ---------- */
.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #000;
  padding: 14px 26px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-logo {
  display: block;
  height: 30px;
  width: 150px;
  background: var(--lime);
  -webkit-mask: url('/resources/Logo.png') no-repeat left center / contain;
  mask: url('/resources/Logo.png') no-repeat left center / contain;
  transition: background .15s;
}
.brand:hover .brand-logo { background: var(--magenta); }
.nav-tabs { display: flex; gap: 16px; }
.nav-tab {
  font-family: 'Glitch', monospace;
  font-size: 19px;
  letter-spacing: 1px;
  color: #0a0a0a;
  background: var(--lime);
  text-decoration: none;
  padding: 8px 22px 9px;
  /* notched sci-fi tab shape */
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  transition: background .15s, color .15s, transform .15s;
}
.nav-tab:hover { background: var(--magenta); color: #fff; transform: translateY(-1px); }
.nav-tab.active { background: var(--magenta); color: #fff; }

/* ---------- Layout shell ---------- */
.page { position: relative; z-index: 10; flex: 1 0 auto; }

.footer {
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  border-top: 1px solid var(--line);
  padding: 18px 26px;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.footer a { color: var(--lime); text-decoration: none; }
.footer a:hover { color: var(--magenta); }

/* ---------- Portfolio 3D stage ---------- */
#stage {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: block;
  cursor: grab;
}
.stage-hint {
  position: fixed;
  left: 50%;
  bottom: 70px;
  transform: translateX(-50%);
  z-index: 15;
  color: var(--steel);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  pointer-events: none;
  animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: .35; } 50% { opacity: .9; } }

/* Card detail overlay */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(3, 4, 8, 0.82);
  backdrop-filter: blur(6px);
}
.overlay.open { display: flex; }
.overlay-card {
  position: relative;
  width: min(560px, 92vw);
  background: linear-gradient(160deg, var(--panel), #05060c);
  border: 1px solid var(--lime);
  box-shadow: 0 0 0 1px rgba(232,58,240,.25), 0 30px 80px rgba(0,0,0,.7);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
  padding: 26px 28px 30px;
}
.overlay-card h2 { font-family: 'Glitch', monospace; color: var(--lime); margin: 0 0 4px; letter-spacing: 1px; }
.overlay-card .sub { color: var(--magenta); font-size: 13px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 16px; }
.overlay-card img { width: 100%; border: 1px solid var(--line); margin-bottom: 16px; display: block; }
.overlay-card p { color: var(--text); line-height: 1.6; }
.overlay-card .go {
  display: inline-block; margin-top: 14px;
  font-family: 'Glitch', monospace; letter-spacing: 1px;
  color: #000; background: var(--lime); padding: 8px 18px; text-decoration: none;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}
.overlay-card .go:hover { background: var(--magenta); color: #fff; }
.overlay-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; color: var(--steel);
  font-size: 26px; cursor: pointer; line-height: 1;
}
.overlay-close:hover { color: var(--magenta); }

/* ---------- Content pages ---------- */
.container { max-width: 980px; margin: 0 auto; padding: 60px 26px 80px; }
.eyebrow {
  color: var(--magenta); font-size: 13px; letter-spacing: 5px;
  text-transform: uppercase; margin-bottom: 10px;
}
.title-xl {
  font-family: 'Glitch', monospace; font-size: clamp(40px, 7vw, 84px);
  color: var(--lime); line-height: .95; margin: 0 0 24px; letter-spacing: 2px;
}
.lead { font-size: 19px; line-height: 1.7; color: var(--text); max-width: 720px; }
.muted { color: var(--muted); }

.hr { height: 1px; background: var(--line); margin: 40px 0; border: 0; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; margin-top: 34px; }
.info-card {
  background: linear-gradient(160deg, var(--panel), #05060c);
  border: 1px solid var(--line);
  padding: 22px 24px;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}
.info-card h3 { font-family: 'Glitch', monospace; color: var(--lime); margin: 0 0 8px; letter-spacing: 1px; font-size: 20px; }
.info-card p, .info-card a { color: var(--text); text-decoration: none; }
.info-card a:hover { color: var(--magenta); }

.contact-row { display: flex; gap: 14px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); }
.contact-row .label { min-width: 92px; color: var(--steel); font-size: 12px; letter-spacing: 3px; text-transform: uppercase; }
.contact-row .val { font-size: 20px; }
.contact-row .val a { color: var(--lime); text-decoration: none; }
.contact-row .val a:hover { color: var(--magenta); }

.tag {
  display: inline-block; font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--lime); border: 1px solid var(--line); padding: 4px 10px; margin: 4px 6px 0 0;
}

@media (max-width: 640px) {
  .brand .brand-text { font-size: 20px; }
  .nav-tab { font-size: 15px; padding: 7px 14px; }
  .nav-tabs { gap: 8px; }
}
