/* Base */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #0f172a; /* slate-900 */
  background: #f8fafc; /* slate-50 */
}

:root {
  --brand: #115e59; /* teal-800 */
  --brand-2: #0ea5e9; /* sky-500 */
  --ink: #0f172a;
  --muted: #475569;
  --card: #ffffff;
  --ring: #e2e8f0;
  --gradient-start: #e0f2fe; /* sky-100 */
  --gradient-end: #ecfdf5;  /* emerald-50 */
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.section.alt { background: #ffffff; }
.section-title { font-size: 32px; margin: 0 0 24px; }
.muted { color: var(--muted); }
.max-700 { max-width: 700px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 30; background: #ffffffcc; backdrop-filter: blur(8px); border-bottom: 1px solid #e2e8f0; transition: box-shadow .2s ease; }
.site-header.scrolled { box-shadow: 0 6px 24px rgba(2,6,23,.08); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 800; color: var(--ink); text-decoration: none; font-size: 20px; }
.brand span { color: var(--brand-2); }
.brand-logo { width: 36px; height: 36px; border-radius: 999px; border: 2px solid var(--ring); object-fit: cover; }
.nav { display: flex; gap: 20px; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--brand-2); }
.nav-toggle { display: none; font-size: 22px; background: transparent; border: 0; }

/* Buttons */
.btn { display: inline-block; padding: 10px 16px; border-radius: 10px; border: 1px solid #cbd5e1; text-decoration: none; color: var(--ink); background: #fff; }
.btn:hover { border-color: var(--brand-2); color: var(--brand-2); }
.btn-primary { background: var(--brand-2); color: #fff; border-color: var(--brand-2); }
.btn-primary:hover { filter: brightness(0.95); }
.btn-ghost { background: transparent; border-color: #cbd5e1; }

/* Hero */
.hero { background: linear-gradient(180deg, var(--gradient-start), var(--gradient-end)); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; align-items: center; }
.display { font-size: 56px; line-height: 1.05; margin: 8px 0 12px; }
.lead { color: var(--muted); font-size: 20px; }
.cta { display: flex; gap: 12px; margin-top: 16px; }
.avatar-ring { width: 380px; height: 380px; border-radius: 50%; border: 10px solid #e2e8f0; margin: 0 auto; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.08); }
.avatar-ring img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo { display: flex; justify-content: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--brand); }

/* Chips */
.chips { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 999px; background: #fff; font-weight: 500; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card { background: var(--card); border: 1px solid #e2e8f0; border-radius: 16px; padding: 20px; box-shadow: 0 6px 20px rgba(2,6,23,0.04); }
.card h3 { margin: 0 0 8px; }
.cards.interactive .card { transition: transform .2s ease, box-shadow .2s ease; }
.cards.interactive .card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(2,6,23,0.08); }
.f-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #f1f5f9; margin-bottom: 8px; font-size: 22px; }
.bullets { margin: 0; padding-left: 18px; color: var(--muted); }
.bullets li { margin: 6px 0; }
.feat-img { width: 100%; height: 120px; object-fit: cover; border-radius: 12px; margin-bottom: 10px; border: 1px solid #e2e8f0; }

/* Skills illustration */
.skills-wrap { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: start; }
.skills-illustration { position: sticky; top: 84px; }
.skills-img { width: 100%; height: 100%; max-height: 460px; object-fit: cover; border-radius: 16px; border: 1px solid #e2e8f0; box-shadow: 0 10px 24px rgba(2,6,23,.06); }

/* Timeline */
.timeline { display: grid; gap: 16px; }
.t-item { border-left: 3px solid var(--ring); padding-left: 16px; }
.t-item h3 { margin: 0 0 4px; }

/* Projects */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid #cbd5e1; padding: 8px 12px; background: #fff; border-radius: 999px; cursor: pointer; }
.chip.active { background: var(--brand-2); color: #fff; border-color: var(--brand-2); box-shadow: 0 6px 14px rgba(14,165,233,.25); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.p-card .tag { display: inline-block; margin-top: 6px; font-size: 12px; color: #065f46; background: #ecfdf5; border: 1px solid #a7f3d0; padding: 2px 8px; border-radius: 999px; }

/* Projects - media style */
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.p-card.media { display: grid; grid-template-columns: 60px 1fr; gap: 12px; align-items: start; border: 1px solid #e2e8f0; border-radius: 16px; background: #fff; padding: 16px; box-shadow: 0 6px 18px rgba(2,6,23,.05); }
.p-card .p-icon { width: 60px; height: 60px; border-radius: 14px; display: grid; place-items: center; background: #f1f5f9; font-size: 28px; }
.p-card .p-body h3 { margin: 0 0 6px; }
.p-card .p-body p { margin: 0 0 6px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.stat { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px; text-align: center; box-shadow: 0 6px 16px rgba(2,6,23,.04); }
.stat .num { display: block; font-size: 28px; font-weight: 800; color: var(--brand); }
.stat .label { display: block; color: var(--muted); font-weight: 600; }

/* Contact */
.form-card .field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 6px; font-weight: 600; }
.field input, .field textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid #cbd5e1; background: #fff; }
.field .error { display: none; color: #b91c1c; font-size: 12px; }
.field.invalid .error { display: block; }

/* Footer */
.site-footer { padding: 28px 0; border-top: 1px solid #e2e8f0; background: #ffffff; text-align: center; color: #0ea5e9; }
.site-footer a { color: var(--brand-2); text-decoration: none; }
.site-footer p { margin: 0; }

/* Reveal animations */
.reveal { opacity: 0; transform: translateY(28px); transition: transform 1.2s cubic-bezier(.16,.84,.44,1), opacity 1.2s ease; }
.reveal.visible { opacity: 1; transform: none; }
.fade-up { transform: translateY(32px); }
.fade-left { transform: translateX(-28px); }
.fade-right { transform: translateX(28px); }
.zoom-in { transform: scale(.94); }
.fade-up.visible, .fade-left.visible, .fade-right.visible, .zoom-in.visible { transform: none; }

/* Role carousel typing effect */
.role { border-right: 2px solid rgba(15,23,42,.5); padding-right: 6px; animation: caret 1s step-end infinite; color: var(--brand); font-weight: 700; }
@keyframes caret { 50% { border-color: transparent; } }

/* Image carousel */
.carousel { position: relative; overflow: hidden; border-radius: 16px; border: 1px solid #e2e8f0; background: #fff; }
.carousel .track { display: flex; transition: transform .5s ease; }
.carousel .slide { min-width: 100%; height: 380px; display: grid; place-items: center; background: #f1f5f9; }
.carousel img { width: 100%; height: 100%; object-fit: cover; }
.c-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(15,23,42,.7); color: #fff; border: 0; width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; cursor: pointer; }
.c-btn:hover { background: rgba(14,165,233,.9); }
.c-btn.prev { left: 10px; }
.c-btn.next { right: 10px; }

/* Scroll progress */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; background: transparent; z-index: 40; }
.scroll-progress #progressBar { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--brand-2), #22c55e); transition: width .1s linear; }

/* Back to top */
.to-top { position: fixed; right: 16px; bottom: 16px; width: 44px; height: 44px; border-radius: 999px; background: var(--brand-2); color: #fff; border: 0; display: none; align-items: center; justify-content: center; box-shadow: 0 10px 18px rgba(14,165,233,.35); cursor: pointer; z-index: 40; }
.to-top.show { display: grid; }

/* Certifications */
.certs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.cert .c-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.cert .c-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: #f1f5f9; font-size: 20px; }

/* Responsive */
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .skills-wrap { grid-template-columns: 1fr; }
  .certs-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .display { font-size: 40px; }
  .lead { font-size: 18px; }
  .avatar-ring { width: 260px; height: 260px; }
  .cards, .grid-3 { grid-template-columns: 1fr; }
  .nav { position: fixed; inset: 64px 0 auto 0; background: #fff; border-bottom: 1px solid #e2e8f0; padding: 12px 20px; transform: translateY(-120%); transition: transform .25s ease; display: grid; gap: 12px; }
  .nav.open { transform: translateY(0); }
  .nav-toggle { display: inline-block; }
}


