/* ============================================================
   FalloutJr Portfolio – Dark Theme Stylesheet
   ============================================================ */

/* ── Custom Properties ─────────────────────────────────────── */
:root {
  --bg-primary:   #0d1117;
  --bg-secondary: #161b22;
  --bg-card:      #1c2230;
  --bg-card-hover:#212a3b;

  --accent:       #58a6ff;
  --accent-glow:  rgba(88, 166, 255, 0.25);
  --accent-2:     #79c0ff;
  --green:        #3fb950;
  --purple:       #bc8cff;
  --orange:       #f0883e;

  --text-primary:   #e6edf3;
  --text-secondary: #8b949e;
  --text-muted:     #6e7681;

  --border:       rgba(48, 54, 61, 0.9);
  --border-light: rgba(88, 166, 255, 0.15);

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;

  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 20px var(--accent-glow);

  --font-body:  'Inter', system-ui, sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', monospace;

  --transition: 0.25s ease;
  --nav-h:      64px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

strong { color: var(--text-primary); font-weight: 600; }

img { max-width: 100%; display: block; }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section-alt {
  background: var(--bg-secondary);
}

.section-header {
  margin-bottom: 56px;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 48px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.02em;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
  border: 2px solid var(--accent);
}

.btn-primary:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent-glow);
  color: var(--accent-2);
  border-color: var(--accent-2);
  transform: translateY(-2px);
}

/* ══════════════════════════════════════════════════════════════
   NAVIGATION
══════════════════════════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 1000;
  transition: background var(--transition), border-color var(--transition);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: rgba(13, 17, 23, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.02em;
  transition: color var(--transition);
}

.nav-logo:hover { color: var(--accent-2); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-link {
  padding: 8px 14px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: var(--border);
}

.nav-btn {
  padding: 7px 16px;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  margin-left: 8px;
}

.nav-btn:hover {
  background: var(--accent);
  color: var(--bg-primary);
}

.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: all var(--transition);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* animated grid */
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(88,166,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88,166,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: gridDrift 20s linear infinite;
}

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

/* radial glow */
.hero-bg::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(88,166,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 760px;
  padding: 0 24px;
  animation: fadeUp 0.9s ease both;
}

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

.hero-greeting {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.hero-name {
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #e6edf3 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 3vw, 1.4rem);
  color: var(--text-secondary);
  margin-bottom: 24px;
  min-height: 2em;
}

.cursor {
  display: inline-block;
  color: var(--accent);
  animation: blink 0.8s step-end infinite;
}

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

.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  animation: fadeIn 1.5s 1s ease both;
}

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

.scroll-arrow {
  width: 16px;
  height: 16px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  animation: bounce 1.6s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50%       { transform: rotate(45deg) translateY(4px); }
}

/* ══════════════════════════════════════════════════════════════
   ABOUT
══════════════════════════════════════════════════════════════ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about-text p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 20px;
  line-height: 1.8;
}

.about-stats {
  display: flex;
  gap: 32px;
  margin-top: 32px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* Code card */
.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 32px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.about-card::before {
  content: 'profile.json';
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.about-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--purple));
}

.card-line {
  padding: 3px 0;
  display: flex;
  gap: 6px;
  align-items: baseline;
  flex-wrap: wrap;
}

.card-line .key   { color: var(--purple); }
.card-line .sep   { color: var(--text-muted); }
.card-line .str   { color: var(--green); }
.card-line .arr   { color: var(--orange); }
.card-line .bool  { color: var(--accent); }

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

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border);
  transition: background var(--transition);
}

.project-card:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card), 0 0 30px rgba(88,166,255,0.08);
}

.project-card:hover::before {
  background: linear-gradient(90deg, var(--accent), var(--purple));
}

.project-card.featured {
  border-color: rgba(88, 166, 255, 0.3);
}

.project-card.featured::before {
  background: linear-gradient(90deg, var(--accent), var(--purple));
}

.project-icon {
  font-size: 2rem;
  line-height: 1;
}

.project-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(88, 166, 255, 0.15);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(88, 166, 255, 0.3);
}

.project-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.project-description {
  color: var(--text-secondary);
  font-size: 0.93rem;
  line-height: 1.7;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  background: rgba(88, 166, 255, 0.1);
  border: 1px solid rgba(88, 166, 255, 0.2);
  border-radius: 4px;
  padding: 3px 10px;
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.project-status {
  font-size: 0.8rem;
  font-weight: 500;
}

.project-status.in-progress { color: var(--orange); }
.project-status.active       { color: var(--green); }
.project-status.ongoing      { color: var(--purple); }

.project-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  transition: all var(--transition);
}

.project-link:hover {
  color: var(--accent-2);
  letter-spacing: 0.02em;
}

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

.skill-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
}

.skill-group-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.skill-group-icon { font-size: 1.1rem; }

/* Skill bars */
.skill-list { display: flex; flex-direction: column; gap: 14px; }

.skill-item { display: flex; flex-direction: column; gap: 6px; }

.skill-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.skill-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 3px;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Pills */
.skill-pills { display: flex; flex-wrap: wrap; gap: 10px; }

.pill {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
  transition: all var(--transition);
}

.pill:hover {
  color: var(--accent);
  border-color: rgba(88, 166, 255, 0.4);
  background: rgba(88, 166, 255, 0.07);
}

/* ══════════════════════════════════════════════════════════════
   CURRENTLY LEARNING
══════════════════════════════════════════════════════════════ */
.learning-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
}

.learning-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.learning-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(88,166,255,0.03) 0%, transparent 60%);
  pointer-events: none;
}

.learning-card:hover {
  border-color: var(--border-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.learning-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}

.learning-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.3;
}

.learning-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ══════════════════════════════════════════════════════════════
   CONTACT
══════════════════════════════════════════════════════════════ */
.contact-content {
  max-width: 700px;
}

.contact-intro {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 40px;
}

.contact-cards {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  transition: all var(--transition);
  min-width: 200px;
}

.contact-card:hover {
  border-color: rgba(88, 166, 255, 0.4);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.contact-card-icon {
  color: var(--accent);
  font-size: 1.5rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.contact-card-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-card-text strong {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.contact-card-text span {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.contact-quote {
  border-left: 3px solid var(--accent);
  padding-left: 20px;
  font-style: italic;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
}

/* ══════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

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

.footer-logo {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--accent);
}

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

.footer-link {
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.footer-link:hover { color: var(--accent); }

/* ══════════════════════════════════════════════════════════════
   SCROLL REVEAL ANIMATION
══════════════════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE – TABLET
══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-card {
    order: -1;
  }
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE – MOBILE
══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .section { padding: 72px 0; }

  /* Nav mobile */
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(13, 17, 23, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--border);
    gap: 4px;
  }

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

  .nav-link { width: 100%; padding: 10px 0; }
  .nav-btn   { margin-left: 0; margin-top: 8px; }

  /* Hero */
  .hero-actions { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; max-width: 280px; }

  /* About stats */
  .about-stats { gap: 20px; }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}
