
/* ===================================================
   JOY ETANA — PORTFOLIO · REDESIGN 2025
   Black & Gold Dashboard Aesthetic
=================================================== */

:root {
  --bg:       #080808;
  --surface:  #0e0e0e;
  --panel:    #131313;
  --card:     #181818;
  --border:   rgba(212, 175, 55, 0.18);
  --border-h: rgba(212, 175, 55, 0.5);
  --gold:     #d4af37;
  --gold-lt:  #f0c94d;
  --gold-dim: rgba(212, 175, 55, 0.12);
  --text:     #e4e4e4;
  --muted:    #888;
  --dim:      #444;
  --disp:     'Poppins', sans-serif;
  --mono:     'JetBrains Mono', monospace;
  --body:     'Poppins', sans-serif;
  --r:        12px;
  --r-sm:     8px;
  --trans:    0.3s ease;
}

/* ===== LIGHT THEME ===== */
html[data-theme="light"] {
  --bg:       #c8c9c9;
  --surface:  #d2d3d3;
  --panel:    #bbbcbc;
  --card:     #dcdcdc;
  --border:   rgba(0, 0, 0, 0.12);
  --border-h: rgba(0, 0, 0, 0.28);
  --gold:     #7a5c00;
  --gold-lt:  #9a7200;
  --gold-dim: rgba(120, 90, 0, 0.12);
  --text:     #111111;
  --muted:    #3d3d3d;
  --dim:      #7a7a7a;
}

html[data-theme="light"] #codeRain {
  opacity: 0.06;
}

html[data-theme="light"] body::before {
  background-image:
    linear-gradient(rgba(140,100,0,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140,100,0,0.06) 1px, transparent 1px);
}

html[data-theme="light"] .navbar.scrolled {
  background: rgba(200, 201, 201, 0.92);
}

html[data-theme="light"] .nav-links.mobile-open {
  background: rgba(200, 201, 201, 0.98);
}

html[data-theme="light"] .c-key  { color: #7c3aed; }
html[data-theme="light"] .c-var  { color: #1d4ed8; }
html[data-theme="light"] .c-prop { color: #dc2626; }
html[data-theme="light"] .c-bool { color: #db2777; }

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  overflow-x: clip;
  cursor: default;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { display: block; width: 100%; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 99px; }

/* ===== CANVAS CODE RAIN ===== */
#codeRain {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.03;
}

/* ===== GRID OVERLAY ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(212,175,55,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212,175,55,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ===== SHARED LAYOUT ===== */
/* Sections scroll normally — sticky was pinning content off-screen.
   The card overlap visual comes from border-radius + shadow + z-index,
   both sections are genuinely in the viewport during the scroll transition. */
section, .footer { position: relative; z-index: 1; }

/* ── Section card overlap ── */
#home    { z-index: 1; }
#about   { z-index: 2; border-radius: 28px 28px 0 0; box-shadow: 0 -24px 60px rgba(0,0,0,0.5); }
#skills  { z-index: 3; border-radius: 28px 28px 0 0; box-shadow: 0 -24px 60px rgba(0,0,0,0.5); }
#projects{ z-index: 4; border-radius: 28px 28px 0 0; box-shadow: 0 -24px 60px rgba(0,0,0,0.5); }
#reviews { z-index: 5; border-radius: 28px 28px 0 0; box-shadow: 0 -24px 60px rgba(0,0,0,0.5); }
#contact { z-index: 6; border-radius: 28px 28px 0 0; box-shadow: 0 -24px 60px rgba(0,0,0,0.5); }

html[data-theme="light"] section:not(#home) {
  box-shadow: 0 -16px 50px rgba(0,0,0,0.1);
}

.section-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 100px 5%;
}

.section-tag {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}
.tag-line {
  display: block;
  width: 40px;
  height: 2px;
  background: var(--gold);
}
.tag-text {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-title {
  font-family: var(--disp);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 16px;
}
.section-title em {
  font-style: normal;
  color: var(--gold);
}
.section-title.center { text-align: center; }

.section-sub {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

/* Email direct link — shown below contact section subtitle */
.email-direct-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid var(--border-h);
  padding: 9px 22px;
  border-radius: 30px;
  background: var(--gold-dim);
  margin: 0 auto 52px;
  display: flex;
  width: fit-content;
  transition: var(--trans);
  letter-spacing: 0.02em;
}
.email-direct-link i { font-size: 0.95rem; }
.email-direct-link:hover {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--gold-dim);
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  background: var(--gold);
  color: #080808;
  font-family: var(--disp);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  border-radius: 6px;
  border: 2px solid var(--gold);
  transition: var(--trans);
  white-space: nowrap;
}
.btn-primary:hover {
  background: transparent;
  color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(212,175,55,0.22);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  background: transparent;
  color: var(--text);
  font-family: var(--disp);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  border-radius: 6px;
  border: 2px solid var(--border-h);
  transition: var(--trans);
}
.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

.full-width { width: 100%; justify-content: center; }

/* ===== REVEAL ANIMATION ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================================
   NAVBAR
=================================================== */
.navbar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 1000;
  transition: background var(--trans), box-shadow var(--trans);
}
.navbar.scrolled {
  background: rgba(8,8,8,0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 5%;
  height: 70px;
  display: flex;
  align-items: center;
  gap: 40px;
}

/* Logo */
.logo {
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 500;
  flex-shrink: 0;
}
.logo-bracket { color: var(--gold); }
.logo-name { color: var(--text); margin: 0 1px; }

/* Nav links */
.nav-links {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.nav-links a {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: var(--r-sm);
  transition: var(--trans);
}
.nav-links a:hover { color: var(--gold); background: var(--gold-dim); }
.nav-num { color: var(--gold); margin-right: 4px; font-size: 0.72rem; }

/* Nav CTA */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--gold);
  border: 1.5px solid var(--border-h);
  border-radius: 6px;
  transition: var(--trans);
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-cta:hover {
  background: var(--gold);
  color: #080808;
}

/* Theme toggle */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--border-h);
  background: transparent;
  color: var(--gold);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--trans);
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: var(--gold);
  color: #fff;
  transform: rotate(20deg) scale(1.08);
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 99px;
  transition: var(--trans);
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===================================================
   HERO
=================================================== */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 120px 5% 80px;
}

/* Radial glow */
.hero::after {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  top: 20%; left: -10%;
  background: radial-gradient(circle, rgba(212,175,55,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: 800px;
  position: relative;
  z-index: 2;
}

/* Available badge */
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  background: rgba(212,175,55,0.08);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--gold);
  margin-bottom: 28px;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4caf50;
  flex-shrink: 0;
}
.dot.pulse {
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(76,175,80,0.6); }
  50%       { box-shadow: 0 0 0 6px rgba(76,175,80,0); }
}

.hero-greeting {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.hero-name {
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  line-height: 1;
  margin-bottom: 20px;
  letter-spacing: 0.04em;
}
.hero-name .line-1 {
  display: block;
  font-size: clamp(3rem, 8vw, 6.5rem);
  color: var(--text);
  letter-spacing: 0.06em;
}
.hero-name .line-2 {
  display: block;
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  color: var(--text);
  letter-spacing: 0.04em;
}
.hero-name em {
  font-style: normal;
  color: var(--gold);
  -webkit-text-stroke: 0px;
}

.hero-role {
  font-family: var(--mono);
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--gold);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.role-prefix { opacity: 0.6; }

.cursor-blink {
  animation: blink 0.9s step-start infinite;
  color: var(--gold);
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-desc {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--muted);
  max-width: 580px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

/* Stats bar */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 20px 30px;
  background: rgba(212,175,55,0.05);
  border: 1px solid var(--border);
  border-radius: var(--r);
  flex-wrap: wrap;
  gap: 4px;
}
.stat-chip {
  flex: 1;
  text-align: center;
  min-width: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.stat-num {
  font-family: var(--disp);
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
  flex-shrink: 0;
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 40px;
  right: 5%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--dim);
  letter-spacing: 0.2em;
}
.scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(var(--gold), transparent);
  animation: scrollDrop 2s ease-in-out infinite;
}
@keyframes scrollDrop {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50% { transform: scaleY(0.5); opacity: 0.4; }
}

/* ===================================================
   ABOUT
=================================================== */
.about { background: var(--surface); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 70px;
  align-items: start;
}

/* Image frame */
.img-frame {
  position: relative;
  display: inline-block;
  width: 100%;
}
.profile-img {
  width: 100%;
  aspect-ratio: 5/5;
  object-fit: cover;
  object-position: center 20%;
  border-radius: var(--r);
  filter: grayscale(15%);
  transition: filter var(--trans);
}
.img-frame:hover .profile-img { filter: grayscale(0); }
.img-border {
  position: absolute;
  inset: -8px;
  border: 2px solid var(--border);
  border-radius: calc(var(--r) + 8px);
  pointer-events: none;
}
.img-corner {
  position: absolute;
  width: 20px; height: 20px;
  border-color: var(--gold);
  border-style: solid;
}
.img-corner.tl { top: -8px; left: -8px; border-width: 2px 0 0 2px; border-radius: 4px 0 0 0; }
.img-corner.tr { top: -8px; right: -8px; border-width: 2px 2px 0 0; border-radius: 0 4px 0 0; }
.img-corner.bl { bottom: -8px; left: -8px; border-width: 0 0 2px 2px; border-radius: 0 0 0 4px; }
.img-corner.br { bottom: -8px; right: -8px; border-width: 0 2px 2px 0; border-radius: 0 0 4px 0; }

/* Mini stats below image */
.about-mini-stats {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mini-stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  transition: var(--trans);
}
.mini-stat:hover { border-color: var(--border-h); transform: translateX(4px); }
.mini-stat i { color: var(--gold); font-size: 1rem; width: 20px; text-align: center; }
.mini-stat strong { display: block; font-size: 0.9rem; }
.mini-stat span { font-size: 0.75rem; color: var(--muted); }

/* About text */
.about-text {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 16px;
}

/* Code snippet */
.code-snippet {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  margin: 28px 0;
}
.snippet-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.dots { display: flex; gap: 6px; }
.dots span {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--dim);
}
.dots span:nth-child(1) { background: #ff5f57; }
.dots span:nth-child(2) { background: #febc2e; }
.dots span:nth-child(3) { background: #28c840; }
.snippet-file {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}
.code-snippet pre {
  padding: 20px;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.7;
  overflow-x: auto;
}
.c-key  { color: #c792ea; }
.c-var  { color: #82aaff; }
.c-prop { color: #f07178; }
.c-str  { color: var(--gold); }
.c-bool { color: #ff9cac; }

.about-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
}

/* ===================================================
   SKILLS
=================================================== */
.skills { background: var(--bg); }

.skills-dashboard {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: start;
}

/* Right column holds Tools + Version Control stacked */
.skills-side-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Sub-sections within the Skills card */
.skill-subgroup { margin-bottom: 28px; }
.skill-subgroup:last-child { margin-bottom: 0; }
.skill-sub-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* Version Control items */
.vc-list { display: flex; flex-direction: column; gap: 10px; }
.vc-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  transition: var(--trans);
}
.vc-item:hover { border-color: var(--border-h); transform: translateX(4px); }
.vc-icon {
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  background: var(--gold-dim);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  font-size: 1.15rem;
  flex-shrink: 0;
}
.vc-info { display: flex; flex-direction: column; gap: 3px; }
.vc-info strong { font-size: 0.9rem; color: var(--text); }
.vc-info span { font-size: 0.75rem; color: var(--muted); }

.skill-group {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 30px;
  transition: var(--trans);
}
.skill-group:hover { border-color: var(--border-h); }

.group-title {
  font-family: var(--disp);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Skill bars */
.skill-bars { display: flex; flex-direction: column; gap: 18px; }

.skill-bar-item {}
.skill-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text);
}
.skill-info i { color: var(--gold); font-size: 1rem; width: 20px; text-align: center; }
.skill-info span:nth-child(2) { flex: 1; }
.skill-pct { color: var(--gold); }

.bar-track {
  height: 4px;
  background: var(--card);
  border-radius: 99px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-lt));
  border-radius: 99px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Skill tags */
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 0.82rem;
  font-family: var(--mono);
  color: var(--text);
  transition: var(--trans);
  cursor: default;
}
.skill-tag i { color: var(--gold); font-size: 0.85rem; }
.skill-tag:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-dim); }

/* ===================================================
   PROJECTS — BOOK UI
=================================================== */
.projects { background: var(--surface); }

/* ── Stage: wraps book + depth shadows ── */
.book-stage {
  margin-top: 48px;
  position: relative;
}

/* Depth-stack layers peeking behind the book */
.book-stage::before,
.book-stage::after {
  content: '';
  position: absolute;
  border-radius: 14px;
  pointer-events: none;
}
.book-stage::before {
  inset: 8px -8px -8px 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  z-index: 0;
  opacity: 0.75;
}
.book-stage::after {
  inset: 16px -16px -16px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  z-index: -1;
  opacity: 0.45;
}

/* ── Book wrap: 3D perspective container ── */
.book-wrap {
  position: relative;
  z-index: 1;
  min-height: 500px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 24px 70px rgba(0,0,0,0.45);
  perspective: 1800px;
  perspective-origin: center center;
}

/* ── Individual page ── */
.book-page {
  position: absolute;
  inset: 0;
  display: flex;
  will-change: transform, opacity;
  backface-visibility: hidden;
}

/* Flip shadow — darkens the page as it rotates edge-on */
.book-page::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  pointer-events: none;
  transition: background 0.28s ease;
  border-radius: inherit;
  z-index: 10;
}
.book-page.flipping::after {
  background: rgba(0,0,0,0.55);
}

/* ── Spine strip ── */
.page-spine {
  width: 48px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--gold) 0%, #8a6200 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.45);
  font-weight: 700;
  user-select: none;
}

/* ── Page layout: image | info ── */
.page-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 0;
}

.page-visual {
  position: relative;
  overflow: hidden;
}
.page-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
/* Fade edge into info column */
.page-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 60%, var(--card) 100%);
  pointer-events: none;
}

/* ── Info column ── */
.page-info {
  padding: 44px 40px 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
}

.page-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.page-num {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--gold);
  letter-spacing: 0.12em;
}

.page-badge {
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid var(--border-h);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--mono);
}

.page-title {
  font-family: var(--disp);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin: 0;
}

.page-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}

.page-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.page-tags span {
  padding: 3px 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
}

/* ── Project links ── */
.page-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-page-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--gold);
  color: #111;
  border: 1.5px solid var(--gold);
  transition: var(--trans);
}
.btn-page-link:hover {
  background: transparent;
  color: var(--gold);
}
.btn-page-link.ghost {
  background: transparent;
  color: var(--gold);
}
.btn-page-link.ghost:hover {
  background: var(--gold);
  color: #111;
}


/* ── Page navigation ── */
.page-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}

.btn-flip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border-h);
  transition: var(--trans);
  font-family: inherit;
}
.btn-flip:hover:not(:disabled) {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--gold);
}
.btn-flip:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ── View All CTA (below book stage) ── */
.view-all-cta {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.view-all-cta p {
  font-size: 0.88rem;
  color: var(--muted);
  font-family: var(--mono);
  letter-spacing: 0.04em;
}

/* ── See More button (inside each book page) ── */
.btn-see-more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--gold);
  text-decoration: none;
  border: 1.5px solid var(--border-h);
  padding: 8px 18px;
  border-radius: 8px;
  background: transparent;
  transition: var(--trans);
  width: fit-content;
}
.btn-see-more:hover {
  background: var(--gold-dim);
  border-color: var(--gold);
  gap: 12px;
}

/* ── Dot indicators ── */
.book-indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}

.book-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--border-h);
  cursor: pointer;
  padding: 0;
  transition: var(--trans);
}
.book-dot.active {
  background: var(--gold);
  width: 26px;
  border-radius: 4px;
}

/* ===================================================
   REVIEWS
=================================================== */
.reviews { background: var(--bg); }

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.review-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 30px;
  position: relative;
  transition: var(--trans);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.review-card:hover {
  border-color: var(--border-h);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(212,175,55,0.06);
}

.quote-icon {
  font-size: 1.4rem;
  color: var(--gold);
  opacity: 0.5;
}
.review-card p {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--muted);
  flex: 1;
}
.review-footer {
  display: flex;
  align-items: center;
  gap: 14px;
}
.reviewer-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--gold-dim);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
}
.review-footer > div:nth-child(2) {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.review-footer strong { font-size: 0.9rem; color: var(--text); }
.review-footer span  { font-size: 0.75rem; color: var(--muted); }
.review-stars { display: flex; gap: 3px; }
.review-stars i { color: var(--gold); font-size: 0.7rem; }

/* ===================================================
   CONTACT
=================================================== */
.contact { background: var(--surface); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 30px;
  align-items: start;
}

.contact-info-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 40px 32px;
}
.contact-info-panel h3 {
  font-family: var(--disp);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.contact-info-panel > p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 32px;
}

.contact-items { display: flex; flex-direction: column; gap: 16px; margin-bottom: 36px; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  transition: var(--trans);
}
.contact-item:hover { border-color: var(--border-h); transform: translateX(4px); }
.contact-icon {
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  background: var(--gold-dim);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  font-size: 0.9rem;
  flex-shrink: 0;
}
.contact-label { display: block; font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 2px; }
.contact-item strong { font-size: 0.88rem; }

.social-bar { display: flex; gap: 12px; }
.social-bar a {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  font-size: 0.95rem;
  transition: var(--trans);
}
.social-bar a:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-dim); transform: translateY(-3px); }

/* Form */
.contact-form-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 40px 32px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.form-group:last-child { margin-bottom: 0; }

label {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 13px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: var(--body);
  font-size: 0.92rem;
  outline: none;
  transition: border-color var(--trans), box-shadow var(--trans);
  resize: none;
}
input:focus, textarea:focus {
  border-color: var(--border-h);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.08);
}
input::placeholder, textarea::placeholder { color: var(--dim); }

/* ===================================================
   FOOTER
=================================================== */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.fa-spin { animation: spin 0.8s linear infinite; }

.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 36px 5%;
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.footer-logo {
  font-family: var(--mono);
  font-size: 1rem;
}
.footer-logo .logo-bracket { color: var(--gold); }
.footer-copy {
  flex: 1;
  text-align: center;
  font-size: 0.82rem;
  color: var(--dim);
}
.footer-links {
  display: flex;
  gap: 20px;
}
.footer-links a {
  font-size: 0.82rem;
  color: var(--muted);
  transition: color var(--trans);
}
.footer-links a:hover { color: var(--gold); }

/* ===== BACK TO TOP ===== */
#backToTop {
  position: fixed;
  bottom: 32px; right: 32px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--gold);
  color: #080808;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 900;
  transition: var(--trans);
  box-shadow: 0 4px 20px rgba(212,175,55,0.35);
}
#backToTop.show { display: flex; }
#backToTop:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(212,175,55,0.45); }

/* ===== TOAST ===== */
#toast {
  position: fixed;
  bottom: 40px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 24px;
  border-radius: 99px;
  font-size: 0.88rem;
  font-family: var(--mono);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
  white-space: nowrap;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===================================================
   RESPONSIVE
=================================================== */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr 1.3fr; gap: 50px; }
  .skills-dashboard { grid-template-columns: 1fr; }
  .skills-side-col { flex-direction: row; flex-wrap: wrap; }
  .skills-side-col .skill-group { flex: 1; min-width: 260px; }
}

@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }

  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 70px; left: 0; right: 0;
    background: rgba(8,8,8,0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 20px;
    gap: 4px;
    z-index: 999;
  }
  .nav-links.mobile-open a { padding: 12px 16px; border-radius: var(--r-sm); display: block; }

  .about-grid { grid-template-columns: 1fr; }

  /* Book UI — stacked layout on mobile */
  .book-wrap { min-height: 680px; }
  .page-layout { grid-template-columns: 1fr; }
  .page-visual { height: 220px; flex-shrink: 0; }
  .page-visual::after { background: linear-gradient(180deg, transparent 60%, var(--card) 100%); }
  .page-info { padding: 28px 24px 24px; }
  .page-title { font-size: 1.3rem; }
  .page-spine { width: 100%; height: 36px; writing-mode: horizontal-tb; flex-shrink: 0; }
  .book-page { flex-direction: column; }
  .book-stage::before { inset: 6px -6px -6px 6px; }
  .book-stage::after { inset: 12px -12px -12px 12px; }

  .reviews-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero-stats { display: grid; grid-template-columns: 1fr 1fr; }
  .stat-divider { display: none; }
}

@media (max-width: 600px) {
  .section-container { padding: 70px 5%; }
  .form-row { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .btn-primary, .btn-ghost { width: 100%; justify-content: center; }
  .about-ctas { flex-direction: column; }
  .hero-stats { grid-template-columns: 1fr 1fr; padding: 16px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
  .skills-side-col { flex-direction: column; }
}