/* Root theme */
:root {
  --bg: #ffffff;
  --text: #0b1220;
  --muted: #5e6b85;
  --border: #e9edf5;
  --primary-600: #2463eb; /* deep blue */
  --primary-500: #3b82f6; /* sky blue */
  --primary-400: #60a5fa;
  --shadow-color: 18 34 66;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --container: 1152px;
}

/* Global reset */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; border-radius: var(--radius-md); }

h1, h2, h3 { font-family: "Space Grotesk", ui-sans-serif, system-ui; margin: 0 0 12px; letter-spacing: 0.2px; }
h1 { font-weight: 700; font-size: clamp(36px, 6vw, 56px); line-height: 1.1; }
h2 { font-weight: 700; font-size: clamp(26px, 3.5vw, 36px); }
h3 { font-weight: 600; font-size: 20px; }

p { margin: 0 0 16px; color: var(--muted); }
ul { padding-left: 18px; margin: 0 0 16px; }
a { color: var(--primary-600); text-decoration: none; }

.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }
.section { padding: 96px 0; border-top: 1px solid var(--border); }
.section#about { padding: 72px 0; }
.section-title { margin-bottom: 28px; }
.section-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 999px; font-weight: 600; border: 1px solid transparent; transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease; }
.btn-primary { background: linear-gradient(135deg, var(--primary-600), var(--primary-400)); color: #fff; box-shadow: 0 8px 20px rgba(var(--shadow-color) / 0.15), inset 0 -2px 0 rgba(255 255 255 / 0.15); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(var(--shadow-color) / 0.25), 0 0 0 6px rgba(59 130 246 / 0.15) inset; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: #cdd6ea; background: #f8faff; box-shadow: 0 8px 20px rgba(var(--shadow-color) / 0.08); }

/* Sticky Nav */
.site-header { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(180%) blur(10px); background: rgba(255,255,255,0.75); border-bottom: 1px solid rgba(233,237,245,0.8); }
.nav { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 12px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: "Space Grotesk"; font-weight: 700; color: var(--text); }
.brand-text { font-size: 18px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; box-shadow: 0 8px 18px rgba(var(--shadow-color) / 0.25); }

.nav-links { display: flex; align-items: center; gap: 18px; list-style: none; margin: 0; padding: 0; justify-self: center; }
.nav-links a { color: var(--text); font-weight: 600; padding: 8px 10px; border-radius: 8px; }
.nav-links a:hover { background: #f3f6ff; color: var(--primary-600); }

.nav-toggle { display: none; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--border); background: #fff; align-items: center; justify-content: center; gap: 4px; padding: 0 10px; }
.nav-toggle span { display: block; width: 100%; height: 2px; background: var(--text); }

.cta { justify-self: end; }

/* Mobile nav */
@media (max-width: 860px) {
  .nav { grid-template-columns: auto 1fr auto; height: 64px; }
  .nav-toggle { display: inline-flex; }
  .nav-links { position: fixed; inset: 64px 0 auto 0; background: rgba(255,255,255,0.98); border-bottom: 1px solid var(--border); display: grid; gap: 6px; padding: 12px; transform-origin: top; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
  .nav.open .nav-links { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .cta { display: none; }
}

/* Hero */
.hero { position: relative; min-height: 88vh; display: grid; place-items: center; overflow: clip; }
.hero-bg { position: absolute; inset: -2px; background: radial-gradient(1200px 600px at 15% 20%, rgba(59,130,246,0.28), transparent 55%), radial-gradient(900px 600px at 80% 10%, rgba(36,99,235,0.22), transparent 60%), linear-gradient(180deg, #f8fbff 0%, #ffffff 40%); }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: conic-gradient(from 0deg, rgba(59,130,246,0.06), rgba(36,99,235,0.08), rgba(59,130,246,0.06)); mask: radial-gradient(70% 50% at 50% 40%, black 55%, transparent 60%); animation: spin 18s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero-inner { padding: 64px 0; text-align: center; position: relative; }
.hero-title { letter-spacing: -0.5px; }
.accent { background: linear-gradient(90deg, var(--primary-600), var(--primary-400)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: clamp(16px, 2.6vw, 20px); color: var(--muted); min-height: 28px; margin: 10px 0 22px; }
.hero-ctas { display: flex; gap: 12px; justify-content: center; }

/* Chips / filters */
.chip { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--text); font-weight: 600; cursor: pointer; transition: background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease; }
.chip:hover { background: #f6f9ff; border-color: #d7e1f5; }
.chip.active { background: linear-gradient(135deg, var(--primary-600), var(--primary-400)); color: #fff; border-color: transparent; box-shadow: 0 8px 18px rgba(var(--shadow-color) / 0.18); }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 24px; align-items: start; }
.about-photo img { aspect-ratio: 4/5; object-fit: cover; }
.whatido { display: grid; gap: 6px; }
.education { display: grid; gap: 6px; }
.quick-facts { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.fact { background: #f8faff; border: 1px solid var(--border); padding: 12px 14px; border-radius: var(--radius-md); color: var(--text); box-shadow: 0 6px 14px rgba(var(--shadow-color) / 0.06); display: flex; align-items: center; gap: 10px; }
.about-content > * { margin-bottom: 12px; }
.about-content > *:last-child { margin-bottom: 0; }
.icon { font-size: 18px; }

@media (max-width: 980px) {
  .about-grid { grid-template-columns: 1fr; gap: 18px; }
  .section#about { padding: 56px 0; }
}

/* Projects */
.projects-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.card { grid-column: span 6; background: #fff; border: 2px solid rgba(59,130,246,0.22); border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 10px 24px rgba(var(--shadow-color) / 0.08), inset 0 0 0 1px rgba(59,130,246,0.10); transform: translateY(0); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.card:hover { transform: translateY(-6px); box-shadow: 0 18px 36px rgba(var(--shadow-color) / 0.14), 0 0 0 4px rgba(59,130,246,0.12); border-color: rgba(59,130,246,0.38); }
.card-media img { width: 100%; height: 220px; object-fit: cover; border-radius: 0; }
.card-body { padding: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 10px 0; }
.tags li { background: #f3f6ff; color: var(--primary-600); border: 1px solid #e0e8ff; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.card-actions { display: flex; gap: 12px; margin-top: 10px; }
.link { font-weight: 700; }

@media (max-width: 980px) { .card { grid-column: span 12; } }

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.skill-card { background: #ffffff; border: 2px solid rgba(59,130,246,0.22); border-radius: var(--radius-md); padding: 14px; box-shadow: inset 0 0 0 1px rgba(59,130,246,0.10); transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease; }
.skill-card:hover { box-shadow: inset 0 0 0 2px rgba(59,130,246,0.35), 0 10px 22px rgba(var(--shadow-color) / 0.08); transform: translateY(-3px); border-color: rgba(59,130,246,0.38); }
.skill-card h3 { margin-bottom: 8px; }
.skill-card ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.skill-card li { background: #f6f9ff; border: 1px solid #e1eafe; color: var(--text); padding: 6px 10px; border-radius: 999px; font-weight: 600; font-size: 13px; }

@media (max-width: 980px) { .skills-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .skills-grid { grid-template-columns: 1fr; } }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 22px; }
.contact-list { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.contact-list li { display: flex; align-items: center; gap: 10px; }
.contact-icon { width: 18px; height: 18px; color: var(--primary-600); display: inline-flex; }
.contact-form { display: grid; gap: 12px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px; box-shadow: 0 10px 22px rgba(var(--shadow-color) / 0.06); }
.field { display: grid; gap: 6px; }
label { font-weight: 600; }
input, textarea { width: 100%; padding: 12px 12px; border-radius: 12px; border: 1px solid var(--border); background: #fbfcff; font: inherit; outline: none; transition: border-color .2s ease, box-shadow .2s ease; }
input:focus, textarea:focus { border-color: var(--primary-500); box-shadow: 0 0 0 4px rgba(59,130,246,0.15); background: #fff; }

@media (max-width: 980px) { .contact-grid { grid-template-columns: 1fr; } }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 24px 0; color: var(--muted); }

/* Reveal on scroll */
.reveal-up { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
.reveal-visible { opacity: 1 !important; transform: translateY(0) !important; }

/* Utilities */
.hide { display: none !important; }
