/* =============================================
   PORTFOLIO BTS SIO SISR — STYLE GLOBAL
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&family=Space+Mono:wght@400;700&display=swap');

/* ─── VARIABLES ─── */
:root {
  --bg-deep:    #0a0a0f;
  --bg-card:    #0f0f1a;
  --bg-hover:   #151525;
  --cyan:       #00d4ff;
  --violet:     #7b2fff;
  --pink:       #ff2d78;
  --green:      #00ff9d;
  --text:       #e8e8f0;
  --text-muted: #6b6b8a;
  --border:     rgba(0, 212, 255, 0.12);
  --border-hot: rgba(0, 212, 255, 0.35);
  --glow-cyan:  0 0 20px rgba(0, 212, 255, 0.25), 0 0 60px rgba(0, 212, 255, 0.08);
  --glow-violet: 0 0 20px rgba(123, 47, 255, 0.3);
  --nav-w:      72px;
  --radius:     12px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-deep);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--violet); border-radius: 2px; }

/* ─── HEX GRID BACKGROUND ─── */
.hex-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(123,47,255,0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0,212,255,0.05) 0%, transparent 45%);
  overflow: hidden;
}
.hex-bg::before {
  content: '';
  position: absolute; inset: -10%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='70'%3E%3Cpolygon points='30,2 58,17 58,53 30,68 2,53 2,17' fill='none' stroke='rgba(0,212,255,0.04)' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 60px 70px;
  animation: hexDrift 25s linear infinite;
}
.hex-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,212,255,0.012) 2px,
    rgba(0,212,255,0.012) 4px
  );
  pointer-events: none;
}
@keyframes hexDrift {
  from { transform: translate(0,0); }
  to   { transform: translate(60px, 70px); }
}

/* ─── SIDEBAR NAV ─── */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: var(--nav-w);
  background: rgba(10,10,15,0.95);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center;
  padding: 20px 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.sidebar-logo {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Mono', monospace;
  font-size: 13px; font-weight: 700;
  color: #fff;
  margin-bottom: 28px;
  box-shadow: var(--glow-cyan);
  cursor: pointer;
  transition: transform var(--transition);
}
.sidebar-logo:hover { transform: scale(1.08) rotate(3deg); }

.nav-links {
  display: flex; flex-direction: column; gap: 6px;
  list-style: none; flex: 1; width: 100%;
  padding: 0 8px;
}

.nav-links li a {
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 4px; border-radius: 10px;
  color: var(--text-muted); font-size: 9px; font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase; gap: 4px;
  transition: all var(--transition); cursor: pointer; text-decoration: none;
  position: relative;
}
.nav-links li a svg { width: 20px; height: 20px; stroke: currentColor; }
.nav-links li a:hover, .nav-links li a.active {
  color: var(--cyan); background: rgba(0,212,255,0.08);
}
.nav-links li a.active::before {
  content: '';
  position: absolute; left: -8px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%; background: var(--cyan);
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px var(--cyan);
}

.sidebar-footer {
  padding: 0 8px; width: 100%;
}
.sidebar-status {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 10px 0;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(0.85); }
}
.status-label { font-size: 8px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* ─── MAIN LAYOUT ─── */
.main-wrap {
  margin-left: var(--nav-w);
  min-height: 100vh;
  position: relative; z-index: 1;
}

/* ─── PAGE SECTIONS ─── */
.page-section {
  display: none; min-height: 100vh;
  padding: 48px 48px 80px;
  animation: fadeIn 0.4s ease;
}
.page-section.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── PAGE HEADER ─── */
.page-header {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.page-eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 11px; color: var(--cyan);
  letter-spacing: 0.2em; text-transform: uppercase;
  margin-bottom: 8px;
}
.page-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700; line-height: 1.1;
  background: linear-gradient(135deg, var(--text) 0%, var(--cyan) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-meta {
  font-size: 12px; color: var(--text-muted);
  font-family: 'Space Mono', monospace;
  text-align: right;
}

/* ─── CARDS ─── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all var(--transition);
}
.card:hover {
  border-color: var(--border-hot);
  transform: translateY(-2px);
  box-shadow: var(--glow-cyan);
}

/* ─── GRID LAYOUTS ─── */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }

/* ─── BADGE / TAG ─── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 500;
  font-family: 'Space Mono', monospace;
}
.badge-cyan  { background: rgba(0,212,255,0.1);  color: var(--cyan);   border: 1px solid rgba(0,212,255,0.25); }
.badge-violet{ background: rgba(123,47,255,0.1); color: var(--violet); border: 1px solid rgba(123,47,255,0.25); }
.badge-pink  { background: rgba(255,45,120,0.1); color: var(--pink);   border: 1px solid rgba(255,45,120,0.25); }
.badge-green { background: rgba(0,255,157,0.1);  color: var(--green);  border: 1px solid rgba(0,255,157,0.25); }

/* ─── DIVIDER ─── */
.divider {
  height: 1px; background: var(--border); margin: 32px 0;
}
.divider-label {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-muted); font-size: 11px;
  font-family: 'Space Mono', monospace; letter-spacing: 0.1em;
  margin: 32px 0 20px;
}
.divider-label::before, .divider-label::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ─── PROGRESS BAR ─── */
.progress-bar {
  height: 4px; background: rgba(255,255,255,0.06);
  border-radius: 2px; overflow: hidden; margin-top: 8px;
}
.progress-fill {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  transition: width 1s cubic-bezier(0.4,0,0.2,1);
  position: relative;
}
.progress-fill::after {
  content: ''; position: absolute; right: 0; top: -2px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

/* ─── TIMELINE ─── */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px;
  width: 1px; background: linear-gradient(180deg, var(--cyan), var(--violet));
}
.timeline-item { position: relative; margin-bottom: 28px; }
.timeline-item::before {
  content: ''; position: absolute; left: -24px; top: 6px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--bg-deep); border: 2px solid var(--cyan);
  box-shadow: 0 0 10px rgba(0,212,255,0.5);
}

/* ─── GLITCH TEXT EFFECT ─── */
.glitch {
  position: relative;
}
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  background: transparent;
  -webkit-background-clip: text; background-clip: text;
}
.glitch::before {
  color: var(--cyan); animation: glitch1 3.5s infinite;
  clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
  transform: translate(-2px, 0);
}
.glitch::after {
  color: var(--pink); animation: glitch2 3.5s infinite;
  clip-path: polygon(0 66%, 100% 66%, 100% 100%, 0 100%);
  transform: translate(2px, 0);
}
@keyframes glitch1 {
  0%,90%,100% { transform: translate(-2px,0) skew(0); opacity:0; }
  92%          { transform: translate(-4px,-1px) skew(-5deg); opacity:1; }
  94%          { transform: translate(3px,1px) skew(3deg); opacity:1; }
  96%          { transform: translate(-2px,0) skew(0); opacity:0; }
}
@keyframes glitch2 {
  0%,88%,100% { transform: translate(2px,0) skew(0); opacity:0; }
  90%          { transform: translate(4px,1px) skew(5deg); opacity:1; }
  92%          { transform: translate(-3px,-1px) skew(-3deg); opacity:1; }
  94%          { transform: translate(2px,0) skew(0); opacity:0; }
}

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-hot);
  border-radius: 16px; max-width: 680px; width: 100%;
  max-height: 85vh; overflow-y: auto;
  box-shadow: var(--glow-cyan), 0 40px 80px rgba(0,0,0,0.6);
  animation: modalIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes modalIn {
  from { opacity:0; transform: scale(0.92) translateY(20px); }
  to   { opacity:1; transform: scale(1) translateY(0); }
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 28px; border-bottom: 1px solid var(--border);
}
.modal-body { padding: 28px; }
.modal-close {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.modal-close:hover { background: rgba(255,45,120,0.1); color: var(--pink); border-color: var(--pink); }

/* ─── BUTTON ─── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 8px; font-size: 13px; font-weight: 500;
  cursor: pointer; border: none; transition: all var(--transition);
  font-family: 'Inter', sans-serif;
}
.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: #fff; box-shadow: 0 4px 15px rgba(0,212,255,0.2);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 25px rgba(0,212,255,0.35); }
.btn-ghost {
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--border-hot); color: var(--cyan); background: rgba(0,212,255,0.04); }

/* ─── STAT BLOCK ─── */
.stat-block {
  display: flex; flex-direction: column;
}
.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.4rem; font-weight: 700;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  line-height: 1;
}
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ─── TOOLTIP ─── */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%);
  background: var(--bg-hover); border: 1px solid var(--border-hot);
  color: var(--cyan); font-size: 11px; padding: 4px 8px;
  border-radius: 6px; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity 0.2s; z-index: 10;
  font-family: 'Space Mono', monospace;
}
[data-tooltip]:hover::after { opacity: 1; }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  :root { --nav-w: 0px; }
  .sidebar { display: none; }
  .main-wrap { margin-left: 0; }
  .page-section { padding: 24px 20px 60px; }
  .mobile-nav {
    display: flex !important; position: fixed; bottom: 0; left: 0; right: 0;
    background: rgba(10,10,15,0.97); border-top: 1px solid var(--border);
    z-index: 100; padding: 8px 0;
    justify-content: space-around; backdrop-filter: blur(12px);
  }
  .mobile-nav a {
    display: flex; flex-direction: column; align-items: center;
    gap: 3px; color: var(--text-muted); font-size: 8px;
    text-transform: uppercase; letter-spacing: 0.04em;
    padding: 6px 12px; border-radius: 8px;
    transition: color var(--transition);
  }
  .mobile-nav a.active, .mobile-nav a:hover { color: var(--cyan); }
  .mobile-nav svg { width: 18px; height: 18px; }
}
.mobile-nav { display: none; }
