:root {
  --bg: #07090a;
  --bg-panel: #121712;
  --bg-panel-raised: #171d17;
  --border: #2c3a26;
  --border-soft: #1a231a;
  --green: #3fe066;
  --green-dim: #1f9e40;
  --green-glow: rgba(63, 224, 102, 0.35);
  --text: #eaf5ea;
  --text-dim: #a2b6a3;
  --text-faint: #647466;
  --danger: #ff5c45;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  font-family: 'Oswald', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
}

#space {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.grain {
  position: fixed;
  inset: -200px;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(3, 4, 3, 0.6) 100%);
}

/* Secret unlock trigger — visually just part of the ambient glow */

.secret-orb {
  position: fixed;
  top: -6vw;
  left: -6vw;
  width: 26vw;
  height: 26vw;
  min-width: 200px;
  min-height: 200px;
  max-width: 340px;
  max-height: 340px;
  border-radius: 50%;
  z-index: 5;
}

/* Profile / link-in-bio page */

.profile {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 60px 24px;
  z-index: 2;
}

.avatar {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  box-shadow: 0 0 0 6px rgba(63, 224, 102, 0.06), 0 12px 40px rgba(0, 0, 0, 0.5);
}

.profile-name {
  margin: 0;
  font-weight: 600;
  font-size: 26px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
}

.link-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(360px, 88vw);
  margin-top: 8px;
}

.link-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.link-btn:hover {
  border-color: var(--brand, var(--green));
  background: var(--bg-panel-raised);
  transform: translateY(-2px);
}

.link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--brand, var(--green));
  flex-shrink: 0;
}

.link-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.link-name {
  text-transform: uppercase;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #ff5c45;
  border: 1px solid rgba(255, 92, 69, 0.4);
  border-radius: 20px;
  flex-shrink: 0;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff5c45;
  animation: live-pulse 1.4s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* Gate / unlock panel */

.panel,
.unlock-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 36px 42px;
  width: min(340px, 86vw);
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.panel:focus-within,
.unlock-panel:focus-within {
  border-color: var(--green-dim);
}

#password,
#unlock-password {
  width: 100%;
  text-align: center;
  padding: 10px 4px;
  font-family: inherit;
  font-size: 17px;
  letter-spacing: 0.28em;
  color: var(--text);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  outline: none;
  transition: border-color 0.25s ease;
}

#password::placeholder,
#unlock-password::placeholder {
  letter-spacing: normal;
  color: var(--text-faint);
}

#password:focus,
#unlock-password:focus {
  border-color: var(--green);
}

.panel button,
.unlock-panel button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.2s ease, gap 0.2s ease;
}

.panel button:hover,
.unlock-panel button:hover {
  color: var(--green);
  gap: 10px;
}

.panel button:active,
.unlock-panel button:active {
  transform: scale(0.98);
}

.gate-message {
  height: 12px;
  margin: -4px 0 0;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--danger);
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gate-message.show {
  opacity: 1;
}

.gate-message.granted {
  color: var(--green);
}

.panel.shake,
.unlock-panel.shake {
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

/* 404 */

.notfound {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  z-index: 2;
}

.notfound-code {
  margin: 0;
  font-size: 64px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--green);
}

.notfound-message {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--text-dim);
}

.notfound-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s ease, gap 0.2s ease;
}

.notfound-link:hover {
  color: var(--green);
  gap: 10px;
}

/* Dashboard */

.back-link {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s ease, gap 0.2s ease;
}

.back-link:hover {
  color: var(--green);
  gap: 10px;
}

.dashboard {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 96px 24px 60px;
}

.dashboard-header {
  width: min(880px, 100%);
  margin-bottom: 48px;
}

.dashboard-title {
  margin: 0;
  font-weight: 600;
  font-size: 28px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.dashboard-sub {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text-dim);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
  width: min(880px, 100%);
}

.project-card {
  --accent: 63, 224, 102;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 12px;
  padding: 24px;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.15s ease;
}

.project-card:hover {
  border-color: rgba(var(--accent), 0.55);
  background: var(--bg-panel-raised);
  transform: translateY(-2px);
}

.project-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 18px;
  border-radius: 10px;
  background: rgba(var(--accent), 0.14);
}

.project-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.project-tagline {
  margin-top: -6px;
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.55;
}

.click-stats {
  width: min(880px, 100%);
  margin-top: 40px;
}

.click-stats-title {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.click-stats-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.click-stats-list span {
  padding: 8px 14px;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--text-dim);
}

.click-stats-list strong {
  color: var(--green);
  margin-left: 6px;
}

.project-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.03em;
}

/* Modal */

.modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 4, 3, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-panel {
  --accent: 63, 224, 102;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  width: min(360px, 86vw);
  padding: 40px 34px;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.25s ease;
}

.unlock-panel {
  align-items: center;
}

#unlock-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.modal-overlay.open .modal-panel {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text);
}

.modal-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 20px;
  border-radius: 12px;
  background: rgba(var(--accent), 0.16);
}

.modal-title {
  margin: 0;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text);
}

.modal-tagline {
  margin: -6px 0 6px;
  font-size: 13px;
  text-align: left;
  color: var(--text-dim);
  line-height: 1.55;
}

.modal-links {
  display: flex;
  gap: 10px;
  width: 100%;
}

.modal-link {
  flex: 1;
  text-align: center;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.modal-link:hover {
  border-color: var(--text-dim);
  background: var(--bg-panel-raised);
}

.modal-link.primary {
  background: rgba(var(--accent), 0.9);
  border-color: rgba(var(--accent), 0.9);
  color: #04150a;
}

.modal-link.primary:hover {
  background: rgb(var(--accent));
  border-color: rgb(var(--accent));
}
