/* ═══════════════════════════════════════════════════════════════
   RESET & CUSTOM PROPERTIES
═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --dark:    #322D29;
  --accent:  #72383D;
  --mid:     #AC9C8D;
  --light:   #D1C7BD;
  --silver:  #D9D9D9;
  --cream:   #EFE9E1;
  --white:   #ffffff;

  --text-primary:   #EFE9E1;
  --text-secondary: #D1C7BD;
  --text-muted:     #AC9C8D;
  --bg:             #322D29;
  --bg-card:        #3e3835;
  --border:         rgba(255,255,255,0.12);
  --border-light:   rgba(255,255,255,0.07);

  --nav-h: 100px;
  --page-pad: 72px;
  --radius: 4px;
  --radius-lg: 8px;
  --transition: 0.25s ease;

  font-size: 16px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font: inherit; }
img { display: block; max-width: 100%; height: auto; }
textarea, input { font: inherit; }

/* ═══════════════════════════════════════════════════════════════
   TYPOGRAPHY
═══════════════════════════════════════════════════════════════ */
h1, h2, h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

/* ═══════════════════════════════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════════════════════════════ */
.nav {
  position: static;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: var(--dark);
}

.nav-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.4rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream);
  text-align: center;
  padding: 48px var(--page-pad) 18px;
  transition: color var(--transition);
}
.nav-brand:hover { color: var(--light); }

.nav-tabs {
  display: flex;
  gap: 0;
}

.nav-tab {
  flex: 1;
  text-align: center;
  padding: 6px 8px 10px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid);
  border-radius: 0;
  transition: color var(--transition), background var(--transition);
  cursor: pointer;
}
.nav-tab:hover  { color: var(--cream); }
.nav-tab.active { color: var(--cream); background: rgba(255,255,255,0.07); }

/* ═══════════════════════════════════════════════════════════════
   TAB SECTIONS
═══════════════════════════════════════════════════════════════ */
.tab-section {
  display: none;
  padding: 32px var(--page-pad) 48px;
  animation: fadeIn 0.3s ease;
}
.tab-section.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.section-heading {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition), opacity var(--transition);
  white-space: nowrap;
}
.btn:disabled { opacity: 0.4; pointer-events: none; }

.btn-primary {
  background: var(--accent);
  color: var(--cream);
  border-color: var(--accent);
}
.btn-primary:hover { background: #5c2c31; border-color: #5c2c31; }

.btn-outline {
  background: transparent;
  color: var(--cream);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--cream); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}
.btn-ghost:hover { color: var(--cream); }

.btn-ghost-danger {
  background: transparent;
  color: var(--accent);
  border-color: var(--border);
}
.btn-ghost-danger:hover { background: var(--accent); color: var(--cream); border-color: var(--accent); }

.btn-sm { padding: 7px 14px; font-size: 0.7rem; }
.btn-full { width: 100%; }

/* ═══════════════════════════════════════════════════════════════
   WORK / PROJECTS GRID
═══════════════════════════════════════════════════════════════ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.empty-msg {
  grid-column: 1/-1;
  padding: 80px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ── Project Card ── */
.project-card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: visible;
}

.project-card-img-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  background: var(--light);
}

.project-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.4s ease;
}

.project-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 24px;
  background: linear-gradient(
    to top,
    rgba(50,45,41,0.88) 0%,
    rgba(50,45,41,0.2)  50%,
    transparent         100%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
}

.project-card-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-style: italic;
  color: var(--cream);
  line-height: 1.3;
}

.project-card-img-wrap:hover .project-card-img    { transform: scale(1.05); filter: brightness(0.88); }
.project-card-img-wrap:hover .project-card-overlay { opacity: 1; }

.card-del-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(50,45,41,0.75);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--cream);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition), background var(--transition);
}
.project-card:hover .card-del-btn { opacity: 1; }
.card-del-btn:hover { background: var(--accent); border-color: var(--accent); }

/* ═══════════════════════════════════════════════════════════════
   DEMO REEL
═══════════════════════════════════════════════════════════════ */
.reel-wrap {
  max-width: 100%;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--dark);
  border: 1px solid var(--border);
}

.reel-video {
  width: 100%;
  display: block;
  max-height: 800px;
  background: #000;
  outline: none;
}

.reel-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 100px 40px;
  color: var(--mid);
  text-align: center;
}
.reel-play-icon {
  font-size: 3rem;
  opacity: 0.25;
  color: var(--cream);
}

.reel-file-info {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text-muted);
}
.reel-file-info strong { color: var(--text-primary); }

/* ═══════════════════════════════════════════════════════════════
   ABOUT
═══════════════════════════════════════════════════════════════ */
.about-hero {
  max-width: 820px;
  margin: 0 auto 40px;
}

.about-name-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.about-label {
  display: none;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.about-name {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  color: var(--cream);
  letter-spacing: -0.01em;
}
.about-tagline {
  color: var(--text-muted);
  margin-top: 4px;
  font-style: italic;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
}
.about-bio-text {
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.8;
  font-weight: 300;
  margin-top: 20px;
}

.about-photo-col { flex-shrink: 0; }
.about-photo-wrap {
  position: relative;
  width: 260px;
}
.about-photo {
  width: 260px;
  height: 340px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}
.photo-change-btn {
  margin-top: 8px;
  width: 100%;
  padding: 6px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: border-color var(--transition), color var(--transition);
  cursor: pointer;
}
.photo-change-btn:hover { border-color: var(--cream); color: var(--cream); }

.about-photo-placeholder {
  width: 260px;
  height: 340px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-divider {
  height: 1px;
  background: var(--border);
  max-width: 820px;
  margin: 0 auto 40px;
}

/* ── Resume Sections ── */
.resume-section {
  max-width: 820px;
  margin: 0 auto 36px;
}
.resume-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}
.resume-section-title {
  font-size: 1.1rem;
  color: var(--cream);
  letter-spacing: 0em;
}
.resume-list { display: flex; flex-direction: column; }

.resume-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}
.resume-item:last-child { border-bottom: none; }

/* Title + date on the same line */
.resume-item-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.resume-item-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  color: var(--cream);
}
.resume-item-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* Org + action buttons on the line below */
.resume-item-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 20px;
}
.resume-item-org {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}
.resume-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.resume-item-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-top: 2px;
}
.resume-edit-btn {
  background: none;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius);
  transition: border-color var(--transition), color var(--transition);
  flex-shrink: 0;
}
.resume-edit-btn:hover { border-color: var(--cream); color: var(--cream); }

.resume-del-btn {
  background: none;
  border: none;
  color: var(--border);
  font-size: 11px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}
.resume-del-btn:hover { background: var(--accent); color: var(--cream); }
.resume-empty { font-size: 0.875rem; color: var(--text-muted); padding: 16px 0; }

/* ═══════════════════════════════════════════════════════════════
   CONTACT
═══════════════════════════════════════════════════════════════ */
#contact {
  padding-top: 36px;
  padding-bottom: 16px;
}
.contact-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 680px;
  margin: 0 auto;
}

.contact-detail-block { display: flex; flex-direction: column; gap: 20px; margin-bottom: 32px; }
.contact-detail-row { display: flex; flex-direction: column; gap: 4px; }
.contact-detail-label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.contact-detail-value {
  font-size: 1rem;
  color: var(--text-primary);
  transition: color var(--transition);
}
.contact-detail-value:hover { color: var(--accent); }

.social-links { display: flex; gap: 16px; flex-wrap: wrap; }
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(114,56,61,0.06);
}
.social-link svg { width: 18px; height: 18px; }

/* ── Contact Form ── */
.contact-social-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.contact-form-col {
  border-top: 1px solid var(--border);
  padding-top: 32px;
}
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row-2 { grid-template-columns: 1fr; } }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}
.form-input {
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 300;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
.form-input::placeholder { color: var(--mid); }
.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(114,56,61,0.08);
}
.form-textarea { resize: vertical; min-height: 140px; }
.form-textarea-lg { min-height: 200px; }
.form-hint { font-size: 0.8rem; text-transform: none; letter-spacing: 0; font-weight: 400; }
.req { color: var(--accent); }

.form-success, .form-error { text-align: center; font-size: 0.875rem; margin-top: 8px; }
.form-success { color: #6dbf8e; }
.form-error   { color: var(--accent); }

/* ═══════════════════════════════════════════════════════════════
   MODALS
═══════════════════════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(50,45,41,0.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-backdrop[hidden] { display: none; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-wide { max-width: 680px; }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  border-bottom: 1px solid var(--border-light);
}
.modal-head h3 { font-size: 1.2rem; color: var(--cream); font-family: 'Cormorant Garamond',serif; }

.modal-x {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 4px;
  line-height: 1;
  transition: color var(--transition);
}
.modal-x:hover { color: var(--cream); }

.modal-body {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-foot {
  padding: 16px 28px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ── Drop Zone ── */
.drop-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 24px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(114,56,61,0.12);
  color: var(--cream);
}
.drop-icon {
  font-size: 1.6rem;
  opacity: 0.45;
}

/* ── Image Preview Strip ── */
.preview-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.preview-item {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.preview-item img { width: 100%; height: 100%; object-fit: cover; }
.preview-item-video-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 1.4rem;
  gap: 2px;
}
.preview-item-video-icon span { font-size: 0.55rem; letter-spacing: 0.04em; text-transform: uppercase; }
.preview-item-del {
  position: absolute;
  top: 2px; right: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: rgba(50,45,41,0.8);
  border: none;
  color: #fff;
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Photo Preview ── */
.photo-preview-wrap { margin-top: 8px; }
.photo-preview-img {
  max-height: 240px;
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* ── Upload Progress ── */
.upload-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.upload-progress[hidden] { display: none; }
.progress-track {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  transition: width 0.2s;
}

/* ═══════════════════════════════════════════════════════════════
   PROJECT DETAIL PAGE
═══════════════════════════════════════════════════════════════ */
.proj-back-row {
  padding: 28px var(--page-pad) 0;
}
.back-link {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition);
}
.back-link:hover { color: var(--cream); }

.proj-header {
  padding: 36px var(--page-pad) 32px;
}
.proj-title {
  font-size: clamp(2.4rem, 5vw, 4rem);
  color: var(--cream);
  letter-spacing: -0.02em;
}
.proj-description {
  margin-top: 20px;
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.8;
  font-weight: 300;
  max-width: 67%;
}

.proj-controls {
  padding: 32px var(--page-pad) 24px;
}

/* ── Masonry Gallery ── */
.proj-gallery {
  padding: 24px var(--page-pad) 80px;
  columns: 3;
  column-gap: 20px;
}
@media (max-width: 900px) { .proj-gallery { columns: 2; } }
@media (max-width: 560px)  { .proj-gallery { columns: 1; padding: 0 32px 60px; } }

.gallery-cell {
  position: relative;
  break-inside: avoid;
  margin-bottom: 20px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--light);
  cursor: pointer;
}
.gallery-img {
  width: 100%;
  display: block;
  transition: transform 0.4s ease, filter 0.3s ease;
}
.gallery-cell:hover .gallery-img { transform: scale(1.03); filter: brightness(0.92); }

.gallery-del-btn {
  position: absolute;
  top: 8px; right: 8px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(50,45,41,0.72);
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--cream);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition), background var(--transition);
}
.gallery-cell:hover .gallery-del-btn { opacity: 1; }
.gallery-del-btn:hover { background: var(--accent); border-color: var(--accent); }

.gallery-video {
  width: 100%;
  display: block;
  background: #000;
  outline: none;
  border-radius: var(--radius);
}

.gallery-cell[draggable="true"] { cursor: grab; }
.gallery-cell[draggable="true"]:active { cursor: grabbing; }
.gallery-cell.dragging { opacity: 0.35; }
.gallery-cell.drag-over-cell { outline: 2px dashed var(--accent); outline-offset: 3px; }

/* ═══════════════════════════════════════════════════════════════
   LIGHTBOX
═══════════════════════════════════════════════════════════════ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(24,20,18,0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  animation: fadeIn 0.2s ease;
}
.lightbox[hidden] { display: none; }
.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
  cursor: default;
  box-shadow: 0 30px 90px rgba(0,0,0,0.6);
}
.lightbox-x {
  position: absolute;
  top: 20px; right: 24px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.55);
  font-size: 1.4rem;
  transition: color var(--transition);
  z-index: 10;
}
.lightbox-x:hover { color: #fff; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  :root { --page-pad: 28px; }
  .nav { padding: 0 24px; }
  .nav-tab { padding: 8px 12px; }
}
@media (max-width: 500px) {
  .nav-brand { font-size: 1rem; }
  .nav-tab { letter-spacing: 0.06em; font-size: 0.7rem; padding: 8px 8px; }
}
