:root {
  --bg: #07111f;
  --bg-2: #0b172a;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.10);
  --border: rgba(255, 255, 255, 0.12);
  --text: #f5f7fb;
  --muted: #9eabc0;
  --accent: #8be9ff;
  --accent-2: #c084fc;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.30);
  --radius: 28px;
}

[data-theme="light"] {
  --bg: #f5f8fc;
  --bg-2: #ffffff;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.92);
  --border: rgba(13, 25, 43, 0.10);
  --text: #0b1420;
  --muted: #58657a;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  background: linear-gradient(180deg, var(--bg), var(--bg-2));
  color: var(--text);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at top, rgba(255,255,255,0.08), transparent 42%);
  z-index: -1;
}

.bg-orbs span {
  position: fixed;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.55;
  z-index: -2;
}

.bg-orbs span:nth-child(1) {
  top: -120px;
  left: -90px;
  width: 380px;
  height: 380px;
  background: rgba(56, 189, 248, 0.22);
}

.bg-orbs span:nth-child(2) {
  top: 12%;
  right: -120px;
  width: 340px;
  height: 340px;
  background: rgba(192, 132, 252, 0.18);
}

.bg-orbs span:nth-child(3) {
  bottom: -140px;
  left: 30%;
  width: 380px;
  height: 380px;
  background: rgba(16, 185, 129, 0.14);
}

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px 28px;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
}

.brand-badge {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  font-weight: 900;
  color: #07111f;
  background: linear-gradient(135deg, #8be9ff, #c084fc);
}

.brand-text {
  display: grid;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 0.98rem;
}

.brand-text small {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 3px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: color .2s ease;
}

.nav a:hover {
  color: var(--text);
}

.header-actions {
  display: flex;
  gap: 10px;
}

.theme-btn,
.menu-btn {
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--text);
  border-radius: 14px;
  width: 44px;
  height: 44px;
  cursor: pointer;
}

.menu-btn {
  display: none;
}

.section {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 88px 0;
}

.glass {
  border: 1px solid var(--border);
  background: var(--glass);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: center;
  min-height: calc(100vh - 88px);
}

.eyebrow-row,
.mini-tags,
.cta-row,
.contact-actions,
.project-links,
.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pill,
.mini-tags span {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--glass) 85%, transparent);
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--text);
  font-size: 0.92rem;
}

.hero h1 {
  margin: 24px 0 18px;
  font-size: clamp(3rem, 7vw, 5.9rem);
  line-height: 0.94;
  letter-spacing: -0.06em;
}

.lead {
  max-width: 680px;
  font-size: 1.1rem;
  line-height: 1.9;
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  padding: 14px 22px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid var(--border);
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: white;
  color: #07111f;
}

.btn-secondary {
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
}

.metrics-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  border-radius: 22px;
  padding: 18px;
  border: 1px solid var(--border);
  background: var(--glass);
}

.metric-card strong {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.metric-card span {
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-panel {
  border-radius: var(--radius);
  overflow: hidden;
}

.window-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.window-bar span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
}

.profile-frame {
  aspect-ratio: 4 / 3.6;
  overflow: hidden;
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 10% 35%;
  display: block;
}

.hero-meta {
  padding: 22px 24px 24px;
}

.hero-meta h2,
.section-heading h2,
.featured-content h3,
.process-card h3,
.timeline-item h3,
.side-card h3,
.contact-shell h2,
.callout-card h2 {
  margin: 0;
}

.hero-meta p {
  margin: 8px 0 16px;
  color: var(--muted);
}

.section-heading {
  display: grid;
  gap: 10px;
  max-width: 820px;
}

.section-heading p,
.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  font-size: 0.78rem;
  color: var(--muted);
}

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: start;
}

.card-stack,
.skill-card,
.process-card,
.timeline-item,
.side-card,
.contact-shell,
.callout-card {
  border-radius: var(--radius);
  padding: 28px;
}

.card-stack p,
.featured-content p,
.process-card p,
.timeline-item p,
.side-card p,
.contact-shell p,
.callout-card p,
.project-body p,
.projects-intro {
  color: var(--muted);
  line-height: 1.8;
}

.skills-grid {
  margin-top: 34px;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.skill-card h3 {
  margin-bottom: 14px;
}

.featured-grid {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.featured-card {
  overflow: hidden;
  border-radius: var(--radius);
}

.featured-visual {
  min-height: 220px;
  color: white;
}


.featured-card:hover .browser-mockup {
  transform: translateY(-4px);
}

.browser-top {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid var(--border);
}

.browser-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
}

.featured-visual .browser-mockup {
  overflow: hidden;
  border-radius: 28px 28px 0 0;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  aspect-ratio: 16 / 17;
  transition: all 0.35s ease;
}

.featured-visual .browser-mockup img {
  width: 100%;
  height: 90%;
  display: block;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.visual-ai { 
  background: linear-gradient(135deg, rgba(56,189,248,0.26), rgba(192,132,252,0.26)); 
}

.visual-systems { 
  background: linear-gradient(135deg, rgba(16,185,129,0.24), rgba(56,189,248,0.16)); 
}

.visual-web { 
  background: linear-gradient(135deg, rgba(248,113,113,0.22), rgba(56,189,248,0.14)); 
}

.visual-algorithms { 
  background: linear-gradient(135deg, rgba(192,132,252,0.20), rgba(59,130,246,0.20)); 
}

.visual-games { 
  background: linear-gradient(135deg, rgba(241, 99, 231, 0.2), rgba(26, 165, 234, 0.2)); 
}

.project-visual .browser-mockup {
  aspect-ratio: 16 / 12;
  overflow: hidden;
  border-radius: 28px 28px 0 0;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid var(--border);
  display: flex;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

.project-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
}

.hover-video {
  transition: transform 0.4s ease;
}

.project-showcase:hover .hover-video {
  transform: scale(1.03);
}

.featured-card:hover .browser-mockup img {
  transform: scale(1.05);
}

.featured-content {
  padding: 24px;
}

.topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.project-top a {
  color: white;
  font-size: 1.3rem;
  text-decoration: none;
}

.topline a,
.project-links a {
  color: #dce7f7;
  text-decoration: none;
  font-weight: 700;
}

.project-links a:hover {
  color: white;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(139,233,255,0.24);
  background: rgba(139,233,255,0.08);
  color: color-mix(in srgb, var(--accent) 80%, white);
  font-size: 0.8rem;
  font-weight: 700;
}

.center-cta {
  margin-top: 28px;
  text-align: center;
}

.process-grid {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.process-card span {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin-bottom: 12px;
}

.timeline {
  display: grid;
  gap: 16px;
  margin-top: 34px;
}

.timeline-item .year,
.bottom-grid .year {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.bottom-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.side-card ul,
.project-body ul {
  color: var(--muted);
  line-height: 1.8;
  padding-left: 18px;
}

/* Experience section styling using the SAME classes */
#experience {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 60px 1fr;
  gap: 28px 28px;
  align-items: start;
}

#experience .section-heading {
  grid-column: 1;
  grid-row: 1;
  max-width: 520px;
}

#experience .timeline {
  grid-column: 3;
  grid-row: 1;
  display: grid;
  gap: 16px;
  margin-top: 0;
}

#experience .bottom-grid {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 520px;
}

#experience .side-card {
  width: 100%;
}

#experience::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(50% - 1px);
  width: 2px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(139, 233, 255, 0.95),
    rgba(192, 132, 252, 0.95),
    rgba(139, 233, 255, 0.95),
    transparent
  );
  box-shadow: 0 0 18px rgba(139, 233, 255, 0.55);
  pointer-events: none;
}

#experience::after {
  content: "";
  position: absolute;
  top: 12px;
  left: calc(50% - 7px);
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: white;
  box-shadow:
    0 0 10px rgba(255, 255, 255, 0.95),
    0 0 24px rgba(139, 233, 255, 0.85),
    0 0 40px rgba(192, 132, 252, 0.55);
  animation: journeyPulse 2.6s infinite ease-in-out;
  pointer-events: none;
}

#experience .timeline-item {
  position: relative;
}

#experience .timeline-item::before {
  content: "";
  position: absolute;
  top: 28px;
  left: -56px;
  width: 22px;
  height: 2px;
  background: rgba(139, 233, 255, 0.75);
  box-shadow: 0 0 14px rgba(139, 233, 255, 0.5);
}

#experience .side-card {
  max-width: 100%;
}

#experience .bottom-grid .side-card:nth-child(1),
#experience .bottom-grid .side-card:nth-child(2),
#experience .bottom-grid .side-card:nth-child(3) {
  grid-column: 1;
}

.cert-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cert-list li {
  position: relative;

  padding: 14px 16px 14px 50px;

  border: 1px solid var(--border);
  border-radius: 16px;

  background: rgba(255,255,255,0.03);

  color: var(--muted);
  line-height: 1.6;

  transition: all 0.3s ease;
}

.cert-list li:hover {
  transform: translateX(6px);
  background: rgba(255,255,255,0.06);
  border-color: rgba(139,233,255,0.35);

  box-shadow:
    0 0 20px rgba(139,233,255,0.08);
}

.cert-list li::before {
  content: "✓";

  position: absolute;
  left: 16px;
  top: 50%;

  transform: translateY(-50%);

  width: 22px;
  height: 22px;

  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 0.8rem;
  font-weight: 700;

  color: #07111f;
  background: linear-gradient(
    135deg,
    var(--accent),
    var(--accent-2)
  );
}

.cert-list strong {
  display: block;
  margin-bottom: 3px;

  color: var(--text);
  font-weight: 700;
}

@keyframes journeyPulse {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.9; }
  50% { transform: translateY(4px) scale(1.15); opacity: 1; }
}

.contact-shell {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.footer {
  padding: 28px;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.projects-page .projects-hero {
  padding-top: 62px;
}

.projects-intro {
  max-width: 760px;
  font-size: 1.05rem;
}

.project-filters {
  margin-top: 28px;
}

.filter-btn {
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--text);
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 700;
  cursor: pointer;
}

.filter-btn.active,
.filter-btn:hover {
  background: white;
  color: #07111f;
}

.projects-showcase-grid {
  display: grid;
  gap: 22px;
}

.project-showcase {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  overflow: hidden;
  padding: 0;
  border-radius: var(--radius);
}

.project-visual {
  min-height: 320px;
  color: white;
}

.project-body {
  padding: 28px;
}

.project-body h2 {
  margin: 16px 0 10px;
}

.project-body ul {
  margin-bottom: 0;
}

.callout-card {
  text-align: center;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .7s ease, transform .7s ease;
}

@media (max-width: 1024px) {
  .hero,
  .split,
  .featured-grid,
  .skills-grid,
  .process-grid,
  .bottom-grid,
  .contact-shell,
  .project-showcase {
    grid-template-columns: 1fr;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section {
    width: min(1200px, calc(100% - 24px));
  }

  #experience {
    grid-template-columns: 1fr;
  }

  #experience::before,
  #experience::after {
    display: none;
  }

  #experience .section-heading,
  #experience .timeline,
  #experience .bottom-grid {
    grid-column: auto;
    grid-row: auto;
  }

  #experience .timeline-item::before {
    display: none;
  }
}

@media (max-width: 760px) {
  .header {
    padding: 14px 16px;
  }

  .nav {
    display: none;
    position: absolute;
    top: 74px;
    left: 16px;
    right: 16px;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    border-radius: 22px;
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    border: 1px solid var(--border);
  }

  .nav.open {
    display: flex;
  }

  .menu-btn {
    display: inline-grid;
    place-items: center;
  }

  .hero h1 {
    font-size: clamp(2.8rem, 15vw, 4.6rem);
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .contact-shell {
    text-align: left;
  }
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;

  width: 55px;
  height: 55px;

  border: 1px solid var(--border);
  border-radius: 50%;

  background: var(--glass);
  backdrop-filter: blur(18px);

  color: var(--text);
  font-size: 1.4rem;
  font-weight: 700;

  cursor: pointer;
  z-index: 999;

  opacity: 0;
  visibility: hidden;

  transform: translateY(20px);

  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    visibility 0.3s ease,
    box-shadow 0.3s ease;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow:
    0 0 15px rgba(139, 233, 255, 0.4),
    0 0 30px rgba(192, 132, 252, 0.3);
}

.back-to-top:active {
  transform: scale(0.95);
}
