/* Design tokens */
:root {
  --bg: #0b0d10;
  --bg-elev: #111418;
  --text: #e8edf2;
  --muted: #a9b2bd;
  --primary: #4f8cff;
  --primary-600: #3d70cc;
  --card: #141921;
  --border: #222934;
  --chip: #1a2230;
  --shadow: 0 8px 24px rgba(0,0,0,0.35);
}

[data-theme="light"] {
  --bg: #f7f9fc;
  --bg-elev: #fff;
  --text: #0f1720;
  --muted: #42566c;
  --primary: #265dff;
  --primary-600: #1f4dcc;
  --card: #ffffff;
  --border: #e6eef6;
  --chip: #eef3fb;
  --shadow: 0 8px 24px rgba(13, 27, 53, 0.08);
}

/* Reset */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-elev) 100%);
  line-height: 1.6;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.skip-link {
  position: absolute; left: -999px; top: -999px;
}
.skip-link:focus { left: 1rem; top: 1rem; background: var(--primary); color: white; padding: 0.5rem 0.75rem; border-radius: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(10,12,16,0.6);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 0.8rem 0; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--text); font-weight: 700; letter-spacing: .2px; }
.brand-mark { display: grid; place-content: center; width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--primary-600)); color: white; font-weight: 800; }
.brand-text { font-weight: 700; }

.site-nav { display: flex; align-items: center; gap: 1rem; }
.nav-list { display: flex; gap: 1rem; list-style: none; padding: 0; margin: 0; }
.nav-list a { color: var(--muted); text-decoration: none; padding: 0.5rem 0.6rem; border-radius: 8px; }
.nav-list a:hover { color: var(--text); background: var(--chip); }

.nav-toggle { display: none; background: transparent; border: 0; padding: .25rem; }
.nav-toggle .bar { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; }

.theme-toggle { background: var(--chip); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: .5rem .7rem; cursor: pointer; }
.theme-toggle:hover { background: var(--border); }

/* Hero */
.hero { padding: 5rem 0 3rem; background: radial-gradient(1200px 500px at 10% -10%, rgba(79,140,255,0.18), transparent 60%); }
.hero-title { font-size: clamp(2rem, 3.5vw, 3rem); margin: 0 0 .5rem; letter-spacing: .3px; }
.hero-subtitle { margin: 0 0 1rem; color: var(--muted); }
.hero-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 1.25rem; }
.hero-cta { display: flex; gap: .75rem; }

/* Sections */
.section { padding: 3rem 0; }
.section.alt { background: linear-gradient(180deg, var(--bg-elev), var(--bg)); }
.section-header { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.section-header h2 { margin: 0; font-size: clamp(1.3rem, 2.2vw, 1.8rem); }
.section-subheader { margin-top: 2rem; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.card + .card { margin-top: 1rem; }
.timeline-head, .project-head, .edu-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.time { color: var(--muted); font-size: .95rem; }
.title-link { color: inherit; text-decoration: none; }
.title-link:hover { text-decoration: underline; text-decoration-color: var(--primary); text-underline-offset: 3px; }

/* Grids */
.skills-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1rem; }
.projects-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem; }
.edu-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1rem; }
.contact-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1rem; }

/* Lists */
.bullet-list { margin: .25rem 0 0; padding-left: 1.1rem; }
.bullet-list li { margin: .25rem 0; }
.course-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .5rem 1rem; padding: 0; margin: .5rem 0 0; list-style: none; }
.course-list li::before { content: "• "; color: var(--primary); margin-right: .25rem; }

/* Chips & buttons */
.chip-list { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: .5rem 0 0; list-style: none; }
.chip, .filter { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--border); background: var(--chip); color: var(--text); padding: .4rem .6rem; border-radius: 999px; font-size: .95rem; text-decoration: none; cursor: pointer; }
.filter.active { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in oklab, var(--primary) 35%, transparent); }

.btn { display: inline-block; border: 1px solid var(--border); background: var(--chip); color: var(--text); padding: .6rem .9rem; border-radius: 12px; text-decoration: none; font-weight: 600; }
.btn.primary { background: linear-gradient(135deg, var(--primary), var(--primary-600)); border-color: transparent; color: white; }
.btn.small { padding: .45rem .7rem; font-size: .9rem; }
.ext { color: var(--primary); text-decoration: none; }
.ext:hover { text-decoration: underline; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 1.25rem 0; background: rgba(0,0,0,0.15); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; }
.muted { color: var(--muted); }

/* Contact */
.contact-item { display: grid; place-items: center; text-decoration: none; color: var(--text); gap: .4rem; padding: 1.2rem 0; }
.contact-item i { font-size: 1.25rem; color: var(--primary); }

/* Responsive */
@media (max-width: 1024px) {
  .skills-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .projects-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .edu-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .contact-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 700px) {
  .nav-toggle { display: inline-block; }
  .nav-list { position: absolute; right: 1rem; top: 60px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: .5rem; display: none; flex-direction: column; box-shadow: var(--shadow); }
  .nav-list.open { display: flex; }
  .hero { padding: 3.25rem 0 2.25rem; }
  .projects-grid { grid-template-columns: 1fr; }
}

/* Utilities */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 1px, 1px); border: 0; }


