/* =========
   Global styles
   ========= */
:root {
  --bg: #0f172a;
  --panel: #111827;
  --card: #0b1220;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --brand: #60a5fa;
  --brand-2: #34d399;
  --ring: rgba(96, 165, 250, 0.35);
  --radius: 18px;
  --gap: 18px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  color: var(--text);
  background: radial-gradient(1000px 600px at 10% -10%, #1f2937 0%, transparent 60%),
              radial-gradient(800px 500px at 120% 10%, #1e293b 0%, transparent 55%),
              var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, Apple Color Emoji, Segoe UI Emoji;
  line-height: 1.6;
}

a { color: var(--text); text-decoration: none; }
a:focus { outline: 2px solid var(--brand); outline-offset: 3px; }

img { max-width: 100%; height: auto; display: block; border-radius: calc(var(--radius) - 6px); }

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 24px 0 64px;
}

/* =========
   Header and Nav
   ========= */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.3px;
  font-size: 1.1rem;
}

.brand .dot {
  width: 10px; height: 10px; border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 0 6px rgba(52, 211, 153, 0.15), 0 6px 18px rgba(96, 165, 250, 0.35);
}

.nav-links {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 999px;
  transition: transform 120ms ease, background 120ms ease, color 120ms ease;
  color: var(--muted);
  border: 1px solid transparent;
}
.nav-links a.active,
.nav-links a:hover {
  color: white;
  background: linear-gradient(135deg, rgba(96,165,250,0.16), rgba(52,211,153,0.12));
  border-color: rgba(255,255,255,0.08);
  transform: translateY(-1px);
}

/* Mobile nav toggle */
.nav-toggle { display: none; }
@media (max-width: 720px) {
  .nav-links { display: none; width: 100%; }
  .nav-toggle { display: inline-flex; gap: 8px; align-items: center; }
  input#menu:checked ~ .nav-links { display: flex; }
}

/* =========
   Sections
   ========= */
.section {
  margin-top: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.035), transparent 60%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: clip;
}

.section-header {
  padding: 24px 22px 6px;
}

.section-header h1,
.section-header h2 {
  margin: 0;
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
  letter-spacing: 0.2px;
}

.section-body { padding: 18px 22px 26px; color: var(--muted); }

/* =========
   Hero
   ========= */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 26px;
  padding: 32px 26px;
  align-items: center;
}
.hero .intro {
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.1rem);
  color: var(--muted);
}
.hero .cta {
  margin-top: 18px; display: flex; gap: 12px; flex-wrap: wrap;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: linear-gradient(135deg, rgba(96,165,250,0.15), rgba(52,211,153,0.15));
  color: white;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(0,0,0,0.28); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
}

/* =========
   Cards and grids
   ========= */
.grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(12, 1fr);
}

.grid.auto-fit {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: linear-gradient(180deg, rgba(17,24,39,0.75), rgba(17,24,39,0.55));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 38px rgba(0,0,0,0.35);
  border-color: rgba(255,255,255,0.15);
}
.card .cover { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.card .content { padding: 14px 14px 16px; }
.card .title { margin: 0 0 6px; font-weight: 700; font-size: 1.02rem; color: #fff; }
.card .meta { margin: 0; font-size: 0.9rem; color: var(--muted); }

/* =========
   About page layout
   ========= */
.about {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr 1.4fr;
  padding: 22px 22px 30px;
}
.about .avatar {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: calc(var(--radius) + 10px);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: var(--shadow);
}
.about .bio {
  color: var(--muted);
  font-size: 1.05rem;
}
@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; }
}

/* =========
   Certifications carousel - CSS only
   ========= */
.carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0b1220;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow);
  overflow: clip;
}
.carousel .slides {
  display: grid;
  grid-template-columns: 100% 100% 100% 100%;
  width: 100%;
  height: 150%;
  transition: transform 380ms ease;
}
.carousel img { width: 100%; height: 100%; object-fit: contain; background: #0b1220; }

.carousel input[type="radio"] { display: none; }

/* Positioning the slide track based on selected radio */
#s1:checked ~ .slides { transform: translateX(0%); }
#s2:checked ~ .slides { transform: translateX(-100%); }
#s3:checked ~ .slides { transform: translateX(-200%); }
#s4:checked ~ .slides { transform: translateX(-300%); }

.carousel .controls {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: 1fr 1fr;
  pointer-events: none;
}
.carousel .controls label {
  pointer-events: auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: rgba(255,255,255,0.8);
  user-select: none; cursor: pointer;
  transition: background 120ms ease;
}
.carousel .controls label:hover { background: rgba(255,255,255,0.06); }

/* Prev and next, mapped per slide */
.prev, .next { position: relative; }
.prev::after, .next::after { content: ""; }

/* Dots */
.carousel .dots {
  position: absolute; bottom: 10px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 10px;
}
.carousel .dots label {
  width: 10px; height: 10px; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,0.4); border: 1px solid rgba(255,255,255,0.6);
  transition: transform 120ms ease, background 120ms ease;
}
#s1:checked ~ .dots label[for="s1"],
#s2:checked ~ .dots label[for="s2"],
#s3:checked ~ .dots label[for="s3"],
#s4:checked ~ .dots label[for="s4"] {
  background: white; transform: scale(1.2);
}

/* Screen reader only */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* =========
   Footer
   ========= */
.footer {
  margin-top: 28px;
  padding: 20px 0 40px;
  color: var(--muted);
  font-size: 0.95rem;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,0.06);
}
