:root {
  --blue-dark: #0b2a55;
  --blue-ocean: #1b65d6;
  --cyan-soft: #82def5;
  --blue-pale: #c2f0ff;
  --bg: #0b1630;
  --bg-2: #12294a;
  --text: #e6f1ff;
  --muted: #a9bcd6;
  --card: rgba(18, 33, 60, 0.9);
  --shadow: 0 20px 60px rgba(4, 10, 25, 0.45);
  --topbar: 86px;
  --safe-top: env(safe-area-inset-top, 0px);
  --vpad: 48px;
}

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

body {
  font-family: 'Roboto', system-ui, -apple-system, sans-serif;
  background: radial-gradient(120% 120% at 20% 20%, rgba(27, 101, 214, 0.28), transparent 60%),
              radial-gradient(100% 100% at 80% 0%, rgba(130, 222, 245, 0.18), transparent 55%),
              linear-gradient(135deg, var(--bg), var(--bg-2));
  color: var(--text);
  min-height: 100vh;
  scroll-behavior: smooth;
  padding-top: var(--safe-top);
}

h1, h2, h3, h4, .nav__link, .logo-main {
  font-family: 'Poppins', 'Roboto', sans-serif;
  font-weight: 600;
  color: var(--text);
}

a { color: inherit; text-decoration: none; }

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(16px + var(--safe-top)) 5vw 16px;
  z-index: 20;
  background: rgba(5, 12, 25, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(130, 222, 245, 0.12);
}

.logo-link { text-decoration: none; }

.logo {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-main { font-size: 1.5rem; letter-spacing: 0.05em; }
.logo-sub { font-size: 1.1rem; color: var(--muted); }

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

.nav__link {
  position: relative;
  font-weight: 600;
  color: var(--muted);
  padding-bottom: 6px;
  transition: color 0.2s ease;
}

.nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--blue-ocean);
  transition: width 0.2s ease;
}

.nav__link:hover,
.nav__link.active {
  color: var(--cyan-soft);
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

.mobile-toggle {
  display: none;
  background: var(--blue-ocean);
  color: #fff;
  border: none;
  padding: 10px 12px;
  font-size: 1.1rem;
  border-radius: 8px;
}

.page {
  margin-top: 0;
  scroll-snap-type: y proximity;
  scroll-padding-top: var(--topbar);
  position: relative;
}

.panel {
  min-height: calc(100vh - var(--topbar));
  padding: calc(var(--topbar) + 16px) 5vw var(--vpad);
  display: grid;
  align-items: center;
  position: relative;
  overflow: visible;
  scroll-snap-align: start;
  opacity: 1;
  transform: translateY(0);
  scroll-margin-top: var(--topbar);
  row-gap: 24px;
}

.has-js .panel {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.has-js .panel.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-heading {
  margin-bottom: 24px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--blue-pale);
  margin-bottom: 8px;
  font-weight: 700;
}

.lede { color: var(--muted); max-width: 640px; line-height: 1.6; }

.hero {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  align-items: center;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 12% -10% auto auto;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(130, 222, 245, 0.35), transparent 60%);
  filter: blur(12px);
  pointer-events: none;
}

.hero__content h1 {
  font-size: clamp(2.1rem, 2.7vw, 3rem);
  margin: 8px 0 12px;
}

.hero__actions { display: flex; gap: 12px; margin: 14px 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1.5px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease, color 0.2s ease;
}

.btn.primary { background: linear-gradient(135deg, var(--blue-ocean), var(--blue-dark)); color: #fff; box-shadow: var(--shadow); }
.btn.primary:hover { transform: translateY(-2px); }

.btn.ghost { border-color: var(--cyan-soft); color: var(--cyan-soft); background: transparent; }
.btn.ghost:hover { background: rgba(0, 119, 182, 0.08); }

.btn.full { width: 100%; }

.metrics { display: grid; grid-template-columns: repeat(3, minmax(80px, 1fr)); gap: 12px; margin-top: 12px; }
.metrics strong { display: block; font-size: 1.4rem; color: var(--cyan-soft); }
.metrics span { color: var(--muted); font-size: 0.95rem; }

.hero__visual { display: grid; gap: 14px; align-items: center; justify-items: end; }

.hero-stack { position: relative; display: grid; gap: 12px; }

.profile-frame {
  position: relative;
  width: clamp(220px, 32vw, 320px);
  max-height: min(70vh, 520px);
  aspect-ratio: 4/5;
  border-radius: 18px;
  overflow: hidden;
  border: 2px solid rgba(130, 222, 245, 0.45);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  background: linear-gradient(160deg, rgba(27, 101, 214, 0.35), rgba(5, 13, 26, 0.9));
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.profile-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: lighten;
  opacity: 0.92;
}

.profile-frame::after {
  content: '';
  position: absolute;
  inset: -20% 20% 50% -20%;
  background: radial-gradient(circle, rgba(194, 240, 255, 0.4), transparent 60%);
  filter: blur(20px);
  opacity: 0.8;
  pointer-events: none;
}

.profile-frame:hover {
  transform: translateY(-6px) rotate(-1.5deg) scale(1.02);
  border-color: rgba(194, 240, 255, 0.8);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.glass-card {
  background: linear-gradient(145deg, rgba(17, 34, 64, 0.9), rgba(12, 28, 53, 0.85));
  padding: 18px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(130, 222, 245, 0.16);
  max-width: 320px;
}

.tag { display: inline-block; padding: 6px 10px; border-radius: 999px; background: rgba(130, 222, 245, 0.15); color: var(--cyan-soft); font-weight: 700; font-size: 0.85rem; margin-bottom: 10px; letter-spacing: 0.04em; }
.card-text { color: var(--muted); margin: 12px 0; line-height: 1.6; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { padding: 8px 12px; border-radius: 999px; background: rgba(27, 101, 214, 0.2); color: var(--cyan-soft); font-weight: 600; }

.portfolio { background: radial-gradient(140% 140% at 15% 20%, rgba(130, 222, 245, 0.2), transparent 60%), linear-gradient(180deg, #101f35, #132845); }
.portfolio__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; align-items: stretch; }
.portfolio-card { background: #0d1c32; border-radius: 18px; padding: 16px 16px 12px; box-shadow: var(--shadow); border: 1px solid rgba(130, 222, 245, 0.1); display: grid; grid-template-rows: auto auto auto auto; gap: 10px; height: 100%; }
.portfolio-card .card-top { display: flex; gap: 12px; align-items: center; }
.portfolio-card .logo { width: 56px; height: 56px; object-fit: contain; background: rgba(130, 222, 245, 0.12); border-radius: 12px; padding: 10px; }
.portfolio-card h3 { font-size: 1.05rem; line-height: 1.3; }
.summary { color: var(--muted); line-height: 1.5; min-height: 48px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; min-height: 32px; }
.tags span { background: rgba(27, 101, 214, 0.18); color: var(--cyan-soft); padding: 6px 10px; border-radius: 999px; font-weight: 600; font-size: 0.85rem; }
.video-wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  max-height: clamp(180px, 40vw, 320px);
  margin-top: 4px;
}
.video-wrapper iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

.contact { background: linear-gradient(160deg, #0d1c32, #0b1a2d 60%, rgba(194, 240, 255, 0.12)); border-radius: 28px 28px 0 0; }
.contact__layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.contact__meta h4 { margin-bottom: 4px; }
.contact__meta p, .contact__meta a { color: var(--muted); }

.contact__form { background: #0f223d; padding: 18px; border-radius: 16px; box-shadow: var(--shadow); border: 1px solid rgba(130, 222, 245, 0.14); display: grid; gap: 12px; }
.contact__form label { display: grid; gap: 6px; font-weight: 600; }
.contact__form input, .contact__form textarea, .contact__form select { width: 100%; padding: 12px; border-radius: 10px; border: 1.5px solid rgba(130, 222, 245, 0.25); font-family: inherit; background: rgba(255, 255, 255, 0.02); color: var(--text); }
.contact__form input:focus, .contact__form textarea:focus, .contact__form select:focus { outline: 2px solid rgba(0, 119, 182, 0.2); }
.form-note { color: var(--muted); font-size: 0.9rem; }

.note { margin-top: 14px; color: var(--muted); font-size: 0.95rem; }

@media (max-width: 900px) {
  :root { --vpad: 36px; }
  .nav { position: fixed; top: 72px; right: 5vw; background: #fff; flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; border-radius: 12px; box-shadow: var(--shadow); transform-origin: top right; transform: scale(0.95); opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; }
  .nav.open { opacity: 1; pointer-events: auto; transform: scale(1); }
  .mobile-toggle { display: inline-flex; }
  .panel { min-height: calc(100vh - var(--topbar)); padding: calc(var(--vpad) + 4px) 6vw var(--vpad); }
  .profile-frame { width: clamp(200px, 60vw, 280px); max-height: 65vh; }
  .glass-card { max-width: 300px; padding: 16px; }
  .portfolio__grid, .contact__layout { gap: 16px; }
  .video-wrapper { max-height: clamp(170px, 45vw, 260px); }
}

@media (max-width: 640px) {
  .panel { padding: 64px 6vw 72px; min-height: calc(100vh - var(--topbar)); }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metrics strong { font-size: 1.2rem; }
  .hero { gap: 20px; }
  .profile-frame { width: clamp(180px, 70vw, 240px); max-height: 60vh; }
  .glass-card { max-width: 280px; }
  .video-wrapper { max-height: clamp(150px, 48vw, 230px); }
}
