/* =============================================
   BEK.ai — AI Training Portfolio
   Style sheet
   ============================================= */

:root {
  --bg: #0a0e1a;
  --bg2: #0f1629;
  --bg3: #141d35;
  --border: rgba(99,179,237,0.15);
  --accent: #63b3ed;
  --accent2: #9f7aea;
  --green: #68d391;
  --yellow: #f6e05e;
  --red: #fc8181;
  --orange: #f6ad55;
  --text: #e2e8f0;
  --text2: #a0aec0;
  --text3: #718096;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Inter', sans-serif;
  --radius: 12px;
  --glow: 0 0 20px rgba(99,179,237,0.2);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  overflow-x: hidden;
  line-height: 1.6;
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ===================== BOOT SCREEN ===================== */
#boot-screen {
  position: fixed; inset: 0;
  background: #000;
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity 0.8s ease;
}
#boot-screen.fade-out { opacity: 0; pointer-events: none; }

.boot-inner {
  width: 500px;
  font-family: var(--mono);
  padding: 2rem;
}

.boot-logo {
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 2rem;
  letter-spacing: 4px;
  text-shadow: 0 0 30px var(--accent);
}

.cursor-blink { animation: blink 1s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.boot-log {
  font-size: 0.8rem;
  color: var(--text2);
  margin-bottom: 1.5rem;
  min-height: 140px;
  line-height: 1.8;
}
.boot-log .ok { color: var(--green); }
.boot-log .warn { color: var(--yellow); }
.boot-log .info { color: var(--accent); }

.boot-bar-wrap {
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.8rem;
}
.boot-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
  width: 0;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px var(--accent);
}

.boot-status {
  font-size: 0.75rem;
  color: var(--text3);
}

/* ===================== NEURAL BG ===================== */
#neural-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

/* ===================== NAV ===================== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  background: rgba(10,14,26,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 2px;
  text-shadow: 0 0 15px var(--accent);
}
.blink { animation: blink 2s infinite; }

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}
.nav-links a {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text2);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

.nav-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--green);
}
.status-dot {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
  box-shadow: 0 0 6px var(--green);
}
@keyframes pulse-dot {
  0%,100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.7; }
}

/* ===================== HERO ===================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 0 4rem;
  position: relative;
  z-index: 1;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
}

/* Terminal window */
.terminal-window {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--glow);
  background: #0d1117;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: #161b22;
  border-bottom: 1px solid var(--border);
}
.t-btn {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.t-btn.red { background: #ff5f57; }
.t-btn.yellow { background: #ffbd2e; }
.t-btn.green { background: #28c840; }
.t-title {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text3);
  margin-left: 0.5rem;
}
.terminal-body {
  padding: 1.2rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  min-height: 260px;
}
.t-line {
  line-height: 1.8;
  color: var(--text2);
}
.t-line.success { color: var(--green); }
.t-line.accent-line { color: var(--accent); font-weight: 600; }
.t-line.comment { color: var(--text3); }
.t-prompt {
  color: var(--green);
  margin-right: 0.5rem;
}

.epoch-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(99,179,237,0.1);
  border: 1px solid rgba(99,179,237,0.3);
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.85rem;
  margin-bottom: 1.2rem;
}
.epoch-label { color: var(--text3); font-size: 0.7rem; letter-spacing: 2px; }
.epoch-num { color: var(--accent); font-size: 1.2rem; font-weight: 700; }
.epoch-slash, .epoch-total { color: var(--text3); }

.hero-name {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.8rem;
  letter-spacing: -1px;
}
.accent { color: var(--accent); }

.hero-role {
  font-family: var(--mono);
  color: var(--text2);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.loss-meter {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.loss-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--mono);
  font-size: 0.75rem;
}
.loss-label { color: var(--text3); width: 80px; flex-shrink: 0; }
.loss-bar-wrap {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
}
.loss-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 3px;
  transition: width 1.5s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 0 8px rgba(99,179,237,0.5);
}
.loss-val { color: var(--green); width: 35px; }

.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn-primary {
  background: var(--accent);
  color: #0a0e1a;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 0 15px rgba(99,179,237,0.3);
}
.btn-primary:hover {
  background: #90cdf4;
  box-shadow: 0 0 25px rgba(99,179,237,0.5);
  transform: translateY(-1px);
}
.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.85rem;
  transition: all 0.2s;
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===================== SECTIONS ===================== */
.hidden { display: none !important; }

.section {
  padding: 6rem 0;
  position: relative;
  z-index: 1;
}
.section:nth-child(even) { background: rgba(255,255,255,0.01); }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-header {
  margin-bottom: 3rem;
}
.section-tag {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  display: block;
  margin-bottom: 0.5rem;
  opacity: 0.7;
}
.section-header h2 {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.2;
}
.section-sub {
  color: var(--text2);
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

/* ===================== MODEL SECTION ===================== */
.model-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: start;
}

.model-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.nn-layer {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  align-items: center;
  position: relative;
}
.nn-layer::before {
  content: attr(data-label);
  position: absolute;
  top: -1.5rem;
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text3);
  letter-spacing: 1px;
}
.nn-node {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s;
}
.nn-node.active {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(99,179,237,0.3);
  animation: node-pulse 3s infinite;
}
.nn-node.pulse {
  border-color: var(--green);
  box-shadow: 0 0 20px rgba(104,211,145,0.4);
  animation: node-pulse2 2s infinite;
}
@keyframes node-pulse {
  0%,100% { box-shadow: 0 0 12px rgba(99,179,237,0.3); }
  50% { box-shadow: 0 0 20px rgba(99,179,237,0.6); }
}
@keyframes node-pulse2 {
  0%,100% { box-shadow: 0 0 20px rgba(104,211,145,0.4); }
  50% { box-shadow: 0 0 35px rgba(104,211,145,0.7); }
}

.nn-arrow {
  color: var(--text3);
  font-size: 1.5rem;
  padding-top: 2rem;
}

.code-block {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  margin-bottom: 1.5rem;
  line-height: 1.8;
}
.cb-line { color: var(--text2); }
.cb-line.indent { padding-left: 1.5rem; }
.cb-line.indent2 { padding-left: 3rem; }
.kw { color: var(--accent2); }
.fn { color: var(--yellow); }
.cm { color: var(--text3); font-style: italic; }

.model-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.model-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}
.model-card:hover { border-color: rgba(99,179,237,0.4); }
.mc-icon { font-size: 1.5rem; flex-shrink: 0; }
.model-card h4 { font-size: 0.9rem; margin-bottom: 0.3rem; color: var(--text); }
.model-card p { font-size: 0.82rem; color: var(--text2); line-height: 1.5; }

/* ===================== RUNS / PROJECTS ===================== */
.runs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.runs-grid.mini { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

.run-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.run-card:hover {
  border-color: rgba(99,179,237,0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.run-card.featured {
  border-color: rgba(99,179,237,0.35);
  background: linear-gradient(135deg, var(--bg2), rgba(99,179,237,0.04));
}
.run-card.lab {
  background: rgba(255,255,255,0.02);
}

.run-header { }
.run-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}
.run-id {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text3);
}
.run-badge {
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
  color: var(--text2);
}
.run-badge.active { background: rgba(104,211,145,0.15); color: var(--green); }
.run-badge.wip { background: rgba(246,173,85,0.15); color: var(--orange); }
.run-badge.deployed { background: rgba(99,179,237,0.15); color: var(--accent); }
.run-badge.dataviz { background: rgba(159,122,234,0.15); color: var(--accent2); }

.run-card h3 { font-size: 1.1rem; font-weight: 600; }
.run-card h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.3rem; }

.run-metrics {
  display: flex;
  gap: 1rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.metric { display: flex; flex-direction: column; }
.m-label { font-family: var(--mono); font-size: 0.65rem; color: var(--text3); }
.m-val { font-family: var(--mono); font-size: 0.9rem; color: var(--accent); font-weight: 600; }

.run-desc { font-size: 0.85rem; color: var(--text2); line-height: 1.5; flex: 1; }

.run-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(99,179,237,0.08);
  color: var(--accent);
  border: 1px solid rgba(99,179,237,0.15);
}

.run-links { display: flex; gap: 0.8rem; margin-top: auto; }
.link-live, .link-gh {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-decoration: none;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  transition: all 0.2s;
}
.link-live {
  background: rgba(104,211,145,0.1);
  color: var(--green);
  border: 1px solid rgba(104,211,145,0.2);
}
.link-live:hover { background: rgba(104,211,145,0.2); }
.link-gh {
  border: 1px solid var(--border);
  color: var(--text2);
}
.link-gh:hover { border-color: var(--accent); color: var(--accent); }

.labs-header {
  margin: 2rem 0 1.5rem;
}
.labs-header p { color: var(--text2); font-size: 0.9rem; margin-top: 0.3rem; }

/* ===================== DATASET / EXPERIENCE ===================== */
.dataset-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.ds-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 1.5rem;
}

.ds-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 0.3rem;
}
.ds-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg3);
  border: 2px solid var(--border);
  flex-shrink: 0;
  transition: all 0.3s;
}
.ds-dot.active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(99,179,237,0.5);
}
.ds-line {
  flex: 1;
  width: 2px;
  background: var(--border);
  margin: 4px 0;
  min-height: 30px;
}

.ds-content {
  padding-bottom: 3rem;
}
.ds-epoch {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text3);
  margin-bottom: 0.4rem;
}
.ds-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.3rem;
}
.ds-header h3 { font-size: 1.05rem; }
.ds-company { color: var(--accent); font-weight: 400; }
.ds-badge {
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
  color: var(--text2);
  white-space: nowrap;
}
.ds-badge.current { background: rgba(104,211,145,0.15); color: var(--green); }
.ds-location {
  font-size: 0.82rem;
  color: var(--text3);
  margin-bottom: 0.8rem;
  font-family: var(--mono);
}
.ds-log {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  margin-bottom: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.log-line { color: var(--text2); }
.log-key { color: var(--accent2); margin-right: 0.5rem; }

/* ===================== WEIGHTS / FORMATION ===================== */
.weights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.weight-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s;
}
.weight-card:hover { border-color: rgba(99,179,237,0.4); }

.weight-top {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.weight-icon { font-size: 2rem; }
.weight-date {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text3);
  display: block;
  margin-bottom: 0.2rem;
}
.weight-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.2rem; }
.weight-school { font-size: 0.8rem; color: var(--text3); }

.weight-body {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.param-line {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text2);
  line-height: 1.5;
}
.p-key { color: var(--accent2); }

/* ===================== ABOUT ===================== */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-config {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  font-family: var(--mono);
  font-size: 0.82rem;
}
.config-block { display: flex; flex-direction: column; gap: 0.2rem; }
.cfg-line { color: var(--text2); line-height: 1.6; }
.cfg-line.indent { padding-left: 1.5rem; }
.cfg-key { color: var(--accent2); }
.cfg-val { color: var(--green); }

.about-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  text-align: center;
  transition: all 0.2s;
}
.stat-card:hover {
  border-color: rgba(99,179,237,0.4);
  box-shadow: var(--glow);
}
.stat-num {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stat-lbl { font-size: 0.78rem; color: var(--text3); }

/* ===================== SKILLS / PIP ===================== */
.pip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.8rem;
}
.pip-pkg {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 1rem;
  transition: all 0.2s;
  cursor: default;
}
.pip-pkg:hover {
  border-color: rgba(99,179,237,0.4);
  transform: translateX(4px);
  box-shadow: 0 0 15px rgba(99,179,237,0.1);
}
.pip-icon { font-size: 1.1rem; }
.pip-name { font-size: 0.85rem; color: var(--text); flex: 1; }
.pip-ver {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text3);
  background: rgba(255,255,255,0.04);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
}

/* ===================== DEPLOY / CONTACT ===================== */
.deploy-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3rem;
}

.deploy-terminal .terminal-body {
  min-height: 180px;
  padding: 1rem 1.2rem;
}

.deploy-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.deploy-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.2s;
}
.deploy-btn:hover {
  border-color: rgba(99,179,237,0.4);
  transform: translateX(4px);
}
.db-icon { font-size: 1.5rem; }
.db-label { display: block; color: var(--text); font-size: 0.95rem; font-weight: 600; }
.db-sub { display: block; font-family: var(--mono); font-size: 0.75rem; color: var(--text3); }

/* ===================== FOOTER ===================== */
footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text3);
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.footer-sep { color: var(--border); }
.footer-mono { color: var(--green); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; }
  .terminal-window { display: none; }
  .model-layout { grid-template-columns: 1fr; }
  .about-layout { grid-template-columns: 1fr; }
  .deploy-card { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .hero-name { font-size: 2rem; }
}

/* ===================== ANIMATIONS ===================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.section { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.section.visible { opacity: 1; transform: translateY(0); }
