/* ============================================
   BASE — shared across every page
   Reem Dissoky Portfolio
   ============================================ */

@font-face {
  font-family: 'Bebas Neue Bold';
  src: url('../fonts/BebasNeue-Bold.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Granite';
  src: url('../fonts/Granite.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --black: #111111;
  --blue: #0047CC;
  --blue-deep: #001a4d;
  --white: #FAFAFA;
  --gray-300: #c9c9c9;
  --gray-600: #4a4a4a;
  --gray-200: #e2e2e2;
  --serif: 'Bebas Neue Bold', 'Arial Narrow', sans-serif;
  --accent-hand: 'Granite', cursive;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --nav-h: 76px;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --container: 1280px;
}

html { scroll-behavior: smooth; font-size: 16px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.6;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--blue); color: var(--white);
  padding: 12px 20px; z-index: 200;
}
.skip-link:focus { left: 16px; top: 16px; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 40px; }
@media (max-width: 640px) { .container { padding: 0 24px; } }

/* ─── NAV ─── */
#main-nav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px; z-index: 100;
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
@media (max-width: 640px) { #main-nav { padding: 0 24px; } }

#main-nav.scrolled {
  background: rgba(17, 17, 17, 0.94);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.08);
}
#main-nav.solid { background: var(--black); }

.nav-mark { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-mark img.nav-mark-img { width: 30px; height: 30px; object-fit: contain; }
.nav-name { font-family: var(--serif); font-size: 16px; font-weight: 400; color: var(--white); letter-spacing: 0.04em; text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: 36px; list-style: none; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: rgba(250,250,250,0.72);
  text-decoration: none; transition: color 0.2s;
}
.nav-links a:hover, .nav-links a:focus-visible { color: var(--white); }
.nav-links a.active { color: var(--white); }

.nav-cta {
  font-size: 14px; font-weight: 500; color: var(--white); text-decoration: none;
  border: 1px solid rgba(250,250,250,0.35); padding: 9px 20px; border-radius: 999px;
  transition: border-color 0.2s, background 0.2s;
}
.nav-cta:hover { border-color: var(--white); background: rgba(255,255,255,0.06); }

.menu-toggle {
  display: none; background: none; border: none; width: 32px; height: 24px;
  position: relative; cursor: pointer;
}
.menu-toggle span {
  position: absolute; left: 0; right: 0; height: 2px; background: var(--white);
  transition: transform 0.25s var(--ease), opacity 0.2s;
}
.menu-toggle span:nth-child(1) { top: 3px; }
.menu-toggle span:nth-child(2) { top: 11px; }
.menu-toggle span:nth-child(3) { top: 19px; }
.menu-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

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

.mobile-menu {
  position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0;
  background: var(--black); z-index: 99;
  display: flex; flex-direction: column; justify-content: center; gap: 28px; padding: 40px;
  transform: translateY(-8px); opacity: 0; pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.mobile-menu.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.mobile-menu a { font-family: var(--serif); font-size: 34px; font-weight: 400; color: var(--white); text-decoration: none; text-transform: uppercase; }

/* ─── BUTTONS ─── */
.btn-primary {
  background: var(--blue); color: var(--white); font-weight: 500; font-size: 15px;
  text-decoration: none; padding: 14px 30px; border-radius: 8px; display: inline-block;
  transition: background 0.2s, transform 0.2s;
}
.btn-primary:hover { background: #0038a8; transform: translateY(-1px); }

.btn-ghost {
  color: var(--white); font-weight: 500; font-size: 15px; text-decoration: none;
  padding: 14px 30px; border: 1px solid rgba(250,250,250,0.3); border-radius: 8px; display: inline-block;
  transition: border-color 0.2s, background 0.2s;
}
.btn-ghost:hover { border-color: var(--white); background: rgba(255,255,255,0.05); }

.btn-ghost-dark {
  color: var(--black); font-weight: 500; font-size: 15px; text-decoration: none;
  padding: 14px 30px; border: 1px solid var(--gray-200); border-radius: 8px; display: inline-block;
  transition: border-color 0.2s, background 0.2s;
}
.btn-ghost-dark:hover { border-color: var(--black); background: var(--gray-200); }

/* ─── SECTION SHARED ─── */
section { padding: 100px 0; }
@media (max-width: 640px) { section { padding: 72px 0; } }

.section-heading {
  font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 5.4vw, 68px);
  line-height: 1.05; max-width: 18ch; text-transform: uppercase; letter-spacing: 0.01em;
}

.on-dark { background: var(--black); color: var(--white); }
.on-light { background: var(--white); color: var(--black); }

.text-link {
  display: inline-block; font-size: 15px; font-weight: 500; color: var(--blue);
  text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.2s;
}
.text-link:hover { border-color: var(--blue); }
.text-link.on-dark-link { color: var(--white); border-bottom-color: rgba(250,250,250,0.4); }

/* ─── FOOTER ─── */
footer { background: var(--black); color: rgba(250,250,250,0.6); padding: 48px 0; font-size: 13.5px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-lockup { display: flex; align-items: center; gap: 14px; }
.footer-lockup img { width: 34px; height: 34px; object-fit: contain; }
.footer-lockup-text { line-height: 1.2; }
.footer-lockup-name { font-family: var(--serif); font-size: 17px; color: var(--white); text-transform: uppercase; letter-spacing: 0.02em; }
.footer-lockup-role { font-size: 10.5px; color: var(--blue); text-transform: uppercase; letter-spacing: 0.14em; font-weight: 600; }
.footer-links { display: flex; gap: 24px; list-style: none; }
.footer-links a { text-decoration: none; color: rgba(250,250,250,0.6); transition: color 0.2s; }
.footer-links a:hover { color: var(--white); }
.footer-socials {
  width: 100%; display: flex; justify-content: flex-end; gap: 18px;
  padding-top: 20px; margin-top: 8px; border-top: 1px solid rgba(250,250,250,0.1);
}
.footer-socials a {
  color: rgba(250,250,250,0.62); text-decoration: none; font-size: 13px;
  transition: color 0.2s, transform 0.2s;
}
.footer-socials a:hover { color: var(--white); transform: translateY(-1px); }
@media (max-width: 640px) {
  .footer-inner { align-items: flex-start; }
  .footer-links { width: 100%; gap: 14px 20px; flex-wrap: wrap; margin-top: 10px; }
  .footer-socials { justify-content: flex-start; flex-wrap: wrap; gap: 14px 20px; }
}

/* ─── INTERACTION LAYER ─── */
body.menu-open { overflow: hidden; }

.page-progress {
  position: fixed; inset: 0 auto auto 0; z-index: 160;
  width: 100%; height: 3px; pointer-events: none;
  transform: scaleX(0); transform-origin: left center;
  background: var(--blue);
}

.nav-links a[aria-current="page"] {
  color: var(--white);
  position: relative;
}
.nav-links a[aria-current="page"]::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -8px;
  height: 2px; background: var(--blue);
}

.mobile-menu[aria-hidden="true"] { visibility: hidden; }
.mobile-menu a[aria-current="page"] { color: #7aa8ff; }

.reveal-ready {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal-ready.revealed { opacity: 1; transform: none; }

.back-to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 90;
  width: 46px; height: 46px; border: 1px solid rgba(250,250,250,0.22);
  border-radius: 50%; background: rgba(17,17,17,0.9); color: var(--white);
  display: grid; place-items: center; font: 600 20px/1 var(--sans);
  cursor: pointer; box-shadow: 0 8px 28px rgba(0,0,0,0.2);
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity 0.2s, transform 0.2s, background 0.2s;
}
.back-to-top.visible { opacity: 1; transform: none; pointer-events: auto; }
.back-to-top:hover { background: var(--blue); }

.lightbox-trigger { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; z-index: 250; padding: 32px;
  display: grid; place-items: center; background: rgba(0,0,0,0.92);
  opacity: 0; visibility: hidden; transition: opacity 0.22s ease;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox-dialog { max-width: min(1180px, 94vw); max-height: 92vh; position: relative; }
.lightbox-image { max-width: 100%; max-height: 82vh; object-fit: contain; margin: auto; }
.lightbox-caption { color: rgba(250,250,250,0.75); font-size: 13px; text-align: center; margin-top: 12px; }
.lightbox-close {
  position: absolute; right: 0; top: -46px; width: 40px; height: 40px;
  border: 1px solid rgba(250,250,250,0.35); border-radius: 50%;
  background: rgba(17,17,17,0.7); color: var(--white); cursor: pointer;
  font: 400 25px/1 var(--sans);
}

@media (max-width: 640px) {
  .back-to-top { right: 16px; bottom: 16px; width: 42px; height: 42px; }
  .lightbox { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal-ready { opacity: 1; transform: none; }
}
