/* ============================================================
   PORTFOLIO.CSS — Justin Dhillon · "Aurora"
   Dark aurora-gradient theme · glassmorphism · oklch accents
   Fonts (loaded via Google Fonts in index.html):
     Space Grotesk (display) · Inter (body) · JetBrains Mono (labels)
   ============================================================ */

:root {
  --bg: #05060d;
  --grad: linear-gradient(90deg, oklch(0.8 0.13 285), oklch(0.82 0.12 200));
  --accent-purple: oklch(0.78 0.13 285);
  --accent-cyan: oklch(0.82 0.12 200);
  --maxw: 1180px;
  --pad-x: 7vw;
  --text: #e9ecf6;
  --text-mid: #aab2c8;
  --text-dim: #9aa3bd;
  --text-faint: #7e87a3;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  font-family: 'Inter', sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
.aurora-root { position: relative; overflow-x: hidden; color: var(--text); }
img { display: block; }
a { text-decoration: none; color: inherit; }
::selection { background: oklch(0.62 0.21 280 / .4); color: #fff; }

/* ---------- keyframes ---------- */
@keyframes driftA { 0% { transform: translate(0,0) scale(1) } 50% { transform: translate(120px,-60px) scale(1.25) } 100% { transform: translate(0,0) scale(1) } }
@keyframes driftB { 0% { transform: translate(0,0) scale(1.1) } 50% { transform: translate(-140px,80px) scale(1) } 100% { transform: translate(0,0) scale(1.1) } }
@keyframes driftC { 0% { transform: translate(0,0) scale(1) } 50% { transform: translate(80px,100px) scale(1.3) } 100% { transform: translate(0,0) scale(1) } }
@keyframes floaty { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-12px) } }
@keyframes spin { from { transform: rotate(0) } to { transform: rotate(360deg) } }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .4 } }
@keyframes scrolldot { 0% { transform: translateY(0); opacity: 1 } 70% { opacity: 1 } 100% { transform: translateY(16px); opacity: 0 } }

/* ---------- utilities ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.glass { backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); }
.glass:hover { background: rgba(255,255,255,.07); border-color: rgba(160,140,255,.35); }
.gtext { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.eyebrow { font-family: 'JetBrains Mono', monospace; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-purple); }
.navlink { position: relative; }
.navlink::after { content: ''; position: absolute; left: 0; bottom: -4px; width: 0; height: 1.5px; background: var(--grad); transition: width .3s; }
.navlink:hover::after { width: 100%; }

/* chips */
.chip { font-size: 12.5px; color: #cfd5ea; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); padding: 6px 12px; border-radius: 8px; transition: transform .2s, background .2s, border-color .2s; }
.chip:hover { transform: translateY(-3px); border-color: rgba(160,140,255,.5); background: rgba(160,140,255,.1); }
.chip.sm { font-size: 11.5px; color: #bfc6dd; padding: 4px 10px; border-radius: 6px; border-color: rgba(255,255,255,.1); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-row.sm { gap: 6px; }

/* buttons */
.btnp { font-size: 15px; font-weight: 600; color: #05060d; background: #fff; padding: 14px 28px; border-radius: 100px; display: inline-block; transition: transform .25s, box-shadow .25s; }
.btnp:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(150,120,255,.4); }
.btnp-lg { font-size: 16px; padding: 16px 34px; margin-top: 32px; }
.btng { font-size: 15px; font-weight: 600; color: #fff; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.2); padding: 14px 28px; border-radius: 100px; display: inline-flex; align-items: center; gap: 9px; transition: background .25s, border-color .25s; }
.btng:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.4); }

/* ============================================================
   NAVBAR
   ============================================================ */
#navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 100; transition: background .3s, border-color .3s, backdrop-filter .3s; border-bottom: 1px solid transparent; }
#navbar.scrolled { background: rgba(8,9,18,.72); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom-color: rgba(255,255,255,.08); }
.nav-inner { max-width: 1240px; margin: 0 auto; padding: 16px var(--pad-x); display: flex; align-items: center; justify-content: space-between; }
.nav-logo { font-family: 'Space Grotesk', sans-serif; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.nav-links { list-style: none; display: flex; align-items: center; gap: 30px; margin: 0; padding: 0; font-size: 14.5px; color: #c9d2ff; }
.nav-links a { color: #c9d2ff; transition: color .2s; }
.nav-links a:hover { color: #fff; }
.nav-links a.active { color: #fff; }
.nav-cta { font-family: 'Space Grotesk', sans-serif; font-weight: 600; color: #05060d !important; background: var(--grad); padding: 9px 20px; border-radius: 100px; transition: transform .25s, box-shadow .25s; }
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(150,120,255,.4); }
.hamburger { display: none; flex-direction: column; gap: 5px; width: 40px; height: 40px; align-items: center; justify-content: center; background: none; border: 0; cursor: pointer; }
.hamburger span { width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: transform .3s, opacity .3s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; padding: 120px var(--pad-x) 80px; }
.hero-glow { position: absolute; border-radius: 50%; }
.hero-glow-1 { width: 560px; height: 560px; left: -100px; top: -140px; background: radial-gradient(circle, oklch(0.62 0.21 280) 0%, transparent 65%); filter: blur(50px); opacity: .6; animation: driftA 16s ease-in-out infinite; }
.hero-glow-2 { width: 640px; height: 640px; right: -160px; top: 0; background: radial-gradient(circle, oklch(0.66 0.18 200) 0%, transparent 65%); filter: blur(60px); opacity: .5; animation: driftB 20s ease-in-out infinite; }
.hero-glow-3 { width: 520px; height: 520px; left: 38%; bottom: -220px; background: radial-gradient(circle, oklch(0.64 0.2 330) 0%, transparent 65%); filter: blur(60px); opacity: .45; animation: driftC 18s ease-in-out infinite; }
.hero-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 35%, rgba(5,6,13,.75) 100%); }
.hero-grid { position: relative; z-index: 3; width: 100%; max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 1.25fr .9fr; gap: 60px; align-items: center; }

.hero-badge { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; color: #c9d2ff; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14); padding: 8px 16px; border-radius: 100px; letter-spacing: .02em; margin-bottom: 28px; }
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: oklch(0.8 0.16 150); box-shadow: 0 0 10px oklch(0.8 0.16 150); animation: pulse 2s ease-in-out infinite; }
.hero-name { font-family: 'Space Grotesk', sans-serif; font-size: clamp(48px,7vw,92px); font-weight: 700; line-height: .98; letter-spacing: -.03em; margin: 0; color: #fff; }
.hero-sub { font-family: 'JetBrains Mono', monospace; font-size: clamp(15px,1.5vw,19px); color: #aeb6d0; margin: 22px 0 0; min-height: 28px; }
.hero-prefix { color: var(--accent-purple); }
.cursor { display: inline-block; width: 9px; height: 18px; background: var(--accent-purple); vertical-align: -3px; animation: pulse 1s step-end infinite; margin-left: 2px; }
.hero-desc { font-size: 18px; line-height: 1.65; color: var(--text-mid); max-width: 540px; margin: 24px 0 0; }
.hero-desc strong { color: var(--text); font-weight: 600; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin: 34px 0 0; }
.hero-social { display: flex; gap: 12px; margin: 30px 0 0; }
.social-btn { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 50%; padding: 0; color: #c9d2ff; font-family: 'JetBrains Mono', monospace; font-size: 13px; }

.hero-visual { position: relative; display: flex; align-items: center; justify-content: center; min-height: 400px; }
.ring { position: absolute; border-radius: 50%; }
.ring-1 { width: 340px; height: 340px; border: 1px solid rgba(160,140,255,.3); animation: spin 24s linear infinite; }
.ring-2 { width: 400px; height: 400px; border: 1px dashed rgba(120,200,220,.2); animation: spin 36s linear infinite reverse; }
.profile-frame { position: relative; width: 280px; height: 280px; border-radius: 50%; padding: 4px; background: linear-gradient(135deg, oklch(0.7 0.18 285), oklch(0.75 0.15 200)); box-shadow: 0 24px 70px rgba(110,80,220,.45); }
.profile-inner { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: #0a0c18; }
.profile-inner img { width: 100%; height: 100%; object-fit: cover; }
.float-tag { position: absolute; font-size: 13px; color: #e6e9f5; padding: 8px 15px; border-radius: 100px; animation: floaty 4s ease-in-out infinite; }
.tag-1 { top: 6%; left: -6%; }
.tag-2 { top: 28%; right: -12%; animation-delay: .8s; }
.tag-3 { bottom: 18%; left: -14%; animation-delay: 1.4s; }
.tag-4 { bottom: 2%; right: -4%; animation-delay: 2s; }

.scroll-hint { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 4; width: 24px; height: 38px; border: 2px solid rgba(255,255,255,.25); border-radius: 14px; display: flex; justify-content: center; padding-top: 7px; }
.scroll-dot { width: 4px; height: 8px; border-radius: 2px; background: #fff; animation: scrolldot 1.6s ease-in-out infinite; }

/* ============================================================
   SECTION SHELL
   ============================================================ */
.section { max-width: var(--maxw); margin: 0 auto; padding: 60px var(--pad-x); }
.section-head { margin-bottom: 40px; }
.section-title { font-family: 'Space Grotesk', sans-serif; font-size: clamp(32px,4vw,46px); font-weight: 700; color: #fff; margin: 10px 0 0; letter-spacing: -.02em; }

/* ---------- stats ---------- */
.section-stats { max-width: var(--maxw); margin: 0 auto; padding: 30px var(--pad-x) 70px; }
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.stat-card { border-radius: 20px; padding: 30px 26px; transition: transform .4s, background .4s, border-color .4s; }
.stat-card:hover { transform: translateY(-5px); }
.stat-num { font-family: 'Space Grotesk', sans-serif; font-size: 44px; font-weight: 700; }
.stat-label { font-size: 14.5px; font-weight: 600; color: var(--text); margin: 8px 0 3px; }
.stat-desc { font-size: 12.5px; color: var(--text-faint); margin: 0; }

/* ---------- stack ---------- */
.stack-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.stack-card { border-radius: 18px; padding: 24px; transition: transform .4s, background .4s, border-color .4s; }
.stack-card:hover { transform: translateY(-5px); }
.stack-title { font-family: 'Space Grotesk', sans-serif; font-size: 16px; color: #fff; margin: 0 0 16px; }

/* ============================================================
   PROJECTS
   ============================================================ */
.featured { border-radius: 24px; padding: 40px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; margin-bottom: 24px; transition: transform .4s, background .4s, border-color .4s; }
.featured-meta { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.featured-badge { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: #05060d; background: var(--grad); padding: 5px 11px; border-radius: 6px; font-weight: 600; }
.featured-gh { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; color: var(--text-dim); }
.featured-gh:hover { color: #fff; }
.featured-title { font-family: 'Space Grotesk', sans-serif; font-size: 34px; font-weight: 700; color: #fff; margin: 0 0 14px; }
.featured-desc { font-size: 15.5px; line-height: 1.7; color: var(--text-mid); margin: 0 0 22px; }
.featured-metrics { display: flex; gap: 26px; margin-bottom: 22px; flex-wrap: wrap; }
.metric-val { font-family: 'Space Grotesk', sans-serif; font-size: 24px; font-weight: 700; }
.metric-label { font-size: 11.5px; color: var(--text-faint); }
.featured-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-accent { font-size: 12px; color: #cfd5ea; background: rgba(160,140,255,.1); border: 1px solid rgba(160,140,255,.25); padding: 5px 11px; border-radius: 7px; }

/* riskguard terminal */
.rg-terminal { border-radius: 16px; overflow: hidden; border: 1px solid rgba(255,255,255,.1); background: #070910; font-family: 'JetBrains Mono', monospace; box-shadow: 0 20px 50px rgba(0,0,0,.4); }
.rg-bar { display: flex; align-items: center; gap: 7px; padding: 13px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.rg-dot { width: 10px; height: 10px; border-radius: 50%; }
.rg-dot-r { background: #ff5f56; }
.rg-dot-y { background: #ffbd2e; }
.rg-dot-g { background: #27c93f; }
.rg-title { margin-left: 8px; font-size: 11.5px; color: #5a6480; }
.rg-env { margin-left: auto; font-size: 10px; color: var(--text-faint); border: 1px solid rgba(255,255,255,.12); padding: 2px 7px; border-radius: 4px; }
.rg-feed { padding: 16px; font-size: 12px; line-height: 1.85; min-height: 180px; color: #8fb8a8; }
.rg-status { display: flex; gap: 14px; padding: 11px 16px; border-top: 1px solid rgba(255,255,255,.08); font-size: 11px; color: var(--text-faint); }
.rg-live { display: flex; align-items: center; gap: 5px; color: oklch(0.8 0.16 150); }
.rg-live-dot { width: 7px; height: 7px; border-radius: 50%; background: oklch(0.8 0.16 150); animation: pulse 1.4s infinite; }
.rg-flag-count { margin-left: auto; color: #ff8080; }

/* project grid */
.projects-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.pcard { transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .35s, background .35s; }
.pcard:hover { transform: translateY(-6px); }
.project-card { border-radius: 18px; padding: 28px; }
.project-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.project-emoji { font-size: 28px; }
.project-gh { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: var(--text-dim); }
.project-gh:hover { color: #fff; }
.project-title { font-family: 'Space Grotesk', sans-serif; font-size: 21px; font-weight: 600; color: #fff; margin: 0 0 10px; }
.project-desc { font-size: 13.5px; line-height: 1.65; color: var(--text-dim); margin: 0 0 18px; }

/* ============================================================
   EXPERIENCE TIMELINE
   ============================================================ */
.timeline { position: relative; padding-left: 34px; }
.timeline-line { position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(180deg, oklch(0.7 0.18 285), oklch(0.72 0.15 200), transparent); }
.timeline-item { position: relative; margin-bottom: 26px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot { position: absolute; left: -34px; top: 6px; width: 16px; height: 16px; border-radius: 50%; }
.dot-purple { background: oklch(0.7 0.18 285); box-shadow: 0 0 0 4px rgba(150,120,255,.18); }
.dot-cyan { background: oklch(0.72 0.15 200); box-shadow: 0 0 0 4px rgba(120,200,220,.18); }
.dot-white { background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.14); }
.timeline-card { border-radius: 18px; padding: 28px; }
.timeline-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.timeline-role { font-family: 'Space Grotesk', sans-serif; font-size: 21px; font-weight: 600; color: #fff; margin: 0; }
.timeline-org { font-size: 14px; margin: 5px 0 0; }
.org-purple { color: oklch(0.8 0.12 285); }
.org-cyan { color: oklch(0.82 0.12 200); }
.org-white { color: #cfd5ea; }
.timeline-date { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--text-faint); white-space: nowrap; }
.timeline-note { font-size: 14px; color: var(--text-dim); margin: 14px 0 0; font-style: italic; }
.timeline-note.edu { font-style: normal; margin: 12px 0 0; }
.timeline-bullets { margin: 14px 0 0; padding-left: 18px; color: var(--text-dim); font-size: 14px; line-height: 1.7; }
.timeline-bullets li { margin-bottom: 4px; }
.nested-role { margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.08); }
.nested-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.nested-title { font-family: 'Space Grotesk', sans-serif; font-size: 16px; color: #e3e7f4; margin: 0; }
.nested-role .timeline-bullets { margin-top: 12px; }
.timeline-card .chip-row { margin-top: 16px; }

/* ============================================================
   CONTACT
   ============================================================ */
.section-contact { position: relative; max-width: var(--maxw); margin: 0 auto; padding: 80px var(--pad-x) 60px; text-align: center; }
.contact-glow { position: absolute; width: 500px; height: 500px; border-radius: 50%; left: 50%; top: 30%; transform: translateX(-50%); background: radial-gradient(circle, oklch(0.62 0.21 280) 0%, transparent 65%); filter: blur(70px); opacity: .35; }
.contact-inner { position: relative; z-index: 2; }
.contact-title { font-family: 'Space Grotesk', sans-serif; font-size: clamp(38px,6vw,68px); font-weight: 700; color: #fff; margin: 12px 0 0; letter-spacing: -.03em; }
.contact-desc { font-size: 17px; line-height: 1.65; color: var(--text-mid); max-width: 540px; margin: 22px auto 0; }
.contact-links { display: flex; gap: 28px; justify-content: center; margin: 30px 0 0; font-family: 'JetBrains Mono', monospace; font-size: 13px; flex-wrap: wrap; }
.contact-links a { color: var(--text-mid); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid rgba(255,255,255,.08); padding: 26px var(--pad-x); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #6a7290; max-width: var(--maxw); margin: 40px auto 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .projects-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 860px) {
  .nav-links { position: fixed; top: 0; right: 0; height: 100vh; width: min(78vw,320px); flex-direction: column; align-items: flex-start; justify-content: center; gap: 26px; padding: 0 40px; background: rgba(8,9,18,.96); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-left: 1px solid rgba(255,255,255,.1); transform: translateX(100%); transition: transform .35s cubic-bezier(.2,.7,.2,1); font-size: 18px; }
  .nav-links.open { transform: translateX(0); }
  .hamburger { display: flex; z-index: 101; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { order: -1; }
  .featured { grid-template-columns: 1fr; gap: 28px; padding: 32px; }
}
@media (max-width: 760px) {
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .stack-grid { grid-template-columns: repeat(2,1fr); }
  .projects-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hero { padding: 100px var(--pad-x) 64px; }
  .ring-1 { width: 280px; height: 280px; }
  .ring-2 { width: 330px; height: 330px; }
  .profile-frame { width: 230px; height: 230px; }
  .hero-visual { min-height: 340px; }
  .featured-metrics { gap: 18px; }
  .footer { flex-direction: column; gap: 6px; }
}
@media (max-width: 440px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-glow, .ring, .badge-dot, .cursor, .scroll-dot, .rg-live-dot { animation: none !important; }
}
