/* ═══════════════════════════════════════════
   BHUWAN REGMI — PORTFOLIO
   ═══════════════════════════════════════════ */

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

:root {
  --bg:        #060606;
  --bg-el:     #0c0c0e;
  --bg-card:   #101013;
  --bg-hover:  #161619;
  --surface:   #1a1a1e;
  --border:    rgba(255,255,255,0.055);
  --border-h:  rgba(255,255,255,0.1);
  --gold:      #c4a265;
  --gold-l:    #dbb978;
  --gold-dim:  rgba(196,162,101,0.12);
  --text:      #ddd8cf;
  --text-s:    #9a958c;
  --white:     #eeebe4;
  --green:     #4ade80;
  --red:       #ef4444;
  --radius:    10px;
  --radius-sm: 6px;
  --ease:      cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* grain */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.45;
}

::selection {
  background: var(--gold-dim);
  color: var(--white);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
}

/* custom scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.14); }

/* ─── SCROLL PROGRESS ─── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-l));
  z-index: 200;
  width: 0%;
  transition: width 0.05s linear;
}

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  background: rgba(6,6,6,0.88);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  transition: padding 0.3s var(--ease);
}

nav.scrolled { padding: 14px 48px; }

.nav-logo {
  font-family: 'Instrument Serif', serif;
  font-size: 1.3rem;
  color: var(--gold-l);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  color: var(--text-s);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s var(--ease);
}

.nav-links a:hover { color: var(--gold-l); }
.nav-links a:hover::after { width: 100%; }

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: 0 48px 72px;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 45% at 70% 20%, rgba(196,162,101,0.055) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 5% 85%, rgba(196,162,101,0.03) 0%, transparent 50%);
  animation: glowDrift 25s ease infinite alternate;
}

@keyframes glowDrift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(20px, -15px) scale(1.03); }
  100% { transform: translate(-10px, 10px) scale(0.98); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

.hero-label {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-label::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--gold);
}

.hero-name {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(4rem, 10vw, 9rem);
  line-height: 0.92;
  color: var(--white);
  letter-spacing: -0.02em;
}

.hero-name-accent {
  background: linear-gradient(135deg, var(--gold-l) 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-style: italic;
}

.hero-intro {
  margin-top: 32px;
  font-size: 1.05rem;
  color: var(--text-s);
  max-width: 580px;
  line-height: 1.85;
  font-weight: 300;
}

.hero-actions {
  margin-top: 44px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-scroll-cue {
  position: absolute;
  right: 48px;
  bottom: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scroll-line {
  width: 1px;
  height: 64px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollPulse 2.5s ease infinite;
}

/* ─── BUTTONS ─── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--gold);
  color: var(--bg);
  padding: 15px 30px;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s var(--ease);
}

.btn-primary:hover {
  background: var(--gold-l);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(196,162,101,0.18);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  padding: 15px 30px;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  border: 1px solid var(--border-h);
  transition: all 0.3s var(--ease);
}

.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

/* ─── SECTION HEADERS ─── */
section {
  padding: 140px 0;
}

#work { background: var(--bg-el); }
#certifications { background: var(--bg); }
#about { background: var(--bg-el); }

.section-header {
  margin-bottom: 72px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}

.section-tag::after {
  content: '';
  width: 48px;
  height: 1px;
  background: var(--gold);
  opacity: 0.35;
}

.section-title {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  color: var(--white);
  line-height: 1.08;
}

.section-title em {
  font-style: italic;
  background: linear-gradient(135deg, var(--gold-l), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── FEATURED PROJECT ─── */
.featured-wrap {
  margin-bottom: 48px;
}

.featured-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.4s, box-shadow 0.5s;
  position: relative;
}

.featured-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(196,162,101,0.25) 0%, transparent 40%, transparent 60%, rgba(196,162,101,0.12) 100%);
  opacity: 0;
  transition: opacity 0.5s;
  z-index: 0;
  pointer-events: none;
}

.featured-card:hover {
  border-color: rgba(196,162,101,0.2);
  box-shadow: 0 24px 80px rgba(0,0,0,0.4), 0 0 60px rgba(196,162,101,0.04);
}

.featured-card:hover::before { opacity: 1; }

.featured-inner {
  position: relative;
  z-index: 1;
  padding: 56px 52px;
}

.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  background: rgba(74,222,128,0.07);
  padding: 7px 16px;
  border-radius: 24px;
  border: 1px solid rgba(74,222,128,0.12);
  margin-bottom: 28px;
}

.featured-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

.featured-icon {
  font-size: 2.8rem;
  margin-bottom: 16px;
}

.featured-name {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 8px;
}

.featured-tagline {
  font-size: 0.95rem;
  color: var(--gold-l);
  font-weight: 500;
  margin-bottom: 32px;
}

.featured-story {
  columns: 2;
  column-gap: 48px;
  font-size: 0.92rem;
  color: var(--text-s);
  line-height: 1.85;
}

.featured-story p {
  margin-bottom: 16px;
  break-inside: avoid;
}

/* Featured features grid */
.featured-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 36px;
}

.featured-feature {
  background: var(--bg-card);
  padding: 24px 22px;
  transition: background 0.3s;
}

.featured-card:hover .featured-feature { background: var(--bg-hover); }

.featured-feature-title {
  font-family: 'Instrument Serif', serif;
  font-size: 1rem;
  color: var(--white);
  margin-bottom: 6px;
}

.featured-feature-desc {
  font-size: 0.78rem;
  color: var(--text-s);
  line-height: 1.65;
}

/* Featured screenshots */
.featured-screenshots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 28px;
}

.featured-screenshot {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color 0.3s, transform 0.4s var(--ease), box-shadow 0.4s;
}

.featured-screenshot:hover {
  border-color: rgba(196,162,101,0.2);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.featured-screenshot img {
  width: 100%;
  height: auto;
  display: block;
}

.featured-screenshot-label {
  padding: 10px 14px;
  background: var(--bg);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-s);
  border-top: 1px solid var(--border);
}

/* Featured outcome */
.featured-outcome {
  margin-top: 28px;
  padding: 22px 28px;
  border-left: 2px solid var(--gold);
  background: rgba(196,162,101,0.025);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.7;
  font-weight: 400;
}

.featured-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.featured-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.featured-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-s);
  transition: color 0.3s;
}

.featured-card:hover .featured-link { color: var(--gold-l); }

.featured-link-arrow {
  transition: transform 0.3s var(--ease);
}

.featured-card:hover .featured-link-arrow {
  transform: translate(3px, -3px);
}

/* ─── PROJECT CARDS ─── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 40px 36px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.35s, transform 0.4s var(--ease), box-shadow 0.4s;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(196,162,101,0.2), transparent 50%);
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 0;
  pointer-events: none;
}

.project-card:hover {
  border-color: rgba(196,162,101,0.18);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.35), 0 0 40px rgba(196,162,101,0.03);
}

.project-card:hover::before { opacity: 1; }

.project-card > * { position: relative; z-index: 1; }

.project-icon { font-size: 2.2rem; line-height: 1; }

.project-name {
  font-family: 'Instrument Serif', serif;
  font-size: 1.65rem;
  color: var(--white);
  line-height: 1.15;
}

.project-tagline {
  font-size: 0.85rem;
  color: var(--gold-l);
  font-weight: 500;
}

.project-desc {
  font-size: 0.85rem;
  color: var(--text-s);
  line-height: 1.8;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.tag {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-s);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 4px;
  transition: color 0.3s, border-color 0.3s;
}

.project-card:hover .tag,
.featured-card:hover .tag {
  color: var(--gold);
  border-color: rgba(196,162,101,0.2);
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.project-footer-text {
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-s);
  transition: color 0.3s;
}

.project-card:hover .project-footer-text { color: var(--gold-l); }

.project-arrow {
  color: var(--text-s);
  transition: transform 0.3s var(--ease), color 0.3s;
  font-size: 1.1rem;
}

.project-card:hover .project-arrow {
  transform: translate(3px, -3px);
  color: var(--gold-l);
}

/* ─── CERT CARDS ─── */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.35s, transform 0.4s var(--ease), box-shadow 0.4s;
}

.cert-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-l));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.cert-card:hover {
  border-color: rgba(196,162,101,0.18);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}

.cert-card:hover::after { transform: scaleX(1); }

.cert-issuer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

.cert-issuer-dot {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
}

.cert-issuer-dot.coursera { background: rgba(0,86,210,0.12); color: #5b9bf5; }
.cert-issuer-dot.udemy { background: rgba(164,92,255,0.12); color: #b07cf7; }

.cert-name {
  font-family: 'Instrument Serif', serif;
  font-size: 1.1rem;
  color: var(--white);
  line-height: 1.3;
  flex: 1;
}

.cert-date {
  font-size: 0.76rem;
  color: var(--text-s);
}

.cert-actions {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.cert-view-btn {
  width: 100%;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-s);
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s;
}

.cert-view-btn:hover {
  border-color: var(--gold);
  color: var(--gold-l);
  background: rgba(196,162,101,0.04);
}

.cert-view-btn.has-cred {
  border-color: rgba(196,162,101,0.25);
  color: var(--gold);
}

/* ─── ABOUT ─── */
.about-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 100px;
  align-items: start;
}

.about-bio {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--text-s);
  font-weight: 300;
}

.about-bio p + p { margin-top: 22px; }

.about-bio strong {
  color: var(--text);
  font-weight: 500;
}

.about-quote {
  margin-top: 48px;
  padding: 28px 32px;
  border-left: 2px solid var(--gold);
  background: rgba(196,162,101,0.025);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text);
  line-height: 1.6;
}

.about-sidebar {
  position: sticky;
  top: 120px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.sidebar-section {}

.sidebar-title {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-s);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.3s;
  width: fit-content;
}

.sidebar-link:hover { color: var(--gold-l); }

.sidebar-link svg { flex-shrink: 0; }

.skills-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-s);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 20px;
  transition: all 0.3s;
}

.skill:hover {
  color: var(--gold);
  border-color: rgba(196,162,101,0.25);
  background: rgba(196,162,101,0.04);
}

/* ─── FOOTER ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-name {
  font-family: 'Instrument Serif', serif;
  font-size: 1.05rem;
  color: var(--gold-l);
  text-decoration: none;
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-s);
}

.admin-trigger {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--text-s);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  opacity: 0.35;
}

.admin-trigger:hover {
  opacity: 1;
  border-color: var(--gold);
  color: var(--gold);
}

/* ─── MODALS & BACKDROPS ─── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* Auth */
.auth-box {
  background: var(--bg-el);
  border: 1px solid var(--border-h);
  border-radius: 14px;
  padding: 40px 36px;
  width: 90%;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5);
}

.auth-box h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 1.4rem;
  color: var(--white);
  margin-bottom: 6px;
}

.auth-box > p {
  font-size: 0.85rem;
  color: var(--text-s);
  margin-bottom: 24px;
}

.auth-box input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-h);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  text-align: center;
  letter-spacing: 0.1em;
  transition: border-color 0.3s;
  margin-bottom: 8px;
}

.auth-box input:focus { border-color: var(--gold); }

.auth-error {
  display: none;
  font-size: 0.78rem;
  color: var(--red);
  margin-bottom: 12px;
}

.auth-error.show { display: block; }

/* Admin Panel (slide from right) */
.admin-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.admin-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.admin-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 440px;
  max-width: 92vw;
  height: 100vh;
  background: var(--bg-el);
  border-left: 1px solid var(--border-h);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease);
  box-shadow: -16px 0 64px rgba(0,0,0,0.4);
}

.admin-panel.open { transform: translateX(0); }

.admin-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.admin-panel-header h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 1.2rem;
  color: var(--white);
}

.admin-panel-close {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-s);
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.admin-panel-close:hover { border-color: var(--gold); color: var(--gold); }

.admin-panel-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.admin-tab {
  flex: 1;
  padding: 10px 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-s);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.admin-tab.active {
  background: var(--surface);
  color: var(--gold-l);
}

.admin-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.admin-tab-pane { display: none; }
.admin-tab-pane.active { display: block; }

.admin-panel-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.btn-publish {
  flex: 1;
  padding: 12px 16px;
  background: var(--gold);
  color: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s;
}

.btn-publish:hover { background: var(--gold-l); }

.btn-reset {
  padding: 12px 16px;
  background: transparent;
  color: var(--text-s);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s;
}

.btn-reset:hover { border-color: var(--red); color: var(--red); }

/* Admin items */
.admin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.admin-item-name {
  font-size: 0.85rem;
  color: var(--text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  margin-left: 12px;
}

.admin-item-btn {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.admin-item-btn.edit { color: var(--gold); }
.admin-item-btn.edit:hover { border-color: var(--gold); background: rgba(196,162,101,0.06); }

.admin-item-btn.del { color: var(--red); }
.admin-item-btn.del:hover { border-color: var(--red); background: rgba(239,68,68,0.06); }

.admin-item-btn.upload { color: var(--text-s); position: relative; overflow: hidden; }
.admin-item-btn.upload:hover { border-color: var(--gold); color: var(--gold); }
.admin-item-btn.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.admin-section-title {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
  margin-top: 28px;
}

.admin-section-title:first-child { margin-top: 0; }

.admin-add-btn {
  width: 100%;
  padding: 14px;
  border: 2px dashed var(--border-h);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-s);
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s;
  margin-top: 12px;
}

.admin-add-btn:hover {
  border-color: var(--gold);
  color: var(--gold-l);
  background: rgba(196,162,101,0.03);
}

/* Edit Modal */
.edit-modal {
  background: var(--bg-el);
  border: 1px solid var(--border-h);
  border-radius: 14px;
  width: 90%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5);
}

.edit-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-el);
  z-index: 2;
}

.edit-modal-header h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 1.15rem;
  color: var(--white);
}

.edit-form {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-s);
}

.form-input,
.form-textarea {
  background: var(--bg);
  border: 1px solid var(--border-h);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text);
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.3s;
}

.form-input:focus,
.form-textarea:focus { border-color: var(--gold); }

.form-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.7;
}

.form-file-area {
  border: 2px dashed var(--border-h);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.form-file-area:hover {
  border-color: var(--gold);
  background: rgba(196,162,101,0.02);
}

.form-file-area input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.form-file-label {
  font-size: 0.82rem;
  color: var(--text-s);
}

.form-file-label strong {
  color: var(--gold-l);
}

.form-file-name {
  font-size: 0.78rem;
  color: var(--gold);
  margin-top: 6px;
}

.form-submit {
  padding: 14px 24px;
  background: var(--gold);
  color: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s;
  margin-top: 4px;
}

.form-submit:hover { background: var(--gold-l); }

/* Credential Viewer */
.cred-viewer {
  background: var(--bg-el);
  border: 1px solid var(--border-h);
  border-radius: 14px;
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5);
}

.cred-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}

.cred-viewer-header h4 {
  font-family: 'Instrument Serif', serif;
  font-size: 1.05rem;
  color: var(--white);
}

.cred-viewer-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
}

.cred-viewer-body img {
  max-width: 100%;
  max-height: 60vh;
  border-radius: var(--radius);
}

.cred-viewer-body iframe {
  width: 100%;
  height: 60vh;
  border: none;
  border-radius: var(--radius);
}

.cred-empty {
  text-align: center;
  color: var(--text-s);
  font-size: 0.9rem;
}

.cred-empty p + p {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--gold);
}

/* Publish Modal */
.publish-modal {
  background: var(--bg-el);
  border: 1px solid var(--border-h);
  border-radius: 14px;
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5);
}

.publish-body {
  padding: 24px;
  overflow-y: auto;
}

.publish-body > p {
  font-size: 0.88rem;
  color: var(--text-s);
  margin-bottom: 16px;
  line-height: 1.7;
}

.publish-body code {
  background: var(--surface);
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.85em;
  color: var(--gold-l);
}

.publish-body textarea {
  width: 100%;
  height: 300px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  color: var(--text-s);
  font-size: 0.78rem;
  font-family: monospace;
  resize: vertical;
  outline: none;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--surface);
  border: 1px solid var(--gold-dim);
  color: var(--gold-l);
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  z-index: 2000;
  transition: transform 0.4s var(--ease);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.25; transform: scaleY(1); }
  50%      { opacity: 0.9;  transform: scaleY(1.1); }
}

.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s ease, transform 0.8s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* stagger children */
.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0s; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 0.32s; }
.reveal-stagger > .reveal:nth-child(6) { transition-delay: 0.40s; }
.reveal-stagger > .reveal:nth-child(7) { transition-delay: 0.48s; }

/* hero specific reveal */
.hero .reveal:nth-child(1) { animation: fadeUp 0.8s 0.15s both; opacity: 1; transform: none; }
.hero .reveal:nth-child(2) { animation: fadeUp 0.9s 0.30s both; opacity: 1; transform: none; }
.hero .reveal:nth-child(3) { animation: fadeUp 0.9s 0.50s both; opacity: 1; transform: none; }
.hero .reveal:nth-child(4) { animation: fadeUp 0.9s 0.65s both; opacity: 1; transform: none; }

.hero-scroll-cue {
  opacity: 0;
  animation: fadeUp 1s 1.2s both;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1080px) {
  .certs-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-story { columns: 1; }
  .featured-features { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  nav { padding: 18px 24px; }
  .nav-links { display: none; }
  .hero { padding: 0 24px 56px; }
  .container { padding: 0 24px; }
  section { padding: 100px 0; }
  .projects-grid { grid-template-columns: 1fr; }
  .certs-grid { grid-template-columns: 1fr; }
  .about-layout { grid-template-columns: 1fr; gap: 56px; }
  .about-sidebar { position: static; }
  .hero-scroll-cue { display: none; }
  .featured-inner { padding: 36px 28px; }
  .featured-features { grid-template-columns: 1fr; }
  .featured-screenshots { grid-template-columns: 1fr; }
  footer { padding: 32px 0; }
}

@media (max-width: 520px) {
  .hero-name { font-size: clamp(3rem, 14vw, 5rem); }
  .hero-actions { flex-direction: column; }
  .hero-actions a { text-align: center; justify-content: center; }
}
