/* ==============================================================
   QUINTIN DE JONGH — Design System
   Professional · Modern · Plus Jakarta Sans · Slate / Blue / White
   ============================================================== */

:root {
  /* Fonts */
  --font-main:    'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  /* Palette */
  --bg-main:      #F8FAFC;   /* page bg */
  --bg-white:     #FFFFFF;   /* cards */
  --bg-subtle:    #F1F5F9;   /* alt sections */

  --accent:       #2563EB;   /* blue */
  --accent-dark:  #1D4ED8;
  --accent-soft:  #DBEAFE;
  --accent-glow:  rgba(37, 99, 235, 0.18);

  --navy:         #0F172A;   /* primary text / headings */
  --navy-dark:    #070E1F;
  --navy-deep:    #020817;

  --text-main:    #1E293B;
  --text-muted:   #64748B;
  --text-light:   #94A3B8;
  --line:         rgba(15, 23, 42, 0.10);
  --line-soft:    rgba(15, 23, 42, 0.06);

  --shadow-sm:    0 1px 6px rgba(15, 23, 42, 0.04);
  --shadow-md:    0 6px 20px rgba(15, 23, 42, 0.08);
  --shadow-lg:    0 18px 48px rgba(15, 23, 42, 0.12);
  --shadow-blue:  0 8px 28px rgba(37, 99, 235, 0.20);

  --radius-sm:    8px;
  --radius:       14px;
  --radius-lg:    22px;
  --radius-pill:  999px;

  --section-pad:  100px 0;
  --nav-h:        72px;
}

/* ==============================================================
   RESET & BASE
   ============================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-main);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-main);
  background: var(--bg-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main, #page { flex: 1 0 auto; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent-dark); }

/* ==============================================================
   TYPOGRAPHY
   ============================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--navy);
  margin: 0 0 .5em;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.8rem); font-weight: 700; }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.65rem); font-weight: 600; }
h4 { font-size: 1.12rem; font-weight: 600; }
h5 { font-size: .97rem; font-weight: 600; }
h6 { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); }

p { margin: 0 0 1em; }
.lead { font-size: 1.15rem; line-height: 1.7; color: var(--text-main); }

.eyebrow {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.eyebrow::before { content: "// "; opacity: .5; }

/* ==============================================================
   LAYOUT
   ============================================================== */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
}
.container-narrow { max-width: 820px; margin: 0 auto; padding: 0 28px; }
.container-wide   { max-width: 1440px; margin: 0 auto; padding: 0 28px; }

section { padding: var(--section-pad); position: relative; }
section.alt { background: var(--bg-subtle); }
section.dark { background: var(--navy-dark); color: #CBD5E1; }
section.dark h1, section.dark h2, section.dark h3, section.dark h4 { color: #fff; }

.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto-320 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid-auto-280 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ==============================================================
   BUTTONS
   ============================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-main);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .01em;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all .25s cubic-bezier(.4,0,.2,1);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-blue); }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 14px 38px rgba(37,99,235,.3); color: #fff; }

.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-dark); transform: translateY(-2px); color: #fff; }

.btn-outline { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-outline:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-outline-light:hover { background: #fff; color: var(--navy); border-color: #fff; }

.btn-ghost { background: transparent; color: var(--navy); padding: 10px 6px; }
.btn-ghost:hover { color: var(--accent); }
.btn-ghost .arrow { transition: transform .25s ease; }
.btn-ghost:hover .arrow { transform: translateX(6px); }

.btn-sm { padding: 9px 18px; font-size: .85rem; }
.btn-lg { padding: 17px 36px; font-size: 1.02rem; }
.btn-block { width: 100%; }

/* ==============================================================
   CARDS
   ============================================================== */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-soft);
  transition: transform .3s ease, box-shadow .3s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

/* Project / media card */
.card-project {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-soft);
  transition: transform .3s ease, box-shadow .3s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.card-project:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); color: inherit; }
.card-project-img {
  aspect-ratio: 16 / 10;
  background: var(--bg-subtle);
  overflow: hidden;
  position: relative;
}
.card-project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.card-project:hover .card-project-img img { transform: scale(1.06); }

.card-project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7,14,31,.65) 0%, rgba(7,14,31,.1) 50%, transparent 100%);
  opacity: 0;
  transition: opacity .3s ease;
  display: flex;
  align-items: flex-end;
  padding: 20px;
}
.card-project:hover .card-project-overlay { opacity: 1; }
.card-project-overlay span {
  color: #fff;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--accent);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}

.card-project-body { padding: 24px 26px 28px; flex: 1; display: flex; flex-direction: column; }
.card-project-body h3 { margin-bottom: 8px; font-size: 1.15rem; }
.card-project-body p { color: var(--text-muted); font-size: .92rem; margin-bottom: 16px; flex: 1; }

.card-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.card-tag.work    { background: #DCFCE7; color: #166534; }
.card-tag.academic { background: #FEF9C3; color: #854D0E; }
.card-tag.personal { background: #F3E8FF; color: #6B21A8; }
.card-tag.friend  { background: #FFE4E6; color: #9F1239; }

/* ==============================================================
   FORMS
   ============================================================== */
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.input, .textarea, .select {
  width: 100%;
  font-family: var(--font-main);
  font-size: .95rem;
  color: var(--navy-dark);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.textarea { min-height: 130px; resize: vertical; }

/* ==============================================================
   NAVBAR
   ============================================================== */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(248, 250, 252, .94);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line-soft);
  transition: box-shadow .25s ease;
}
.site-nav.scrolled { box-shadow: 0 2px 16px rgba(15,23,42,.07); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.nav-logo img { height: 42px; width: auto; border-radius: var(--radius-sm); }
.nav-logo-word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .98rem;
  letter-spacing: -.015em;
  color: var(--navy);
  line-height: 1.15;
}
.nav-logo-word span {
  display: block;
  font-size: .65rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-top: 1px;
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-main);
  padding: 9px 15px;
  border-radius: var(--radius-pill);
  transition: background .2s ease, color .2s ease;
}
.nav-links a:hover, .nav-links a.active {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.nav-cta { display: flex; gap: 12px; align-items: center; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--navy);
}
.nav-toggle svg { width: 24px; height: 24px; }

.nav-mobile-panel, .nav-backdrop { display: none; }

@media (max-width: 920px) {
  .nav-links, .nav-cta .btn-sm { display: none; }
  .nav-toggle { display: block; }

  .nav-mobile-panel {
    display: block;
    position: fixed;
    top: 0; right: -100%;
    width: 82%;
    max-width: 340px;
    height: 100vh;
    background: var(--bg-white);
    z-index: 1100;
    padding: 80px 26px 26px;
    transition: right .35s cubic-bezier(.4,0,.2,1);
    box-shadow: -20px 0 60px rgba(0,0,0,.14);
    overflow-y: auto;
  }
  .nav-mobile-panel.open { right: 0; }
  .nav-mobile-panel .nav-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 18px;
  }
  .nav-mobile-panel .nav-links a { font-size: 1.1rem; padding: 13px 16px; display: block; color: var(--navy); }
  .nav-mobile-panel .btn { margin-top: 8px; width: 100%; display: block; text-align: center; }
  .nav-mobile-close {
    position: absolute; top: 20px; right: 20px;
    background: none; border: none; cursor: pointer;
    color: var(--navy); padding: 8px;
  }
  .nav-backdrop {
    display: block;
    position: fixed; inset: 0;
    background: rgba(7, 14, 31, .4);
    z-index: 1050; opacity: 0; visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
  }
  .nav-backdrop.open { opacity: 1; visibility: visible; }
}

/* ==============================================================
   HERO
   ============================================================== */
.hero {
  position: relative;
  min-height: 96vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: var(--nav-h);
  background: var(--navy-dark);
}
.hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: .35;
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom right, rgba(37,99,235,.12) 0%, transparent 55%),
    linear-gradient(to top, rgba(7,14,31,.95) 0%, rgba(7,14,31,.55) 50%, rgba(7,14,31,.15) 100%);
  z-index: 2;
}
/* Animated grid lines */
.hero-grid {
  position: absolute; inset: 0; z-index: 1;
  background-image:
    linear-gradient(rgba(37,99,235,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37,99,235,.06) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-inner {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 60px 28px;
  max-width: 860px;
}
.hero-inner .eyebrow { color: rgba(147, 197, 253, .9); }
.hero-inner h1 { color: #fff; margin-bottom: 20px; }
.hero-inner .lead { color: rgba(255,255,255,.78); font-size: 1.15rem; max-width: 600px; margin: 0 auto 38px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Profile image in hero */
.hero-avatar {
  width: 130px; height: 130px;
  border-radius: 50%;
  border: 3px solid rgba(37,99,235,.5);
  box-shadow: 0 0 0 6px rgba(37,99,235,.12), var(--shadow-lg);
  object-fit: cover;
  margin: 0 auto 28px;
  display: block;
}

/* Page hero (inner pages) */
.page-hero {
  position: relative;
  padding: 160px 0 80px;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(37,99,235,.08) 0%, transparent 60%),
    var(--bg-main);
  text-align: center;
  border-bottom: 1px solid var(--line-soft);
}
.page-hero h1 { margin-bottom: 14px; }
.page-hero p { color: var(--text-muted); max-width: 580px; margin: 0 auto; font-size: 1.08rem; }

/* ==============================================================
   SECTION HEADERS
   ============================================================== */
.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}
.section-head p { color: var(--text-muted); font-size: 1.05rem; }

.section-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
}

/* ==============================================================
   SKILLS / PROGRESS BARS
   ============================================================== */
.skill-bar { margin-bottom: 18px; }
.skill-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: .82rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
  letter-spacing: .02em;
}
.skill-bar-track {
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  overflow: hidden;
}
.skill-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--accent) 0%, #60A5FA 100%);
  transform-origin: left;
  animation: growBar .9s cubic-bezier(.4,0,.2,1) both;
}
@keyframes growBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ==============================================================
   STAT COUNTERS
   ============================================================== */
.stat-strip {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
}
.stat-item {
  flex: 1;
  min-width: 160px;
  padding: 28px 24px;
  border-left: 1px solid var(--line-soft);
  text-align: center;
}
.stat-item:first-child { border-left: none; }
.stat-num {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  display: block;
}
.stat-label {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 6px;
}

/* ==============================================================
   TIMELINE (Resume)
   ============================================================== */
.timeline { position: relative; padding-left: 36px; }
.timeline::before {
  content: "";
  position: absolute;
  top: 8px; bottom: 8px; left: 10px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent) 0%, var(--accent-soft) 100%);
}
.timeline-item { position: relative; margin-bottom: 40px; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -32px; top: 6px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-main);
  box-shadow: 0 0 0 2px var(--accent);
}
.timeline-date {
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--accent); margin-bottom: 4px;
  display: flex; align-items: center; gap: 8px;
}
.timeline-org {
  font-size: .85rem; color: var(--text-muted); font-style: italic; margin-bottom: 8px;
}
.timeline-item h3 { font-size: 1.18rem; margin-bottom: 4px; }
.timeline-item ul { color: var(--text-muted); padding-left: 18px; font-size: .92rem; }
.timeline-item ul li { margin-bottom: 4px; }

/* ==============================================================
   CONTACT CARDS
   ============================================================== */
.contact-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 26px;
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s ease, transform .25s ease;
}
.contact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.contact-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-icon svg { width: 24px; height: 24px; }
.contact-card h4 { margin-bottom: 4px; font-size: 1rem; }
.contact-card p, .contact-card a { color: var(--text-muted); font-size: .92rem; margin: 0; }
.contact-card a:hover { color: var(--accent); }

/* ==============================================================
   FOOTER
   ============================================================== */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,.65);
  padding: 72px 0 28px;
  margin-top: auto;
}
.site-footer h6 { color: rgba(255,255,255,.38); font-size: .72rem; letter-spacing: .18em; margin-bottom: 20px; }
.site-footer a {
  color: rgba(255,255,255,.72);
  display: block;
  padding: 5px 0;
  font-size: .92rem;
  transition: color .2s ease, transform .2s ease;
}
.site-footer a:hover { color: #93C5FD; transform: translateX(3px); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 50px;
  margin-bottom: 44px;
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 34px; }
  .footer-brand { grid-column: 1 / -1; }
}

.footer-brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.015em;
  margin-bottom: 6px;
}
.footer-brand-sub {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #93C5FD;
  margin-bottom: 16px;
}
.footer-brand p { color: rgba(255,255,255,.48); max-width: 300px; font-size: .88rem; margin-bottom: 20px; }

.social-icons { display: flex; gap: 10px; margin-top: 8px; }
.social-icons a {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  padding: 0 !important;
  transition: background .2s ease, transform .2s ease;
  color: rgba(255,255,255,.7);
}
.social-icons a:hover { background: var(--accent); transform: translateY(-3px); color: #fff; }
.social-icons svg { width: 17px; height: 17px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.07);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .76rem;
  color: rgba(255,255,255,.3);
  letter-spacing: .04em;
}

/* ==============================================================
   ADMIN SHELL
   ============================================================== */
.admin-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.admin-sidebar {
  background: var(--navy-dark);
  color: rgba(255,255,255,.8);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.admin-sidebar .brand { display: flex; gap: 10px; align-items: center; margin-bottom: 32px; }
.admin-sidebar .brand img { height: 40px; border-radius: var(--radius-sm); }
.admin-sidebar .brand-text { color: #fff; font-weight: 700; font-size: .95rem; line-height: 1.15; }
.admin-sidebar .brand-text small { display: block; font-size: .62rem; color: #93C5FD; letter-spacing: .15em; font-weight: 500; text-transform: uppercase; margin-top: 3px; }
.admin-sidebar nav a {
  display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,.65);
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  margin-bottom: 3px;
  transition: background .18s, color .18s;
  cursor: pointer;
  text-decoration: none;
}
.admin-sidebar nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.admin-sidebar nav a.active { background: var(--accent); color: #fff; font-weight: 600; }
.admin-sidebar nav { flex: 1; }
.admin-sidebar .logout { margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); }
.admin-sidebar .logout button {
  width: 100%; background: rgba(255,255,255,.07); color: rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.1); padding: 10px 13px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: .88rem; cursor: pointer; font-family: var(--font-main);
  transition: background .2s;
}
.admin-sidebar .logout button:hover { background: rgba(255,255,255,.12); color: #fff; }

.admin-main { padding: 38px 46px; background: var(--bg-main); }
.admin-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--line-soft);
}
.admin-header h2 { margin-bottom: 3px; }
.admin-header p { color: var(--text-muted); margin: 0; font-size: .88rem; }

.admin-panel { display: none; }
.admin-panel.active { display: block; animation: fadeUp .3s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px);} to { opacity: 1; transform: translateY(0);} }

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.data-table th, .data-table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line-soft); font-size: .9rem; }
.data-table th { background: var(--bg-subtle); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--navy); font-weight: 700; }
.data-table tr:last-child td { border-bottom: none; }
.data-table button {
  background: none; border: 1px solid var(--line); padding: 5px 11px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: .78rem; color: var(--navy); font-family: var(--font-main); margin-right: 4px;
}
.data-table button:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.data-table button.danger:hover { background: #DC2626; border-color: #DC2626; color: #fff; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: #fff; padding: 20px; border-radius: var(--radius);
  box-shadow: var(--shadow-sm); border: 1px solid var(--line-soft);
}
.stat-card .num { font-size: 2rem; font-weight: 800; color: var(--navy); line-height: 1; margin-bottom: 3px; }
.stat-card .lbl { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); font-weight: 700; }

/* Admin mobile */
.admin-mobile-bar { display: none; }
.admin-sidebar-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(7,14,31,.55); z-index: 250;
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.admin-sidebar-backdrop.open { opacity: 1; visibility: visible; }

@media (max-width: 860px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: fixed; top: 0; left: -100%; width: 272px; height: 100vh;
    z-index: 300; transition: left .3s cubic-bezier(.4,0,.2,1);
    box-shadow: 6px 0 28px rgba(0,0,0,.22);
  }
  .admin-sidebar.open { left: 0; }
  .admin-sidebar-backdrop { display: block; }
  .admin-mobile-bar {
    display: flex; align-items: center; gap: 12px;
    background: var(--navy-dark); padding: 12px 16px;
    position: sticky; top: 0; z-index: 200;
  }
  .admin-mobile-bar .mob-brand { color: #fff; font-size: .92rem; font-weight: 700; flex: 1; }
  .admin-mobile-bar .mob-brand small { display: block; font-size: .6rem; color: #93C5FD; letter-spacing: .12em; text-transform: uppercase; }
  .admin-hamburger {
    background: none; border: none; cursor: pointer; color: #fff;
    padding: 5px; border-radius: var(--radius-sm);
  }
  .admin-hamburger svg { width: 22px; height: 22px; display: block; }
  .admin-main { padding: 20px 14px; }
  .admin-header { flex-direction: column; align-items: flex-start; gap: 6px; }
  .data-table { display: block; overflow-x: auto; white-space: nowrap; }
  .admin-panel .grid-2 { grid-template-columns: 1fr; }
}

/* ==============================================================
   UTILITIES
   ============================================================== */
.text-center { text-align: center; }
.text-muted   { color: var(--text-muted); }
.text-blue    { color: var(--accent); }
.text-white   { color: #fff; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 36px; } .mt-5 { margin-top: 56px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 36px; } .mb-5 { margin-bottom: 56px; }

.pill {
  display: inline-block; padding: 4px 13px; border-radius: var(--radius-pill);
  font-size: .72rem; font-weight: 700; letter-spacing: .05em;
  background: var(--accent-soft); color: var(--accent-dark); text-transform: uppercase;
}

.divider { height: 1px; background: var(--line); margin: 56px 0; }

.notice {
  padding: 13px 16px; border-radius: var(--radius); font-size: .88rem; margin-bottom: 16px;
}
.notice.info    { background: rgba(37,99,235,.08);  color: #1D4ED8; border: 1px solid rgba(37,99,235,.18); }
.notice.success { background: rgba(22,163,74,.08);  color: #15803D; border: 1px solid rgba(22,163,74,.22); }
.notice.error   { background: rgba(220,38,38,.07);  color: #B91C1C; border: 1px solid rgba(220,38,38,.18); }
.notice.warn    { background: rgba(234,179,8,.08);  color: #854D0E; border: 1px solid rgba(234,179,8,.22); }

/* ==============================================================
   SCROLL REVEAL
   ============================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .65s ease, transform .65s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ==============================================================
   PHOTO UPLOAD (admin)
   ============================================================== */
.photo-upload-row { display: flex; align-items: center; gap: 10px; }
.field-photo-preview {
  display: none; max-width: 160px; height: 110px; object-fit: contain;
  border-radius: var(--radius-sm); margin-top: 10px; border: 1.5px solid var(--line);
  background: var(--bg-subtle); padding: 4px;
}

/* ==============================================================
   CTA block
   ============================================================== */
.cta-block {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 60%, var(--navy-deep) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 56px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-block::before {
  content: "";
  position: absolute; top: -80px; right: -80px;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,.28), transparent 70%);
}
.cta-block h2 { color: #fff; margin-bottom: 12px; position: relative; }
.cta-block p  { color: rgba(255,255,255,.72); max-width: 560px; margin: 0 auto 26px; position: relative; }
.cta-block .btn { position: relative; }

/* ==============================================================
   RESPONSIVE PAGE PADDING
   ============================================================== */
@media (max-width: 680px) {
  .page-hero { padding: 120px 0 56px; }
  section { padding: 68px 0; }
  .site-footer { padding: 52px 0 22px; }
  .card { padding: 22px; }
  .cta-block { padding: 38px 24px; }
}

/* ==============================================================
   PROJECT DETAIL PAGE
   ============================================================== */
.project-hero {
  position: relative;
  padding: 160px 0 72px;
  background: var(--navy-dark);
  background-image:
    linear-gradient(135deg, rgba(37,99,235,.18) 0%, transparent 60%),
    linear-gradient(to bottom, rgba(7,14,31,.5) 0%, rgba(7,14,31,.85) 100%);
  overflow: hidden;
}
.project-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(37,99,235,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37,99,235,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  z-index: 0;
}
.project-hero .container { position: relative; z-index: 1; }
.project-hero .back-link {
  display: inline-flex; align-items: center; gap: 7px;
  color: rgba(255,255,255,.55); font-size: .82rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: 22px; transition: color .2s;
  text-decoration: none;
}
.project-hero .back-link:hover { color: #93C5FD; }
.project-hero .back-link svg { width: 14px; height: 14px; }
.project-hero h1 { color: #fff; margin-bottom: 18px; }
.project-hero .project-meta {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 8px;
}

.project-images { display: flex; flex-direction: column; gap: 18px; }
.project-images img {
  width: 100%; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  object-fit: cover;
}
.project-images .img-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
}
.project-images .img-grid img { aspect-ratio: 4/3; }

.project-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}
.what-i-did { list-style: none; padding: 0; margin: 0; }
.what-i-did li {
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: .9rem;
  color: var(--text-main);
  display: flex; align-items: flex-start; gap: 10px;
}
.what-i-did li::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0; margin-top: 6px;
}
.what-i-did li:last-child { border-bottom: none; }

.doc-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--radius-pill);
  border: 1.5px solid var(--line);
  font-size: .86rem; font-weight: 600; color: var(--navy);
  transition: all .2s; text-decoration: none; margin-top: 8px;
}
.doc-link:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.doc-link svg { width: 15px; height: 15px; flex-shrink: 0; }

@media (max-width: 900px) {
  .project-sidebar { position: static; }
}

/* ── Project detail page helpers ───────────────────────────── */
/* .project-back is an alias for the back-link anchor in project heroes */
.project-back {
  display: inline-flex; align-items: center; gap: 7px;
  color: rgba(255,255,255,.55); font-size: .82rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: 22px; transition: color .2s;
  text-decoration: none;
}
.project-back:hover { color: #93C5FD; }

/* Two-column layout for project body (images + sidebar) */
.project-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 60px;
  align-items: start;
}
@media (max-width: 900px) {
  .project-layout { grid-template-columns: 1fr; }
}

/* Heading inside sidebar what-i-did card */
.what-i-did-heading {
  margin-bottom: 16px;
  color: var(--accent);
}
