@import url('https://api.fontshare.com/v2/css?f[]=satoshi@400,500,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;1,400&display=swap');

:root {
  --bg: #F8F7F3;
  --text: #2D2B28;
  --accent: #C2602A;
  --accent-hover: #A84E20;
  --accent-light: rgba(194, 96, 42, 0.08);
  --secondary: #6B6963;
  --muted: #E5E2DC;
  --card: #FFFFFF;
  --green: #3A7D44;
  --font-display: 'Satoshi', system-ui, -apple-system, sans-serif;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --max-width: 800px;
  --nav-width: 1080px;
  --page-padding: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 12px;
  --radius-sm: 8px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 1.05rem;
  min-height: 100vh;
  position: relative;
  overflow-x: clip;
}

/* Paper grain texture — very subtle */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }

/* Text selection — warm terracotta highlight */
::selection {
  background: rgba(194, 96, 42, 0.15);
  color: var(--text);
}

::-moz-selection {
  background: rgba(194, 96, 42, 0.15);
  color: var(--text);
}

/* === CUSTOM CURSOR (desktop only) === */
.cursor-dot {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 10000;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease, transform 0.15s var(--ease);
  mix-blend-mode: multiply;
}

.cursor-dot.visible { opacity: 0.6; }
.cursor-dot.hovering { transform: translate(-50%, -50%) scale(2.5); opacity: 0.35; }

@media (pointer: coarse) {
  .cursor-dot { display: none; }
}

/* === LAYOUT === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--page-padding);
  padding-right: var(--page-padding);
}

/* === TYPOGRAPHY === */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text);
}

h1 { font-size: clamp(2.75rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.15rem; }

p { color: var(--secondary); }

/* === NAV === */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem var(--page-padding);
  max-width: var(--nav-width);
  margin: 0 auto;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 247, 243, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text);
}

.nav__logo .dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Crunch easter egg */
.logo-crunch {
  transition: letter-spacing 0.3s var(--ease);
  display: inline-block;
}

.logo-crunch:hover {
  letter-spacing: -0.08em;
}

.nav__link {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--secondary);
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.nav__link:hover { color: var(--accent); }

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

.nav__link:hover .nav__arrow { transform: translateX(2px); }

/* === HERO === */
.hero {
  padding-top: clamp(2.5rem, 6vw, 5rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

/* Left-aligned variant (newsletter) — centered on page but text flows left */
.hero--left {
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero--left .hero__title,
.hero--left .hero__subtitle,
.hero--left .email-form,
.hero--left .hero__label,
.hero--left .hero__note {
  width: 100%;
  max-width: 580px;
}

/* Centered variant (portfolio) */
.hero--center {
  text-align: center;
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.hero--center p { margin-left: auto; margin-right: auto; }

.hero__label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 1.25rem;
  display: inline-block;
}

.hero__title {
  margin-bottom: 1.5rem;
  max-width: 600px;
}

.hero--center .hero__title {
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

.hero__subtitle {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--secondary);
  max-width: 480px;
  margin-bottom: 2.5rem;
}

/* === EMAIL FORM === */
.email-form {
  display: flex;
  gap: 0.5rem;
  max-width: 420px;
}

.hero--center .email-form {
  margin-left: auto;
  margin-right: auto;
}

.email-form__input {
  flex: 1;
  padding: 0.85rem 1.15rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--card);
  border: 1.5px solid var(--muted);
  border-radius: var(--radius-sm);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.email-form__input::placeholder { color: #B0ADA6; }

.email-form__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.email-form__btn {
  padding: 0.85rem 1.6rem;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  background: var(--accent);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}

.email-form__btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.email-form__btn:active { transform: translateY(0); }

.hero__note {
  margin-top: 0.85rem;
  font-size: 0.78rem;
  color: #B0ADA6;
}

/* === DIVIDER === */
.divider {
  width: 6px;
  height: 6px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.25;
  margin: 0 auto;
}

/* === SECTIONS === */
.section {
  padding-top: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

/* Asymmetric spacing — some sections breathe more */
.section--spacious {
  padding-top: clamp(3rem, 6vw, 5rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.section__label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section__title {
  margin-bottom: 2.5rem;
}

/* === STACKED FEATURE BLOCKS (anti-grid) === */
.stacked-blocks {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  max-width: 520px;
}

.block {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.block__number {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 28px;
  padding-top: 0.15rem;
  opacity: 0.6;
}

.block__content { flex: 1; }

.block__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.block__desc {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--secondary);
}

/* === ABOUT === */
.about__text {
  max-width: 580px;
}

.about__text p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--secondary);
  margin-bottom: 1rem;
}

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

.about__highlight {
  color: var(--text);
  font-weight: 500;
}

.about__link {
  color: var(--accent);
  font-weight: 500;
  border-bottom: 1px solid var(--accent-light);
  transition: border-color 0.2s ease;
  white-space: nowrap;
}

.about__link:hover {
  border-color: var(--accent);
}

/* === STATS === */
.stats {
  display: flex;
  gap: 1rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.stat {
  flex: 1;
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--card);
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(45, 43, 40, 0.05);
}

.stat__number {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.stat__label {
  display: block;
  font-size: 0.72rem;
  color: var(--secondary);
  margin-top: 0.3rem;
  letter-spacing: 0.02em;
}

/* === PROJECT CARDS === */
.projects { display: flex; flex-direction: column; gap: 1.5rem; }

.project-card {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--card);
  border: 1px solid var(--muted);
  border-left: 2.5px solid transparent;
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(45, 43, 40, 0.06);
  border-color: #D5D2CC;
  border-left-color: var(--accent);
}

.project-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.project-card__name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.project-card__status {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  background: rgba(58, 125, 68, 0.08);
  color: var(--green);
  border: 1px solid rgba(58, 125, 68, 0.15);
}

.project-card__status--active {
  background: var(--accent-light);
  color: var(--accent);
  border-color: rgba(194, 96, 42, 0.2);
}

.project-card__tagline {
  font-size: 1.05rem;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.project-card__story {
  font-size: 0.95rem;
  color: var(--secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  max-width: 55ch;
}

.project-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.project-card__tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.tag {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.25rem 0.6rem;
  background: var(--bg);
  border: 1px solid var(--muted);
  border-radius: 100px;
  color: var(--secondary);
}

.project-card__link {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: gap 0.2s ease;
}

.project-card__link:hover { gap: 0.45rem; }

/* === CTA SECTION === */
.cta {
  text-align: center;
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
  background: rgba(194, 96, 42, 0.03);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.cta__title { margin-bottom: 1rem; }
.cta__title .accent { color: var(--accent); }

.cta__subtitle {
  margin: 0 auto 2.25rem;
  max-width: 420px;
  font-size: 1rem;
  line-height: 1.7;
}

.cta .email-form {
  margin-left: auto;
  margin-right: auto;
}

/* === FOOTER === */
.footer {
  padding-top: 2.5rem;
  padding-bottom: 3rem;
  border-top: 1px solid var(--muted);
  margin-top: 1rem;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer__copy {
  font-size: 0.78rem;
  color: #B0ADA6;
}

.footer__year {
  cursor: pointer;
  transition: color 0.2s ease;
}

.footer__year:hover { color: var(--accent); }

.footer__links { display: flex; gap: 1.25rem; }

.footer__link {
  font-size: 0.82rem;
  color: var(--secondary);
  transition: color 0.2s ease;
}

.footer__link:hover { color: var(--accent); }

/* === HIDDEN SCROLL MESSAGE === */
.scroll-secret {
  text-align: center;
  padding: 3rem 0;
  font-size: 0.78rem;
  color: transparent;
  transition: color 0.6s ease;
  user-select: none;
}

.scroll-secret.visible {
  color: #C8C5BE;
}

/* === EASTER EGG TOOLTIP === */
.easter-period {
  position: relative;
  cursor: default;
}

.easter-period::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-style: italic;
  color: var(--secondary);
  background: var(--card);
  border: 1px solid var(--muted);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.easter-period:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* === SCROLL REVEAL === */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.45s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-d1 { transition-delay: 0.06s; }
.reveal-d2 { transition-delay: 0.12s; }
.reveal-d3 { transition-delay: 0.18s; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  :root {
    --page-padding: 1.5rem;
  }

  .hero__subtitle { max-width: 100%; }
  .email-form { max-width: 100%; }
}

@media (max-width: 600px) {
  :root {
    --page-padding: 1.25rem;
  }

  /* Tighter nav on mobile */
  .nav {
    padding: 0.75rem var(--page-padding);
    font-size: 0.9rem;
  }

  /* Smaller h1 on mobile — saves vertical space */
  h1 { font-size: clamp(1.65rem, 6vw, 2rem); }

  /* Tighter hero spacing */
  .hero {
    padding-top: clamp(1.5rem, 4vw, 2.5rem);
    padding-bottom: clamp(1.5rem, 3vw, 2rem);
  }

  .hero__label { margin-bottom: 0.75rem; }
  .hero__title { margin-bottom: 1rem; }
  .hero__subtitle { margin-bottom: 1.5rem; }

  /* Tighter section spacing */
  .section {
    padding-top: clamp(2rem, 4vw, 3rem);
    padding-bottom: clamp(2rem, 4vw, 3rem);
  }

  .section--spacious {
    padding-top: clamp(2.5rem, 5vw, 3.5rem);
    padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
  }

  .section__title { margin-bottom: 1.75rem; }

  /* Stacked email form with bigger touch targets */
  .email-form { flex-direction: column; }
  .email-form__input { padding: 1rem 1.15rem; font-size: 1rem; }
  .email-form__btn {
    width: 100%;
    text-align: center;
    padding: 1rem 1.6rem;
    font-size: 0.95rem;
  }

  /* Stats stack */
  .stats { flex-direction: column; gap: 0.75rem; }
  .stat { padding: 1.25rem; }

  /* Blocks stack vertically */
  .block { flex-direction: column; gap: 0.5rem; }
  .block__number { min-width: auto; }
  .stacked-blocks { gap: 1.75rem; }

  /* Card footer stacks */
  .project-card__footer { flex-direction: column; align-items: flex-start; }
  .project-card { padding: 1.25rem; }

  /* Footer stacks */
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .footer { padding-top: 1.5rem; padding-bottom: 2rem; }

  /* Max-width overrides for mobile */
  .hero--left .hero__title,
  .hero--left .hero__subtitle,
  .hero--left .email-form,
  .hero--left .hero__label,
  .hero--left .hero__note {
    max-width: 100%;
  }

  .hero--center .hero__title { max-width: 100%; }
  .hero--center { padding-bottom: clamp(1rem, 2vw, 1.5rem); }

  .project-card__story { max-width: 100%; }
  .about__text { max-width: 100%; }

  /* CTA tighter on mobile */
  .cta {
    padding-top: clamp(2rem, 5vw, 3rem);
    padding-bottom: clamp(2rem, 5vw, 3rem);
    padding-left: var(--page-padding);
    padding-right: var(--page-padding);
  }
}
