/* ═══════════════════════════════════════════════════════════════════
   RSK PORTFOLIO — Complete Stylesheet
   Aesthetic: Industrial precision meets editorial refinement
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --bg: #0c0c0e;
  --bg2: #141416;
  --bg3: #1c1c20;
  --bg4: #242428;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.18);
  --text: #f0f0f2;
  --text-muted: #888;
  --accent: #e8c547;
  --accent-dim: rgba(232,197,71,0.12);
  --accent-hover: #f0d060;
  --red: #e84545;
  --green: #3ecf8e;
  --radius: 4px;
  --radius-lg: 10px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --nav-h: 64px;
  --sidebar-w: 220px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

/* ── SCROLLBAR ─────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 99px; }

/* ═══════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn--primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-hover);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--full { width: 100%; justify-content: center; }
.btn--sm { padding: 5px 12px; font-size: 0.8rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
}
.btn-icon svg { width: 15px; height: 15px; }
.btn-edit:hover { border-color: var(--accent); color: var(--accent); }
.btn-delete:hover { border-color: var(--red); color: var(--red); }

/* ═══════════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════════ */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

label {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.optional { font-weight: 300; text-transform: none; font-size: 0.8rem; }

input[type="text"], input[type="email"], input[type="password"], textarea, select {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  padding: 12px 16px;
  transition: border-color 0.2s;
  outline: none;
  width: 100%;
}
input:focus, textarea:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 100px; }
input[type="file"] { padding: 10px; font-size: 0.875rem; }

/* ═══════════════════════════════════════════════════════════════════
   NAV
   ═══════════════════════════════════════════════════════════════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; padding: 0 40px;
  gap: 32px;
  transition: background 0.3s, backdrop-filter 0.3s;
}
.nav--scrolled {
  background: rgba(12,12,14,0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav__logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--accent);
  margin-right: auto;
}
.nav__links { display: flex; list-style: none; gap: 32px; }
.nav__links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--text); }
.nav__resume {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 8px 18px;
  border-radius: var(--radius);
  transition: all 0.2s;
}
.nav__resume:hover { background: var(--accent); color: #000; }
.nav__hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav__hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.3s; }

/* ═══════════════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-h) + 40px) 40px 80px;
}
.hero__grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(232,197,71,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232,197,71,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}
.hero__content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  animation: heroIn 0.9s cubic-bezier(.16,1,.3,1) both;
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero__eyebrow {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  animation: heroIn 0.9s 0.1s cubic-bezier(.16,1,.3,1) both;
}
.hero__name {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 7.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
  animation: heroIn 0.9s 0.15s cubic-bezier(.16,1,.3,1) both;
}
.hero__name span { color: var(--accent); }
.hero__sub {
  font-size: 1rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 40px;
  animation: heroIn 0.9s 0.2s cubic-bezier(.16,1,.3,1) both;
}
.hero__cta {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
  animation: heroIn 0.9s 0.28s cubic-bezier(.16,1,.3,1) both;
}
.hero__scroll-hint {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted);
  animation: fadeIn 1s 1s both;
}
.hero__scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scrollLine 1.5s 1.5s infinite;
}
@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 1; }
  50%  { transform: scaleY(1); transform-origin: top; }
  100% { transform: scaleY(1); transform-origin: bottom; opacity: 0; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ═══════════════════════════════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════════════════════════════ */
.container { max-width: 1140px; margin: 0 auto; padding: 0 40px; }
.section { padding: 100px 0; }

.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.section-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 60px;
}

/* ─── ABOUT ─────────────────────────────────────────────────────── */
.about { background: var(--bg2); }
.about__inner {
  display: grid; grid-template-columns: 1fr 2fr; gap: 80px; align-items: start;
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s, transform 0.6s;
}
.about__inner.revealed { opacity: 1; transform: translateY(0); }
.about__label { padding-top: 6px; }
.about__heading {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 24px;
}
.about__text p { color: rgba(240,240,242,0.72); margin-bottom: 16px; }
.about__contact-row { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 32px; }
.about__contact-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.9rem; font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}
.about__contact-item:hover { color: var(--accent); }
.about__contact-item svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ─── SKILLS ────────────────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}
.skill-group {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.5s, transform 0.5s, border-color 0.2s;
}
.skill-group.revealed { opacity: 1; transform: translateY(0); }
.skill-group:hover { border-color: var(--border-hover); }
.skill-group__cat {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.skill-group ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tag {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 4px 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.skills-loading { color: var(--text-muted); font-size: 0.9rem; }

/* ─── PROJECTS ──────────────────────────────────────────────────── */
.projects-section { background: var(--bg); }
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}
.project-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  opacity: 0; transform: translateY(20px);
}
.project-card.revealed { opacity: 1; transform: translateY(0); }
.project-card:hover { border-color: var(--border-hover); transform: translateY(-4px); box-shadow: var(--shadow); }
.project-card__img-wrap { aspect-ratio: 16/9; overflow: hidden; background: var(--bg3); }
.project-card__img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.project-card:hover .project-card__img-wrap img { transform: scale(1.04); }
.project-card__placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
}
.project-card__placeholder svg { width: 48px; height: 48px; opacity: 0.3; }
.project-card__body { padding: 22px 24px; }
.project-card__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.project-card__desc { font-size: 0.875rem; color: rgba(240,240,242,0.65); line-height: 1.6; }
.project-card__date { display: block; margin-top: 14px; font-size: 0.75rem; color: var(--text-muted); letter-spacing: 0.06em; }
.projects-empty { color: var(--text-muted); }

/* ─── CONTACT ───────────────────────────────────────────────────── */
.contact-section { background: var(--bg2); }
.contact-wrap { display: grid; grid-template-columns: 1fr 2fr; gap: 80px; align-items: start; }
.contact-info p { color: rgba(240,240,242,0.65); margin-bottom: 20px; }
.contact-email {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
  transition: opacity 0.2s;
}
.contact-email:hover { opacity: 0.75; }
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.contact-feedback { font-size: 0.875rem; padding: 10px 14px; border-radius: var(--radius); }
.contact-feedback--ok { background: rgba(62,207,142,0.12); color: var(--green); }
.contact-feedback--err { background: rgba(232,69,69,0.12); color: var(--red); }

/* ─── FOOTER ────────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); padding: 28px 0; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; color: var(--text-muted); }
.footer__admin-link { opacity: 0.3; transition: opacity 0.2s; font-size: 0.75rem; }
.footer__admin-link:hover { opacity: 1; }

/* ═══════════════════════════════════════════════════════════════════
   ADMIN LOGIN
   ═══════════════════════════════════════════════════════════════════ */
.admin-login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(232,197,71,0.04) 0%, transparent 60%);
  padding: 40px 20px;
}
.admin-login-card {
  width: 100%; max-width: 400px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 8px;
  animation: heroIn 0.6s cubic-bezier(.16,1,.3,1) both;
}
.admin-login-logo {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 800;
  color: var(--accent); margin-bottom: 8px;
}
.admin-login-card h1 { font-family: var(--font-display); font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; }
.admin-login-sub { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 20px; }
.admin-login-card form { display: flex; flex-direction: column; gap: 18px; margin-bottom: 16px; }
.login-error { font-size: 0.875rem; color: var(--red); background: rgba(232,69,69,0.1); padding: 10px 14px; border-radius: var(--radius); }
.back-link { font-size: 0.8rem; color: var(--text-muted); text-align: center; transition: color 0.2s; }
.back-link:hover { color: var(--text); }

/* ═══════════════════════════════════════════════════════════════════
   ADMIN DASHBOARD
   ═══════════════════════════════════════════════════════════════════ */
.admin-app {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
.admin-sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 28px 16px;
  position: sticky; top: 0; height: 100vh;
  flex-shrink: 0;
}
.admin-sidebar__logo {
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.1rem;
  color: var(--accent);
  padding: 0 12px; margin-bottom: 36px;
}
.admin-sidebar__logo span { font-weight: 400; color: var(--text-muted); font-size: 0.8rem; margin-left: 4px; }
.admin-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.admin-nav__item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  background: none; border: none; border-radius: var(--radius);
  color: var(--text-muted);
  font-family: var(--font-body); font-size: 0.9rem; font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
  text-align: left; position: relative;
}
.admin-nav__item svg { width: 17px; height: 17px; flex-shrink: 0; }
.admin-nav__item:hover { background: var(--bg3); color: var(--text); }
.admin-nav__item.active { background: var(--accent-dim); color: var(--accent); }
.admin-nav__badge {
  position: absolute; right: 12px;
  background: var(--red);
  color: #fff;
  font-size: 0.7rem; font-weight: 700;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.admin-logout {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: none; border: none;
  color: var(--text-muted); font-family: var(--font-body); font-size: 0.875rem;
  cursor: pointer; border-radius: var(--radius);
  transition: color 0.2s; margin-top: auto;
}
.admin-logout svg { width: 16px; height: 16px; }
.admin-logout:hover { color: var(--red); }

/* MAIN CONTENT */
.admin-main { flex: 1; padding: 40px; min-width: 0; overflow-y: auto; }
.admin-tab { display: none; }
.admin-tab.active { display: block; }
.admin-tab__header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px;
}
.admin-tab__header h2 {
  font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em;
}
.admin-loading { color: var(--text-muted); padding: 20px 0; }
.admin-empty { color: var(--text-muted); padding: 20px 0; }
.admin-error { color: var(--red); padding: 20px 0; }

/* PROJECT ROWS */
.admin-projects-list { display: flex; flex-direction: column; gap: 12px; }
.admin-project-row {
  display: grid; grid-template-columns: 90px 1fr auto;
  gap: 20px; align-items: center;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: border-color 0.2s;
}
.admin-project-row:hover { border-color: var(--border-hover); }
.admin-project-row__img { width: 90px; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--bg3); }
.admin-project-row__img img { width: 100%; height: 100%; object-fit: cover; }
.no-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 0.65rem; color: var(--text-muted); }
.admin-project-row__info strong { display: block; font-family: var(--font-display); font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; }
.admin-project-row__info p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }
.admin-project-row__date { font-size: 0.72rem; color: var(--text-muted); margin-top: 6px; display: block; }
.admin-project-row__actions { display: flex; gap: 8px; }

/* SKILLS TABLE */
.admin-skills-table { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.admin-skills-table__head, .admin-skills-table__row {
  display: grid; grid-template-columns: 1fr 1fr 40px;
  gap: 16px; align-items: center;
  padding: 12px 20px;
}
.admin-skills-table__head {
  background: var(--bg3);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted);
}
.admin-skills-table__row { border-top: 1px solid var(--border); font-size: 0.875rem; }
.skill-cat-badge {
  background: var(--accent-dim); color: var(--accent);
  border-radius: 99px; padding: 3px 12px; font-size: 0.78rem; font-weight: 600;
  display: inline-block; white-space: nowrap;
}

/* RESUME */
.resume-zone { display: flex; flex-direction: column; gap: 24px; max-width: 520px; }
.upload-zone {
  border: 2px dashed var(--border-hover);
  border-radius: var(--radius-lg);
  padding: 56px 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.upload-zone.dragover { border-color: var(--accent); background: var(--accent-dim); }
.upload-zone svg { width: 48px; height: 48px; margin: 0 auto 16px; color: var(--text-muted); }
.upload-zone p { font-weight: 500; margin-bottom: 6px; }
.upload-zone span { font-size: 0.82rem; color: var(--text-muted); }
.upload-link { color: var(--accent); cursor: pointer; text-decoration: underline; }
.resume-status { font-size: 0.875rem; padding: 10px 14px; border-radius: var(--radius); }
.resume-status--ok { background: rgba(62,207,142,0.12); color: var(--green); }
.resume-status--err { background: rgba(232,69,69,0.12); color: var(--red); }
.resume-view-btn { align-self: flex-start; }

/* MESSAGES */
#adminMessagesList { display: flex; flex-direction: column; gap: 12px; }
.admin-msg-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  transition: border-color 0.2s;
}
.admin-msg-card--unread { border-color: rgba(232,197,71,0.3); }
.admin-msg-card__head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; margin-bottom: 12px; flex-wrap: wrap;
}
.admin-msg-card__head strong { display: block; font-family: var(--font-display); font-size: 0.95rem; margin-bottom: 3px; }
.admin-msg-card__head a { font-size: 0.82rem; color: var(--text-muted); }
.admin-msg-card__meta { display: flex; align-items: center; gap: 10px; font-size: 0.78rem; color: var(--text-muted); flex-shrink: 0; }
.read-tag { background: var(--bg3); border-radius: 99px; padding: 3px 10px; font-size: 0.72rem; color: var(--text-muted); }
.admin-msg-card__body { font-size: 0.875rem; color: rgba(240,240,242,0.72); white-space: pre-wrap; line-height: 1.65; }

/* ═══════════════════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
  padding: 36px;
  position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  animation: modalIn 0.25s cubic-bezier(.16,1,.3,1);
}
@keyframes modalIn { from { opacity:0; transform:scale(0.97) translateY(10px); } to { opacity:1; transform:none; } }
.modal h3 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; margin-bottom: 24px; }
.modal form { display: flex; flex-direction: column; gap: 18px; }
.modal__close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; color: var(--text-muted); font-size: 1rem; cursor: pointer; padding: 6px; border-radius: 4px;
  transition: color 0.2s;
}
.modal__close:hover { color: var(--text); }
.modal-preview { margin-top: -6px; }
.current-img-preview { width: 100%; border-radius: var(--radius); max-height: 160px; object-fit: cover; }
.modal-error { font-size: 0.875rem; color: var(--red); padding: 8px 12px; background: rgba(232,69,69,0.1); border-radius: var(--radius); }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 4px; }

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .about__inner, .contact-wrap { grid-template-columns: 1fr; gap: 40px; }
  .about__label { display: none; }
}
@media (max-width: 768px) {
  .nav { padding: 0 20px; }
  .nav__links, .nav__resume { display: none; }
  .nav__hamburger { display: flex; }
  .nav--open .nav__links {
    display: flex; flex-direction: column;
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: var(--bg2);
    padding: 20px;
    border-bottom: 1px solid var(--border);
  }
  .hero { padding: calc(var(--nav-h) + 20px) 20px 60px; }
  .container { padding: 0 20px; }
  .section { padding: 70px 0; }
  .section-heading { margin-bottom: 40px; }
  .form-row { grid-template-columns: 1fr; }

  /* Admin mobile */
  .admin-app { flex-direction: column; }
  .admin-sidebar { width: 100%; min-height: auto; height: auto; flex-direction: row; flex-wrap: wrap; padding: 12px; gap: 6px; position: relative; border-right: none; border-bottom: 1px solid var(--border); }
  .admin-sidebar__logo { width: 100%; }
  .admin-nav { flex-direction: row; flex: unset; gap: 4px; flex-wrap: wrap; }
  .admin-nav__item { padding: 8px 14px; font-size: 0.82rem; }
  .admin-logout { margin-top: 0; margin-left: auto; }
  .admin-main { padding: 20px; }
  .admin-project-row { grid-template-columns: 60px 1fr; }
  .admin-project-row__actions { grid-column: 1/-1; justify-content: flex-end; }
  .admin-skills-table__head, .admin-skills-table__row { grid-template-columns: 1fr 1fr 34px; }
  .modal { padding: 24px 20px; }
  .modal-actions { flex-direction: column; }
}

/* ═══════════════════════════════════════════════════════════════════
   ADDITIONAL SECTIONS (Resume data)
   ═══════════════════════════════════════════════════════════════════ */

/* About pills */
.about__pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 24px; }
.pill {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(232,197,71,0.2);
  border-radius: 99px;
  padding: 5px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Reveal */
.reveal-item { opacity: 0; transform: translateY(22px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal-item.revealed { opacity: 1; transform: translateY(0); }

/* Timeline / Experience */
.experience-section { background: var(--bg); }
.timeline { display: flex; flex-direction: column; gap: 0; position: relative; }
.timeline::before {
  content:''; position:absolute; left: 11px; top: 6px; bottom: 6px;
  width: 2px; background: var(--border);
}
.timeline__item { display: flex; gap: 28px; padding-bottom: 36px; }
.timeline__marker {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
  flex-shrink: 0; margin-top: 4px; position: relative; z-index: 1;
}
.timeline__card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  flex: 1;
  transition: border-color 0.2s;
}
.timeline__card:hover { border-color: var(--border-hover); }
.timeline__card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.timeline__card-head h3 { font-family: var(--font-display); font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.timeline__company { font-size: 0.85rem; color: var(--text-muted); }
.timeline__badge {
  background: var(--bg3); color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 99px; padding: 4px 14px;
  font-size: 0.75rem; font-weight: 600;
  white-space: nowrap; flex-shrink: 0;
}
.timeline__badge--current { background: var(--accent-dim); color: var(--accent); border-color: rgba(232,197,71,0.25); }
.timeline__bullets { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.timeline__bullets li {
  font-size: 0.875rem; color: rgba(240,240,242,0.68);
  padding-left: 18px; position: relative; line-height: 1.5;
}
.timeline__bullets li::before {
  content:''; position:absolute; left:0; top:8px;
  width:6px; height:6px; border-radius:50%; background: var(--accent); opacity:0.6;
}

/* Education */
.education-section { background: var(--bg2); }
.edu-grid { display: flex; flex-direction: column; gap: 16px; }
.edu-card {
  display: flex; align-items: flex-start; gap: 28px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px 28px;
  transition: border-color 0.2s;
}
.edu-card:hover { border-color: var(--border-hover); }
.edu-card__year {
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 800;
  color: var(--accent); min-width: 52px; padding-top: 2px;
}
.edu-card h3 { font-family: var(--font-display); font-size: 0.95rem; font-weight: 700; margin-bottom: 5px; }
.edu-card span { font-size: 0.83rem; color: var(--text-muted); }

/* Personal details */
.personal-section { background: var(--bg); }
.personal-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
}
.personal-item {
  display: flex; flex-direction: column; gap: 5px;
  padding: 20px 24px;
  background: var(--bg2);
}
.personal-item__label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent);
}
.personal-item span:last-child { font-size: 0.875rem; color: rgba(240,240,242,0.8); }

/* Contact address */
.contact-address { font-size: 0.82rem; color: var(--text-muted); margin-top: 16px; line-height: 1.8; }

/* Sidebar footer */
.admin-sidebar__footer {
  display: flex; flex-direction: column; gap: 4px; margin-top: auto; padding-top: 16px;
  border-top: 1px solid var(--border);
}
.admin-view-site {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  color: var(--text-muted); font-size: 0.875rem; font-family: var(--font-body);
  border-radius: var(--radius); transition: color 0.2s;
}
.admin-view-site svg { width: 15px; height: 15px; }
.admin-view-site:hover { color: var(--accent); }
.admin-logout { border: none; }

/* Modal error visible */
.modal-error { display: block; }

/* Responsive admin nav on mobile */
@media (max-width: 768px) {
  .admin-sidebar__footer { flex-direction: row; border-top: none; border-left: 1px solid var(--border); padding-top: 0; padding-left: 12px; margin-top: 0; margin-left: auto; }
}

/* ═══════════════════════════════════════════════════════════════════
   ADMIN — NEW SECTION STYLES
   ═══════════════════════════════════════════════════════════════════ */

/* ── Skills table with 4 columns ─────────────────────────────────── */
.admin-skills-table__head,
.admin-skills-table__row { grid-template-columns: 1fr 1fr 60px 80px; }

/* ── Generic admin card (experience, education, achievements) ─────── */
.admin-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px 22px;
  margin-bottom: 12px; transition: border-color .2s;
}
.admin-card:hover { border-color: var(--border-hover); }
.admin-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.admin-card__head > div { flex: 1; min-width: 0; }
.admin-card__head strong { display: block; font-family: var(--font-display); font-size: .95rem; font-weight: 700; margin-bottom: 4px; }
.admin-card__sub  { font-size: .82rem; color: var(--text-muted); display: block; margin-bottom: 4px; }
.admin-card__detail { font-size: .8rem; color: var(--text-muted); display: block; }
.admin-card__desc { font-size: .83rem; color: rgba(240,240,242,.65); margin-top: 8px; line-height: 1.5; }
.admin-card__actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ── Badges ──────────────────────────────────────────────────────── */
.badge-current {
  background: var(--accent-dim); color: var(--accent);
  border: 1px solid rgba(232,197,71,.25); border-radius: 99px;
  padding: 2px 10px; font-size: .72rem; font-weight: 700; letter-spacing: .04em;
}
.badge-year {
  background: var(--bg3); color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 99px;
  padding: 2px 10px; font-size: .72rem;
}

/* ── About edit layout ───────────────────────────────────────────── */
.about-edit-grid { display: grid; grid-template-columns: 200px 1fr; gap: 40px; margin-bottom: 24px; }
.about-edit-photo { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.photo-preview {
  width: 160px; height: 160px; border-radius: 50%;
  overflow: hidden; background: var(--bg3);
  border: 2px solid var(--border);
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center;
  justify-content: center; color: var(--text-muted);
}
.photo-placeholder svg { width: 64px; height: 64px; opacity: .3; }
.about-edit-fields { display: flex; flex-direction: column; gap: 16px; }

/* ── Form actions row ────────────────────────────────────────────── */
.form-actions { display: flex; align-items: center; gap: 20px; margin-top: 8px; }
.save-success { color: var(--green); font-size: .875rem; font-weight: 600; }

/* ── Toggle checkbox ─────────────────────────────────────────────── */
.form-group--inline { flex-direction: row; align-items: center; }
.toggle-label { display: flex; align-items: center; font-size: .875rem; color: var(--text-muted); cursor: pointer; }
.toggle-label input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); margin-right: 4px; }

/* ── Modal wide ──────────────────────────────────────────────────── */
.modal--wide { max-width: 680px; }

/* ── Project row image overlay ───────────────────────────────────── */
.admin-project-row__img { position: relative; }
.img-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: .75rem; font-weight: 600;
  opacity: 0; transition: opacity .2s;
  text-decoration: none;
}
.admin-project-row__img:hover .img-overlay { opacity: 1; }

/* ── req asterisk ────────────────────────────────────────────────── */
.req { color: var(--red); }

/* ── Responsive about edit ───────────────────────────────────────── */
@media (max-width: 768px) {
  .about-edit-grid { grid-template-columns: 1fr; }
  .about-edit-photo { flex-direction: row; align-items: center; }
  .photo-preview { width: 80px; height: 80px; flex-shrink: 0; }
  .admin-skills-table__head,
  .admin-skills-table__row { grid-template-columns: 1fr 1fr 60px; }
  .admin-skills-table__head span:nth-child(3),
  .admin-skills-table__row span:nth-child(3) { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════
   INLINE ADMIN — Admin Bar
   ═══════════════════════════════════════════════════════════════════ */
.admin-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: #1a1200;
  border-bottom: 1px solid rgba(232,197,71,0.35);
  padding: 0 24px; height: 44px;
}
.admin-bar__inner {
  max-width: 1200px; margin: 0 auto;
  height: 100%; display: flex; align-items: center; gap: 16px;
}
.admin-bar__badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-dim); color: var(--accent);
  border: 1px solid rgba(232,197,71,.3);
  border-radius: 99px; padding: 3px 12px;
  font-size: .72rem; font-weight: 700; letter-spacing: .06em;
  white-space: nowrap;
}
.admin-bar__hint { font-size: .78rem; color: rgba(240,240,242,.5); flex: 1; }
.admin-bar__hint strong { color: var(--accent); }
.admin-bar__actions { display: flex; align-items: center; gap: 10px; }
.admin-bar__btn {
  font-size: .78rem; font-weight: 600; letter-spacing: .04em;
  background: rgba(255,255,255,.07); color: var(--text-muted);
  border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius);
  padding: 5px 14px; cursor: pointer; transition: all .2s; text-decoration: none;
  display: inline-flex; align-items: center; gap: 5px;
}
.admin-bar__btn:hover { background: rgba(255,255,255,.13); color: var(--text); }
.admin-bar__btn--danger:hover { border-color: var(--red); color: var(--red); }
.upload-status { font-size: .75rem; color: var(--green); }

/* Push content down when admin bar visible */
body.is-admin .nav { top: 44px; }
body.is-admin .hero { padding-top: calc(44px + var(--nav-h) + 40px); }

/* ── Section edit header ────────────────────────────────────────── */
.section-edit-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 0;
}
.edit-section-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-dim); color: var(--accent);
  border: 1px solid rgba(232,197,71,.3);
  border-radius: var(--radius); padding: 7px 16px;
  font-size: .78rem; font-weight: 700; letter-spacing: .04em;
  cursor: pointer; white-space: nowrap;
  transition: background .2s, border-color .2s;
  flex-shrink: 0; margin-top: 4px;
}
.edit-section-btn:hover { background: rgba(232,197,71,.22); border-color: var(--accent); }

/* ═══════════════════════════════════════════════════════════════════
   EDIT DRAWER
   ═══════════════════════════════════════════════════════════════════ */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,.55); backdrop-filter: blur(4px);
}
.edit-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 301;
  width: 420px; max-width: 95vw;
  background: var(--bg2);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  box-shadow: -20px 0 60px rgba(0,0,0,.4);
  animation: drawerIn .25s cubic-bezier(.16,1,.3,1);
}
@keyframes drawerIn { from { transform: translateX(40px); opacity:.6; } to { transform: none; opacity:1; } }
.edit-drawer__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.edit-drawer__header h3 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 800; }
.edit-drawer__close {
  background: none; border: none; color: var(--text-muted);
  font-size: 1.1rem; cursor: pointer; padding: 4px 8px;
  border-radius: var(--radius); transition: color .2s;
}
.edit-drawer__close:hover { color: var(--text); }
.edit-drawer__body {
  flex: 1; overflow-y: auto; padding: 20px 24px;
  display: flex; flex-direction: column; gap: 0;
}

/* Drawer photo */
.drawer-photo-preview {
  width: 100px; height: 100px; border-radius: 50%;
  overflow: hidden; background: var(--bg3);
  border: 2px solid var(--border); margin: 0 auto;
}
.drawer-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.drawer-photo-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: .72rem; color: var(--text-muted);
}

/* Drawer list items */
.drawer-list-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.drawer-list-item:last-child { border-bottom: none; }
.drawer-list-item__info { flex: 1; min-width: 0; }
.drawer-list-item__title { display: block; font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-list-item__sub   { display: block; font-size: .77rem; color: var(--text-muted); margin-top: 2px; }
.drawer-list-item__thumb { display: block; width: 40px; height: 28px; object-fit: cover; border-radius: 3px; margin-top: 5px; }
.drawer-list-item__actions { display: flex; gap: 6px; flex-shrink: 0; }
.form-error { font-size: .83rem; color: var(--red); padding: 8px 12px; background: rgba(232,69,69,.1); border-radius: var(--radius); }

/* ═══════════════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════════════ */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  z-index: 500; padding: 12px 28px; border-radius: 99px;
  font-size: .875rem; font-weight: 600;
  background: var(--bg3); color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none;
}
.toast--show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast--ok  { background: rgba(62,207,142,.15); border-color: rgba(62,207,142,.4); color: var(--green); }
.toast--err { background: rgba(232,69,69,.15);  border-color: rgba(232,69,69,.4);  color: var(--red); }

/* ═══════════════════════════════════════════════════════════════════
   ABOUT PHOTO
   ═══════════════════════════════════════════════════════════════════ */
.about__inner { display: grid; grid-template-columns: 1fr 2fr; gap: 60px; align-items: start; }
.about__photo-wrap { display: none; }
.about__photo-wrap.has-photo {
  display: flex; align-items: center; justify-content: center;
}
.about__photo {
  width: 200px; height: 200px; border-radius: 50%;
  object-fit: cover; border: 3px solid var(--border);
}
/* When photo shown, shift to 3-col */
.about__inner:has(.about__photo-wrap.has-photo) {
  grid-template-columns: 200px 1fr 2fr;
}

/* ═══════════════════════════════════════════════════════════════════
   ACHIEVEMENTS SECTION
   ═══════════════════════════════════════════════════════════════════ */
.achievements-section { background: var(--bg); }
.achievements-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 20px;
}
.achievement-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  transition: border-color .2s;
  opacity: 0; transform: translateY(16px);
}
.achievement-card.revealed { opacity: 1; transform: none; }
.achievement-card:hover { border-color: var(--border-hover); }
.achievement-card__year {
  display: inline-block; margin-bottom: 10px;
  font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-dim);
  border-radius: 99px; padding: 3px 12px;
}
.achievement-card__title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.achievement-card__desc  { font-size: .85rem; color: rgba(240,240,242,.65); line-height: 1.6; }

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE ADJUSTMENTS
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .admin-bar__hint { display: none; }
  .admin-bar__inner { gap: 8px; }
  .section-edit-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .about__inner { grid-template-columns: 1fr; }
  .about__inner:has(.about__photo-wrap.has-photo) { grid-template-columns: 1fr; }
  .about__photo-wrap.has-photo { justify-content: flex-start; margin-bottom: 8px; }
}

/* ── CRITICAL: Respect [hidden] on admin elements ──────────────── */
/* CSS display rules must never override the HTML hidden attribute  */
[hidden] { display: none !important; }

/* ═══════════════════════════════════════════════════════════════════
   HERO 3D CANVAS
   ═══════════════════════════════════════════════════════════════════ */
.hero__3d-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;    /* Let clicks pass through to content */
  z-index: 0;
}
.hero__content { position: relative; z-index: 1; }
.hero__scroll-hint { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); z-index: 1; }

/* Enable pointer events on hero canvas for parallax */
.hero { position: relative; }

/* ═══════════════════════════════════════════════════════════════════
   PROJECT CARD — 3D VIEWER
   ═══════════════════════════════════════════════════════════════════ */
.project-card__viewer {
  position: relative;
  aspect-ratio: 16/9;
  background: #0e0e10;
  overflow: hidden;
  cursor: grab;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.project-card__viewer:active { cursor: grabbing; }

.model-canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.viewer-hint {
  position: absolute; bottom: 8px; left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.55);
  color: rgba(255,255,255,0.55);
  font-size: 0.68rem; letter-spacing: 0.06em;
  padding: 4px 12px; border-radius: 99px;
  display: flex; align-items: center; gap: 5px;
  pointer-events: none;
  transition: opacity 0.3s;
  white-space: nowrap;
}
.project-card__viewer:hover .viewer-hint { opacity: 0; }

.viewer-toggle {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  color: #fff; font-size: 0.8rem;
  padding: 4px 9px; cursor: pointer;
  transition: background 0.2s;
  z-index: 2;
}
.viewer-toggle:hover { background: rgba(232,197,71,0.3); }

.viewer-loading {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 0.8rem; letter-spacing: 0.1em;
  background: #0e0e10;
}

.viewer-img-overlay {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

/* Model badge on card */
.model-badge {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 10px;
  background: rgba(232,197,71,0.1);
  color: var(--accent);
  border: 1px solid rgba(232,197,71,0.2);
  border-radius: 99px; padding: 2px 10px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em;
}
