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

:root {
  --ink: #0d1a0f;
  --paper: #f2f7f2;
  --sand: #d8eadb;
  --orange: #e86c1a;
  --orange-pale: #fdecd9;
  --green: #1e6b3a;
  --green-mid: #2d8f50;
  --green-pale: #d4edda;
  --muted: #5a7060;
  --white: #ffffff;
  --sidebar-w: 220px;
  --radius: 4px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--white);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
}

/* ── TOP NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: var(--ink);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-brand {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--white);
  line-height: 1.2;
  text-align: left;
}
.nav-brand span { color: var(--orange); }

.nav-links {
  list-style: none;
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  position: fixed;
  top: 0; right: 0;
  width: 240px;
  height: 100vh;
  background: var(--ink);
  border-left: 1px solid rgba(255,255,255,0.08);
  padding: 5rem 1.5rem 2rem;
  z-index: 99;
  transition: transform 0.3s;
}
.nav-links.open { display: flex; }
.nav-links a {
  text-decoration: none;
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  background: #1e3a24;
  border: 1px solid #2a5030;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-links a:hover {
  background: #2a5030;
  border-color: #3a6640;
  color: var(--white);
}
.nav-links a.active {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}

/* hamburger button */
.nav-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  z-index: 101;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* overlay when menu is open */
.nav-overlay {
  display: none;
  position: fixed; inset: 0;
  z-index: 98;
  background: rgba(0,0,0,0.4);
}
.nav-overlay.open { display: block; }

.nav-foot { display: none; }

/* ── MAIN CONTENT ── */
main {
  padding-top: 64px;
  min-height: 100vh;
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4rem 3rem 4.5rem;
  background: var(--white);
  position: relative;
  overflow: hidden;
}
.hero-bg { display: none; }
.hero-bottom { position: relative; }
.hero-eyebrow {
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 1rem;
}
.hero-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 1.5rem;
}
.hero-name span { color: var(--orange); }
.hero-desc {
  max-width: 460px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}
.hero-cta {
  display: inline-flex;
  gap: 1rem;
  align-items: center;
}
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem; font-weight: 500;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer; border: none;
}
.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover { background: #c95c10; }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--sand);
  color: var(--muted);
}
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); }

/* ── PROFILE IN HERO ── */
.hero-profile {
  position: relative; z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.profile-avatar {
  width: clamp(90px, 14vw, 130px);
  height: clamp(90px, 14vw, 130px);
  border-radius: 50%;
  border: 3px solid var(--orange);
  background: var(--green-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-avatar-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--green-pale); color: var(--green);
  font-size: clamp(2rem, 5vw, 3rem);
}
.profile-change-btn {
  display: none;
  background: var(--orange);
  border: none;
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  margin-top: 0.6rem;
}
.profile-change-btn.admin-visible { display: inline-block; }
#profileInput { display: none; }
section { padding: 5rem 3rem; }
.section-label {
  font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.5rem;
}
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 1.5rem;
}

/* ── ABOUT ── */
.about { background: var(--white); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  max-width: 1000px;
}
.about-body { color: #2d4a35; line-height: 1.8; }
.about-body p + p { margin-top: 1rem; }
.skills-list {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-top: 1.5rem;
}
.skill-pill {
  padding: 0.3rem 0.8rem;
  background: var(--green-pale);
  color: var(--green);
  border-radius: 2rem;
  font-size: 0.8rem; font-weight: 500;
}
.about-stats { display: flex; flex-direction: column; gap: 2rem; }
.stat-item { border-left: 2px solid var(--orange); padding-left: 1.25rem; }
.stat-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem; font-weight: 800;
  line-height: 1; color: var(--green);
}
.stat-desc { font-size: 0.875rem; color: var(--muted); margin-top: 0.25rem; }

/* ── PORTFOLIO FOLDERS ── */
.portfolio { background: var(--paper); }
.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}
.folder-card {
  background: var(--sand);
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  overflow: hidden;
  position: relative;
  aspect-ratio: 4/3;
}
.folder-card:hover { border-color: var(--orange); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(13,26,15,0.12); }
.folder-card-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.folder-card-placeholder {
  width: 100%; height: 100%;
  background: var(--green-pale);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem; font-weight: 800;
  color: var(--green);
}
.folder-card-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(13,26,15,0.85) 0%, transparent 100%);
  padding: 1.25rem 1rem 0.9rem;
}
.folder-name { font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; font-weight: 700; color: var(--white); }
.folder-count { font-size: 0.75rem; color: rgba(255,255,255,0.6); margin-top: 0.1rem; }

/* ── FOLDER VIEW ── */
.folder-view {
  display: none; position: fixed; inset: 0; z-index: 150;
  background: var(--paper); overflow-y: auto; padding: 2rem 3rem;
}
.folder-view.open { display: block; }
.folder-view-header {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 2rem; padding-top: 1rem;
}
.folder-back {
  background: none; border: 1px solid var(--sand);
  border-radius: var(--radius); padding: 0.45rem 1rem;
  font-size: 0.8rem; font-weight: 500; cursor: pointer;
  color: var(--ink); transition: all 0.2s;
}
.folder-back:hover { border-color: var(--orange); color: var(--orange); }
.folder-view-title { font-family: 'Cormorant Garamond', serif; font-size: 1.8rem; font-weight: 700; }
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.media-card {
  position: relative; overflow: hidden;
  border-radius: var(--radius); background: var(--sand);
  aspect-ratio: 4/3; cursor: pointer; transition: transform 0.25s;
}
.media-card:hover { transform: translateY(-3px); }
.media-card img, .media-card video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-card .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(13,26,15,0.75) 0%, transparent 60%);
  opacity: 0; transition: opacity 0.2s;
  display: flex; align-items: flex-end; padding: 1rem;
}
.media-card:hover .overlay { opacity: 1; }
.overlay-title { color: var(--white); font-size: 0.875rem; font-weight: 500; }
.delete-btn {
  position: absolute; top: 0.5rem; right: 0.5rem;
  background: rgba(232,108,26,0.9); border: none;
  color: white; width: 28px; height: 28px;
  border-radius: 50%; font-size: 1rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s;
}
.media-card:hover .delete-btn { opacity: 1; }
.video-badge {
  position: absolute; top: 0.5rem; left: 0.5rem;
  background: var(--orange); color: var(--white); font-size: 0.65rem;
  padding: 0.2rem 0.5rem; border-radius: 2px;
  font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
}
.empty-state {
  grid-column: 1 / -1; text-align: center; padding: 4rem 2rem; color: var(--muted);
}
.empty-state p { font-size: 0.9rem; }

/* ── UPLOAD (admin only) ── */
.upload-section { background: var(--green); display: none; }
.upload-section.admin-visible { display: block; }
.upload-section .section-title { color: var(--white); }

.category-btns {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}
.cat-btn {
  padding: 0.75rem 1rem;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  color: rgba(255,255,255,0.65);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem; font-weight: 500;
  cursor: pointer; transition: all 0.2s; text-align: center;
}
.cat-btn:hover { border-color: var(--orange); color: rgba(255,255,255,0.9); }
.cat-btn.active { border-color: var(--orange); color: #ffd0a0; }

.cat-note { color: #ffd0a0; font-size: 0.8rem; margin-bottom: 1rem; min-height: 1.2rem; }

.upload-zone {
  border: 2px dashed rgba(255,255,255,0.25);
  border-radius: var(--radius);
  padding: 3rem 2rem; text-align: center;
  cursor: pointer; transition: border-color 0.2s, background 0.2s;
  position: relative;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--orange);
  background: rgba(232,108,26,0.1);
}
.upload-zone input[type=file] {
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer;
  width: 100%; height: 100%;
}
.upload-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.upload-zone h3 {
  font-family: 'Cormorant Garamond', serif;
  color: var(--white); font-size: 1.25rem; margin-bottom: 0.5rem;
}
.upload-zone p { color: rgba(255,255,255,0.55); font-size: 0.875rem; }
.upload-zone strong { color: #ffd0a0; }

.upload-progress { margin-top: 1.5rem; display: none; }
.progress-bar { height: 3px; background: rgba(255,255,255,0.15); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: var(--orange); transition: width 0.3s; }
.upload-status { color: rgba(255,255,255,0.55); font-size: 0.8rem; margin-top: 0.5rem; text-align: center; }

/* ── LOGIN MODAL ── */
.login-modal {
  display: none; position: fixed; inset: 0; z-index: 300;
  background: rgba(13,26,15,0.85);
  align-items: center; justify-content: center;
}
.login-modal.open { display: flex; }
.login-box {
  background: var(--white); border-radius: var(--radius);
  padding: 2.5rem 2rem; width: 100%; max-width: 360px;
  display: flex; flex-direction: column; gap: 1rem;
}
.login-box h2 { font-family: 'Cormorant Garamond', serif; font-size: 1.25rem; font-weight: 700; color: var(--ink); }
.login-box p { font-size: 0.85rem; color: var(--muted); }
.login-box input {
  width: 100%; padding: 0.65rem 0.9rem;
  border: 1px solid var(--sand); border-radius: var(--radius);
  font-size: 0.9rem; font-family: 'DM Sans', sans-serif; outline: none;
}
.login-box input:focus { border-color: var(--orange); }
.login-error { color: #c0392b; font-size: 0.8rem; display: none; }
.login-actions { display: flex; gap: 0.75rem; justify-content: flex-end; }

.nav-admin-btn {
  background: none; border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.55); font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.3rem 0.75rem; border-radius: var(--radius);
  cursor: pointer; transition: all 0.2s; margin-top: 0.4rem;
}
.nav-admin-btn:hover { border-color: var(--orange); color: var(--orange); }
.nav-admin-btn.logged-in { border-color: var(--orange); color: var(--orange); }

/* ── CONTACT ── */
.contact { background: var(--white); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: start; max-width: 1000px;
}
.contact-item { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.contact-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  background: var(--green-pale); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: var(--green);
}
.contact-label { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.2rem; }
.contact-value { font-size: 0.95rem; font-weight: 500; color: var(--ink); }
.lang-grid { display: flex; flex-direction: column; gap: 0.75rem; }
.lang-row { display: flex; align-items: center; justify-content: space-between; }
.lang-name { font-size: 0.9rem; font-weight: 500; min-width: 60px; }
.lang-bar { flex: 1; height: 3px; background: var(--sand); margin: 0 1rem; border-radius: 2px; }
.lang-fill { height: 100%; background: var(--green-mid); border-radius: 2px; }
.lang-level { font-size: 0.75rem; color: var(--muted); }

/* ── FOOTER ── */
footer {
  background: var(--ink);
  color: rgba(255,255,255,0.2);
  text-align: center;
  padding: 2rem;
  font-size: 0.8rem;
}
footer span { color: var(--orange); }

/* ── LIGHTBOX ── */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(13,26,15,0.96);
  align-items: center; justify-content: center; padding: 2rem;
}
.lightbox.open { display: flex; }
.lightbox-inner { max-width: 90vw; max-height: 90vh; position: relative; }
.lightbox-inner img, .lightbox-inner video {
  max-width: 100%; max-height: 85vh;
  border-radius: var(--radius); object-fit: contain;
}
.lightbox-close {
  position: absolute; top: -2.5rem; right: 0;
  background: none; border: none;
  color: var(--white); font-size: 1.5rem; cursor: pointer;
}

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  section { padding: 3.5rem 1.5rem; }
  .hero { padding: 3rem 1.5rem; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .category-btns { grid-template-columns: 1fr; }
  nav { padding: 0.75rem 1rem; }
  .nav-brand { font-size: 0.85rem; }
  main { padding-top: 64px; }
  .folder-view { padding: 1.5rem; }
  .hero-name { font-size: clamp(2.2rem, 10vw, 4rem); }
}

@media (prefers-reduced-motion: reduce) {
  .media-card { transition: none; }
}
