/* ====== Reset & base ====== */
*,
*::before,
*::after { box-sizing: border-box; }
html:focus-within { scroll-behavior: smooth; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.6;
  color: #0b1220;
  background: #ffffff;
}
img { max-width: 100%; display: block; }
a { color: #0a84ff; text-decoration: none; }
a:hover { text-decoration: underline; }
:root {
  --container: 1100px;
  --pad: 20px;
  --radius: 12px;
  --shadow: 0 8px 30px rgba(0,0,0,.08);
  --bg-alt: #f7f9fc;
  --text: #0b1220;
  --muted: #5b6577;
  --primary: #0a84ff;
  --primary-ink: #ffffff;
  --border: #e3e7ee;
}
.container { max-width: var(--container); padding: 0 var(--pad); margin: 0 auto; }
.container.narrow { max-width: 820px; }

.skip-link {
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus { position: static; width: auto; height: auto; padding: .5rem; background: #000; color: #fff; }

/* ====== Header ====== */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,.8);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; color: inherit; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--primary); color: var(--primary-ink); font-weight: 800;
}
.brand.small .brand-mark { width: 24px; height: 24px; border-radius: 6px; font-size: 12px; }
.brand-text { letter-spacing: .2px; }

.site-nav ul { list-style: none; display: flex; gap: 1rem; margin: 0; padding: 0; }
.site-nav a { padding: .5rem .25rem; color: #1c2536; border-bottom: 2px solid transparent; }
.site-nav a.active, .site-nav a:focus { border-color: var(--primary); outline: none; }

.nav-toggle { display: none; background: transparent; border: none; padding: .5rem; }
.nav-toggle .lines { display: block; width: 24px; height: 2px; background: #1c2536; position: relative; }
.nav-toggle .lines::before, .nav-toggle .lines::after { content: ""; position: absolute; left: 0; width: 24px; height: 2px; background: #1c2536; }
.nav-toggle .lines::before { top: -7px; } .nav-toggle .lines::after { top: 7px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .site-nav { position: absolute; top: 64px; right: 0; left: 0; background: #fff; border-bottom: 1px solid var(--border); display: none; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; padding: .5rem var(--pad) 1rem; }
}

/* ====== Hero ====== */
.section { padding: 72px 0; }
.section.alt { background: var(--bg-alt); }
.hero { padding-top: 96px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero .lead { color: var(--muted); font-size: 1.1rem; }
.highlight { background: linear-gradient(90deg, #0a84ff 0%, #44c0ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

.hero-card .stat { display: grid; gap: .25rem; margin-bottom: 16px; }
.stat-num { font-size: 2rem; font-weight: 800; }
.stat-label { color: var(--muted); }
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  background: #fff;
}
.cta { display: flex; gap: .75rem; margin-top: 1rem; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1rem; border-radius: 12px; border: 1px solid var(--border);
  font-weight: 600; text-decoration: none;
}
.btn.primary { background: var(--primary); color: var(--primary-ink); border-color: transparent; }
.btn.outline { background: transparent; }
.btn.ghost { background: #f5f8ff; }
.btn.small { padding: .45rem .7rem; border-radius: 10px; font-size: .9rem; }
.btn.disabled { opacity: .5; pointer-events: none; }

.meta { color: var(--muted); font-size: .95rem; }
.todo { background: #fff2cc; padding: .1rem .35rem; border-radius: 6px; border: 1px solid #ffe08a; font-size: .85rem; }

/* ====== About ====== */
.checklist { display: grid; gap: .4rem; margin: 1rem 0 0; padding-left: 1rem; }
.checklist li { margin-left: .2rem; }

/* ====== Skills ====== */
.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.skill { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; background: #fff; }
.skill h3 { margin-top: 0; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: .5rem 0 0; list-style: none; }
.tags li { padding: .35rem .6rem; border-radius: 999px; border: 1px solid var(--border); background: #fbfcfe; }

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

/* ====== Projects ====== */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; background: #fff; display: grid; gap: .5rem; }
.project h3 { margin: .2rem 0; }
.project-meta { font-size: .8rem; color: var(--muted); }
.project .actions { display: flex; gap: .5rem; }

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

/* ====== Timeline ====== */
.timeline { position: relative; margin-left: 8px; }
.timeline::before { content: ""; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.t-item { position: relative; padding-left: 36px; margin-bottom: 20px; }
.t-dot { position: absolute; left: 2px; top: .65rem; width: 16px; height: 16px; border-radius: 50%; background: var(--primary); }
.t-content { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; }
.t-meta { color: var(--muted); margin-top: -4px; }

/* ====== Contact ====== */
.contact-list { list-style: none; padding: 0; display: grid; gap: .35rem; }
.contact-form { display: grid; gap: .5rem; margin-top: 1rem; }
.contact-form .hidden { display: none; }
.contact-form label { font-weight: 600; }
.contact-form input, .contact-form textarea {
  border: 1px solid var(--border); border-radius: 10px; padding: .6rem .75rem; font: inherit; width: 100%;
}
.form-hint { color: var(--muted); font-size: .9rem; }

/* ====== Footer ====== */
.site-footer { border-top: 1px solid var(--border); background: #fff; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; padding: 24px 0; gap: 16px; flex-wrap: wrap; }
.social { display: inline-flex; padding: .4rem; border-radius: 10px; border: 1px solid var(--border); }
.social:hover { background: #f5f7fb; text-decoration: none; }

/* ====== Utilities ====== */
.narrow { max-width: 820px; }
.hint { color: var(--muted); font-size: .95rem; margin-top: .75rem; }

/* ====== Responsiveness ====== */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
}
