/* ============================================================
   MUNEER.CORE — v3
   Palette: Vault Ink #05080F · Ledger #0C1322 · Brass #E8B34B
            Teller Cyan #5FD4E8 · Bone #EDE7DA · Muted #7A8699
   Type:    Syne (display) · Instrument Sans (body) · IBM Plex Mono (utility)
   ============================================================ */

:root {
  --ink: #05080f;
  --ledger: #0c1322;
  --ledger-2: #101a2e;
  --brass: #e8b34b;
  --brass-soft: rgba(232, 179, 75, 0.14);
  --cyan: #5fd4e8;
  --bone: #ede7da;
  --muted: #7a8699;
  --line: rgba(237, 231, 218, 0.1);
  --font-display: "Syne", sans-serif;
  --font-body: "Instrument Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}

::selection { background: var(--brass); color: var(--ink); }

.mono { font-family: var(--font-mono); }

a { color: inherit; }

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

/* ---------- Boot screen ---------- */
#boot {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s;
}
#boot.done { opacity: 0; visibility: hidden; }
.boot-inner { width: min(320px, 80vw); }
.boot-line { color: var(--brass); font-size: 1.1rem; letter-spacing: 0.12em; }
.boot-cursor { animation: blink 0.8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.boot-status { color: var(--muted); font-size: 0.75rem; margin: 0.9rem 0 0.5rem; }
.boot-track { height: 2px; background: var(--line); }
.boot-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--brass), var(--cyan)); }

/* ---------- Canvas ---------- */
#core-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
  transition: background 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(5, 8, 15, 0.82);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav-brand {
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  color: var(--bone);
}
.brand-dot { color: var(--brass); }
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
}
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.25s;
}
.nav-links a:hover { color: var(--bone); }
.nav-cta {
  color: var(--brass) !important;
  border: 1px solid rgba(232, 179, 75, 0.4);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  transition: background 0.25s, color 0.25s;
}
.nav-cta:hover { background: var(--brass); color: var(--ink) !important; }
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  width: 34px;
  height: 30px;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 4px;
  right: 4px;
  height: 2px;
  background: var(--bone);
  transition: transform 0.3s, top 0.3s;
}
.nav-toggle span:first-child { top: 10px; }
.nav-toggle span:last-child { top: 18px; }
.nav-toggle.open span:first-child { top: 14px; transform: rotate(45deg); }
.nav-toggle.open span:last-child { top: 14px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 7rem clamp(1.25rem, 6vw, 6rem) 5rem;
}
.eyebrow {
  color: var(--brass);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  margin-bottom: 1.6rem;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 8.2vw, 6.4rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-transform: none;
  max-width: 13ch;
}
.hero-title .line {
  display: block;
  overflow: hidden;
}
.hero-title em {
  font-style: normal;
  color: var(--brass);
  position: relative;
}
.hero-sub {
  margin-top: 1.8rem;
  max-width: 34rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
}
.hero-actions {
  margin-top: 2.4rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  transition: transform 0.25s, background 0.25s, color 0.25s, border-color 0.25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-solid { background: var(--brass); color: var(--ink); }
.btn-solid:hover { background: #f2c464; }
.btn-ghost { border: 1px solid var(--line); color: var(--bone); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }

.hero-ticker {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background: rgba(5, 8, 15, 0.5);
}
.ticker-track {
  display: flex;
  gap: 3rem;
  width: max-content;
  padding: 0.55rem 0;
  animation: ticker 36s linear infinite;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  white-space: nowrap;
}
.ticker-track span b, .ticker-track span { color: var(--muted); }
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.scroll-hint {
  position: absolute;
  right: clamp(1.25rem, 4vw, 3rem);
  bottom: 3.4rem;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-decoration: none;
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(-6px); } }

/* ---------- Sections ---------- */
.section {
  position: relative;
  z-index: 1;
  padding: clamp(5rem, 11vh, 8.5rem) 0;
}
.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.2vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 2.4rem;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.about-text p { margin-bottom: 1.2rem; color: #c9c2b4; }
.about-text strong { color: var(--bone); }
.about-mail { font-size: 0.85rem; color: var(--brass); }
.about-mail a { color: var(--brass); text-decoration: none; border-bottom: 1px dashed rgba(232,179,75,.5); }

.about-side { display: flex; flex-direction: column; gap: 1.2rem; }
.about-text em { font-style: normal; color: var(--cyan); }
.about-text a { color: var(--cyan); }

.portrait {
  position: relative;
  border: 1px solid rgba(232, 179, 75, 0.35);
  border-radius: 14px;
  padding: 0.6rem;
  background: var(--ledger);
}
.portrait img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 9px;
  filter: saturate(0.92);
}
.portrait-tag {
  margin-top: 0.6rem;
  text-align: center;
  color: var(--brass);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
}

.stats-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--ledger), rgba(12, 19, 34, 0.35));
  border-radius: 14px;
  overflow: hidden;
}
.stat {
  padding: 1.7rem 1.4rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.stat:nth-child(odd) { border-right: 1px solid var(--line); }
.stat:nth-child(3), .stat:nth-child(4) { border-bottom: 0; }
.stat-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.5rem;
  color: var(--brass);
  line-height: 1;
}
.stat-label { font-size: 0.66rem; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; }

/* ---------- Experience ---------- */
.xp-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--ledger), rgba(12, 19, 34, 0.3));
  padding: clamp(1.6rem, 3.5vw, 2.6rem);
}
.xp-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.3rem;
}
.xp-head h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }
.xp-role { color: var(--cyan); font-size: 0.95rem; margin-top: 0.25rem; }
.xp-date { color: var(--muted); font-size: 0.7rem; letter-spacing: 0.14em; align-self: center; }
.xp-list { list-style: none; display: grid; gap: 0.85rem; }
.xp-list li {
  position: relative;
  padding-left: 1.5rem;
  color: #c9c2b4;
  font-size: 0.98rem;
}
.xp-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--brass);
}
.xp-list b { color: var(--bone); font-weight: 600; }

.edu-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-top: 1.2rem;
}
.edu-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem 1.6rem;
  background: rgba(12, 19, 34, 0.4);
}
.edu-tag { color: var(--cyan); font-size: 0.66rem; letter-spacing: 0.16em; margin-bottom: 0.6rem; }
.edu-card h4 { font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 0.3rem; }
.edu-card p:last-child { color: var(--muted); font-size: 0.9rem; }

/* ---------- Projects ---------- */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}
.proj {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(12, 19, 34, 0.4);
  padding: clamp(1.5rem, 3vw, 2.1rem);
  transition: transform 0.35s ease, border-color 0.35s ease, background 0.35s ease;
}
.proj:hover {
  transform: translateY(-5px);
  border-color: rgba(232, 179, 75, 0.45);
  background: var(--ledger-2);
}
.proj-wide { grid-column: span 2; }
.proj-tag { color: var(--brass); font-size: 0.64rem; letter-spacing: 0.18em; margin-bottom: 0.8rem; }
.proj h3 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  font-weight: 700;
  margin-bottom: 0.7rem;
}
.proj p { color: #b9b3a6; font-size: 0.96rem; }
.proj b { color: var(--bone); }
.proj-stack { margin-top: 1rem; color: var(--cyan); font-size: 0.7rem; letter-spacing: 0.08em; }

.app-list { list-style: none; margin-top: 0.4rem; }
.app-list-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 2.4rem;
}
.app-list-cols li { border-top: 1px solid var(--line); }
.app-list-cols li:first-child, .app-list-cols li:nth-child(2) { border-top: 0; }
.app-all span:first-child { color: var(--brass); font-weight: 600; }
@media (max-width: 880px) {
  .app-list-cols { grid-template-columns: 1fr; }
  .app-list-cols li:nth-child(2) { border-top: 1px solid var(--line); }
}
.app-list li + li { border-top: 1px solid var(--line); }
.app-list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.75rem 0;
  text-decoration: none;
  color: var(--bone);
  transition: color 0.25s, padding-left 0.25s;
}
.app-list a:hover { color: var(--brass); padding-left: 0.4rem; }
.app-list a .mono { color: var(--muted); font-size: 0.68rem; letter-spacing: 0.08em; }

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}
.skill-group {
  border-left: 2px solid var(--brass);
  background: rgba(12, 19, 34, 0.35);
  border-radius: 0 12px 12px 0;
  padding: 1.2rem 1.5rem;
}
.skill-head { color: var(--brass); font-size: 0.66rem; letter-spacing: 0.18em; margin-bottom: 0.5rem; }
.skill-group p:last-child { color: #b9b3a6; font-size: 0.95rem; }

/* ---------- Contact ---------- */
.contact { text-align: center; }
.contact .eyebrow { margin-bottom: 1.2rem; }
.contact-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
}
.contact-title em { font-style: normal; color: var(--brass); }
.contact-mail {
  display: inline-block;
  margin-top: 2rem;
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.4vw, 1.4rem);
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(95, 212, 232, 0.4);
  padding-bottom: 0.2rem;
  transition: color 0.25s, border-color 0.25s;
}
.contact-mail:hover { color: var(--brass); border-color: var(--brass); }
.contact-links {
  margin-top: 2.6rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.contact-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  transition: color 0.25s, border-color 0.25s, transform 0.25s;
}
.contact-links a:hover {
  color: var(--brass);
  border-color: rgba(232, 179, 75, 0.5);
  transform: translateY(-2px);
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 1.4rem clamp(1.25rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--brass); }

/* ---------- Reveal (JS-driven) ---------- */
.reveal { opacity: 0; transform: translateY(28px); }
.no-js .reveal, .reveal.shown { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .about-grid, .proj-grid, .skills-grid, .edu-row { grid-template-columns: 1fr; }
  .proj-wide { grid-column: auto; }
  .stat:nth-child(3) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100svh;
    width: min(78vw, 320px);
    background: rgba(8, 12, 22, 0.97);
    backdrop-filter: blur(18px);
    border-left: 1px solid var(--line);
    flex-direction: column;
    justify-content: center;
    gap: 1.8rem;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 1.15rem; }
  .scroll-hint { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track, .scroll-hint, .boot-cursor { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
