/*
  Theme: Blue & Black
  Primary: #1E3A8A (deep blue)
  Secondary: #60A5FA (sky blue)
  Background: #000000
  Text: #FFFFFF / #D1D5DB
*/

:root {
  --color-bg: #000000;
  --color-surface: #0b0b0f;
  --color-text: #ffffff;
  --color-text-muted: #d1d5db;
  --color-primary: #1E3A8A;
  --color-secondary: #60A5FA;
  --color-border: rgba(96, 165, 250, 0.25);
  --shadow-glow: 0 0 0.5rem rgba(96, 165, 250, 0.4), 0 0 1.25rem rgba(30, 58, 138, 0.35);
  --radius: 14px;
  --radius-sm: 10px;
  --container: 1200px;
}

/* Reset & Base */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: var(--color-secondary); text-decoration: none; }
a:hover { color: #93c5fd; }

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

.section { padding: 96px 0; background: var(--color-bg); }
.section.alt { background: linear-gradient(180deg, #000000 0%, #0a0f16 100%); }
.section-title {
  margin: 0 0 32px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

/* Loader */
#loader {
  position: fixed;
  inset: 0;
  background: #000000;
  display: grid;
  place-items: center;
  gap: 16px;
  z-index: 9999;
}
.spinner {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 4px solid rgba(96, 165, 250, 0.25);
  border-top-color: var(--color-secondary);
  animation: spin 1s linear infinite;
}
.loader-text { color: var(--color-text-muted); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Header / Nav */
.site-header { position: sticky; top: 0; z-index: 1000; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); border-bottom: 1px solid var(--color-border); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--color-text); }
.logo:hover { color: var(--color-secondary); }
.logo-mark { color: var(--color-primary); font-weight: 800; }
.logo-text { font-weight: 700; letter-spacing: 0.3px; }

.nav-menu { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; }
.nav-link { color: var(--color-text); padding: 8px 10px; border-radius: 8px; transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease; }
.nav-link:hover { color: var(--color-secondary); background: rgba(96,165,250,0.1); }

.nav-toggle { display: none; background: transparent; border: 0; cursor: pointer; padding: 8px; border-radius: 8px; }
.nav-toggle .bar { display: block; width: 22px; height: 2px; background: var(--color-text); margin: 5px 0; transition: transform 0.2s ease; }

/* Hero */
.hero { position: relative; padding: 140px 0 90px; background: #000; overflow: hidden; }
#matrix-bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0.25; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto -10%; height: 70%; background: radial-gradient(900px 400px at 50% -10%, rgba(30,58,138,0.35), rgba(0,0,0,0)); pointer-events: none; }
.hero-eyebrow { margin: 0 0 8px; color: var(--color-text-muted); font-weight: 600; letter-spacing: 0.4px; }
.hero-title { font-size: clamp(40px, 6.5vw, 68px); margin: 0; font-weight: 900; letter-spacing: -0.6px; text-shadow: 0 0 12px rgba(96,165,250,0.35), 0 0 28px rgba(30,58,138,0.25); }
.hero-subtitle { margin: 8px 0 8px; color: var(--color-secondary); font-weight: 700; font-size: clamp(18px, 3.2vw, 28px); }
.hero-desc { margin: 6px 0 18px; color: var(--color-text-muted); max-width: 980px; }
.hero-cta { display: flex; gap: 14px; margin: 12px 0 20px; }

.badges { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 24px; }
.badge { display: inline-block; padding: 6px 12px; border-radius: 999px; background: rgba(96,165,250,0.12); color: #bfdbfe; border: 1px solid var(--color-border); font-size: 13px; }

.code-block {
  margin: 0; padding: 20px; border-radius: var(--radius);
  background: linear-gradient(180deg, #0b0b0f 0%, #0f0a16 100%);
  border: 1px solid var(--color-border);
  color: #e5e7eb;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px; overflow: auto;
  box-shadow: var(--shadow-glow);
}
.code-block .pl { color: #93c5fd; } /* punctuation / highlight */
.code-block .cn { color: #60a5fa; } /* constant / comment-like */
.code-block .fn { color: #e0f2fe; } /* function name */
.code-block .kw { color: #7dd3fc; } /* keyword */
.code-block .va { color: #bfdbfe; } /* variable */
.code-block .st { color: #bae6fd; } /* string */

/* Output panel (for code snippet result) */
.output-block {
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: #0b0b0f;
  border: 1px dashed var(--color-border);
  color: var(--color-text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
}
.output-line + .output-line { margin-top: 6px; }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px; align-items: center; }
.about-photo { width: 100%; aspect-ratio: 1 / 1; border-radius: var(--radius); background:
  radial-gradient(60% 60% at 70% 30%, rgba(96,165,250,0.35), rgba(0,0,0,0)),
  #0b0b0f; border: 1px solid var(--color-border); box-shadow: var(--shadow-glow); overflow: hidden; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about-text p { color: var(--color-text-muted); }

/* Timeline */
.timeline { position: relative; padding-left: 20px; }
.timeline-line { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: linear-gradient(#0b3b8a, #60a5fa); opacity: 0.6; }
.timeline-item { position: relative; width: 50%; padding: 20px; }
.timeline-item.left { padding-right: 40px; text-align: right; }
.timeline-item.right { margin-left: 50%; padding-left: 40px; }
.timeline-dot { position: absolute; top: 24px; left: calc(50% - 6px); width: 12px; height: 12px; border-radius: 50%; background: var(--color-secondary); box-shadow: 0 0 0 4px rgba(96,165,250,0.2); }
.timeline-card { display: inline-block; max-width: 520px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 18px 18px; box-shadow: var(--shadow-glow); text-align: left; }
.timeline-role { margin: 0 0 6px; font-weight: 700; }
.timeline-meta { color: var(--color-text-muted); margin-bottom: 10px; font-size: 14px; }
.timeline-card ul { margin: 0; padding-left: 18px; color: var(--color-text-muted); }

/* Projects */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 18px; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.project-card:hover { transform: translateY(-4px) scale(1.01); box-shadow: var(--shadow-glow); }
.project-title { margin: 0 0 6px; }
.project-desc { color: var(--color-text-muted); margin-top: 0; }

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.skill-card { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-glow); }
.skill-title { margin: 0 0 12px; color: var(--color-secondary); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { border: 1px solid var(--color-border); color: #e0f2fe; background: rgba(96,165,250,0.08); padding: 6px 10px; border-radius: 999px; font-size: 13px; }

/* Certifications */
.certs-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; overflow-x: auto; padding-bottom: 4px; }
.cert-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 18px; min-width: 260px; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.cert-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-glow); }
.cert-title { margin: 0 0 6px; }
.cert-meta { color: var(--color-text-muted); margin: 0 0 12px; }

/* Footer */
.footer { background: #000; border-top: 1px solid var(--color-border); padding: 64px 0 40px; text-align: center; }
.socials { display: flex; justify-content: center; gap: 16px; margin: 12px 0 16px; }
.social-link { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--color-border); color: var(--color-secondary); background: rgba(96,165,250,0.08); transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease; }
.social-link:hover { transform: translateY(-2px) scale(1.05); box-shadow: var(--shadow-glow); background: rgba(96,165,250,0.12); }
.social-link svg { width: 20px; height: 20px; fill: currentColor; }
.contact-cta .btn { margin-top: 4px; }
.copyright { color: var(--color-text-muted); font-size: 14px; }

/* Buttons */
.btn { display: inline-block; padding: 12px 18px; border-radius: 16px; color: #fff; background: linear-gradient(90deg, var(--color-primary), var(--color-secondary)); border: 0; box-shadow: var(--shadow-glow); transition: transform 0.2s ease, filter 0.2s ease; }
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn:focus { outline: 3px solid rgba(96,165,250,0.65); outline-offset: 3px; }
.btn.btn-outline { background: transparent; color: var(--color-secondary); border: 1px solid var(--color-border); box-shadow: none; }
.btn.btn-outline:hover { background: rgba(96,165,250,0.12); box-shadow: var(--shadow-glow); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Utilities */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Responsive */
@media (max-width: 1024px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .certs-row { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .nav-menu { position: fixed; inset: 64px 0 auto 0; background: rgba(0,0,0,0.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--color-border); flex-direction: column; gap: 0; padding: 8px 16px 16px; transform: translateY(-100%); transition: transform 0.25s ease; }
  .nav-menu.open { transform: translateY(0); }
  .nav-link { padding: 12px 8px; }
  .nav-toggle { display: inline-block; }

  .about-grid { grid-template-columns: 1fr; }
  .timeline-line { left: 24px; }
  .timeline-item { width: 100%; padding: 12px 0 12px 56px; }
  .timeline-item.left, .timeline-item.right { margin-left: 0; padding-left: 56px; text-align: left; }
  .timeline-dot { left: 18px; }

  .projects-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .certs-row { grid-template-columns: repeat(1, 1fr); }
}
