/* -------------------------
   Theme + base
------------------------- */
:root{
  --bg: #0b1220;
  --surface: rgba(255,255,255,0.07);
  --card: rgba(255,255,255,0.08);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.72);
  --border: rgba(255,255,255,0.12);
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --accent: #67e8f9;
  --accent2: #a78bfa;
  --btnText: #0b1220;

  --radius: 16px;
  --max: 980px;
}

body.light{
  --bg: #f6f7fb;
  --surface: rgba(255,255,255,0.65);
  --card: rgba(255,255,255,0.8);
  --text: #111827;
  --muted: #4b5563;
  --border: rgba(17,24,39,0.10);
  --shadow: 0 12px 28px rgba(17,24,39,0.12);
  --accent: #2563eb;
  --accent2: #8b5cf6;
  --btnText: #ffffff;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.bg-gradient{
  position: fixed;
  inset: -40%;
  background:
    radial-gradient(circle at 20% 20%, rgba(103,232,249,0.35), transparent 40%),
    radial-gradient(circle at 80% 30%, rgba(167,139,250,0.32), transparent 45%),
    radial-gradient(circle at 40% 85%, rgba(34,197,94,0.18), transparent 45%);
  filter: blur(30px);
  z-index: -1;
}

a{ color: inherit; }
.muted{ color: var(--muted); }

/* -------------------------
   Navbar
------------------------- */
.navbar{
  position: sticky;
  top: 0;
  z-index: 50;
  max-width: var(--max);
  margin: 14px auto 0;
  padding: 10px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;

  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.brand{
  display:flex;
  align-items:center;
  gap: 10px;
  text-decoration:none;
  font-weight:600;
}

.brand-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}

.nav-links{
  display:flex;
  align-items:center;
  gap: 10px;
}

.nav-links a{
  text-decoration:none;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text);
  opacity: 0.92;
  transition: transform .15s ease, background .15s ease, opacity .15s ease;
}

.nav-links a:hover{
  background: rgba(255,255,255,0.10);
  transform: translateY(-1px);
  opacity: 1;
}

body.light .nav-links a:hover{
  background: rgba(17,24,39,0.06);
}

.nav-links a.active{
  background: linear-gradient(135deg, rgba(103,232,249,0.18), rgba(167,139,250,0.16));
  border: 1px solid var(--border);
  opacity: 1;
}

.nav-actions{
  display:flex;
  align-items:center;
  gap: 10px;
}

.icon-btn{
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 10px;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}

.icon-btn:hover{ transform: translateY(-1px); background: rgba(255,255,255,0.12); }
body.light .icon-btn{ background: rgba(17,24,39,0.04); }
body.light .icon-btn:hover{ background: rgba(17,24,39,0.08); }

.menu-btn{ display:none; }

/* -------------------------
   Hero
------------------------- */
.hero{
  max-width: var(--max);
  margin: 18px auto 0;
  padding: 22px 14px 0;
}

.hero-inner{
  padding: 26px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.pill{
  display:inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 10px;
}

.hero h1{
  margin: 8px 0 8px;
  font-size: clamp(24px, 4vw, 40px);
  line-height: 1.15;
}

.hero-sub{
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 70ch;
}

.hero-cta{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* -------------------------
   Layout / cards
------------------------- */
.container{
  max-width: var(--max);
  margin: 16px auto 0;
  padding: 0 14px 30px;
}

.card{
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-top: 16px;

  scroll-margin-top: 110px; /* for sticky navbar */
}

.section-head{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

h2{ margin: 0 0 10px; font-size: 20px; }
p{ margin: 0 0 10px; line-height: 1.7; }

.chips{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 8px;
}

.chip{
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  font-size: 13px;
}

/* -------------------------
   Projects grid
------------------------- */
.grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.project{
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  border-radius: calc(var(--radius) - 4px);
  padding: 14px;
  transition: transform .15s ease, background .15s ease;
}

body.light .project{
  background: rgba(17,24,39,0.03);
}

.project:hover{ transform: translateY(-2px); background: rgba(255,255,255,0.08); }
body.light .project:hover{ background: rgba(17,24,39,0.06); }

.project-top{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
}

.project h3{
  margin: 0;
  font-size: 16px;
}

.tag{
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap;
}

.project-actions{
  display:flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* -------------------------
   Buttons
------------------------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-decoration:none;
  cursor:pointer;
  transition: transform .15s ease, background .15s ease;
}

.btn:hover{ transform: translateY(-1px); }

.btn.primary{
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: var(--btnText);
  border: none;
}

.btn.ghost{
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

.btn.small{
  padding: 8px 12px;
  font-size: 13px;
}

button.btn{ font-family: inherit; }

/* -------------------------
   Form
------------------------- */
.form{ margin-top: 10px; }
.field{ margin-bottom: 12px; }
label{ display:block; margin-bottom: 6px; color: var(--muted); font-size: 13px; }

input, textarea{
  width:100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 10px 12px;
  background: rgba(255,255,255,0.06);
  color: var(--text);
  outline: none;
}

body.light input, body.light textarea{
  background: rgba(255,255,255,0.75);
}

input:focus, textarea:focus{
  border-color: rgba(103,232,249,0.55);
}

.form-msg{
  margin-top: 10px;
  min-height: 20px;
  color: var(--muted);
}

/* -------------------------
   Footer + ScrollTop
------------------------- */
.footer{
  max-width: var(--max);
  margin: 10px auto 26px;
  padding: 0 14px;
  color: var(--muted);
  text-align:center;
}

.scrolltop{
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 10px 12px;
  cursor: pointer;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  display: none;
}

/* -------------------------
   Mobile drawer
------------------------- */
.backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 80;
}

.drawer{
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(82vw, 320px);
  background: var(--bg);
  border-left: 1px solid var(--border);
  z-index: 90;
  padding: 14px;
  box-shadow: var(--shadow);
}

.drawer-head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.drawer-title{ font-weight: 600; }
.drawer-links{
  display:flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-links a{
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration:none;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
}

body.light .drawer{ background: #ffffff; }
body.light .drawer-links a{ background: rgba(17,24,39,0.04); }

@media (max-width: 820px){
  .nav-links{ display:none; }
  .menu-btn{ display:inline-flex; }
  .grid{ grid-template-columns: 1fr; }
}
