:root {
  --bg: #0b1020;
  --bg-alt: #111832;
  --surface: #151d3d;
  --border: #263058;
  --text: #e9edff;
  --muted: #9aa6cf;
  --accent: #6c8cff;
  --accent-soft: rgba(108, 140, 255, 0.14);
  --radius: 14px;
  --maxw: 1040px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

h1, h2, h3 { line-height: 1.2; margin-top: 0; }
h2 { font-size: 2rem; margin-bottom: 0.5rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 720px; }
.section-desc { color: var(--muted); margin-bottom: 1.5rem; }
.muted { color: var(--muted); }
.muted-link { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.muted-link:hover { color: var(--accent); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11, 16, 32, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 1.25rem; }
.logo { font-weight: 800; font-size: 1.2rem; color: var(--text); text-decoration: none; }
.nav-links { display: flex; gap: 1.25rem; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.nav-links a:hover { color: var(--accent); }

/* Hero */
.hero { padding: 6rem 0 5rem; text-align: center; }
.hero-kicker { color: var(--accent); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.5rem; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.25rem); margin-bottom: 1rem; }
.hero-sub { color: var(--muted); max-width: 620px; margin: 0 auto 2rem; font-size: 1.15rem; }
.hero-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* Sections */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--bg-alt); }

/* Grid & cards */
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--muted); margin: 0 0 1rem; }
.project-card img { width: 100%; border-radius: 10px; margin-bottom: 1rem; max-height: 180px; object-fit: cover; }
.tech { display: inline-block; background: var(--accent-soft); color: var(--accent); font-size: 0.8rem; padding: 0.2rem 0.6rem; border-radius: 999px; margin-bottom: 1rem; }
.card a.link { color: var(--accent); text-decoration: none; font-weight: 600; }
.card a.link:hover { text-decoration: underline; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 1rem;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-danger { background: #c0392b; color: #fff; padding: 0.5rem 1rem; font-size: 0.9rem; }
.btn-small { padding: 0.5rem 1rem; font-size: 0.9rem; }

/* Form */
.form { max-width: 560px; display: grid; gap: 1rem; }
.form label { display: grid; gap: 0.4rem; font-weight: 600; }
.form input, .form textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: var(--text);
  font-size: 1rem;
  width: 100%;
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.form-status { min-height: 1.5rem; font-size: 0.95rem; }
.form-status.ok { color: #2ecc71; }
.form-status.err { color: #e74c3c; }

/* Admin */
.admin-login, .admin-panel { max-width: 760px; margin: 2rem auto; }
.admin-panel { display: none; }
table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.6rem; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; }
.admin-row { display: flex; gap: 0.75rem; align-items: center; margin: 1rem 0; flex-wrap: wrap; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 2rem 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; }

@media (max-width: 600px) {
  .nav-links { gap: 0.8rem; }
  .hero { padding: 4rem 0 3.5rem; }
}
