/* ================================================================
   MALUSI NKOSI PORTFOLIO — v2
   Theme: Refined Dark Luxury
   Fonts: Playfair Display · IBM Plex Mono · Outfit
   Accent: Warm Gold #C9A84C on Deep Charcoal #0E0E12
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,900;1,400;1,700&family=IBM+Plex+Mono:wght@300;400;500&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ── Variables ── */
:root {
  --bg:           #0E0E12;
  --bg-2:         #13131A;
  --bg-3:         #18181F;
  --surface:      #1E1E28;
  --surface-2:    #252532;
  --border:       #2A2A38;
  --border-2:     #38384A;

  --text:         #F0EDE6;
  --text-2:       #9896A0;
  --text-3:       #5A5868;

  --gold:         #C9A84C;
  --gold-light:   #E5C97A;
  --gold-dim:     #9A7B32;
  --gold-glow:    rgba(201,168,76,0.12);
  --gold-glow-2:  rgba(201,168,76,0.06);

  --white:        #FFFFFF;
  --danger:       #E05555;
  --success:      #4CAF7D;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-mono:    'IBM Plex Mono', 'Courier New', monospace;
  --font-body:    'Outfit', system-ui, sans-serif;

  --r-sm:         4px;
  --r:            8px;
  --r-lg:         14px;
  --r-xl:         20px;

  --ease:         cubic-bezier(0.16, 1, 0.3, 1);
  --t:            0.22s ease;
  --t-slow:       0.5s var(--ease);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.5;
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text);
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; }
h3 { font-size: clamp(1.1rem, 2vw, 1.3rem); font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

p { color: var(--text-2); line-height: 1.8; }
a { color: var(--gold); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--gold-light); }
ul { list-style: none; }
strong { color: var(--text); font-weight: 600; }

/* ── Utility ── */
.highlight { color: var(--gold); }
.highlight-i { color: var(--gold); font-style: italic; }

.mono {
  font-family: var(--font-mono);
  font-size: 0.8em;
  letter-spacing: 0.04em;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--gold);
  background: var(--gold-glow);
  border: 1px solid rgba(201,168,76,0.25);
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  background: var(--gold);
  color: var(--bg);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  border: none;
  border-radius: var(--r);
  cursor: pointer;
  transition: all var(--t);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover {
  background: var(--gold-light);
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(201,168,76,0.3);
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-2);
}
.btn.ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-glow);
  transform: translateY(-1px);
  box-shadow: none;
}

.btn.outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
}
.btn.outline:hover {
  background: var(--gold);
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201,168,76,0.25);
}

/* ── Logo / Nav brand ── */
.brand {
  position: fixed;
  top: 22px;
  left: 28px;
  z-index: 800;
  text-decoration: none;
}
.brand-icon {
  width: 44px;
  height: 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 1rem;
  transition: all var(--t);
}
.brand-icon:hover {
  border-color: var(--gold);
  box-shadow: 0 0 20px var(--gold-glow);
}

/* ── Hamburger ── */
.nav-toggle {
  position: fixed;
  top: 22px;
  right: 28px;
  z-index: 801;
  width: 44px;
  height: 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all var(--t);
}
.nav-toggle:hover { border-color: var(--gold); }
.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--t);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Side Drawer ── */
.side-nav {
  position: fixed;
  top: 0; right: 0;
  height: 100%;
  width: 0;
  overflow: hidden;
  background: var(--bg-2);
  border-left: 1px solid var(--border);
  z-index: 800;
  transition: width var(--t-slow);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0;
}
.side-nav.open { width: 300px; }

.nav-links {
  padding: 40px 0;
  display: flex;
  flex-direction: column;
}
.nav-links a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 36px;
  color: var(--text-2);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  border-left: 2px solid transparent;
  white-space: nowrap;
  transition: all var(--t);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
  border-left-color: var(--gold);
  background: var(--gold-glow-2);
}
.nav-links a i { width: 20px; text-align: center; font-size: 0.88rem; }

.nav-footer {
  padding: 28px 36px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 14px;
}
.nav-social {
  width: 34px; height: 34px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 0.85rem;
  transition: all var(--t);
  text-decoration: none;
}
.nav-social:hover { color: var(--gold); border-color: var(--gold); }

/* ── Page wrapper ── */
.page {
  min-height: 100vh;
  position: relative;
}

/* ── Section container ── */
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ── Page header block ── */
.pg-header {
  padding: 130px 32px 64px;
  max-width: 1080px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
  margin-bottom: 72px;
}
.pg-header h1 { margin-top: 8px; }
.pg-header p {
  max-width: 540px;
  margin-top: 14px;
  font-size: 1.05rem;
}

/* ── Gold rule decoration ── */
.gold-rule {
  display: block;
  width: 48px;
  height: 2px;
  background: var(--gold);
  margin-bottom: 28px;
}

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: border-color var(--t), transform var(--t-slow), box-shadow var(--t-slow);
}
.card:hover {
  border-color: var(--border-2);
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5), 0 0 0 1px var(--border-2);
}
.card.gold-top { border-top: 2px solid var(--gold); }

/* ── Grids ── */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }

/* ── Divider ── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 56px 0;
}

/* ── Scroll bar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dim); }

/* ── Selection ── */
::selection { background: var(--gold-glow); color: var(--gold); }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes pulseRing {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,168,76,0.3); }
  50%       { box-shadow: 0 0 0 8px rgba(201,168,76,0); }
}

.anim-1 { animation: fadeUp 0.7s var(--ease) 0.05s both; }
.anim-2 { animation: fadeUp 0.7s var(--ease) 0.15s both; }
.anim-3 { animation: fadeUp 0.7s var(--ease) 0.25s both; }
.anim-4 { animation: fadeUp 0.7s var(--ease) 0.35s both; }
.anim-5 { animation: fadeUp 0.7s var(--ease) 0.45s both; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .wrap { padding: 0 20px; }
  .pg-header { padding: 110px 20px 48px; margin-bottom: 48px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .btn { padding: 11px 20px; font-size: 0.84rem; }
}