/* ============================================================
   BASE.CSS — Shared design system for Zannatul Naim Portfolio
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400;1,600&family=IBM+Plex+Mono:wght@300;400;500&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

/* ── VARIABLES ── */
:root {
  --bg:          #06080f;
  --bg2:         #0b0f1a;
  --bg3:         #111827;
  --bg4:         #161e2e;
  --cyan:        #00d4ff;
  --cyan-dim:    rgba(0,212,255,0.15);
  --cyan-glow:   rgba(0,212,255,0.25);
  --gold:        #ffc857;
  --gold-dim:    rgba(255,200,87,0.12);
  --white:       #f0ece3;
  --white-dim:   rgba(240,236,227,0.6);
  --muted:       #8892a4;
  --muted2:      #5a6478;
  --border:      rgba(0,212,255,0.1);
  --border2:     rgba(0,212,255,0.2);
  --nav-h:       72px;
  --glow:        0 0 40px rgba(0,212,255,0.12);
  --glow-strong: 0 0 60px rgba(0,212,255,0.2);
  --radius:      6px;
  --transition:  0.3s cubic-bezier(0.25,0.46,0.45,0.94);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }

/* ── CANVAS STARS ── */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

/* ── NAV ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  background: rgba(6,8,15,0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}

.nav--scrolled {
  background: rgba(6,8,15,0.96);
  border-color: var(--border2);
}

.nav__logo {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-decoration: none;
}

.nav__logo-name {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--white);
  letter-spacing: 0.06em;
}

.nav__logo-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.58rem;
  color: var(--cyan);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav__links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 2.5rem;
}

.nav__links a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color var(--transition);
  position: relative;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--cyan);
  transition: width var(--transition);
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--cyan);
}

.nav__links a:hover::after,
.nav__links a.active::after {
  width: 100%;
}

/* Mobile hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}

.nav__hamburger span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--muted);
  transition: all var(--transition);
}

.nav__hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav__mobile {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: rgba(6,8,15,0.98);
  border-bottom: 1px solid var(--border);
  padding: 2rem 5%;
  z-index: 899;
  flex-direction: column;
  gap: 1.5rem;
}

.nav__mobile.open { display: flex; }

.nav__mobile a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  transition: color var(--transition);
}

.nav__mobile a:hover { color: var(--cyan); }

/* ── FOOTER ── */
.footer {
  position: relative;
  z-index: 1;
  padding: 2.5rem 5%;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.footer__left {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  color: var(--muted2);
  letter-spacing: 0.08em;
}

.footer__center {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--muted);
  text-align: center;
}

.footer__right {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  color: var(--muted2);
  letter-spacing: 0.08em;
  text-align: right;
}

/* ── DIVIDER ── */
.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border) 30%, var(--border) 70%, transparent 100%);
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.8rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 3px;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
}

.btn--primary {
  background: var(--cyan);
  color: var(--bg);
}

.btn--primary:hover {
  background: #fff;
  box-shadow: 0 0 30px var(--cyan-glow);
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  color: var(--cyan);
  border: 1px solid rgba(0,212,255,0.4);
}

.btn--outline:hover {
  background: var(--cyan-dim);
  border-color: var(--cyan);
  box-shadow: 0 0 20px var(--cyan-glow);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  color: var(--white);
  border-color: var(--border2);
}

.btn--sm {
  padding: 0.5rem 1.2rem;
  font-size: 0.65rem;
}

/* ── SECTION LABELS ── */
.section-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-label::before {
  content: '';
  display: block;
  width: 30px;
  height: 1px;
  background: var(--cyan);
  opacity: 0.5;
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 3rem;
}

.section-title em {
  font-style: italic;
  color: var(--cyan);
}

/* ── REVEAL ANIMATIONS ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s cubic-bezier(0.25,0.46,0.45,0.94),
              transform 0.75s cubic-bezier(0.25,0.46,0.45,0.94);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── PAGE HEADER (inner pages) ── */
.page-hero {
  padding: calc(var(--nav-h) + 5rem) 5% 5rem;
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
}

.page-hero__eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1.2rem;
}

.page-hero__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--white);
}

.page-hero__title em {
  font-style: italic;
  color: var(--cyan);
}

.page-hero__desc {
  margin-top: 1.5rem;
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 540px;
  line-height: 1.8;
}

/* ── INNER PAGE WRAP ── */
.page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 5% 8rem;
  position: relative;
  z-index: 1;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan-dim); }

/* ── SELECTION ── */
::selection {
  background: var(--cyan-dim);
  color: var(--cyan);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__hamburger { display: flex; }
  .footer { grid-template-columns: 1fr; text-align: center; gap: 0.5rem; }
  .footer__right { text-align: center; }
}
