/* ==============================================
   chrismakarsky.com — Retro-Game + Naturalist
   ============================================== */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&family=Inter:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');

/* ── Variables ─────────────────────────────── */
:root {
  --forest-deep:    #080f08;
  --forest-mid:     #111c11;
  --forest-card:    #172017;
  --forest-border:  #243624;

  --parchment:      #f7f0e3;
  --parchment-mid:  #eddfc5;
  --parchment-dark: #d9c9a8;
  --cream:          #fdf9f3;

  --leaf:    #6abf45;
  --moss:    #4a8040;
  --gold:    #d4a827;
  --sky:     #68b4d4;
  --bark:    #7a5230;

  --text-light:       #ddecd4;
  --text-muted-light: #6a9460;
  --text-dark:        #1a130a;
  --text-muted-dark:  #7a6a50;

  --font-px:   'Press Start 2P', monospace;
  --font-vt:   'VT323', monospace;
  --font-body: 'Inter', sans-serif;

  --ease: 0.2s ease;
  --shadow-px: 5px 5px 0 rgba(0,0,0,0.45);
}

/* ── Reset ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-body); background: var(--parchment); color: var(--text-dark); overflow-x: hidden; }
img  { display: block; max-width: 100%; }
a    { color: inherit; text-decoration: none; }
em   { font-style: italic; }

/* ── Container ─────────────────────────────── */
.container {
  max-width: 1020px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ── Nav ────────────────────────────────────── */
.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 56px;
  background: rgba(8, 15, 8, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--forest-border);
  transition: border-color var(--ease);
}

.site-nav.scrolled { border-bottom-color: var(--moss); }

.nav-logo {
  font-family: var(--font-px);
  font-size: 0.7rem;
  color: var(--leaf);
  letter-spacing: 3px;
  transition: color var(--ease);
}
.nav-logo:hover { color: #fff; }

.nav-links {
  list-style: none;
  display: flex;
  gap: 28px;
}

.nav-links a {
  font-family: var(--font-px);
  font-size: 0.45rem;
  color: var(--text-muted-light);
  letter-spacing: 1px;
  transition: color var(--ease);
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover,
.nav-links a.active { color: var(--leaf); border-bottom-color: var(--leaf); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--leaf);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

/* ── Hero ───────────────────────────────────── */
#hero {
  min-height: 100vh;
  background: var(--forest-deep);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 32px 64px;
  position: relative;
  overflow: hidden;
}

.hero-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(74,128,64,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74,128,64,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* radial glow behind the photo */
#hero::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 30%;
  transform: translate(-50%, -50%);
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(106,191,69,0.07) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 72px;
  max-width: 960px;
  width: 100%;
}

/* Photo frame */
.hero-frame-wrap { flex-shrink: 0; }

.hero-frame {
  position: relative;
  display: inline-block;
}

.hero-photo {
  width: 280px;
  height: 280px;
  object-fit: cover;
  object-position: 25% 2%;
  border: 3px solid var(--leaf);
  box-shadow:
    0 0 0 6px var(--forest-deep),
    0 0 0 9px var(--moss),
    10px 10px 0 var(--forest-mid);
}

/* pixel corner brackets */
.frame-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 3px solid var(--gold);
}
.frame-corner.tl { top: -9px;  left: -9px;  border-right: none; border-bottom: none; }
.frame-corner.tr { top: -9px;  right: -9px; border-left:  none; border-bottom: none; }
.frame-corner.bl { bottom: -9px; left: -9px;  border-right: none; border-top:    none; }
.frame-corner.br { bottom: -9px; right: -9px; border-left:  none; border-top:    none; }

/* Hero text */
.hero-text { flex: 1; min-width: 0; }

.hero-eyebrow {
  font-family: var(--font-px);
  font-size: 0.5rem;
  color: var(--moss);
  letter-spacing: 4px;
  margin-bottom: 18px;
}

.hero-name {
  font-family: var(--font-px);
  font-size: clamp(1.5rem, 3.8vw, 2.6rem);
  color: var(--text-light);
  line-height: 1.45;
  margin-bottom: 18px;
  text-shadow: 4px 4px 0 rgba(0,0,0,0.6);
}

.hero-class {
  font-family: var(--font-vt);
  font-size: 1.35rem;
  color: var(--gold);
  letter-spacing: 2px;
  margin-bottom: 14px;
}

.hero-location {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted-light);
  margin-bottom: 32px;
  font-family: var(--font-body);
}

.location-pin {
  color: var(--leaf);
  font-size: 1rem;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.btn-pixel {
  display: inline-block;
  font-family: var(--font-px);
  font-size: 0.5rem;
  letter-spacing: 1px;
  padding: 12px 20px;
  background: var(--leaf);
  color: var(--forest-deep);
  border: 2px solid var(--leaf);
  cursor: pointer;
  transition: all var(--ease);
  line-height: 1;
}
.btn-pixel:hover {
  background: #fff;
  border-color: #fff;
  box-shadow: var(--shadow-px);
  transform: translate(-2px, -2px);
}

.btn-pixel.btn-outline {
  background: transparent;
  color: var(--leaf);
}
.btn-pixel.btn-outline:hover {
  background: var(--leaf);
  color: var(--forest-deep);
}

.hero-socials {
  font-size: 0.8rem;
  color: var(--text-muted-light);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.hero-socials a { transition: color var(--ease); }
.hero-socials a:hover { color: var(--leaf); }
.hero-socials .divider { opacity: 0.4; }

.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-px);
  font-size: 0.6rem;
  color: var(--text-muted-light);
  letter-spacing: 3px;
  animation: blink 1.8s step-end infinite;
  z-index: 1;
}

@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0; } }

/* ── Section Shared ─────────────────────────── */
section { padding: 88px 0; }

.section-header { text-align: center; margin-bottom: 56px; }

.section-eyebrow {
  display: block;
  font-family: var(--font-px);
  font-size: 0.45rem;
  letter-spacing: 5px;
  color: var(--moss);
  margin-bottom: 14px;
}

.section-header h2 {
  font-family: var(--font-px);
  font-size: clamp(1rem, 2.8vw, 1.7rem);
  line-height: 1.5;
  color: var(--text-dark);
}

.section-header.light .section-eyebrow { color: var(--leaf); }
.section-header.light h2 { color: var(--text-light); }

.section-sub {
  margin-top: 12px;
  font-size: 0.95rem;
  color: var(--text-muted-dark);
}

/* Section backgrounds */
.section-parchment { background: var(--parchment); }
.section-dark      { background: var(--forest-mid); }
.section-forest    { background: var(--forest-deep); }

/* ── About ──────────────────────────────────── */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 64px;
  align-items: start;
}

.about-text p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-dark);
  margin-bottom: 18px;
}
.about-text p:last-child { margin-bottom: 0; }

.about-text strong { color: var(--bark); font-weight: 600; }

.about-tagline {
  font-family: var(--font-vt);
  font-size: 1.3rem !important;
  color: var(--text-muted-dark) !important;
  border-left: 3px solid var(--parchment-dark);
  padding-left: 16px;
}

.polaroid {
  background: #fff;
  padding: 12px 12px 44px;
  border: 1px solid #ddd;
  box-shadow: 5px 5px 0 var(--parchment-dark);
}
.polaroid.tilt-right  { transform: rotate(2.5deg); }
.polaroid.tilt-left   { transform: rotate(-2.5deg); }

.polaroid img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top;
}

.polaroid-caption {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.75rem;
  color: var(--text-muted-dark);
  text-align: center;
  margin-top: 10px;
}

/* ── Quest Log ──────────────────────────────── */
.quest-log {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.quest-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 24px;
  position: relative;
}

.quest-marker { display: flex; flex-direction: column; align-items: center; }

.quest-dot {
  width: 14px;
  height: 14px;
  background: var(--forest-border);
  border: 2px solid var(--moss);
  flex-shrink: 0;
  margin-top: 20px;
}
.quest-dot.active-dot {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(212,168,39,0.6);
}

.quest-line {
  flex: 1;
  width: 2px;
  background: linear-gradient(to bottom, var(--forest-border), transparent);
  margin-top: 6px;
  min-height: 32px;
}

.quest-card {
  padding: 20px 24px 32px;
  border: 2px solid var(--forest-border);
  margin-bottom: 16px;
  transition: border-color var(--ease);
}
.quest-item.active .quest-card { border-color: var(--moss); background: rgba(106,191,69,0.04); }

.quest-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.quest-status {
  font-family: var(--font-px);
  font-size: 0.38rem;
  letter-spacing: 1px;
  padding: 5px 8px;
  border: 1px solid;
}
.quest-item.active  .quest-status { color: var(--gold);             border-color: var(--gold); }
.quest-item:not(.active) .quest-status { color: var(--text-muted-light); border-color: var(--forest-border); }

.quest-date {
  font-size: 0.75rem;
  color: var(--text-muted-light);
}

.quest-card h3 {
  font-family: var(--font-px);
  font-size: 0.7rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 6px;
}

.quest-org {
  font-family: var(--font-vt);
  font-size: 1.25rem;
  color: var(--sky);
  margin-bottom: 12px;
}

.quest-desc {
  font-size: 0.9rem;
  line-height: 1.75;
  color: rgba(221,236,212,0.75);
}

/* ── The Pack ───────────────────────────────── */
.pack-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 860px;
  margin: 0 auto;
}

.char-card {
  border: 3px solid var(--bark);
  background: var(--cream);
  box-shadow: 7px 7px 0 var(--parchment-dark);
  overflow: hidden;
}

.char-photo-wrap {
  position: relative;
  overflow: hidden;
}

.char-photo {
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: center 35%;
  display: block;
  transition: transform 0.4s ease;
}
.char-card:hover .char-photo { transform: scale(1.03); }

.char-level {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--font-px);
  font-size: 0.42rem;
  background: var(--forest-deep);
  color: var(--gold);
  border: 2px solid var(--gold);
  padding: 4px 8px;
}

.char-info { padding: 22px 22px 24px; }

.char-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 6px;
}

.char-name {
  font-family: var(--font-px);
  font-size: 0.85rem;
  color: var(--text-dark);
}

.char-class {
  font-family: var(--font-vt);
  font-size: 1.1rem;
  color: var(--moss);
}

.char-species {
  font-size: 0.72rem;
  color: var(--text-muted-dark);
  margin-bottom: 18px;
  letter-spacing: 0.3px;
}

/* Stat bars */
.stats { display: flex; flex-direction: column; gap: 9px; margin-bottom: 18px; }

.stat-row { display: flex; align-items: center; gap: 10px; }

.stat-label {
  font-family: var(--font-px);
  font-size: 0.38rem;
  color: var(--text-muted-dark);
  width: 26px;
  flex-shrink: 0;
}

.stat-bar {
  flex: 1;
  height: 8px;
  background: var(--parchment-mid);
  border: 1px solid var(--parchment-dark);
  overflow: hidden;
}

.stat-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(to right, var(--moss), var(--leaf));
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.stat-val {
  font-family: var(--font-vt);
  font-size: 1rem;
  color: var(--text-muted-dark);
  width: 24px;
  text-align: right;
  flex-shrink: 0;
}

.potato-photo { object-position: left 20%; }

.char-bio {
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-muted-dark);
  font-style: italic;
  border-top: 1px solid var(--parchment-dark);
  padding-top: 14px;
}

/* ── Skills ─────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  max-width: 1020px;
  margin: 0 auto;
}

.skill-card {
  background: var(--forest-card);
  border: 2px solid var(--forest-border);
  padding: 26px 20px;
  transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease);
}
.skill-card:hover {
  border-color: var(--leaf);
  transform: translate(-3px, -3px);
  box-shadow: 5px 5px 0 var(--forest-border);
}

.skill-icon { font-size: 2rem; margin-bottom: 14px; }

.skill-card h3 {
  font-family: var(--font-px);
  font-size: 0.52rem;
  color: var(--text-light);
  margin-bottom: 10px;
  line-height: 1.6;
}

.skill-card p {
  font-size: 0.82rem;
  line-height: 1.75;
  color: var(--text-muted-light);
}

/* ── Contact ────────────────────────────────── */
.contact-wrap {
  max-width: 540px;
  margin: 0 auto;
  text-align: center;
}

.contact-intro {
  font-size: 1rem;
  color: rgba(221,236,212,0.75);
  line-height: 1.7;
  margin-bottom: 36px;
}

.contact-links { display: flex; flex-direction: column; gap: 12px; }

.contact-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 2px solid var(--forest-border);
  color: var(--text-light);
  font-size: 0.9rem;
  transition: all var(--ease);
}
.contact-row:hover {
  border-color: var(--leaf);
  background: rgba(106,191,69,0.06);
  transform: translateX(6px);
}

.contact-icon-wrap {
  font-family: var(--font-px);
  font-size: 0.5rem;
  color: var(--leaf);
  width: 28px;
  flex-shrink: 0;
  text-align: center;
}

.contact-arrow { margin-left: auto; color: var(--text-muted-light); transition: color var(--ease); }
.contact-row:hover .contact-arrow { color: var(--leaf); }

/* ── Footer ─────────────────────────────────── */
footer {
  background: var(--forest-deep);
  border-top: 2px solid var(--forest-border);
  padding: 36px 32px;
  text-align: center;
}

.footer-name {
  font-family: var(--font-px);
  font-size: 0.42rem;
  color: var(--text-muted-light);
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.footer-sub {
  font-size: 0.78rem;
  color: rgba(106,148,96,0.5);
}

/* ── Scroll-in animations ───────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* stagger siblings */
.skills-grid .fade-in:nth-child(2) { transition-delay: 0.06s; }
.skills-grid .fade-in:nth-child(3) { transition-delay: 0.12s; }
.skills-grid .fade-in:nth-child(4) { transition-delay: 0.18s; }
.skills-grid .fade-in:nth-child(5) { transition-delay: 0.06s; }
.skills-grid .fade-in:nth-child(6) { transition-delay: 0.12s; }
.skills-grid .fade-in:nth-child(7) { transition-delay: 0.18s; }
.skills-grid .fade-in:nth-child(8) { transition-delay: 0.24s; }

.pack-grid .fade-in:nth-child(2) { transition-delay: 0.12s; }

/* ── Responsive ─────────────────────────────── */
@media (max-width: 900px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero-inner {
    flex-direction: column;
    gap: 44px;
    text-align: center;
  }
  .hero-location,
  .hero-cta,
  .hero-socials { justify-content: center; }

  .about-layout { grid-template-columns: 1fr; }
  .about-photos { display: flex; justify-content: center; }
  .polaroid { max-width: 240px; transform: none !important; }

  .pack-grid { grid-template-columns: 1fr; max-width: 440px; }

  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0; right: 0;
    background: rgba(8,15,8,0.97);
    padding: 20px 32px;
    gap: 18px;
    border-bottom: 2px solid var(--forest-border);
  }
  .nav-toggle { display: block; }
}

@media (max-width: 520px) {
  .container { padding: 0 20px; }
  section { padding: 64px 0; }
  .skills-grid { grid-template-columns: 1fr; }
  .hero-photo { width: 220px; height: 220px; }
  .quest-header { flex-direction: column; align-items: flex-start; }
}
