/* ── Reset & Base ─────────────────────────────────────────────────────────── */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  background: #ffffff;
  color: #111111;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

/* ── Typography ───────────────────────────────────────────────────────────── */

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }

p {
  line-height: 1.7;
  font-size: 0.95rem;
}

/* ── Layout ───────────────────────────────────────────────────────────────── */

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header / Nav ─────────────────────────────────────────────────────────── */

header {
  border-bottom: 1px solid #111;
  padding: 16px 0;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 100;
  overflow: hidden;
}

header .container {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  background: #fff;
  border: 1px solid rgba(17,17,17,0.2);
  border-radius: 25%;
  padding: 6px 14px;
}

.logo-name {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
}

.logo-sub {
  font-size: 0.72rem;
  font-weight: 300;
  color: #555;
  letter-spacing: 0.01em;
}

.profile-img {
  width: 70px;
  height: 70px;
  border-radius: 25%;
  object-fit: cover;
  border: 1px solid #111;
  flex-shrink: 0;
}

.profile-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #111;
  flex-shrink: 0;
  background: #eee;
}

.profile-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.social-icons {
  display: flex;
  flex-direction: row !important;
  gap: 6px;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
  transition: opacity 0.15s;
  line-height: 1;
  flex-shrink: 0;
}

.social-icons a:hover {
  opacity: 0.4;
  text-decoration: none;
}

.social-icons svg {
  width: 15px;
  height: 15px;
  display: block;
}

nav {
  display: flex;
  gap: 28px;
  align-items: center;
  background: #fff;
  border: 1px solid rgba(17,17,17,0.2);
  border-radius: 25%;
  padding: 6px 20px;
}

nav a {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 400;
  color: #555;
  transition: color 0.15s;
  letter-spacing: 0.01em;
}

nav a:hover {
  color: #111;
  text-decoration: none;
}

nav a.active {
  font-weight: 700;
  color: #111;
}

/* ── Main content area ────────────────────────────────────────────────────── */

main {
  flex: 1;
  padding: 52px 0 80px;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  padding: 10px 24px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1.5px solid #111;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  letter-spacing: 0.02em;
  background: #fff;
  color: #111;
}

.btn:hover {
  background: #111;
  color: #fff;
  text-decoration: none;
}

.btn-fill {
  background: #111;
  color: #fff;
}

.btn-fill:hover {
  background: #333;
}

/* ── Tree decorations ─────────────────────────────────────────────────────── */

.tree-left,
.tree-right {
  position: fixed;
  top: 0;
  bottom: 80px;
  width: 280px;
  pointer-events: none;
  z-index: 0;
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: contain;
  opacity: 0.45;
}

.tree-left {
  left: -40px;
  background-image: url('../images/tree2.png');
}

.tree-right {
  right: -40px;
  background-image: url('../images/tree1.png');
}

@media (max-width: 1200px) {
  .tree-left, .tree-right { opacity: 0.30; width: 200px; }
}

@media (max-width: 900px) {
  .tree-left, .tree-right { display: none; }
}

/* ── Floating rocks ───────────────────────────────────────────────────────── */

@keyframes floatA {
  0%   { transform: translateY(0px) rotate(0deg); }
  33%  { transform: translateY(-10px) rotate(1.5deg); }
  66%  { transform: translateY(4px) rotate(-1deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes floatB {
  0%   { transform: translateY(0px) rotate(0deg); }
  40%  { transform: translateY(-14px) rotate(-2deg); }
  70%  { transform: translateY(6px) rotate(1.2deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes floatC {
  0%   { transform: translateY(0px) rotate(0deg); }
  25%  { transform: translateY(-8px) rotate(2.5deg); }
  75%  { transform: translateY(10px) rotate(-1.5deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes floatD {
  0%   { transform: translateY(0px) rotate(0deg); }
  50%  { transform: translateY(-18px) rotate(-3deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes floatE {
  0%   { transform: translateY(0px) rotate(0deg); }
  30%  { transform: translateY(8px) rotate(1deg); }
  65%  { transform: translateY(-12px) rotate(-2.5deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

.rock {
  position: absolute;
  pointer-events: none;
  opacity: 0.88;
  z-index: 0;
}

.rock img {
  display: block;
  width: 100%;
  height: auto;
}

/* ── Easter egg — Are You Sure modal ─────────────────────────────────────── */

#areYouSureModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  align-items: flex-start;
  justify-content: center;
  padding-top: 72px;
  pointer-events: none;
}

#areYouSureBox {
  background: #111;
  color: #fff;
  padding: 20px 28px;
  border-radius: 4px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
  pointer-events: all;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  animation: popIn 0.18s ease;
  max-width: 260px;
  text-align: center;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.88) translateY(-8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

#areYouSureText {
  margin-bottom: 16px;
  line-height: 1.5;
}

#areYouSureBtns {
  display: flex;
  gap: 10px;
  justify-content: center;
}

#areYouSureBtns button {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  padding: 6px 20px;
  border: 1.5px solid #fff;
  background: none;
  color: #fff;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.15s, color 0.15s;
}

#areYouSureBtns button:last-child {
  background: #fff;
  color: #111;
}

#areYouSureBtns button:hover {
  background: #fff;
  color: #111;
}

/* ── Game canvas + fade ───────────────────────────────────────────────────── */

#gameCanvas {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: block;
}

#gameFade {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 450;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */

footer {
  border-top: 1px solid #111;
  padding: 20px 0;
  background: #fff;
  position: relative;
  z-index: 1;
}

footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

footer p {
  font-size: 0.75rem;
  color: #888;
}

/* ── Contact Modal ────────────────────────────────────────────────────────── */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: #fff;
  border: 1.5px solid #111;
  padding: 36px;
  width: 100%;
  max-width: 480px;
  margin: 24px;
}

.modal h2 {
  margin-bottom: 24px;
  font-size: 1.2rem;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: #111;
  line-height: 1;
}

.modal form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #555;
}

.form-group input,
.form-group textarea {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  border: 1px solid #ccc;
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.15s;
  background: #fff;
  color: #111;
  border-radius: 1px;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #111;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

/* ── Tablet ── */
@media (max-width: 768px) {

  /* Header — stack logo | profile | nav vertically, center everything */
  header {
    padding: 12px 0;
  }

  header .container {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 0 16px;
  }

  .logo {
    order: 1;
    padding: 4px 12px;
    border-radius: 12px;
    text-align: center;
    align-items: center;
  }

  .logo-name { font-size: 1.1rem; }
  .logo-sub  { font-size: 0.65rem; }

  .profile-wrap {
    order: 2;
    flex-direction: row;
    gap: 10px;
    align-items: center;
  }

  .profile-img {
    width: 44px;
    height: 44px;
  }

  .social-icons svg {
    width: 12px;
    height: 12px;
  }

  nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 20px;
    padding: 5px 16px;
    border-radius: 12px;
  }

  nav a { font-size: 0.9rem; }

  main { padding: 32px 0 52px; }
}

/* ── Mobile ── */
@media (max-width: 480px) {

  .logo-name { font-size: 1rem; }

  .profile-img {
    width: 38px;
    height: 38px;
  }

  nav { gap: 14px; }
  nav a { font-size: 0.82rem; }
}

/* ── Rocks — hide on mobile, reduce on tablet ── */
@media (max-width: 900px) {
  .rock { display: none; }
}

/* ── Trees — already handled at 900px in tree rules above ── */

/* ── Feed grid ── */
@media (max-width: 700px) {
  .feed { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

@media (max-width: 420px) {
  .feed { grid-template-columns: 1fr; gap: 14px; }
}
