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

:root {
  --bg:           #080006;
  --accent:       #FF2D6B;
  --accent-hover: #FF6690;
  --dim:          rgba(255, 45, 107, 0.3);
  --dimmer:       rgba(255, 45, 107, 0.1);
  --text-dim:     rgba(255, 45, 107, 0.45);
  --font:         'JetBrains Mono', 'Courier New', monospace;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  background: var(--bg);
  color: var(--accent);
  font-family: var(--font);
  font-size: 14px;
  min-height: 100vh;
}

/* Scanlines — fixed overlay, always on top */
#scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.08) 3px,
    rgba(0, 0, 0, 0.08) 4px
  );
  pointer-events: none;
  z-index: 900;
  transition: opacity 0.4s;
}

/* Vignette — darkens edges */
#vignette {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
  z-index: 899;
  transition: opacity 0.4s;
}

/* Scroll mode: dial back the effects */
body.scroll-mode #scanlines { opacity: 0.35; }
body.scroll-mode #vignette  { opacity: 0; }

/* Animations */
@keyframes blink   { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes appear  { to { opacity: 1; } }

/* ══════════════════════════════
   MODE TOGGLE BUTTON
══════════════════════════════ */
.mode-btn {
  background: transparent;
  border: 1px solid var(--dim);
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.mode-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--dimmer);
}

/* Fixed position in terminal mode */
#toggle-terminal {
  position: fixed;
  top: 16px;
  right: 20px;
  z-index: 800;
}
body.scroll-mode #toggle-terminal { display: none; }

/* Toggle inside nav in scroll mode */
#toggle-nav { display: none; }
body.scroll-mode #toggle-nav { display: inline-block; }

/* ══════════════════════════════
   TERMINAL MODE
══════════════════════════════ */
#terminal-mode {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
}
body.scroll-mode #terminal-mode { display: none; }

.terminal {
  width: 100%;
  max-width: 660px;
}

/* Boot sequence lines */
.boot-line {
  font-size: 13px;
  color: var(--accent);
  opacity: 0;
  animation: appear 0.05s forwards;
  line-height: 1.8;
}

.boot-progress {
  height: 2px;
  background: var(--dimmer);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 10px;
  opacity: 0;
}
.boot-progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  box-shadow: 0 0 8px var(--accent);
  transition: width 0.04s linear;
}

/* Terminal header */
.t-header {
  border-bottom: 1px solid var(--dim);
  padding-bottom: 14px;
  margin-bottom: 18px;
}
.t-logo {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-shadow: 0 0 24px rgba(255, 45, 107, 0.35);
}
.t-tagline {
  font-size: 11px;
  opacity: 0.4;
  margin-top: 4px;
  letter-spacing: 0.06em;
}

/* Output area */
.t-output {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 180px;
  margin-bottom: 16px;
}
.t-out         { font-size: 12px; line-height: 1.75; color: var(--accent); }
.t-out.dim     { opacity: 0.38; }
.t-out.divider { opacity: 0.18; letter-spacing: 0.03em; }

/* Back button */
.t-back {
  display: none;
  font-family: var(--font);
  font-size: 11px;
  color: var(--text-dim);
  background: none;
  border: none;
  cursor: pointer;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  transition: color 0.15s;
}
.t-back:hover { color: var(--accent); }
.t-back.visible { display: block; }

/* Command suggestion buttons */
.cmd-btn {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 5px 12px;
  border: 1px solid var(--dim);
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
  margin: 3px 0;
  color: var(--accent);
  background: transparent;
  font-family: var(--font);
  letter-spacing: 0.04em;
  transition: background 0.12s, border-color 0.12s;
  width: fit-content;
}
.cmd-btn:hover { background: var(--dimmer); border-color: var(--accent-hover); }
.cmd-name { font-weight: 700; }
.cmd-desc { opacity: 0.38; font-size: 10px; }

/* Project card in terminal output */
.t-proj-card {
  border: 1px solid var(--dim);
  border-left: 3px solid var(--accent);
  padding: 11px 14px;
  border-radius: 0 4px 4px 0;
  margin: 8px 0;
  background: var(--dimmer);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.t-proj-card:hover { background: rgba(255, 45, 107, 0.15); }
.t-proj-name { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; }
.t-proj-hint { font-size: 9px; opacity: 0.3; font-weight: 400; margin-left: 8px; }
.t-proj-desc { font-size: 10px; opacity: 0.45; margin-top: 3px; }
.t-proj-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-top: 7px;
  padding: 2px 8px;
  border: 1px solid var(--dim);
  border-radius: 2px;
}

/* Prompt row */
.t-prompt-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--dim);
  padding-top: 13px;
}
.t-prompt-lbl { font-size: 11px; opacity: 0.4; white-space: nowrap; }
.t-prompt-inp {
  background: transparent;
  border: none;
  color: var(--accent);
  font-family: var(--font);
  font-size: 12px;
  flex: 1;
  outline: none;
  caret-color: var(--accent);
}
.t-cursor {
  width: 7px;
  height: 14px;
  background: var(--accent);
  animation: blink 1s step-end infinite;
  box-shadow: 0 0 5px var(--accent);
  flex-shrink: 0;
}

/* ══════════════════════════════
   SCROLL MODE
══════════════════════════════ */
#scroll-mode { display: none; }
body.scroll-mode #scroll-mode { display: block; }

/* Nav */
.s-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 48px;
  background: rgba(8, 0, 6, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--dim);
}
.s-nav-logo {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2em;
}
.s-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.s-nav-links a {
  font-size: 11px;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.15s;
}
.s-nav-links a:hover { color: var(--accent); }

/* Sections */
.s-section {
  max-width: 760px;
  margin: 0 auto;
  padding: 80px 48px;
}
#hero { padding-top: 130px; }

.s-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  opacity: 0.3;
  margin-bottom: 18px;
}

.s-h {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.15;
}
.s-h span { opacity: 0.28; }

.s-h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.25;
}

.s-p {
  font-size: 13px;
  line-height: 1.9;
  opacity: 0.5;
  margin-top: 18px;
  max-width: 520px;
}

/* Horizontal rule between sections */
.s-rule {
  height: 1px;
  background: var(--dim);
  max-width: 760px;
  margin: 0 auto 0 48px;
}

/* Project card */
.s-proj-card {
  border: 1px solid var(--dim);
  border-radius: 6px;
  padding: 20px 24px;
  margin-top: 20px;
  background: var(--dimmer);
  transition: border-color 0.15s, background 0.15s;
}
.s-proj-card:hover {
  border-color: rgba(255, 45, 107, 0.5);
  background: rgba(255, 45, 107, 0.08);
}
.s-proj-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.s-proj-desc {
  font-size: 11px;
  opacity: 0.45;
  margin-top: 5px;
  line-height: 1.7;
}
.s-proj-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}
.s-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border: 1px solid var(--dim);
  border-radius: 2px;
}
.s-proj-link {
  font-size: 10px;
  opacity: 0.35;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.15s;
}
.s-proj-link:hover { opacity: 0.8; }
.s-more {
  font-size: 10px;
  opacity: 0.2;
  margin-top: 16px;
  letter-spacing: 0.06em;
}

/* Contact */
.s-contact-item {
  display: flex;
  gap: 16px;
  font-size: 12px;
  margin-top: 14px;
}
.s-contact-key {
  opacity: 0.3;
  min-width: 70px;
}
.s-contact-val {
  opacity: 0.7;
  color: var(--accent);
  text-decoration: none;
}
.s-contact-val:hover { opacity: 1; }

/* Footer */
.s-footer {
  padding: 24px 48px;
  border-top: 1px solid var(--dim);
  font-size: 10px;
  color: rgba(255, 45, 107, 0.25);
  letter-spacing: 0.06em;
  max-width: 760px;
  margin: 0 auto;
}
.s-footer-link {
  color: rgba(255, 45, 107, 0.25);
  text-decoration: none;
  transition: color 0.15s;
}
.s-footer-link:hover { color: var(--accent); }

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width: 600px) {
  /* Terminal mode: tighten padding */
  #terminal-mode { padding: 24px 16px; }
  .t-logo { font-size: 20px; }

  /* Scroll mode: tighten padding */
  .s-nav { padding: 12px 20px; }
  .s-nav-links { gap: 16px; }
  .s-section { padding: 60px 20px; }
  #hero { padding-top: 90px; }
  .s-rule { margin: 0 20px; }
  .s-h { font-size: 26px; }
  .s-footer { padding: 20px; }

  /* Privacy page */
  .privacy-wrap { padding: 48px 20px; }
}
