/* Base */
:root {
  --bg: #0b1221;
  --bg-elev: rgba(255, 255, 255, 0.03);
  --text: #e6ecff;
  --muted: #aab3cf;
  --brand: #7aa2ff;
  --brand-2: #8be9fd;
  --accent: #c1ff72;
  --card: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: radial-gradient(1200px 600px at 80% -10%, rgba(122,162,255,0.18), transparent 50%),
              radial-gradient(1000px 500px at -10% 10%, rgba(139,233,253,0.12), transparent 50%),
              var(--bg);
  line-height: 1.6;
}

.background-gradient {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(600px 300px at 20% 10%, rgba(193,255,114,0.07), transparent 60%);
  filter: blur(40px);
}

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.top-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: stretch; padding-top: 24px; }
.col-left, .col-right { display: flex; flex-direction: column; gap: 24px; }
.stack + .stack { margin-top: 0; }
.section-title { font-family: "Space Grotesk", Inter, sans-serif; font-size: 20px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 20px; }
.section-lead { color: var(--text); opacity: 0.9; margin: 0 0 28px; }

.skip-link { position: absolute; left: -999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { position: static; width: auto; height: auto; padding: 8px 12px; background: var(--card); border-radius: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; backdrop-filter: saturate(130%) blur(10px); background: linear-gradient(to bottom, rgba(11,18,33,0.8), rgba(11,18,33,0.3)); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #0b1221; font-weight: 800; font-family: "Space Grotesk", Inter, sans-serif; box-shadow: var(--shadow); }
.brand-text { opacity: 0.9; font-weight: 600; letter-spacing: 0.02em; }
.nav-links { list-style: none; display: flex; gap: 14px; margin: 0; padding: 0; align-items: center; }
.nav-links a { color: var(--muted); text-decoration: none; padding: 8px 10px; border-radius: 8px; transition: background 0.2s ease, color 0.2s ease; }
.nav-links a:hover { background: var(--bg-elev); color: var(--text); }

.theme-toggle { background: transparent; border: 1px solid var(--border); color: var(--muted); padding: 8px; border-radius: 10px; cursor: pointer; display: none; }

/* Buttons, chips, badges */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; border-radius: 12px; text-decoration: none; font-weight: 600; border: 1px solid var(--border); color: var(--text); background: var(--bg-elev); transition: transform 0.06s ease, background 0.2s ease, border-color 0.2s ease; }
.btn:hover { transform: translateY(-1px); border-color: rgba(122,162,255,0.7); }
.btn-primary { background: linear-gradient(135deg, rgba(122,162,255,0.35), rgba(139,233,253,0.3)); border-color: rgba(122,162,255,0.6); }
.btn-ghost { background: transparent; }
.badge { display: inline-block; padding: 6px 10px; border-radius: 999px; background: var(--bg-elev); border: 1px solid var(--border); color: var(--muted); font-weight: 600; margin-right: 8px; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; padding: 0; margin: 10px 0 0; list-style: none; }
.chip { padding: 8px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); color: var(--muted); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 28px; align-items: center; padding: 56px 0 24px; }
.top-grid .hero { padding-top: 0; }
.name { font-family: "Space Grotesk", Inter, sans-serif; font-weight: 800; font-size: 42px; letter-spacing: -0.02em; margin: 0 0 6px; white-space: nowrap; }
.title { font-size: 20px; color: var(--muted); margin: 0 0 14px; }
.tagline { font-size: 16px; opacity: 0.95; margin: 0 0 18px; }
.hero-visual { display: grid; place-items: center; }
.hero-photo { width: 280px; height: 280px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); box-shadow: var(--shadow); }
/* Inline hero header (image + name on one line) */
.hero-header { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.hero-photo-inline { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); box-shadow: var(--shadow); }
.hero-heading .name { margin: 0; }
.hero-heading .title { margin: 4px 0 8px; }
/* Stacked photo row */
.hero-photo-row { margin: 0 0 10px; }
.orbital { position: relative; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(122,162,255,0.2), transparent 55%), radial-gradient(circle at 70% 70%, rgba(139,233,253,0.2), transparent 55%), var(--bg-elev); border: 1px solid var(--border); box-shadow: var(--shadow); }
.orbital .dot { position: absolute; width: 10px; height: 10px; background: var(--accent); border-radius: 50%; top: 50%; left: 50%; transform: translate(-50%, -50%); animation: orbit 14s linear infinite; box-shadow: 0 0 20px rgba(193,255,114,0.7);
}
.orbital .ring { position: absolute; inset: 18px; border-radius: 50%; border: 1px dashed rgba(193,255,114,0.2); }
.orbital .ring-2 { inset: 46px; border-color: rgba(122,162,255,0.25); }
@keyframes orbit { 0% { transform: rotate(0deg) translateX(110px) rotate(0deg); } 100% { transform: rotate(360deg) translateX(110px) rotate(-360deg); } }

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.skill-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.skill-card h4 { margin: 0 0 8px; font-size: 16px; font-weight: 700; }
.skill-list { display: flex; gap: 8px; flex-wrap: wrap; }
.skill { padding: 6px 10px; border-radius: 999px; background: var(--bg-elev); border: 1px solid var(--border); color: var(--muted); font-weight: 600; }

/* Cards / Projects */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 10px; background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)); border: 1px solid var(--border); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); }
.card h4 { margin: 0; font-size: 18px; font-weight: 700; }
.card p { margin: 0; color: var(--muted); }
.meta { display: flex; gap: 8px; flex-wrap: wrap; }
.meta .tag { padding: 6px 10px; border-radius: 999px; background: var(--bg-elev); border: 1px solid var(--border); color: var(--muted); font-weight: 600; }
.card .actions { display: flex; gap: 10px; margin-top: 8px; }
.demo-video { width: 100%; border-radius: 12px; border: 1px solid var(--border); }

/* Demos layout - full half-screen videos with overlay captions */
#demosGrid { display: grid; grid-template-rows: 1fr 1fr; gap: 12px; min-height: 100vh; }
#demosGrid .card { position: relative; padding: 0; border: none; background: transparent; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
#demosGrid .demo-video { width: 100%; height: 100%; border: none; border-radius: 0; object-fit: cover; display: block; }
#demosGrid .card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 36%; background: linear-gradient(180deg, rgba(11,18,33,0) 0%, rgba(11,18,33,0.35) 40%, rgba(11,18,33,0.65) 100%); z-index: 1; }
#demosGrid .card h4 { position: absolute; left: 14px; bottom: 44px; z-index: 2; margin: 0; font-weight: 700; }
#demosGrid .card p { position: absolute; left: 14px; bottom: 14px; z-index: 2; margin: 0; color: #e6ecff; opacity: 0.95; max-width: 80%; }
#demosGrid .card .actions { position: absolute; right: 12px; bottom: 12px; z-index: 2; margin: 0; }

/* Lead video under About */
.lead-video-wrap { border-radius: 16px; overflow: hidden; border: 1px solid var(--border); background: #000; height: 100%; }
.lead-video { width: 100%; height: 100%; display: block; object-fit: cover; }
.video-caption { margin: 8px 0 0; color: var(--muted); }

/* Timeline */
.timeline { display: grid; gap: 14px; }
.timeline-item { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 16px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; }
.timeline-item .period { color: var(--muted); font-weight: 600; }
.timeline-item .role { margin: 0; font-weight: 700; }
.timeline-item .company a { color: var(--text); text-decoration: none; }
.timeline-item ul { margin: 8px 0 0 18px; padding: 0; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr; }
.contact-card { background: linear-gradient(135deg, rgba(122,162,255,0.1), rgba(139,233,253,0.08)); border: 1px solid rgba(122,162,255,0.3); border-radius: 16px; padding: 18px; }
.contact-card h4 { margin: 0 0 6px; font-size: 18px; }
.contact-card p { margin: 0 0 12px; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 20px 0; background: rgba(0,0,0,0.15); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.footer-left { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.social { list-style: none; display: flex; gap: 12px; margin: 0; padding: 0; }
.social a { color: var(--muted); text-decoration: none; }
.social a:hover { color: var(--text); }

/* Responsive */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .top-grid { grid-template-columns: 1fr; padding-top: 32px; }
  .top-grid .col-right { display: block; }
  .lead-video-wrap { height: auto; }
  .lead-video { height: auto; aspect-ratio: 16/9; }
  .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline-item { grid-template-columns: 1fr; }
  .theme-toggle { display: inline-flex; }
  #demosGrid { grid-template-rows: auto; min-height: auto; }
  #demosGrid .demo-video { height: 240px; }
}

@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .name { font-size: 34px; }
}


