:root {
  --black: #0a0a0a;
  --ink: #111111;
  --bg: #f6f6f6;
  --card: #ffffff;
  --border: #dcdcdc;
  --text: #111111;
  --muted: #6f6f6f;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  margin: 0;
}

h1, h2, h3, h4, .display-font {
  font-family: 'Sora', 'Inter', sans-serif;
  letter-spacing: -0.01em;
}

a { color: var(--black); text-decoration: none; }
a:hover { color: #444; }

/* ---------- Public site nav ---------- */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.site-nav .brand {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  background: var(--black);
  border-radius: 8px;
  line-height: 0;
}
.brand-logo {
  height: 22px;
  width: auto;
  display: block;
}
.site-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav .nav-links a {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
}
.site-nav .nav-links a.active { color: var(--black); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.btn {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-primary:hover { border-color: var(--black); color: var(--black); }
.btn-outline { background: #fff; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--black); color: var(--black); }
.btn-danger { background: #fff; color: var(--black); border: 1.5px dashed var(--black); }
.btn-danger:hover { background: var(--black); color: #fff; border-style: solid; }
.btn-sm { padding: 5px 12px; font-size: 0.8rem; }

/* ---------- User account dropdown ---------- */
.user-menu { position: relative; list-style: none; }
.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
  font-family: inherit;
}
.user-menu-trigger:hover { background: var(--bg); }
.user-menu-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3a3a3a, #0a0a0a);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.user-menu-name { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.user-menu-caret { color: var(--muted); transition: transform 0.15s ease; }
.user-menu-trigger[aria-expanded="true"] .user-menu-caret { transform: rotate(180deg); }

.user-menu-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 190px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
  padding: 6px;
  z-index: 50;
}
.user-menu-dropdown.open { display: block; }
.user-menu-dropdown a {
  display: block;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
}
.user-menu-dropdown a:hover { background: var(--bg); }
.user-menu-dropdown a.danger { color: var(--black); font-weight: 700; }
.user-menu-dropdown a.danger:hover { background: #eee; }
.user-menu-divider { height: 1px; background: var(--border); margin: 6px 4px; }

/* ---------- Hero ---------- */
.hero {
  background: transparent;
  color: var(--text);
  padding: 90px 40px 70px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -80px; top: -80px;
  width: 340px; height: 340px;
  border-radius: 50%;
  border: 1px solid var(--border);
}
.hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}
.hero h1 {
  font-size: 2.4rem;
  max-width: 720px;
  margin: 14px 0 16px;
}
.hero p {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.6;
}
.hero .hero-actions { margin-top: 26px; display: flex; gap: 12px; }

/* ---------- Sections ---------- */
.content-wrap { max-width: 1100px; margin: 0 auto; }
.section { padding: 60px 40px; }
.section .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  color: var(--black);
  font-weight: 700;
}
.section h2 { font-size: 1.6rem; margin: 8px 0 30px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
  max-width: 1080px;
  margin: 0 auto;
}
.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.project-thumb {
  height: 140px;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  position: relative;
}
.project-card .body { padding: 18px 20px 20px; }
.project-card .tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
}
.project-card h3 { font-size: 1.05rem; margin: 6px 0 8px; }
.project-card p { color: var(--muted); font-size: 0.88rem; line-height: 1.5; margin: 0 0 14px; }

.about-wrap {
  display: flex;
  gap: 50px;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.about-photo {
  width: 190px; height: 190px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e2e2e2, #f4f4f4);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.stat-row { display: flex; gap: 16px; margin-top: 20px; flex-wrap: wrap; }
.stat-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 22px;
  min-width: 110px;
}
.stat-box .num { font-size: 1.4rem; font-weight: 700; font-family: 'Sora', sans-serif; }
.stat-box .label { font-size: 0.78rem; color: var(--muted); }

/* ---------- Forms ---------- */
.form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px;
  max-width: 480px;
  margin: 0 auto;
}
.form-row { margin-bottom: 16px; }
.form-row.two { display: flex; gap: 14px; }
.form-row.two > div { flex: 1; }
label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
input[type=text], input[type=email], input[type=password], textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  background: #fbfbfb;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--black);
  outline-offset: 1px;
  background: #fff;
}
textarea { min-height: 130px; resize: vertical; }
.help-text { font-size: 0.78rem; color: var(--muted); margin-top: 6px; }
.alert { padding: 12px 16px; border-radius: 8px; font-size: 0.85rem; margin-bottom: 18px; }
.alert-success { background: #f2f2f2; color: #111; border: 1px solid #111; }
.alert-error { background: #fff; color: #111; border: 2px solid #111; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  justify-content: space-between;
  padding: 22px 40px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  background: #fff;
}

/* ---------- Admin layout ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 220px;
  background: var(--black);
  color: #c9c9c9;
  padding: 22px 16px;
  flex-shrink: 0;
}
.admin-sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 26px;
  padding: 0 8px;
}
.brand-logo-sidebar { height: 24px; width: auto; }
.admin-sidebar a {
  display: block;
  color: #bdbdbd;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-bottom: 2px;
}
.admin-sidebar a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.admin-sidebar a.active { background: #fff; color: #000; font-weight: 700; }
.admin-main { flex: 1; background: var(--bg); }
.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.admin-topbar h1 { font-size: 1.25rem; margin: 0; }
.admin-topbar .sub { color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
.admin-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3a3a3a, #0a0a0a);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700;
}
.admin-content { padding: 28px 32px; }

.stat-cards { display: flex; gap: 18px; margin-bottom: 26px; flex-wrap: wrap; }
.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  min-width: 180px;
  flex: 1;
}
.stat-card .label { font-size: 0.8rem; color: var(--muted); }
.stat-card .num { font-size: 1.8rem; font-weight: 700; font-family: 'Sora', sans-serif; margin-top: 4px; }

.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 24px;
}
.panel .panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.panel .panel-head h2 { font-size: 1.05rem; margin: 0; }
.quick-links { display: flex; gap: 10px; flex-wrap: wrap; }

table { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: capitalize;
}
.badge-admin { background: #111; color: #fff; }
.badge-user { background: #fff; color: #111; border: 1px solid #111; }
.badge-active { background: #111; color: #fff; }
.badge-inactive { background: #fff; color: #6f6f6f; border: 1px solid #ccc; }

.avatar-sm {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c2c2c2, #6b6b6b);
  display: inline-block;
}
.row-actions a, .row-actions button {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  margin-right: 6px;
  cursor: pointer;
}
.row-actions a.delete, .row-actions button.delete { color: #111; border: 1.5px dashed #111; font-weight: 600; }

.profile-wrap { display: flex; gap: 24px; flex-wrap: wrap; }
.profile-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  width: 260px;
  height: fit-content;
}
.profile-card .avatar-lg {
  width: 96px; height: 96px;
  border-radius: 50%;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, #3a3a3a, #0a0a0a);
}
.profile-form { flex: 1; min-width: 280px; }
.upload-box {
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
}

@media (max-width: 720px) {
  .site-nav, .section, .hero, .site-footer { padding-left: 20px; padding-right: 20px; }
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; }
}
