/* ===== Sticky top nav ===== */
.topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 0.85rem 0;
  background: rgba(237, 232, 224, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  z-index: 10;
}

.version-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--sand);
  letter-spacing: 0.02em;
  margin-left: 0.25rem;
}

.nav-icon {
  color: var(--wood);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-icon:hover,
.nav-icon:focus-visible {
  color: var(--ink-deep);
  background: rgba(0,0,0,0.05);
}

.nav-icon:focus-visible {
  outline: 2px solid var(--wood);
  outline-offset: 2px;
}

/* ===== Typewriter effect ===== */
.typewriter.typing::after {
  content: '|';
  display: inline-block;
  margin-left: 1px;
  color: var(--wood);
  animation: blink 0.7s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .typewriter.typing::after {
    animation: none;
  }
}

/* ===== Fade-in on load ===== */
.fade-in {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.6s ease forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ===== Tokens ===== */
:root {
  --paper: #EDE8E0;
  --ink: #3A352F;
  --ink-deep: #1A1815;
  --wood: #8C6A4F;
  --sand: #B5A48E;

  --font-display: 'Fraunces', serif;
  --font-body: 'Archivo', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(8vh + 3rem) 1.5rem 4rem;
  line-height: 1.6;
}

/* subtle paper texture via layered radial noise — kept very quiet */
body {
  background-image:
    radial-gradient(circle at 20% 10%, rgba(0,0,0,0.015), transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(0,0,0,0.02), transparent 40%);
}

.page {
  max-width: 30rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ===== Intro ===== */
.intro {
  margin-bottom: 2.5rem;
}

.name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.25rem, 6vw, 3.25rem);
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem 0;
  color: var(--ink-deep);
}

.tagline {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--sand);
  margin: 0;
  letter-spacing: 0.02em;
}

/* ===== Photo — "kept polaroid" signature element ===== */
.photo-frame {
  margin: 0 0 2.5rem 0;
  padding: 0.6rem 0.6rem 1.1rem;
  background: #FBF9F5;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 6px 18px rgba(26,24,21,0.12), 0 1px 2px rgba(26,24,21,0.08);
  transform: rotate(-2deg);
  transition: transform 0.4s ease;
  width: 11rem;
}

.photo-frame:hover {
  transform: rotate(0deg);
}

.photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: sepia(8%) saturate(92%) contrast(98%);
}

/* ===== Blurb ===== */
.blurb {
  margin-bottom: 2.25rem;
}

.blurb p {
  font-size: 1.02rem;
  color: var(--ink);
  margin: 0 0 1rem 0;
}

.blurb p:last-child {
  margin-bottom: 0;
}

/* ===== Sign-off / links ===== */
.signoff {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.ig-link {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--wood);
  text-decoration: none;
  border-bottom: 1px solid rgba(140,106,79,0.35);
  padding-bottom: 0.2rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.ig-link:hover,
.ig-link:focus-visible {
  color: var(--ink-deep);
  border-color: var(--ink-deep);
}

.ig-link:focus-visible {
  outline: 2px solid var(--wood);
  outline-offset: 4px;
  border-radius: 2px;
}

.arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.ig-link:hover .arrow {
  transform: translateX(3px);
}

/* ===== Feedback form ===== */
.feedback {
  width: 100%;
  margin-top: 0.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.feedback-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--sand);
  margin: 0 0 1rem 0;
  letter-spacing: 0.01em;
}

.feedback-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.feedback-form textarea,
.feedback-form input[type="text"],
.feedback-form input[type="email"] {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink-deep);
  background: #FBF9F5;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 4px;
  padding: 0.65rem 0.75rem;
  resize: vertical;
}

.feedback-form textarea::placeholder,
.feedback-form input[type="text"]::placeholder,
.feedback-form input[type="email"]::placeholder {
  color: var(--sand);
}

.feedback-form textarea:focus,
.feedback-form input[type="text"]:focus,
.feedback-form input[type="email"]:focus {
  outline: none;
  border-color: var(--wood);
}

.feedback-form button {
  align-self: center;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--paper);
  background: var(--ink-deep);
  border: none;
  border-radius: 4px;
  padding: 0.6rem 1.6rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.feedback-form button:hover {
  background: var(--wood);
}

.feedback-form button:focus-visible {
  outline: 2px solid var(--wood);
  outline-offset: 3px;
}

.feedback-note {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--sand);
  margin: 0.85rem 0 0 0;
}

/* ===== Footer credit ===== */
.credit {
  margin-top: 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--sand);
  letter-spacing: 0.02em;
}

/* ===== Motion preference ===== */
@media (prefers-reduced-motion: reduce) {
  .photo-frame,
  .ig-link,
  .arrow {
    transition: none;
  }
}

/* ===== Mobile ===== */
@media (max-width: 420px) {
  body {
    padding-top: calc(12vh + 3rem);
  }

  .photo-frame {
    width: 9.5rem;
  }
}
