/* ============================================================
   DESIGN TOKENS
   Signature element: viewfinder corner-brackets on media —
   a nod to the video-editing / camera-framing side of the work.
   ============================================================ */
:root {
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  --accent: #FF4D2E;        /* flare orange — primary CTA / signature */
  --accent-2: #5B5FEF;      /* electric indigo — links, tags, secondary */
  --accent-contrast: #0E0E10;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --container-width: 1200px;
  --header-h: 76px;

  --ease: cubic-bezier(.4,0,.2,1);
}

[data-theme="dark"] {
  --bg: #0E0E10;
  --bg-elevated: #17171B;
  --bg-elevated-2: #1F1F24;
  --text: #F5F3EF;
  --text-muted: #A6A5AD;
  --border: #2A2A30;
  --border-strong: #38383F;
  --shadow: 0 20px 60px rgba(0,0,0,.45);
}

[data-theme="light"] {
  --bg: #F7F5F0;
  --bg-elevated: #FFFFFF;
  --bg-elevated-2: #EFEDE6;
  --text: #131316;
  --text-muted: #63626B;
  --border: #E4E1D8;
  --border-strong: #D3D0C6;
  --shadow: 0 20px 60px rgba(20,20,15,.10);
}

* { box-sizing: border-box; }
/* The [hidden] attribute should always win over a class's own display
   rule (e.g. display:flex) — without this, elements styled with flex/grid
   ignore `hidden` and stay visible as an empty box. */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .25s var(--ease), color .25s var(--ease);
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--text-muted); }
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: var(--container-width); margin: 0 auto; padding: 0 24px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent); color: #fff; padding: 10px 16px; z-index: 200; }
.skip-link:focus { left: 12px; top: 12px; }

section { padding: 96px 0; }
@media (max-width: 768px) { section { padding: 56px 0; } }

.eyebrow { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head p { font-size: 1.05rem; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: var(--radius-sm); font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; transition: transform .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #ff6440; }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 10px 18px; font-size: .85rem; }
.btn-block { width: 100%; }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 200; height: var(--header-h);
  border-bottom: 1px solid var(--border);
}
/* The blur/tint lives on a pseudo-element, not on .site-header itself —
   backdrop-filter (like transform) makes an element the "containing block"
   for any position:fixed descendant, which would trap the mobile nav
   panel inside the header's own small box instead of covering the
   screen. Keeping it off .site-header avoids that bug. */
.site-header::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; }
.main-nav { display: flex; gap: 32px; }
.main-nav a { font-size: .93rem; font-weight: 500; color: var(--text-muted); padding: 6px 0; position: relative; }
.main-nav a::after { content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; background: var(--accent); transition: width .2s var(--ease); }
.main-nav a:hover, .main-nav a.active { color: var(--text); }
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 14px; }
.theme-toggle { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--bg-elevated); color: var(--text); display: flex; align-items: center; justify-content: center; }
.icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 32px; height: 32px; background: none; border: none; padding: 0; }
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s var(--ease), opacity .25s var(--ease); }
.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); }

@media (max-width: 860px) {
  .main-nav {
    position: fixed; inset: var(--header-h) 0 0 0; flex-direction: column; gap: 0;
    background: var(--bg); padding: 12px 24px; transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .2s var(--ease), transform .2s var(--ease); border-top: 1px solid var(--border);
  }
  .main-nav.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .main-nav a { padding: 16px 0; border-bottom: 1px solid var(--border); font-size: 1.1rem; }
  .nav-toggle { display: flex; }
  .hire-btn { display: none; }
}

/* WhatsApp floating button */
.whatsapp-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 150;
  width: 56px; height: 56px; border-radius: 50%; background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 30px rgba(0,0,0,.3);
  transition: transform .2s var(--ease);
}
.whatsapp-float:hover { transform: scale(1.08); }

/* ---------------- Hero ---------------- */
.hero { padding: 140px 0 100px; position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; top: -20%; right: -10%; width: 60vw; height: 60vw; max-width: 700px; max-height: 700px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 780px; }
.hero h1 { margin-bottom: 22px; }
.hero .lede { font-size: 1.15rem; max-width: 560px; }
.hero-actions { display: flex; gap: 16px; margin-top: 32px; flex-wrap: wrap; }

/* ---------------- Cards ---------------- */
.card {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 32px; transition: transform .22s var(--ease), border-color .22s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.card-icon { width: 48px; height: 48px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }

.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; } }

.section-cta { text-align: center; margin-top: 44px; }

/* ---------------- Why work with me ---------------- */
.benefit { display: flex; gap: 16px; align-items: flex-start; }
.benefit .num { font-family: var(--font-display); font-size: .85rem; color: var(--accent); font-weight: 700; border: 1px solid var(--border-strong); border-radius: 50%; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ---------------- Final CTA band ---------------- */
.cta-band { background: var(--bg-elevated); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); text-align: center; }
.cta-band h2 { margin-bottom: 12px; }

/* ---------------- Portfolio grid + viewfinder signature ---------------- */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 44px; }
.filter-btn {
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--border-strong); background: transparent; color: var(--text-muted);
  font-size: .85rem; font-weight: 600; transition: all .18s var(--ease);
}
.filter-btn:hover { border-color: var(--accent); color: var(--text); }
.filter-btn.active { background: var(--text); color: var(--bg); border-color: var(--text); }

.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 960px) { .portfolio-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .portfolio-grid { grid-template-columns: 1fr; } }

.p-item {
  position: relative; border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 4/5; background: var(--bg-elevated-2);
  border: 1px solid var(--border);
}
.p-item img, .p-item video { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.p-item:hover img, .p-item:hover video { transform: scale(1.06); }

/* viewfinder corner brackets — the signature detail */
.p-item::before, .p-item::after,
.p-item .bracket-tr, .p-item .bracket-bl {
  content: ''; position: absolute; width: 22px; height: 22px; border-color: #fff; opacity: 0; transition: opacity .25s var(--ease);
}
.p-item::before { top: 12px; left: 12px; border-top: 2px solid; border-left: 2px solid; }
.p-item::after { bottom: 12px; right: 12px; border-bottom: 2px solid; border-right: 2px solid; }
.p-item .bracket-tr { top: 12px; right: 12px; border-top: 2px solid #fff; border-right: 2px solid #fff; }
.p-item .bracket-bl { bottom: 12px; left: 12px; border-bottom: 2px solid #fff; border-left: 2px solid #fff; }
.p-item:hover::before, .p-item:hover::after, .p-item:hover .bracket-tr, .p-item:hover .bracket-bl { opacity: 1; }

.p-item .overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 20px;
  background: linear-gradient(to top, rgba(0,0,0,.75), transparent 55%);
  opacity: 0; transition: opacity .25s var(--ease);
}
.p-item:hover .overlay { opacity: 1; }
.p-item .overlay h4 { color: #fff; margin: 0 0 4px; font-size: 1rem; }
.p-item .overlay span { color: rgba(255,255,255,.75); font-size: .8rem; }
.p-item .play-badge {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 52px; height: 52px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff;
  display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .25s var(--ease);
}
.p-item:hover .play-badge { opacity: 1; }

.load-more-wrap { text-align: center; margin-top: 44px; }

/* ---------------- Lightbox / video modal ---------------- */
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(6,6,8,.92); display: none; align-items: center; justify-content: center; padding: 24px; }
.lightbox.open { display: flex; }
.lightbox-inner { max-width: 1000px; width: 100%; max-height: 90vh; display: flex; flex-direction: column; gap: 18px; }
.lightbox-media { width: 100%; max-height: 65vh; border-radius: var(--radius-md); overflow: hidden; background: #000; display: flex; align-items: center; justify-content: center; }
.lightbox-media img { max-height: 65vh; width: auto; margin: 0 auto; }
.lightbox-media video { width: 100%; max-height: 65vh; }
.lightbox-meta { color: #fff; }
.lightbox-meta h3 { color: #fff; }
.lightbox-meta .tags { display: flex; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
.lightbox-meta .tags span { font-size: .78rem; color: var(--accent-2); border: 1px solid rgba(91,95,239,.4); padding: 4px 10px; border-radius: 999px; }
.lightbox-close { position: absolute; top: 22px; right: 26px; background: none; border: none; color: #fff; font-size: 2rem; line-height: 1; }
.lightbox-actions { display: flex; gap: 14px; margin-top: 8px; flex-wrap: wrap; }
.video-loading { color: #fff; font-size: .85rem; }

/* EXIF camera info chips shown in the lightbox for photo projects */
.exif-panel { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }
.exif-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--bg-elevated-2); border: 1px solid var(--border); color: var(--text-muted); font-size: .78rem;
}
.exif-chip svg { flex-shrink: 0; opacity: .8; }

/* Showreel player — mobile-first: stacked, playlist becomes a side column at wider widths */
.reel-player-wrap { display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 900px) { .reel-player-wrap { flex-direction: row; align-items: flex-start; } }

.reel-player { flex: 1; min-width: 0; }
.reel-player video { width: 100%; border-radius: var(--radius-md); background: #000; display: block; max-height: 65vh; }
.reel-progress { margin-top: 10px; color: var(--text-muted); font-size: .85rem; }

.reel-playlist {
  display: flex; flex-direction: row; overflow-x: auto; gap: 10px; padding-bottom: 6px;
  width: 100%; flex-shrink: 0;
}
@media (min-width: 900px) { .reel-playlist { flex-direction: column; overflow-x: visible; width: 280px; max-height: 65vh; overflow-y: auto; } }

.reel-playlist-item {
  display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg-elevated); cursor: pointer; text-align: left; flex-shrink: 0; width: 220px; transition: border-color .15s var(--ease);
}
@media (min-width: 900px) { .reel-playlist-item { width: 100%; } }
.reel-playlist-item:hover { border-color: var(--border-strong); }
.reel-playlist-item.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.reel-playlist-thumb { position: relative; width: 64px; height: 40px; flex-shrink: 0; border-radius: 4px; overflow: hidden; background: var(--bg-elevated-2); }
.reel-playlist-thumb img { width: 100%; height: 100%; object-fit: cover; }
.reel-playlist-num {
  position: absolute; bottom: 2px; right: 2px; background: rgba(0,0,0,.7); color: #fff; font-size: .65rem;
  padding: 1px 5px; border-radius: 3px; font-weight: 600;
}
.reel-playlist-title { font-size: .84rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- About page ---------------- */
.about-hero { display: grid; grid-template-columns: 320px 1fr; gap: 56px; align-items: center; }
@media (max-width: 800px) { .about-hero { grid-template-columns: 1fr; } }
.about-photo { aspect-ratio: 4/5; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); background: var(--bg-elevated-2); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }
.tag-list span { background: var(--bg-elevated); border: 1px solid var(--border); padding: 8px 16px; border-radius: 999px; font-size: .85rem; }
.stats-row { display: flex; gap: 48px; margin-top: 28px; }
.stats-row .stat b { display: block; font-family: var(--font-display); font-size: 2.2rem; color: var(--accent); }
.stats-row .stat span { color: var(--text-muted); font-size: .85rem; }
.timeline { border-left: 2px solid var(--border); padding-left: 28px; margin-top: 14px; }
.timeline-item { position: relative; padding-bottom: 32px; }
.timeline-item::before { content: ''; position: absolute; left: -33px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.timeline-item .period { color: var(--accent); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }

/* ---------------- Forms ---------------- */
.form-group { margin-bottom: 20px; }
label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 8px; }
input, textarea, select {
  width: 100%; padding: 13px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--bg-elevated); color: var(--text); font-family: var(--font-body); font-size: .95rem;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { resize: vertical; min-height: 140px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }
/* Persistent inline notices (distinct from toasts — for ongoing states
   like "run this migration", not one-off action confirmations) */
.inline-notice { padding: 16px 20px; border-radius: var(--radius-sm); margin-bottom: 24px; font-size: .92rem; }
.inline-notice-error { background: color-mix(in srgb, #ef4444 16%, transparent); border: 1px solid #ef4444; color: #ef4444; }
.inline-notice-error code { background: rgba(0,0,0,.2); padding: 2px 6px; border-radius: 4px; }
.toast-container {
  position: fixed; top: 20px; right: 20px; z-index: 500;
  display: flex; flex-direction: column; gap: 10px; max-width: min(380px, calc(100vw - 40px));
}
@media (max-width: 620px) {
  .toast-container { top: auto; bottom: 20px; right: 16px; left: 16px; max-width: none; }
}
.toast {
  display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; border-radius: var(--radius-md);
  background: var(--bg-elevated); border: 1px solid var(--border-strong); box-shadow: var(--shadow);
  opacity: 0; transform: translateY(-10px); transition: opacity .25s var(--ease), transform .25s var(--ease);
}
@media (max-width: 620px) { .toast { transform: translateY(10px); } }
.toast-visible { opacity: 1; transform: translateY(0); }
.toast-icon { flex-shrink: 0; margin-top: 1px; }
.toast-success .toast-icon { color: #22c55e; }
.toast-error .toast-icon { color: #ef4444; }
.toast-text { flex: 1; font-size: .9rem; color: var(--text); line-height: 1.4; }
.toast-close { flex-shrink: 0; background: none; border: none; color: var(--text-muted); font-size: 1.2rem; line-height: 1; padding: 0 0 0 4px; cursor: pointer; }
.toast-close:hover { color: var(--text); }

.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-option { display: flex; gap: 14px; align-items: center; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 14px; background: var(--bg-elevated); }
.contact-option .ic { width: 42px; height: 42px; border-radius: 50%; background: color-mix(in srgb, var(--accent-2) 15%, transparent); color: var(--accent-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ---------------- Services page ---------------- */
.service-card { display: flex; flex-direction: column; height: 100%; }
.service-card .price { font-family: var(--font-display); color: var(--accent); font-weight: 600; margin: 10px 0 16px; }
.service-card .full-desc { display: none; }
.service-card.expanded .full-desc { display: block; }
.service-toggle { background: none; border: none; color: var(--accent-2); font-weight: 600; font-size: .85rem; padding: 0; margin-bottom: 16px; text-align: left; }

/* ---------------- Footer ---------------- */
.site-footer { border-top: 1px solid var(--border); padding: 72px 0 0; margin-top: 40px; }
.footer-inner { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
.footer-col h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 16px; }
.footer-col a, .footer-col span { display: block; color: var(--text-muted); font-size: .9rem; margin-bottom: 10px; }
.footer-col a:hover { color: var(--accent); }
.footer-whatsapp { display: inline-flex; align-items: center; gap: 8px; color: #25D366; font-weight: 600; margin-top: 14px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding: 22px 0; border-top: 1px solid var(--border); font-size: .82rem; color: var(--text-muted); }
.back-to-top { background: none; border: none; color: var(--text-muted); font-size: .82rem; }
.back-to-top:hover { color: var(--accent); }
.social-icons { display: flex; flex-direction: column; }

/* Fade-in on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Status badges — shared between admin and the public review page */
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600; }
.badge-featured { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.badge-draft { background: color-mix(in srgb, #a6a5ad 18%, transparent); color: var(--text-muted); }
.badge-published { background: color-mix(in srgb, #22c55e 18%, transparent); color: #22c55e; }
.badge-unread { background: color-mix(in srgb, var(--accent-2) 20%, transparent); color: var(--accent-2); }
.badge-draft-alert { background: color-mix(in srgb, #eab308 20%, transparent); color: #eab308; }

/* Empty state */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
