/* ============================================================
   VINCENT DE MOL — PORTFOLIO
   styles.css
   ============================================================ */

/* ---------- FONTS & RESET ---------- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;0,700;1,400;1,600&family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Inter:wght@400;500;600&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=satoshi@400,500,700&display=swap');

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

:root {
  --gold: #c9a84c;
  --gold-bright: #e8c87a;
  --crimson: #8b1a1a;
  --crimson-dim: rgba(139,26,26,0.3);
  --forest: #2d5a27;
  --cyan: #c9a84c;
  --cyan-dim: rgba(201,168,76,0.3);
  --cyan-glow: rgba(201,168,76,0.12);
  --bg: #0e0b07;
  --bg-2: #120f09;
  --bg-3: #161209;
  --border: #2a2010;
  --border-mid: #3a2e18;
  --border-light: #5a4a28;
  --text-primary: #f5edd8;
  --text-secondary: #e0ceaa;
  --text-muted: #b09a78;
  --text-dim: #7a6848;
  --text-faint: #5a4a30;
  --font-title: 'Cormorant Garamond', serif;
  --font-body: 'EB Garamond', serif;
  --font-ui: 'Inter', sans-serif;
}

/* ---------- TYPOGRAPHY ---------- */
h1 { font-family: var(--font-title); font-size: 42px; font-weight: 700; color: var(--text-primary); line-height: 1.1; letter-spacing: 1px; }
h2 { font-family: var(--font-title); font-size: 35px; font-weight: 700; color: var(--text-primary); line-height: 1.15; letter-spacing: 1px; }
h3 { font-family: var(--font-title); font-size: 29px; font-weight: 600; color: var(--text-primary); line-height: 1.2; }
h4 { font-family: var(--font-title); font-size: 24px; font-weight: 600; color: var(--text-primary); line-height: 1.25; }
h5 { font-family: var(--font-title); font-size: 20px; font-weight: 600; color: var(--text-primary); line-height: 1.3; }
p  { font-family: var(--font-body); font-size: 18px; line-height: 1.8; color: var(--text-secondary); }

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

body {
  background: var(--bg);
  color: var(--text-secondary);
  font-family: var(--font-body);
  line-height: 1.6;
  cursor: default;
  position: relative;
}

/* === 1. GRAIN / PAPER TEXTURE === */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 1;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 300px 300px;
  mix-blend-mode: overlay;
}

/* === 2. ORGANIC WARM LIGHTING === */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 15% 20%, rgba(180,130,40,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 85% 80%, rgba(60,30,10,0.25) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 50%, transparent 50%, rgba(0,0,0,0.35) 100%);
}

a { text-decoration: none; color: inherit; }

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ---------- UTILITIES ---------- */
.cyan { color: var(--cyan); }
.divider {
  display: flex; align-items: center; gap: 6px;
  width: 100%;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light) 50%, transparent);
}
.diam {
  font-family: serif;
  font-size: 16px;
  color: var(--gold);
  flex-shrink: 0;
  text-shadow: 0 0 8px rgba(201,168,76,0.7), 0 0 20px rgba(201,168,76,0.25);
  line-height: 1;
  user-select: none;
}

/* === 3. MEDIEVAL ORNAMENTS === */
/* Ornament divider with ✦ symbol */
.ornament-divider {
  display: flex; align-items: center; gap: 10px;
  color: var(--gold-dim); font-size: 10px; user-select: none;
}
.ornament-divider::before, .ornament-divider::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light) 40%, var(--gold-dim) 50%, var(--border-light) 60%, transparent);
}

/* Glowing gold borders on hovered cards */
.about-sheet, .journal-body, .contact-grid {
  transition: box-shadow .4s ease;
}
.about-sheet:hover {
  box-shadow: 0 0 30px rgba(201,168,76,0.06), inset 3px 3px 6px rgba(255,255,255,0.025);
}
.section-title {
  font-family: var(--font-title);
  font-size: 18px; font-weight: 700;
  color: var(--text-primary); letter-spacing: 4px; text-transform: uppercase;
}
.section-sub { font-size: 10px; letter-spacing: 2px; color: var(--text-muted); margin-top: 2px; font-family: var(--font-ui); }
.section-divider { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent); }
.section-badge {
  font-size: 10px; letter-spacing: 1px; color: var(--cyan);
  border: 1px solid var(--cyan-dim); padding: 2px 8px;
  font-family: var(--font-body);
}
.section-label-sm { font-size: 10px; letter-spacing: 3px; color: var(--text-dim); text-transform: uppercase; }

/* ============================================================
   HEADER
   ============================================================ */
#main-header {
  position: fixed; top: 0; z-index: 999;
  width: 100%;
  background: linear-gradient(180deg, #1c1408 0%, #0e0b07 100%);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(201,168,76,0.3);
  height: 56px;
  display: flex; align-items: stretch;
}

/* Spine on the left */
.header-spine {
  width: 48px;
  height: 56px;
  background: linear-gradient(180deg, #2a1c08 0%, #1a1006 50%, #2a1c08 100%);
  border-right: 1px solid rgba(201,168,76,0.4);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; position: relative;
  overflow: hidden;
}
.header-spine::before {
  content: '';
  position: absolute; inset: 4px 6px;
  border: 1px solid rgba(201,168,76,0.15);
}
.spine-rune {
  font-family: serif;
  font-size: 12px; color: rgba(201,168,76,0.7);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-shadow: 0 0 8px rgba(201,168,76,0.4);
  user-select: none;
}

.logo { flex-shrink: 0; display: flex; align-items: center; padding: 0 24px; border-right: 1px solid rgba(201,168,76,0.15); text-decoration: none; }
.logo-img { height: 28px; width: auto; display: block; }

.logo-placeholder {
  width: 72px; height: 72px; border-radius: 50%;
  border: 1px solid rgba(201,168,76,0.35);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.logo-placeholder::before {
  content: ''; position: absolute; inset: 5px; border-radius: 50%;
  border: 1px solid rgba(201,168,76,0.15);
}
.footer-logo-img { width: 36px; height: 36px; object-fit: contain; position: relative; z-index: 1; }

.nav { display: flex; align-items: stretch; flex: 1; padding: 0 12px; gap: 2px; }
.nav-link {
  font-family: var(--font-title);
  font-size: 10px; font-weight: 600;
  color: rgba(245,237,216,0.45);
  text-decoration: none;
  padding: 0 18px;
  border-right: 1px solid rgba(201,168,76,0.08);
  transition: all .2s; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; white-space: nowrap; letter-spacing: 2px;
  text-transform: uppercase; position: relative;
}
.nav-link .prompt {
  font-family: var(--font-title);
  font-style: italic;
  font-size: 9px; color: rgba(201,168,76,0.4);
  letter-spacing: 1px; font-weight: 400;
}
.nav-link .cmd { transition: color .2s; }
.nav-link:hover { background: rgba(201,168,76,0.04); color: rgba(245,237,216,0.7); }
.nav-link.active { background: rgba(201,168,76,0.06); color: #f5edd8; }
.nav-link.active::after {
  content: '';
  position: absolute; bottom: 0; left: 20%; right: 20%; height: 2px;
  background: rgba(201,168,76,0.7);
}
.nav-link:hover .prompt, .nav-link.active .prompt { color: rgba(201,168,76,0.7); }

.header-status {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; letter-spacing: 1px;
  color: var(--cyan); flex-shrink: 0;
  font-family: var(--font-ui);
  padding: 0 20px;
  border-left: 1px solid rgba(201,168,76,0.15);
}
.status-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 6px rgba(201,168,76,0.8);
  animation: pulse-dot 2s infinite ease-in-out;
}
@keyframes pulse-dot { 0%,100%{opacity:1;} 50%{opacity:0.3;} }

/* Burger menu */
.burger-btn {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 40px; height: 56px;
  background: none; border: none; cursor: pointer; padding: 0 12px;
  flex-shrink: 0;
}
.burger-btn span {
  display: block; width: 20px; height: 1px;
  background: rgba(201,168,76,0.7);
  transition: all .25s ease;
}
.burger-btn.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger-btn.open span:nth-child(2) { opacity: 0; }
.burger-btn.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile nav overlay */
.mobile-nav {
  display: none;
  position: fixed; top: 56px; left: 0; right: 0; bottom: 0;
  background: rgba(14,11,7,0.97);
  backdrop-filter: blur(10px);
  z-index: 998;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 8px;
  border-top: 1px solid rgba(201,168,76,0.2);
}
.mobile-nav.open { display: flex; }
.mobile-nav-link {
  font-family: var(--font-title);
  font-size: 28px; font-weight: 600; letter-spacing: 4px;
  color: rgba(245,237,216,0.5); text-decoration: none;
  text-transform: uppercase;
  padding: 12px 40px;
  display: flex; align-items: center; gap: 12px;
  transition: color .2s;
  width: 100%; justify-content: center;
}
.mobile-nav-link span { font-style: italic; font-size: 14px; color: rgba(201,168,76,0.4); font-weight: 400; }
.mobile-nav-link:hover { color: #f5edd8; }
.header-bookmarks {
  display: flex; flex-direction: column;
  border-left: 1px solid rgba(201,168,76,0.15);
  flex-shrink: 0;
}
.bookmark {
  flex: 1; width: 28px;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid rgba(201,168,76,0.1);
  cursor: default;
  font-family: serif; font-size: 8px;
  color: rgba(201,168,76,0.25);
}
.bookmark:last-child { border-bottom: none; }

/* ============================================================
   SECTIONS — COMMON
   ============================================================ */
section {
  display: flex; align-items: center; justify-content: center;
  padding: 80px 48px;
}
section:nth-child(even) { background: transparent; }
section:nth-child(odd)  { background: transparent; }

.section-inner {
  width: 100%; max-width: 1200px;
  display: flex; flex-direction: column; gap: 24px;
}
.journal-header-bar {
  display: flex; align-items: center; gap: 16px;
}

/* ============================================================
   HERO
   ============================================================ */
#hero {
  width:100%; height:100vh; min-height:600px;
  background:#0a0703;
  position:relative; overflow:hidden;
  display:flex; flex-direction:column;
  align-items:center; justify-content:center;
}

#heroCanvas {
  position:absolute;inset:0;width:100%;height:100%;z-index:0;
}

.hero-vignette {
  position:absolute;inset:0;z-index:1;pointer-events:none;
  background:
    radial-gradient(ellipse at 50% 50%, transparent 25%, rgba(0,0,0,0.6) 75%),
    radial-gradient(ellipse at 50% 0%, rgba(10,7,3,0.85) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(10,7,3,0.95) 0%, transparent 50%);
}

.hero-frame {
  position:absolute;inset:16px;z-index:2;pointer-events:none;
  border:1px solid rgba(201,168,76,0.15);
}
.hero-frame::before {
  content:'';position:absolute;inset:5px;
  border:1px solid rgba(201,168,76,0.06);
}

.hero-corner {
  position:absolute;width:24px;height:24px;
  border-color:rgba(201,168,76,0.5);border-style:solid;z-index:3;
}
.hc-tl{top:12px;left:12px;border-width:1px 0 0 1px;}
.hc-tr{top:12px;right:12px;border-width:1px 1px 0 0;}
.hc-bl{bottom:12px;left:12px;border-width:0 0 1px 1px;}
.hc-br{bottom:12px;right:12px;border-width:0 1px 1px 0;}

.hero-cdot {
  position:absolute;width:5px;height:5px;
  background:rgba(201,168,76,0.5);transform:rotate(45deg);z-index:3;
}
.hcd-tl{top:18px;left:18px;} .hcd-tr{top:18px;right:18px;}
.hcd-bl{bottom:18px;left:18px;} .hcd-br{bottom:18px;right:18px;}

.hero-side-rune {
  position:absolute;z-index:3;
  font-size:11px;color:rgba(201,168,76,0.15);letter-spacing:12px;
  writing-mode:vertical-rl;user-select:none;
  opacity:0;animation:heroFade 2s ease 3s forwards;
}
.hero-side-rune.left{left:36px;top:50%;transform:translateY(-50%);}
.hero-side-rune.right{right:36px;top:50%;transform:translateY(-50%) rotate(180deg);}

.hero-content {
  position:relative;z-index:4;
  display:flex;flex-direction:column;align-items:center;
  text-align:center;padding:0 40px;gap:0;
}

.hero-eyebrow {
  font-family:var(--font-body);
  font-size:10px;letter-spacing:8px;text-transform:uppercase;
  color:rgba(201,168,76,0.45);margin-bottom:20px;
  opacity:0;animation:heroUp 1.2s ease 0.8s forwards;
}

.hero-rune-row {
  display:flex;align-items:center;gap:16px;margin-bottom:14px;
  opacity:0;animation:heroUp 1s ease 1.4s forwards;
}
.hero-rune-row::before,.hero-rune-row::after {
  content:'';width:60px;height:1px;
}
.hero-rune-row::before{background:linear-gradient(90deg,transparent,rgba(201,168,76,0.35));}
.hero-rune-row::after{background:linear-gradient(270deg,transparent,rgba(201,168,76,0.35));}
.hero-rune-row span{font-size:16px;color:rgba(201,168,76,0.6);letter-spacing:8px;}

.hero-name {
  font-family:var(--font-title);
  font-size:clamp(48px,8vw,82px);font-weight:700;line-height:0.95;
  color:#f5edd8;letter-spacing:8px;
  text-shadow:0 0 80px rgba(201,168,76,0.12),0 2px 4px rgba(0,0,0,0.8);
  opacity:0;animation:heroUp 1.4s ease 1.8s forwards;
  margin-bottom:18px;
}
.hero-name span{display:block;}

.hero-sep {
  display:flex;align-items:center;gap:12px;width:280px;margin-bottom:16px;
  opacity:0;animation:heroUp 1s ease 2.4s forwards;
}
.hero-sep::before,.hero-sep::after{content:'';flex:1;height:1px;background:linear-gradient(90deg,transparent,rgba(201,168,76,0.4),transparent);}
.hero-sep-rune{font-size:14px;color:rgba(201,168,76,0.7);}

.hero-subtitle {
  font-family:var(--font-body);
  font-size:15px;font-style:italic;font-weight:300;
  color:rgba(245,237,216,0.45);letter-spacing:3px;
  margin-bottom:36px;
  opacity:0;animation:heroUp 1s ease 2.9s forwards;
}

.hero-cta {
  position:relative;font-family:var(--font-title);
  font-size:11px;font-weight:600;letter-spacing:5px;text-transform:uppercase;
  color:rgba(201,168,76,0.8);
  border:1px solid rgba(201,168,76,0.3);
  background:transparent;padding:14px 44px;cursor:pointer;
  text-decoration:none;display:inline-block;
  transition:all .4s;
  opacity:0;animation:heroUp 1s ease 3.5s forwards;
}
.hero-cta::before{content:'';position:absolute;inset:4px;border:1px solid rgba(201,168,76,0.08);pointer-events:none;}
.hero-cta:hover{background:rgba(201,168,76,0.05);border-color:rgba(201,168,76,0.65);color:#f5edd8;box-shadow:0 0 30px rgba(201,168,76,0.08);}

.hero-scroll {
  position:absolute;bottom:28px;left:50%;transform:translateX(-50%);
  z-index:4;display:flex;flex-direction:column;align-items:center;gap:6px;
  opacity:0;animation:heroFade 1.5s ease 4.5s forwards;
}
.hero-scroll-line{width:1px;height:36px;background:linear-gradient(180deg,rgba(201,168,76,0.6),transparent);animation:heroScrollAnim 2.5s ease-in-out infinite;}
.hero-scroll-txt{font-family:var(--font-body);font-size:8px;letter-spacing:4px;text-transform:uppercase;color:rgba(201,168,76,0.3);}

@keyframes heroUp{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:translateY(0)}}
@keyframes heroFade{from{opacity:0}to{opacity:1}}
@keyframes heroScrollAnim{0%,100%{transform:scaleY(0.8);opacity:0.4}50%{transform:scaleY(1.2);opacity:1}}

/* Hide hero on mobile to save space */
@media(max-width:768px){
  #hero { height:100svh; }
  .hero-name { font-size:42px; letter-spacing:4px; }
  .hero-side-rune { display:none; }
}

/* ============================================================
   ABOUT
   ============================================================ */
#about {
  padding: 96px 48px 60px;
  align-items: center;
  justify-content: center;
  background: #0e0b07;
}

.about-sheet {
  width: 100%; max-width: 1060px;
  height: 72vh;
  display: grid;
  grid-template-columns: 26% 74%;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-left: 1px solid rgba(201,168,76,0.15);
  background: #1a1409;
  border-radius: 16px;
}

/* --- Left panel --- */
.about-left {
  border-right: 1px solid var(--border-light);
  padding: 20px 16px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  position: relative; overflow: hidden;
  justify-content: space-between;
}
.about-left::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 1px;
  background: linear-gradient(180deg, transparent, #888 20%, #888 80%, transparent);
}

/* Medallion / Portrait */
.medallion-wrap {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.medallion-ring {
  position: absolute; inset: 0;
  border: 1px solid rgba(201,168,76,0.4);
}
.medallion-svg { display: none; }
.medallion-photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  overflow: hidden;
  border: 1px solid rgba(201,168,76,0.5);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 16px rgba(201,168,76,0.15);
}

/* Overlay effects on top of photo */
.medallion-photo::after {
  content: '';
  position: absolute; inset: 0; z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 50%, transparent 40%, rgba(0,0,0,0.45) 100%),
    radial-gradient(ellipse at 0% 0%, rgba(201,168,76,0.08) 0%, transparent 40%),
    radial-gradient(ellipse at 100% 100%, rgba(80,40,0,0.15) 0%, transparent 40%);
  mix-blend-mode: multiply;
}

/* Grain on photo */
.medallion-photo::before {
  content: '';
  position: absolute; inset: 0; z-index: 3;
  pointer-events: none;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: overlay;
}

/* Outer decorative frame */
.medallion-wrap::before {
  content: '';
  position: absolute; inset: -5px;
  border: 1px solid rgba(201,168,76,0.15);
  pointer-events: none; z-index: 1;
}
/* Corner dots */
.medallion-wrap::after {
  content: '';
  position: absolute;
  width: 5px; height: 5px;
  background: rgba(201,168,76,0.6);
  transform: rotate(45deg);
  top: -3px; left: 50%; margin-left: -2.5px;
  box-shadow: 0 0 6px rgba(201,168,76,0.5);
  z-index: 2;
}

/* Frame tick marks on sides */
.frame-tick {
  position: absolute; background: rgba(201,168,76,0.5); z-index: 2;
}
.frame-tick.top    { width: 1px; height: 8px; top: -7px; left: 50%; }
.frame-tick.bottom { width: 1px; height: 8px; bottom: -7px; left: 50%; }
.frame-tick.left   { height: 1px; width: 8px; left: -7px; top: 50%; }
.frame-tick.right  { height: 1px; width: 8px; right: -7px; top: 50%; }

.frame-dashed {
  position: absolute; inset: -7px;
  border: 1px dashed rgba(201,168,76,0.2);
  pointer-events: none; z-index: 1;
}

.medallion-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portrait-placeholder {
  font-size: 10px; letter-spacing: 2px; color: rgba(201,168,76,0.3);
  text-transform: uppercase;
}

.name-block { text-align: center; flex-shrink: 0; }
.char-name {
  letter-spacing: 3px; white-space: nowrap;
  text-shadow: 0 0 8px rgba(255,255,255,0.9), 0 0 20px rgba(255,255,255,0.4), 0 0 40px rgba(255,255,255,0.15);
}
.char-title { font-size: 13px; letter-spacing: 2px; color: var(--text-primary); margin-top: 3px; font-weight: 500; }
.char-spec  { font-size: 10px; letter-spacing: 2px; color: #dddddd; margin-top: 2px; font-weight: 400; }

.lvl-row {
  width: 100%;
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(201,168,76,0.2);
  padding: 5px 12px; flex-shrink: 0;
}
.lvl-key { font-size: 9px; letter-spacing: 3px; color: rgba(201,168,76,0.5); font-weight: 500; text-transform: uppercase; font-family: var(--font-ui); }
.lvl-val { font-family: var(--font-title); font-size: 22px; color: var(--text-primary); font-weight: 700; text-shadow: 0 0 10px rgba(201,168,76,0.3); }

/* --- Right panel --- */
.about-right {
  padding: 0;
  display: flex; flex-direction: column; gap: 0; overflow: hidden;
  background: #0e0b07;
}

.tabs {
  display: flex; gap: 0; flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  background: #1a1409;
}
.tab {
  font-family: var(--font-title);
  font-size: 10px; font-weight: 700; letter-spacing: 3px;
  color: var(--text-faint); text-transform: uppercase;
  padding: 10px 20px 12px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text-muted); }
.tab.active { color: var(--text-primary); border-bottom-color: var(--cyan); }

.panel {
  display: flex; flex: 1; flex-direction: column; min-height: 0;
  opacity: 0; visibility: hidden; position: absolute;
  width: 100%; height: 100%;
  transition: opacity .25s ease;
  pointer-events: none;
}
.panel.active {
  opacity: 1; visibility: visible; position: relative;
  pointer-events: auto;
}
.panel.transitioning { opacity: 0; }
.panel.active > * { animation: fadeItem .6s ease both; }
.panel.active > *:nth-child(1) { animation-delay: .08s; }
.panel.active > *:nth-child(2) { animation-delay: .2s; }
.panel.active > *:nth-child(3) { animation-delay: .32s; }
.panel.active {
  display: flex;
  padding: 12px 16px 10px;
  position: relative;
  background: #0e0b07;
}
.panel.active::before {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none; z-index: 0;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 250px 250px;
  mix-blend-mode: overlay;
}
.panel.active::after {
  content: 'ᛗ';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: serif;
  font-size: 420px;
  line-height: 1;
  color: rgba(201,168,76,0.05);
  pointer-events: none; z-index: 0;
  user-select: none;
  white-space: nowrap;
}
.panel.active > * { position: relative; z-index: 1; }

/* Inventory */
.inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  row-gap: 14px; column-gap: 6px;
  padding: 4px 0;
  align-content: flex-start;
  overflow: visible;
}
#panel-inventory { overflow: visible !important; }
.inv-slot {
  width: 96px; height: 96px;
  background: #080604;
  border: 2px solid #5a4a28;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative;
  transition: border-color .25s, background .25s, box-shadow .25s;
}
.inv-slot:hover {
  border-color: rgba(201,168,76,0.8);
  background: #1a1208;
  box-shadow: 0 0 12px rgba(201,168,76,0.2), inset 0 0 8px rgba(201,168,76,0.06);
}
.inv-slot img {
  width: 74px; height: 74px;
  object-fit: contain;
  filter: brightness(0.8) sepia(0.3);
  transition: filter .25s;
}
.inv-slot:hover img { filter: brightness(1.1) sepia(0.1); }
.inv-tt { display: none; }
.svg-wrap { position: relative; flex: 1; min-height: 0; }
.tree-svg { width: 100%; height: 100%; display: block; }

.node-group { cursor: default; }
.node-bg { fill: #211809; stroke: #888; stroke-width: 1.5; transition: all .3s; }
.node-group.hoverable { cursor: pointer; }
.node-group.hoverable:hover .node-bg { stroke: var(--cyan); fill: #1a1205; filter: drop-shadow(0 0 6px rgba(201,168,76,0.5)); }
.node-group.hoverable:hover .node-icon { fill: var(--cyan); }
.node-group.hoverable:hover .node-label { fill: var(--cyan); }
.node-icon { fill: #cccccc; transition: fill .3s; }
.node-label { font-family: 'Satoshi', sans-serif; fill: #bbbbbb; font-size: 10px; text-anchor: middle; transition: fill .3s; }
.connector { stroke: #444; stroke-width: 1.5; fill: none; transition: stroke .3s, filter .3s; }
.connector.lit { stroke: var(--cyan); stroke-width: 2; filter: drop-shadow(0 0 4px rgba(201,168,76,0.6)); }

.desc-box {
  position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  background: #1a1205; border: 1px solid #444;
  padding: 6px 14px; font-size: 10px; color: #bbb;
  pointer-events: none; opacity: 0;
  transition: opacity .2s, border-color .2s;
  white-space: nowrap; z-index: 10;
  display: flex; align-items: center; gap: 10px;
}
.desc-box.show { opacity: 1; border-color: var(--cyan); box-shadow: 0 0 10px rgba(201,168,76,0.15); }
.desc-name { font-family: var(--font-title); font-size: 10px; color: var(--cyan); font-weight: 700; letter-spacing: 1px; }
.desc-sep { color: #666; }

/* Bio */
.bio-content {
  padding: 16px 4px;
  display: flex; flex-direction: column; gap: 0;
  overflow-y: auto; scrollbar-width: none;
  font-size: 18px; color: var(--text-secondary); line-height: 1.85;
  font-family: var(--font-body);
}
.bio-content::-webkit-scrollbar { display: none; }
.bio-content p { margin-bottom: 12px; font-size: 18px; font-family: var(--font-body); color: var(--text-secondary); }
.bio-content strong { color: var(--text-primary); font-weight: 600; }

/* ============================================================
   JOURNAL
   ============================================================ */
#journal { background: transparent; }

.journal-body {
  display: grid; grid-template-columns: 40% 60%;
  border: 1px solid var(--border);
  border-radius: 16px;
  height: 70vh; overflow: hidden;
  background: #1a1409;
  box-shadow:
    inset 3px 3px 6px rgba(255,255,255,0.025),
    4px 4px 10px rgba(0,0,0,0.25);
}

.quests-list {
  border-right: 1px solid #444;
  overflow-y: auto; padding: 10px 0; scrollbar-width: none;
  position: relative;
  background: #211809;
}
.quests-list::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 1px;
  background: linear-gradient(180deg, transparent, #888 20%, #888 80%, transparent);
}
.quests-list::-webkit-scrollbar { display: none; }

.quest-item {
  padding: 12px 20px; cursor: pointer;
  border-left: 2px solid transparent;
  border-bottom: 1px solid #222;
  transition: all .2s;
}
.quest-item:last-child { border-bottom: none; }
.quest-item:hover { background: rgba(255,255,255,0.02); }
.quest-item.active { background: rgba(201,168,76,0.04); border-left-color: var(--cyan); }

.quest-type-badge {
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  padding: 2px 8px; border: 1px solid;
  display: inline-block; margin-bottom: 4px;
  font-family: var(--font-ui);
}
.quest-type-badge.formation { color: #b07adc; border-color: rgba(176,122,220,0.4); background: rgba(176,122,220,0.08); }
.quest-type-badge.stage { color: var(--gold); border-color: var(--gold-dim); background: rgba(201,168,76,0.08); }

.quest-name { margin-bottom: 3px; line-height: 1.3; }
.quest-item.active .quest-name, .quest-item.active .quest-name h5 { color: var(--cyan); }
.quest-bottom {
  display: flex; justify-content: space-between; align-items: center; margin-top: 4px;
}
.quest-dates { font-size: 10px; color: var(--text-muted); letter-spacing: 1px; }
.quest-status { font-size: 10px; letter-spacing: 1px; color: var(--text-muted); }
.quest-item.active .quest-status { color: var(--cyan); }

/* Quest detail parchment animation */
@keyframes fadeItem {
  0%   { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}

.quest-detail {
  padding: 20px 28px; overflow-y: auto; scrollbar-width: none;
  display: flex; flex-direction: column; gap: 14px;
  transition: opacity .25s ease;
}
.quest-detail.transitioning { opacity: 0; }
.quest-detail::-webkit-scrollbar { display: none; }

.quest-detail > * { animation: fadeItem .6s ease both; }
.quest-detail > *:nth-child(1) { animation-delay: .08s; }
.quest-detail > *:nth-child(2) { animation-delay: .2s; }
.quest-detail > *:nth-child(3) { animation-delay: .32s; }
.quest-detail > *:nth-child(4) { animation-delay: .44s; }
.quest-detail > *:nth-child(5) { animation-delay: .56s; }

.detail-techs-wrap { margin-top: auto; padding-top: 14px; }

.detail-top { display: flex; justify-content: space-between; align-items: flex-start; }
.detail-title { line-height: 1.2; }
.detail-badge {
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  padding: 2px 8px; border: 1px solid; flex-shrink: 0; margin-top: 4px;
  font-family: var(--font-ui);
}
.detail-badge.formation { color: #b07adc; border-color: rgba(176,122,220,0.4); background: rgba(176,122,220,0.1); }
.detail-badge.stage { color: var(--gold); border-color: var(--gold-dim); background: rgba(201,168,76,0.08); }

.detail-meta { display: flex; gap: 24px; }
.meta-item { display: flex; flex-direction: column; gap: 2px; }
.meta-key { font-size: 10px; letter-spacing: 2px; color: var(--text-muted); text-transform: uppercase; }
.meta-val { font-size: 16px; color: var(--text-secondary); font-weight: 500; }

.detail-hr { height: 1px; background: linear-gradient(90deg, var(--border-mid), transparent); }

.detail-desc-label { font-size: 10px; letter-spacing: 2px; color: var(--text-secondary); text-transform: uppercase; margin-bottom: 6px; font-weight: 600; }
.detail-desc { font-size: 18px; color: var(--text-secondary); line-height: 1.75; font-family: var(--font-body); }

.detail-techs { display: flex; flex-wrap: wrap; gap: 5px; }
.detail-tech {
  font-size: 10px; letter-spacing: 1px;
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(8px);
  border-radius: 4px;
  transition: all .2s;
  font-family: var(--font-ui);
}
.detail-tech:hover { border-color: var(--gold-dim); color: var(--gold); background: rgba(201,168,76,0.05); }

/* ============================================================
   PORTFOLIO — ACHIEVEMENTS
   ============================================================ */
#portfolio { background: transparent; }

.ach-list {
  background: transparent; border: none; padding: 8px 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* === FLIP CARD === */
.flip-wrap {
  perspective: 900px;
  cursor: pointer;
  height: 360px;
  max-width: 340px;
  width: 100%;
  margin: 0 auto;
}
.flip-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform .9s cubic-bezier(0.6,0.0,0.2,1.0);
}
@media (hover: hover) {
  .flip-wrap:hover .flip-inner { transform: rotateY(180deg); }
}

.flip-front, .flip-back {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 6px;
}

/* === FRONT — wood plaque === */
.flip-front {
  background: linear-gradient(160deg, #2e1e08, #1e1208 40%, #2a1a0a 70%, #1a0e04);
  border: 1px solid #5a3a18;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px; padding: 20px 16px;
  position: relative;
  box-shadow: 2px 4px 14px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.04);
}
.flip-front::before {
  content: ''; position: absolute; inset: 5px;
  border: 1px solid rgba(201,168,76,0.12);
  border-radius: 2px; pointer-events: none;
}

/* Nail */
.nail-wrap {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
}
.nail-head {
  width: 9px; height: 9px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #b09050, #5a3a10);
  box-shadow: 0 1px 3px rgba(0,0,0,0.7);
}
.nail-pin { width: 2px; height: 7px; background: #4a3010; }

.plaque-sub {
  font-family: var(--font-body);
  font-size: 10px; color: rgba(201,168,76,0.55);
  text-align: center; font-style: italic;
  margin-top: -3px;
  margin-bottom: 6px;
}

.plaque-symbol {
  font-family: var(--font-title);
  font-size: 30px; font-weight: 700;
  color: rgba(201,168,76,0.65);
  text-shadow: 0 0 12px rgba(201,168,76,0.5), 0 0 30px rgba(201,168,76,0.2);
  line-height: 1; transition: color .3s, text-shadow .3s;
}
.flip-wrap:hover .plaque-symbol {
  color: rgba(201,168,76,0.9);
  text-shadow: 0 0 16px rgba(201,168,76,0.7), 0 0 40px rgba(201,168,76,0.3);
}
.plaque-rule {
  width: 60%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.3), transparent);
}
.plaque-name {
  font-family: var(--font-title);
  font-size: 24px; font-weight: 600;
  color: var(--gold); text-align: center; line-height: 1.25;
  text-shadow: 0 1px 6px rgba(0,0,0,0.9);
  transition: color .3s;
}
.flip-wrap:hover .plaque-name { color: var(--gold-bright); }
.plaque-short {
  font-family: var(--font-body);
  font-size: 13px; color: rgba(201,168,76,0.82);
  text-align: center; font-style: italic; line-height: 1.4;
}
.plaque-techs { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; margin-top: 4px; }
.plaque-tech {
  font-size: 9px; letter-spacing: 1px; padding: 1px 6px;
  border: 1px solid rgba(201,168,76,0.25); color: rgba(201,168,76,0.55);
  background: rgba(201,168,76,0.04); font-family: var(--font-ui);
}

/* === BACK === */
.flip-back {
  transform: rotateY(180deg);
  background: linear-gradient(160deg, #1e1208, #150e06);
  border: 1px solid rgba(201,168,76,0.25);
  display: flex; flex-direction: column;
  justify-content: space-between;
  padding: 10px 12px;
  box-shadow: 2px 4px 14px rgba(0,0,0,0.7);
}
.back-img {
  width: 100%; aspect-ratio: 16/9;
  background: #0e0a04;
  border: 1px solid rgba(201,168,76,0.15);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-ui); font-size: 10px;
  color: rgba(201,168,76,0.3); letter-spacing: 2px; flex-shrink: 0;
  overflow: hidden;
}
.back-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.back-desc {
  font-family: var(--font-body);
  font-size: 16px; color: var(--text-muted); line-height: 1.5;
  font-style: italic;
  overflow: hidden;
  margin: auto 0;
  padding: 10px 0;
}
.back-techs { display: flex; flex-wrap: wrap; gap: 3px; }
.back-tech {
  font-size: 11px; letter-spacing: 1px; padding: 2px 8px;
  border: 1px solid rgba(201,168,76,0.35); color: rgba(201,168,76,0.75);
  background: rgba(201,168,76,0.06); font-family: var(--font-ui);
}
.back-link {
  font-family: var(--font-title);
  font-size: 13px; color: var(--gold);
  letter-spacing: 1px; text-align: right;
  text-decoration: none; transition: color .2s;
  display: block; width: 100%; background: none; border: none;
  padding: 0; cursor: pointer;
}
.desc-link {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s;
  cursor: pointer;
}
.desc-link:hover { color: var(--gold-bright); }
.flip-front-locked {
  background: linear-gradient(160deg, #1a1006, #110c04 40%, #160e05 70%, #0e0902) !important;
  border-color: #3a2810 !important;
  opacity: 0.5;
  cursor: default;
  position: absolute; inset: 0;
  height: 100%;
}
.flip-wrap-locked { cursor: default; pointer-events: none; height: 260px !important; }
.flip-wrap-locked .flip-inner { transform: none !important; transition: none !important; }
.nail-head-locked {
  background: radial-gradient(circle at 35% 35%, #6a5028, #3a2008) !important;
}
.plaque-symbol-locked {
  color: rgba(201,168,76,0.2) !important;
  text-shadow: none !important;
}
.plaque-name-locked {
  color: rgba(201,168,76,0.25) !important;
  font-style: italic;
  letter-spacing: 2px;
}

/* ============================================================
   CONTACT
   ============================================================ */
#contact {
  background: transparent;
  padding: 60px 48px;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
}

.contact-grid {
  width: 100%; max-width: 1100px;
  display: grid; grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  overflow: hidden;
  border-radius: 16px;
  background: radial-gradient(ellipse at 50% 50%, rgba(120,90,20,0.25) 0%, rgba(60,45,8,0.15) 50%, #1a1409 80%);
  box-shadow:
    inset 3px 3px 6px rgba(255,255,255,0.025),
    4px 4px 10px rgba(0,0,0,0.25);
}

.contact-left {
  padding: 40px 44px;
  display: flex; flex-direction: column; justify-content: center; gap: 20px;
  border-right: 1px solid #444; position: relative;
}
.contact-left::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 1px;
  background: linear-gradient(180deg, transparent, #888 20%, #888 80%, transparent);
}

.contact-title {
  font-family: var(--font-title);
  font-size: 32px; font-weight: 700;
  color: var(--text-primary); letter-spacing: 2px; line-height: 1.15;
}
.contact-desc { font-size: 18px; color: var(--text-secondary); line-height: 1.7; max-width: 340px; font-family: var(--font-body); }

.contact-divider {
  display: flex; align-items: center; gap: 8px;
}
.contact-divider::before, .contact-divider::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-mid) 50%, transparent);
}

.contact-links { display: flex; flex-direction: column; gap: 10px; }
.contact-link {
  display: flex; align-items: center; gap: 12px;
  font-size: 10px; color: var(--text-muted); transition: color .2s;
}
.contact-link:hover { color: var(--cyan); }
.link-icon {
  width: 28px; height: 28px;
  border: 1px solid var(--border-mid);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: var(--text-muted); transition: all .2s; flex-shrink: 0;
}
.contact-link:hover .link-icon { border-color: var(--cyan); color: var(--cyan); }

.contact-right {
  padding: 32px 40px;
  display: flex; flex-direction: column; justify-content: center; gap: 0;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1/-1; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 500; letter-spacing: 1px; color: var(--text-muted); text-transform: uppercase; font-family: var(--font-ui); }

.field input, .field textarea {
  width: 100%;
  background: var(--bg); border: 1px solid var(--border-mid);
  color: var(--text-primary);
  font-family: var(--font-body); font-size: 10px;
  padding: 10px 16px; outline: none; resize: none; display: block;
  border-radius: 8px;
  transition: border-color .2s, background .2s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); font-size: 10px; }
.field input:focus, .field textarea:focus {
  border-color: var(--cyan) !important;
  background: #1a1205 !important;
  outline: 2px solid rgba(201,168,76,0.2) !important;
}
.field textarea { height: 100px; }

.error { font-size: 10px; color: #cc3a48; letter-spacing: 1px; margin-top: 2px; display: none; }
.error.show { display: block; }

.form-footer { display: flex; justify-content: flex-end; margin-top: 14px; }

#submit-btn {
  background-color: transparent;
  color: var(--cyan);
  border: 1px solid var(--cyan);
  font-family: var(--font-title);
  font-size: 16px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
  padding: 10px 28px; cursor: pointer;
  border-radius: 30px;
  transition: background-color .3s, color .3s, box-shadow .3s;
}
#submit-btn:hover {
  background-color: var(--cyan);
  color: var(--bg);
  box-shadow: 0 0 16px rgba(201,168,76,0.2);
}

.success-msg {
  display: none; text-align: center; padding: 16px;
  border: 1px solid var(--cyan-dim); background: var(--cyan-glow);
  font-size: 16px; color: var(--cyan); letter-spacing: 1px;
}
.success-msg.show { display: block; }

/* ============================================================
   FOOTER
   ============================================================ */
#main-footer {
  background: linear-gradient(180deg, #1c1408 0%, #0e0b07 100%);
  border-top: 1px solid rgba(201,168,76,0.3);
  position: relative;
}

.footer-inner {
  padding: 36px 48px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}

/* Top ornamental line */
.footer-top {
  width: 100%; display: flex; align-items: center; gap: 12px;
  margin-bottom: 0;
}
.footer-top::before, .footer-top::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.35), transparent);
}
.footer-orn { font-size: 11px; color: rgba(201,168,76,0.4); letter-spacing: 4px; user-select: none; }

/* Seal */
.logo-placeholder {
  width: 72px; height: 72px; border-radius: 50%;
  border: 1px solid rgba(201,168,76,0.35);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-title); font-size: 19px; font-weight: 700;
  color: #f5edd8; letter-spacing: 2px; position: relative;
}
.logo-placeholder::before {
  content: ''; position: absolute; inset: 5px; border-radius: 50%;
  border: 1px solid rgba(201,168,76,0.15);
}
.logo-placeholder span { color: rgba(201,168,76,0.8); }
.seal-name {
  font-family: var(--font-title); font-size: 10px; letter-spacing: 4px;
  text-transform: uppercase; color: rgba(201,168,76,0.8);
}

/* Social */
.footer-social { display: flex; align-items: center; gap: 20px; }
.social-btn {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-title); font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  color: rgba(245,237,216,0.4); text-decoration: none; transition: color .2s;
}
.social-btn:hover { color: rgba(245,237,216,0.8); }
.social-icon {
  width: 24px; height: 24px; border: 1px solid rgba(201,168,76,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: rgba(201,168,76,0.5); transition: border-color .2s;
}
.social-btn:hover .social-icon { border-color: rgba(201,168,76,0.6); }
.footer-sep { color: rgba(201,168,76,0.25); font-size: 16px; }

/* Divider — keep for compatibility */
.footer-divider { display: none; }

.footer-bottom {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; border-top: 1px solid rgba(201,168,76,0.08);
}
.copyright { font-family: var(--font-title); font-size: 10px; color: rgba(245,237,216,0.7); letter-spacing: 1px; }
.privacy-link { font-family: var(--font-title); font-size: 10px; letter-spacing: 1px; color: rgba(245,237,216,0.7); cursor: pointer; transition: color .2s; }
.privacy-link:hover { color: #f5edd8; }

/* ============================================================
   PRIVACY MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.modal-overlay.show { opacity: 1; pointer-events: all; }

.modal-box {
  background: var(--bg-2); border: 1px solid var(--border-mid);
  width: 90%; max-width: 600px; max-height: 75vh;
  overflow-y: auto; padding: 36px; position: relative;
  border-radius: 30px;
  scrollbar-width: thin; scrollbar-color: var(--border-mid) transparent;
}
.modal-box::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan) 50%, transparent);
}
.modal-title {
  font-family: var(--font-title);
  font-size: 22px; font-weight: 700; color: var(--text-primary);
  letter-spacing: 2px; margin-bottom: 6px;
}
.modal-date { font-size: 10px; color: var(--text-faint); letter-spacing: 1px; margin-bottom: 22px; }
.modal-body { font-size: 16px; color: var(--text-muted); line-height: 1.85; }
.modal-body h3 {
  font-family: var(--font-title); font-size: 10px; color: var(--text-primary);
  letter-spacing: 1px; margin: 20px 0 6px; padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.modal-body p { margin-bottom: 8px; }
.modal-body a { color: var(--cyan); }
.modal-body a:hover { text-decoration: underline; }
.modal-body strong { color: var(--text-primary); }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; color: var(--text-faint);
  font-size: 18px; cursor: pointer; transition: color .2s;
}
.modal-close:hover { color: var(--text-primary); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  #main-header { padding: 0; }
  .header-spine { width: 36px; }
  .nav-link { padding: 0 12px; }
  section { padding: 60px 24px; }
  #about { padding: 24px; }
  .about-sheet { grid-template-columns: 220px 1fr; width: 100%; max-width: 100%; height: auto; min-height: 500px; }
  .medallion-wrap { max-height: 260px; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-left { border-right: none; border-bottom: 1px solid var(--border); }
  .ach-list { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .flip-wrap { max-width: 340px; height: 360px; }
}

@media (max-width: 768px) {
  #about { padding: 16px; }
  .about-sheet { grid-template-columns: 1fr; height: auto; min-height: auto; }
  .about-left { border-right: none; border-bottom: 1px solid var(--border-light); padding: 16px; }
  .medallion-wrap { flex: none; width: 180px; aspect-ratio: 3/4; margin: 0 auto; }
  .tabs h4 { font-size: 13px; letter-spacing: 0.5px; }
  .journal-body { grid-template-columns: 1fr; height: auto; }
  .quests-list { height: 200px; }
  .nav { display: none; }
  .burger-btn { display: flex; }
  .header-bookmarks { display: none; }
  .header-status { margin-left: auto; border-left: none; padding: 0 12px; }
  .footer-inner { padding: 24px; }
  .ach-list { grid-template-columns: 1fr; gap: 20px; }
  .flip-wrap { max-width: 340px; height: 360px; }
  .flip-wrap-locked { display: none; }
  .section-badge { display: none; }
  .contact-grid { width: 90%; margin: 0 auto; max-width: 100%; }
  #contact { padding: 40px 0; }
  .desc-box { white-space: normal; width: 90%; left: 5%; transform: none; text-align: center; }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.flip-wrap.flipped .flip-inner { transform: rotateY(180deg); }