*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --accent1: #D0DA7B;
  --accent2: #47C1E9;
  --nge-red: #CC3333;
  --bg: #000000;
  --card-scale: 1.5;
  --card-width: calc(440px * var(--card-scale));
}

body {
  background: var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: safe center;
  justify-content: center;
  padding: 40px 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-y: auto;
  position: relative;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url('media/os-logo-color.png');
  background-repeat: repeat;
  background-size: 60px auto;
  animation: scroll-bg 25s linear infinite;
  opacity: 0.25;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: rgba(15, 15, 18, 0.75);
}

@keyframes scroll-bg {
  from { background-position: 0 0; }
  to   { background-position: 120px 120px; }
}

.card-scene {
  position: relative;
  z-index: 2;
  perspective: 1000px;
  perspective-origin: center;
  border-radius: 24px;
}

.card-wrapper {
  width: min(var(--card-width), 88vw);
  aspect-ratio: 17 / 11;
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  transform-style: preserve-3d;
  cursor: default;
  box-shadow:
    0 2px 30px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 0 50px rgba(71, 193, 233, 0.04),
    0 0 25px rgba(208, 218, 123, 0.03);
}

.card-shimmer {
  position: absolute;
  top: -50%;
  left: -50%;
  z-index: 0;
  height: 200%;
  width: 200%;
  transform: rotate(-45deg);
  overflow: hidden;
  background: linear-gradient(
    to right,
    transparent 20%,
    var(--accent1) 45%,
    var(--accent2) 55%,
    transparent 80%
  );
  background-size: 200% auto;
  animation: shimmer 4s linear infinite;
  animation-delay: 0.5s;
}

@keyframes shimmer {
  to {
    background-position: 200% center;
  }
}

.card {
  position: absolute;
  inset: 1px;
  padding: calc(40px * var(--card-scale));
  background: #101016;
  border-radius: inherit;
  overflow: hidden;
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    160deg,
    rgba(71, 193, 233, 0.04) 0%,
    transparent 35%,
    transparent 65%,
    rgba(208, 218, 123, 0.04) 100%
  );
  pointer-events: none;
  z-index: 0;
}

.card-glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at var(--glare-x, 50%) var(--glare-y, 50%),
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.04) 25%,
    transparent 50%
  );
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.card-wrapper:hover .card-glare {
  opacity: 1;
}

.card-content {
  position: relative;
  z-index: 2;
}

.card-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: calc(24px * var(--card-scale));
}

.card-header-text {
  flex: 1;
  min-width: 0;
}

.card-avatar {
  width: calc(110px * var(--card-scale));
  height: calc(110px * var(--card-scale));
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 20px rgba(71, 193, 233, 0.08);
}

.card-name {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #f0f0f0;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
  line-height: 1.2;
}

.card-title {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 2px;
  letter-spacing: 0.02em;
}

.card-company {
  font-size: clamp(0.8rem, 2vw, 0.95rem);
  color: #7a7a7a;
  font-weight: 400;
  margin-bottom: calc(16px * var(--card-scale));
  letter-spacing: 0.02em;
}

.card-contact {
  display: grid;
  grid-template-columns: 1fr;
  gap: calc(8px * var(--card-scale));
  margin-top: calc(12px * var(--card-scale));
}

.card-divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(208, 218, 123, 0.35) 20%,
    rgba(71, 193, 233, 0.35) 80%,
    transparent 100%
  );
  margin-bottom: calc(24px * var(--card-scale));
}

.card-fields {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-field {
  display: flex;
  align-items: baseline;
  font-size: calc(0.65rem * var(--card-scale));
}

.field-label {
  font-size: calc(0.65rem * var(--card-scale));
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  min-width: calc(20px * var(--card-scale));
  padding-top: 1px;
}

.field-label i {
  vertical-align: middle;
}

.card-field a i {
  margin-right: 6px;
  font-size: 0.85em;
  color: #888;
}

.field-value {
  color: #bbb;
}

.card-field a {
  color: #bbb;
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.3s ease;
}

.card-field a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-field a:hover {
  color: #fff;
}

.card-field a:hover::before {
  transform: scaleX(1);
}

/* ── NGE Page Marquee ── */
.page-marquee {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  overflow: hidden;
  white-space: nowrap;
  background: #1a1012;
  border-top: 1px solid rgba(204, 51, 51, 0.45);
  border-bottom: 1px solid rgba(204, 51, 51, 0.35);
  padding: calc(10px + env(safe-area-inset-top, 0px)) 0 11px;
  pointer-events: none;
  user-select: none;
}

.page-marquee__track {
  display: inline-block;
  animation: marquee-scroll 90s linear infinite;
  white-space: nowrap;
}

.page-marquee__content {
  font-family: 'Courier New', 'Consolas', 'Liberation Mono', monospace;
  font-size: 1.15rem;
  font-weight: 700;
  color: #f8f8f8;
  letter-spacing: 0.1em;
  text-shadow:
    0 0 4px rgba(204, 51, 51, 0.4),
    0 0 8px rgba(204, 51, 51, 0.15);
}

.page-marquee__sep {
  color: var(--nge-red);
  margin: 0 0.4em;
  text-shadow:
    0 0 6px rgba(204, 51, 51, 0.6),
    0 0 12px rgba(204, 51, 51, 0.3);
}

@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (max-width: 640px) {
  :root {
    --card-scale: 1;
  }

  .card-wrapper {
    aspect-ratio: 11 / 17;
  }

  .card {
    padding: calc(24px * var(--card-scale));
  }

  .card-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: calc(14px * var(--card-scale));
    margin-bottom: calc(24px * var(--card-scale));
  }

  .card-header-text {
    order: 2;
  }

  .card-avatar {
    order: 1;
    width: 140px;
    height: 140px;
  }

  .card-contact {
    justify-items: center;
  }

  .card-fields {
    flex-direction: column;
    gap: calc(12px * var(--card-scale));
  }

  .card-divider {
    margin-bottom: calc(24px * var(--card-scale));
  }

  .card-name {
    font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  }

  .card-title {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
  }

  .card-company {
    font-size: clamp(0.9rem, 2.5vw, 1.05rem);
  }

  .card-field {
    font-size: 0.85rem;
  }

  .field-label {
    font-size: 0.75rem;
  }

  .page-marquee {
    padding: calc(6px + env(safe-area-inset-top, 0px)) 0 7px;
  }

  .page-marquee__track {
    animation: marquee-scroll 90s linear infinite;
  }

  .page-marquee__content {
    font-size: 1rem;
  }
}

@media (hover: none) and (pointer: coarse) {
  .card-glare { opacity: 0 !important; }
}

.scroll-indicator {
  position: fixed;
  bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  color: var(--accent2, #47C1E9);
  font-size: 1.4rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  animation: bounce 2s ease-in-out infinite;
}

.scroll-indicator.visible {
  opacity: 0.7;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

@media (max-width: 640px) {
  .scroll-indicator { bottom: calc(32px + env(safe-area-inset-bottom, 0px)); font-size: 1.2rem; }
}

.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.2);
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.65));
  padding: 24px 20px calc(10px + env(safe-area-inset-bottom, 0px));
}
