/* ============================================================
   GIANDOSABA.DEV — Global Stylesheet
   Tokyo Night Enhanced | Terminal / Hacker Aesthetic
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;700;800&display=swap');

/* ─── CSS Variables ────────────────────────────────────────── */
:root {
  --bg-body:       #0f0f14;
  --bg-terminal:   #1a1b26;
  --bg-card:       #1e1f2e;
  --border-dim:    #414868;
  --text-main:     #a9b1d6;
  --text-muted:    #565f89;
  --text-white:    #c0caf5;
  --azure-blue:    #007FFF;
  --neon-cyan:     #7dcfff;
  --neon-green:    #9ece6a;
  --neon-pink:     #f7768e;
  --neon-purple:   #bb9af7;
  --neon-yellow:   #e0af68;
  --neon-red:      #ff6b6b;

  --glow-blue:     0 0 18px rgba(0,127,255,0.45);
  --glow-cyan:     0 0 18px rgba(125,207,255,0.45);
  --glow-green:    0 0 18px rgba(158,206,106,0.45);
  --glow-pink:     0 0 18px rgba(247,118,142,0.45);
  --glow-purple:   0 0 18px rgba(187,154,247,0.45);
  --glow-yellow:   0 0 18px rgba(224,175,104,0.45);

  --nav-h:         60px;
  --radius:        10px;
  --font:          'JetBrains Mono', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background-color: var(--bg-body);
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ─── CRT Scanline Overlay ─────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
  animation: scanMove 8s linear infinite;
}

/* Subtle vignette */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.55) 100%);
}

@keyframes scanMove {
  0%   { background-position: 0 0; }
  100% { background-position: 0 100px; }
}

/* ─── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font);
  color: var(--text-white);
  font-weight: 800;
  letter-spacing: -0.02em;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

::selection {
  background: rgba(0,127,255,0.3);
  color: var(--text-white);
}

/* ─── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: var(--border-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--azure-blue); }

/* ─── Page Wrapper ─────────────────────────────────────────── */
.page-wrapper {
  padding-top: var(--nav-h);
  min-height: 100vh;
}

/* ─── NAVBAR ───────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  background: rgba(15,15,20,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}

.nav-brand {
  font-size: 1rem;
  font-weight: 800;
  color: var(--azure-blue);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-brand span { color: var(--text-muted); font-weight: 400; }

.nav-links {
  display: flex;
  gap: 6px;
  align-items: center;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 5px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.nav-links a .nav-prefix { color: var(--text-muted); font-weight: 300; }

.nav-links a:hover {
  color: var(--neon-cyan);
  background: rgba(125,207,255,0.07);
}

.nav-links a:hover .nav-prefix { color: var(--neon-cyan); }

.nav-links a.active {
  color: var(--azure-blue);
  background: rgba(0,127,255,0.1);
  border: 1px solid rgba(0,127,255,0.25);
}

.nav-links a.active .nav-prefix { color: var(--azure-blue); }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: rgba(15,15,20,0.97);
  border-bottom: 1px solid var(--border-dim);
  padding: 16px 24px;
  z-index: 999;
  flex-direction: column;
  gap: 4px;
}

.nav-mobile.open { display: flex; }

.nav-mobile a {
  display: block;
  padding: 10px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: 5px;
  transition: color 0.2s, background 0.2s;
}

.nav-mobile a:hover { color: var(--neon-cyan); background: rgba(125,207,255,0.07); }
.nav-mobile a.active { color: var(--azure-blue); background: rgba(0,127,255,0.1); }

/* ─── Terminal Box (shared card base) ─────────────────────── */
.terminal-box {
  background: var(--bg-terminal);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px rgba(0,127,255,0.06), 0 4px 32px rgba(0,0,0,0.5);
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border-dim);
}

.terminal-dots span {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
}

.terminal-dots span:nth-child(1) { background: #ff5f57; }
.terminal-dots span:nth-child(2) { background: #ffbd2e; }
.terminal-dots span:nth-child(3) { background: #28c840; }

.terminal-title {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-left: auto;
}

.terminal-body { padding: 24px; }

/* ─── CLI Prompt Decoration ────────────────────────────────── */
.cli-prompt {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.cli-prompt .cli-user  { color: var(--neon-green); font-weight: 700; }
.cli-prompt .cli-at    { color: var(--text-muted); }
.cli-prompt .cli-host  { color: var(--azure-blue); font-weight: 700; }
.cli-prompt .cli-path  { color: var(--neon-cyan); }
.cli-prompt .cli-dollar{ color: var(--text-muted); margin: 0 6px; }
.cli-prompt .cli-cmd   { color: var(--text-white); }

/* ─── Blinking Cursor ──────────────────────────────────────── */
.cursor {
  display: inline-block;
  color: var(--azure-blue);
  animation: blink 1s step-end infinite;
  font-weight: 400;
}

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

/* ─── Section Layout Helpers ───────────────────────────────── */
.section-header {
  margin-bottom: 40px;
}

.section-header .section-cmd {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.section-header h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--text-white);
}

.section-header h2 .accent { color: var(--azure-blue); }

.section-header p {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.83rem;
}

.section-divider {
  border: none;
  border-top: 1px solid var(--border-dim);
  margin: 48px 0;
}

/* ─── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: box-shadow 0.25s, transform 0.2s, background 0.2s;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  position: relative;
  border: none;
  outline: none;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}

.btn-primary {
  background: var(--azure-blue);
  color: #fff;
}

.btn-primary:hover {
  box-shadow: var(--glow-blue);
  transform: translateY(-3px);
  background: #1a8fff;
}

.btn-outline {
  background: transparent;
  color: var(--neon-cyan);
  border: 1px solid var(--neon-cyan);
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}

.btn-outline:hover {
  box-shadow: var(--glow-cyan);
  transform: translateY(-3px);
  background: rgba(125,207,255,0.08);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.72rem;
}

.btn:disabled, .btn[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ─── Tech Tag Pills ───────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  background: #292e42;
  color: var(--neon-cyan);
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  border: 1px solid rgba(125,207,255,0.12);
}

.tag.green   { color: var(--neon-green);  background: rgba(158,206,106,0.08); border-color: rgba(158,206,106,0.2);  }
.tag.blue    { color: var(--azure-blue);  background: rgba(0,127,255,0.08);   border-color: rgba(0,127,255,0.2);    }
.tag.pink    { color: var(--neon-pink);   background: rgba(247,118,142,0.08); border-color: rgba(247,118,142,0.2);  }
.tag.purple  { color: var(--neon-purple); background: rgba(187,154,247,0.08); border-color: rgba(187,154,247,0.2);  }
.tag.yellow  { color: var(--neon-yellow); background: rgba(224,175,104,0.08); border-color: rgba(224,175,104,0.2);  }
.tag.red     { color: var(--neon-red);    background: rgba(255,107,107,0.08); border-color: rgba(255,107,107,0.2);  }

/* ─── Status Badges ────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
}

.badge-production {
  color: var(--neon-green);
  background: rgba(158,206,106,0.12);
  border: 1px solid rgba(158,206,106,0.3);
}
.badge-production::before { background: var(--neon-green); box-shadow: 0 0 6px var(--neon-green); }

.badge-wip {
  color: var(--neon-yellow);
  background: rgba(224,175,104,0.12);
  border: 1px solid rgba(224,175,104,0.3);
}
.badge-wip::before {
  background: var(--neon-yellow);
  animation: blink 1.2s step-end infinite;
}

.badge-archived {
  color: var(--text-muted);
  background: rgba(86,95,137,0.12);
  border: 1px solid rgba(86,95,137,0.3);
}
.badge-archived::before { background: var(--text-muted); }

/* ─── Page Animations ──────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes glitch {
  0%   { clip-path: inset(40% 0 61% 0); transform: translate(-2px, 0); }
  20%  { clip-path: inset(92% 0 1% 0);  transform: translate(2px, 0); }
  40%  { clip-path: inset(43% 0 1% 0);  transform: translate(-1px, 0); }
  60%  { clip-path: inset(25% 0 58% 0); transform: translate(1px, 0); }
  80%  { clip-path: inset(54% 0 7% 0);  transform: translate(-2px, 0); }
  100% { clip-path: inset(58% 0 43% 0); transform: translate(2px, 0); }
}

.anim-1  { animation: fadeInUp 0.5s ease both; animation-delay: 0.05s; }
.anim-2  { animation: fadeInUp 0.5s ease both; animation-delay: 0.15s; }
.anim-3  { animation: fadeInUp 0.5s ease both; animation-delay: 0.25s; }
.anim-4  { animation: fadeInUp 0.5s ease both; animation-delay: 0.35s; }
.anim-5  { animation: fadeInUp 0.5s ease both; animation-delay: 0.45s; }
.anim-6  { animation: fadeInUp 0.5s ease both; animation-delay: 0.55s; }
.anim-7  { animation: fadeInUp 0.5s ease both; animation-delay: 0.65s; }
.anim-8  { animation: fadeInUp 0.5s ease both; animation-delay: 0.75s; }

/* ─── Footer ───────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border-dim);
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 80px;
}

.site-footer .footer-left {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.site-footer .footer-left span { color: var(--azure-blue); }

.site-footer .footer-right {
  display: flex;
  gap: 16px;
}

.site-footer .footer-right a {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.site-footer .footer-right a:hover { color: var(--neon-cyan); }

/* ─── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    margin-top: 48px;
  }
}
