/* ═══════════════════════════════════════════════
   DATA SCIENCE PORTFOLIO — STYLE SHEET
   Theme: dark charcoal + bitcoin orange accents
   ═══════════════════════════════════════════════ */

/* ── CSS Custom Properties ── */
:root {
  --bg-primary:    #120e0b;
  --bg-secondary:  #0f0c09;
  --bg-card:       #221b14;
  --bg-card-hover: #241d15;

  --text-primary:   #e2e8f0;
  --text-secondary: #a89b8c;
  --text-muted:     #7a6e60;

  --accent:         #f7931a;   /* bitcoin orange  */
  --accent-dim:     #c47315;   /* burnt orange     */
  --accent-glow:    rgba(247, 147, 26, .15);

  --border:         #2e2520;
  --border-light:   #3d332a;

  --font-sans:  'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:  'JetBrains Mono', ui-monospace, monospace;

  --header-h:   52px;
  --max-width:  1120px;
  --radius:     10px;
  --transition: .25s cubic-bezier(.4,0,.2,1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-primary);
}

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ═══════════ HEADER ═══════════ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 100;
  background: rgba(26, 20, 16, .88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}
.logo-bracket { color: var(--accent); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}
.nav-link:hover { color: var(--accent); }
.nav-link:hover::after { width: 100%; }

.nav-icon {
  color: var(--text-secondary);
  transition: color var(--transition);
  display: flex;
  align-items: center;
}
.nav-icon:hover { color: var(--accent); }

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ═══════════ HERO ═══════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--header-h);
}

#network-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: .35;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

.hero-text { flex: 1; }

.hero-greeting {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: .95rem;
  margin-bottom: 8px;
}
.hero-name {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 8px;
}
.hero-title {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 16px;
  min-height: 1.8em;
}
.hero-title .typed-cursor {
  color: var(--accent);
  font-weight: 300;
}
.hero-tagline {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 32px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-avatar {
  flex-shrink: 0;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent-dim);
  box-shadow: 0 0 60px var(--accent-glow);
}
.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}
.scroll-indicator span {
  display: block;
  width: 24px; height: 24px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  animation: scrollBounce 2s infinite;
}
@keyframes scrollBounce {
  0%   { opacity: 0; transform: rotate(45deg) translate(-8px,-8px); }
  50%  { opacity: 1; }
  100% { opacity: 0; transform: rotate(45deg) translate(8px,8px); }
}

/* ═══════════ BUTTONS ═══════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .9rem;
  transition: var(--transition);
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
}
.btn-primary:hover {
  background: #ffa533;
  box-shadow: 0 4px 24px var(--accent-glow);
}
.btn-outline {
  border: 1.5px solid var(--border-light);
  color: var(--text-primary);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ═══════════ SECTIONS ═══════════ */
.section {
  padding: 64px 0;
}
.section:nth-child(even) {
  background: var(--bg-secondary);
}

.section-heading {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 32px;
}
.heading-accent {
  color: var(--accent);
  font-family: var(--font-mono);
  margin-right: 8px;
}

/* ── Bio ── */
.bio-body {
  max-width: 720px;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.85;
}
.bio-body p + p { margin-top: 16px; }
.bio-body strong { color: var(--text-primary); font-weight: 600; }
.bio-body em { color: var(--text-primary); font-style: italic; }

/* ═══════════ EXPERIENCE / TIMELINE ═══════════ */
.timeline {
  position: relative;
  padding-left: 32px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--border-light);
}

.timeline-item {
  position: relative;
  margin-bottom: 32px;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-marker {
  position: absolute;
  left: -32px; top: 24px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 3px solid var(--accent);
  z-index: 1;
}

.timeline-card {
  display: flex;
  gap: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.timeline-card:hover {
  border-color: var(--accent-dim);
  box-shadow: 0 4px 32px var(--accent-glow);
}

.timeline-image {
  flex-shrink: 0;
  width: 100px; height: 100px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-secondary);
}
.timeline-image img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.timeline-role {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.timeline-company {
  color: var(--text-secondary);
  font-size: .95rem;
  margin-bottom: 10px;
}
.timeline-period {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--accent);
  margin-left: 8px;
}
/* Multi-position card (e.g. promoted at same employer) */
.timeline-position--stacked {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.timeline-position--stacked .timeline-company {
  margin-bottom: 0;
}

.timeline-text {
  color: var(--text-secondary);
  font-size: .95rem;
}
.timeline-text p + p { margin-top: 8px; }
.timeline-text strong { color: var(--text-primary); font-weight: 600; }
.timeline-text em { color: var(--text-primary); font-style: italic; }

/* Education tags within timeline cards */
.education-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

/* ═══════════ SKILLS ═══════════ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.skill-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color var(--transition);
}
.skill-group:hover { border-color: var(--accent-dim); }

.skill-category {
  font-size: .85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
  margin-bottom: 12px;
  font-family: var(--font-mono);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.skill-tag {
  background: rgba(247, 147, 26, .08);
  border: 1px solid rgba(247, 147, 26, .2);
  color: var(--text-primary);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 500;
  transition: var(--transition);
}
.skill-tag:hover {
  background: rgba(247, 147, 26, .18);
  border-color: var(--accent);
}

/* ═══════════ PROJECTS ═══════════ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}
.projects-grid--full {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-dim);
  box-shadow: 0 8px 40px var(--accent-glow);
}

.project-image {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-secondary);
  overflow: hidden;
}
.project-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.project-card:hover .project-image img {
  transform: scale(1.04);
}

.project-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.project-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.project-desc {
  color: var(--text-secondary);
  font-size: .9rem;
  line-height: 1.6;
  flex: 1;
  margin-bottom: 14px;
}
.project-desc strong { color: var(--text-primary); font-weight: 600; }

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.project-tag {
  background: rgba(247, 147, 26, .08);
  border: 1px solid rgba(247, 147, 26, .18);
  color: var(--text-secondary);
  padding: 3px 10px;
  border-radius: 14px;
  font-size: .75rem;
  font-weight: 500;
}

.section-cta {
  text-align: center;
  margin-top: 32px;
}

/* ═══════════ PROJECTS PAGE HERO ═══════════ */
.page-hero {
  padding: 100px 0 28px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}
.page-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.page-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* ═══════════ FOOTER ═══════════ */
.site-footer {
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer-links {
  display: flex;
  gap: 16px;
}
.footer-links a {
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--accent); }

.footer-copy {
  color: var(--text-muted);
  font-size: .8rem;
}

/* ═══════════ FADE-IN ANIMATION ═══════════ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 768px) {
  .hero-content {
    flex-direction: column-reverse;
    text-align: center;
    padding: 0 16px;
  }
  .hero-avatar { width: 160px; height: 160px; }
  .hero-tagline { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    right: 0;
    width: 220px;
    height: calc(100vh - var(--header-h));
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 20px;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform var(--transition);
    gap: 16px;
    z-index: 200;
  }
  .main-nav.open { transform: translateX(0); }

  .nav-toggle { display: flex; }

  .section { padding: 48px 0; }
  .section-heading { margin-bottom: 24px; font-size: 1.5rem; }

  .timeline-card { flex-direction: column; padding: 16px; gap: 16px; }
  .timeline-image { width: 100%; height: 140px; }
  .timeline-item { margin-bottom: 24px; }

  .skills-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .skill-group { padding: 14px; }

  .projects-grid,
  .projects-grid--full {
    grid-template-columns: 1fr;
  }
  .project-body { padding: 16px; }

  .page-hero { padding: 80px 0 20px; }
  .page-title { font-size: 1.8rem; }

  .footer-inner { flex-direction: column; gap: 8px; text-align: center; }

  .container { padding: 0 16px; }
}

@media (max-width: 480px) {
  .section { padding: 40px 0; }
  .hero-name { font-size: 2rem; }
  .hero-avatar { width: 130px; height: 130px; }
  .hero-title { font-size: 1rem; }

  .skills-grid { grid-template-columns: 1fr; }

  .timeline { padding-left: 24px; }
  .timeline-marker { left: -24px; width: 12px; height: 12px; }
  .timeline::before { left: 5px; }
}
