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

:root {
  --bg:        #0a0a0f;
  --bg-2:      #0f0f1a;
  --surface:   #13131f;
  --surface-2: #1a1a2e;
  --border:    rgba(255,255,255,0.07);
  --accent:    #6366f1;
  --accent-2:  #818cf8;
  --accent-glow: rgba(99,102,241,0.25);
  --text:      #e2e8f0;
  --text-muted:#94a3b8;
  --text-dim:  #475569;
  --mono:      'JetBrains Mono', monospace;
  --sans:      'Inter', system-ui, sans-serif;
  --radius:    12px;
  --radius-lg: 20px;
  --transition: 0.2s ease;
}

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

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

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 3px; }

/* navbar */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  background: rgba(10,10,15,0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

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

.nav-logo {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--accent-2);
  letter-spacing: 0.05em;
  padding: 6px 12px;
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: 8px;
  transition: all var(--transition);
}
.nav-logo:hover { background: var(--accent-glow); border-color: var(--accent); }

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-family: var(--mono);
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--accent-2); }

.nav-resume {
  color: var(--accent-2) !important;
  border: 1px solid rgba(99,102,241,0.4);
  border-radius: 6px;
  padding: 5px 14px;
  transition: all var(--transition);
}
.nav-resume:hover {
  background: var(--accent-glow) !important;
  border-color: var(--accent);
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}
.btn-primary:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--accent-glow);
}
.btn-outline {
  background: transparent;
  color: var(--accent-2);
  border: 1px solid rgba(99,102,241,0.5);
}
.btn-outline:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.btn-lg { padding: 16px 40px; font-size: 1.05rem; }

/* global background */
#global-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.global-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: grid-shift 24s ease-in-out infinite;
}

/* per-section orb layers */
.section-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
section { position: relative; }
.section-inner { position: relative; z-index: 1; }
.section-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.18;
}

.sorb-a {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #6366f1, transparent 70%);
  top: -100px; right: -80px;
  animation: orb-drift-2 16s ease-in-out infinite;
}
.sorb-b {
  width: 300px; height: 300px;
  background: radial-gradient(circle, #818cf8, transparent 70%);
  bottom: -60px; left: 10%;
  animation: orb-drift-1 20s ease-in-out infinite;
  opacity: 0.1;
}
.sorb-c {
  width: 450px; height: 450px;
  background: radial-gradient(circle, #0082fb, transparent 70%);
  top: 5%; left: -100px;
  animation: orb-drift-1 19s ease-in-out infinite;
  opacity: 0.12;
}
.sorb-d {
  width: 350px; height: 350px;
  background: radial-gradient(circle, #6366f1, transparent 70%);
  bottom: 10%; right: -60px;
  animation: orb-drift-2 22s ease-in-out infinite;
  opacity: 0.1;
}
.sorb-e {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #818cf8, transparent 70%);
  top: -60px; left: 30%;
  animation: orb-drift-2 17s ease-in-out infinite;
  opacity: 0.13;
}
.sorb-f {
  width: 300px; height: 300px;
  background: radial-gradient(circle, #0082fb, transparent 70%);
  bottom: 0; right: 5%;
  animation: orb-drift-1 21s ease-in-out infinite;
  opacity: 0.1;
}
.sorb-g {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #6366f1, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: orb-drift-1 18s ease-in-out infinite;
  opacity: 0.15;
}

/* hero */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 80px 2rem 0;
}

.hero-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
}
.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #6366f1, transparent 70%);
  top: -100px; right: -100px;
}
.orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #818cf8, transparent 70%);
  bottom: 0; right: 300px;
  opacity: 0.15;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding-bottom: 4rem;
}

.hero-greeting {
  font-family: var(--mono);
  color: var(--accent-2);
  font-size: 1rem;
  margin-bottom: 12px;
}

.hero-name {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  background: linear-gradient(135deg, #e2e8f0 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.hero-title {
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.hero-title .at { color: var(--accent-2); }

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 40px;
  line-height: 1.8;
}

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

/* sections */
section { padding: 100px 2rem; }

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  min-width: 40px;
}
.num {
  font-family: var(--mono);
  color: var(--accent-2);
  font-size: 0.85em;
  font-weight: 400;
}

/* about */
#about { background: var(--bg-2); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 64px;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.8;
}
.about-text strong { color: var(--text); }

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.skills-list li {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--accent-2);
  padding: 5px 14px;
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: 6px;
  background: rgba(99,102,241,0.06);
}

.about-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), background var(--transition);
}
.card-badge:hover {
  border-color: rgba(99,102,241,0.3);
  background: var(--surface-2);
}
.badge-icon { font-size: 1.4rem; flex-shrink: 0; }
.card-badge div { display: flex; flex-direction: column; }
.card-badge strong { font-size: 0.9rem; font-weight: 600; }
.card-badge span { font-size: 0.8rem; color: var(--text-muted); }

/* experience */
#experience { background: var(--bg); }

.timeline { display: flex; flex-direction: column; }

.timeline-item {
  display: flex;
  gap: 24px;
}

.tl-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  padding-top: 6px;
}

.tl-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
  flex-shrink: 0;
}
.tl-dot.active {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.35), 0 0 10px rgba(99,102,241,0.5);
}
.tl-line {
  flex: 1;
  width: 1px;
  background: var(--border);
  margin: 6px 0;
  min-height: 40px;
}
.timeline-item:last-child .tl-line { display: none; }

.tl-card {
  flex: 1;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  transition: border-color var(--transition), transform var(--transition);
}
.tl-card:hover {
  border-color: rgba(99,102,241,0.3);
  transform: translateX(4px);
}

.tl-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.tl-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.tl-logo-wrap {
  width: 72px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  padding: 6px 8px;
}
.tl-logo-meta {
  background: rgba(0,130,251,0.08);
  border-color: rgba(0,130,251,0.25);
  box-shadow: 0 0 10px rgba(0,130,251,0.2), 0 0 20px rgba(0,130,251,0.08);
}
.tl-logo-uoft {
  background: rgba(0,47,101,0.15);
  border-color: rgba(100,140,220,0.3);
  box-shadow: 0 0 10px rgba(100,140,220,0.15), 0 0 20px rgba(100,140,220,0.06);
}
.tl-logo-veeva {
  background: rgba(245,140,15,0.08);
  border-color: rgba(245,140,15,0.3);
  box-shadow: 0 0 10px rgba(245,140,15,0.15), 0 0 20px rgba(245,140,15,0.06);
}
.tl-logo-careem {
  background: rgba(26,200,160,0.08);
  border-color: rgba(26,200,160,0.3);
  box-shadow: 0 0 10px rgba(26,200,160,0.15), 0 0 20px rgba(26,200,160,0.06);
}
.tl-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.tl-card-meta {
  border-color: rgba(0,130,251,0.2);
}
.tl-card-meta:hover {
  border-color: rgba(0,130,251,0.45);
}
.tl-role {
  font-size: 1.05rem;
  font-weight: 600;
}
.tl-company {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0082FB;
  margin-top: 3px;
}
.tl-location {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.tl-date-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.tl-date {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  white-space: nowrap;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.tl-duration {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  text-align: right;
  padding-right: 2px;
}

.tl-bullets {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.tl-bullets li {
  font-size: 0.92rem;
  color: var(--text-muted);
  padding-left: 18px;
  position: relative;
  line-height: 1.6;
}
.tl-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.75rem;
  top: 3px;
}

.tl-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tl-tags span {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
}

/* projects */
#projects { background: var(--bg-2); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.project-card {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.project-card:hover {
  border-color: rgba(99,102,241,0.4);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.project-icon { font-size: 1.8rem; }
.project-links a {
  display: flex;
  align-items: center;
  color: var(--text-dim);
  transition: color var(--transition);
}
.project-links a:hover { color: var(--accent-2); }

.project-card h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}
.project-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
  flex: 1;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.project-tags span {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent-2);
  padding: 3px 8px;
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 4px;
}

/* contact */
#contact { background: var(--bg); }

.contact-inner {
  max-width: 600px;
  text-align: center;
}
.contact-inner .section-title { justify-content: center; }
.contact-inner .section-title::after { display: none; }
.contact-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  line-height: 1.8;
}
.contact-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* footer */
footer {
  padding: 28px 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-links a {
  color: var(--text-dim);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--accent-2); }

/* animations */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes orb-drift-1 {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(-40px, 30px) scale(1.05); }
  66%  { transform: translate(30px, -20px) scale(0.97); }
  100% { transform: translate(0, 0) scale(1); }
}
@keyframes orb-drift-2 {
  0%   { transform: translate(0, 0) scale(1); }
  40%  { transform: translate(50px, -35px) scale(1.08); }
  70%  { transform: translate(-20px, 20px) scale(0.95); }
  100% { transform: translate(0, 0) scale(1); }
}
.orb-1 { animation: orb-drift-1 18s ease-in-out infinite; }
.orb-2 { animation: orb-drift-2 14s ease-in-out infinite; }

@keyframes grid-shift {
  0%   { background-position: 0 0, 0 0; opacity: 1; }
  50%  { background-position: 30px 30px, 30px 30px; opacity: 0.6; }
  100% { background-position: 0 0, 0 0; opacity: 1; }
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: var(--accent-2);
  pointer-events: none;
  animation: particle-float linear infinite;
  will-change: transform, opacity;
}
@keyframes particle-float {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(-100vh) translateX(var(--drift)); opacity: 0; }
}

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  #navbar { padding: 0 1rem; }
  section { padding: 70px 1.2rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 1.2rem; }
  .nav-links a { font-size: 0.8rem; }
  .hero-cta { flex-direction: column; align-items: flex-start; }
}
