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

:root {
  --bg: #ffffff;
  --bg-elevated: #f5f5f7;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #86868b;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --instagram: #c9226e;
  --border: rgba(0,0,0,0.09);
  --border-strong: rgba(0,0,0,0.14);
  --nav-bg: rgba(255,255,255,0.72);
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #000000;
  --bg-elevated: #1d1d1f;
  --text-primary: #f5f5f7;
  --text-secondary: #a1a1a6;
  --text-tertiary: #86868b;
  --accent: #2997ff;
  --accent-hover: #47a3ff;
  --instagram: #ff7aad;
  --border: rgba(255,255,255,0.11);
  --border-strong: rgba(255,255,255,0.18);
  --nav-bg: rgba(0,0,0,0.62);
  color-scheme: dark;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
               "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.5s ease, color 0.5s ease;
}

mark { background: var(--accent); color: #fff; padding: 0 4px; border-radius: 2px; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 700px) { .wrap { padding: 0 40px; } }

::selection { background: var(--accent); color: #fff; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s ease, border-color 0.4s ease;
}
.nav.scrolled {
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
@media (min-width: 700px) { .nav-inner { padding: 0 40px; } }

.logo {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav-actions { display: flex; align-items: center; gap: 6px; }

.icon-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background-color 0.25s ease, transform 0.2s ease, color 0.25s ease;
  flex-shrink: 0;
}
.icon-btn:hover { background: var(--bg-elevated); }
.icon-btn:active { transform: scale(0.9); }
.icon-btn svg { width: 17px; height: 17px; }

.icon-btn.instagram:hover { color: var(--instagram); }

.btn-pill {
  padding: 8px 16px;
  border-radius: 980px;
  font-size: 0.8125rem;
  font-weight: 500;
  background: var(--accent);
  color: #fff;
  transition: background-color 0.25s ease, transform 0.15s ease;
  white-space: nowrap;
  margin-left: 4px;
}
.btn-pill:hover { background: var(--accent-hover); }
.btn-pill:active { transform: scale(0.96); }

/* ---------- Hero ---------- */
.hero { padding: 176px 0 88px; }

.hero h1 {
  font-size: clamp(2.6rem, 8vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.04;
  opacity: 0;
  transform: translateY(20px);
  animation: rise 0.9s cubic-bezier(.16,1,.3,1) 0.1s forwards;
}

.hero p {
  margin-top: 18px;
  max-width: 46ch;
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  line-height: 1.5;
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.9s cubic-bezier(.16,1,.3,1) 0.28s forwards;
}

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

/* ---------- Posts ---------- */
.posts { padding-bottom: 60px; }

.post {
  padding: 56px 0;
  border-top: 1px solid var(--border);
}
.post:first-child { border-top: 1px solid var(--border); }

.post-title-link {
  display: inline-block;
  position: relative;
}

.post h2 {
  font-size: clamp(1.5rem, 3.6vw, 2.125rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  transition: color 0.2s ease;
}

.post-title-link:hover h2 { color: var(--accent); }

.post-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  margin-bottom: 24px;
}

.post-date { font-size: 0.875rem; color: var(--text-tertiary); }

.post-share {
  display: flex;
  align-items: center;
  gap: 4px;
}

.copy-note {
  font-size: 0.8125rem;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.copy-note.show { opacity: 1; }

.post-body p {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-primary);
  max-width: 62ch;
}
.post-body p + p { margin-top: 20px; }

/* ---------- Newsletter ---------- */
.newsletter {
  padding: 80px 0 90px;
  border-top: 1px solid var(--border);
}

.newsletter h2 {
  font-size: clamp(1.5rem, 3.6vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.newsletter p {
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 46ch;
}

.sub-form {
  margin-top: 26px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.sub-form input {
  font-family: inherit;
  font-size: 0.9375rem;
  padding: 12px 18px;
  border-radius: 980px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text-primary);
  width: 260px;
  max-width: 100%;
  transition: border-color 0.2s ease;
}
.sub-form input:focus { outline: none; border-color: var(--accent); }

.sub-form button {
  padding: 12px 22px;
  border-radius: 980px;
  background: var(--accent);
  color: white;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: opacity 0.2s ease, transform 0.15s ease;
}
.sub-form button:hover { opacity: 0.85; }
.sub-form button:active { transform: scale(0.96); }

.sub-note {
  margin-top: 14px;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  height: 18px;
}

/* ---------- Footer : ) ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 48px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
@media (min-width: 700px) {
  .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

.footer-inner .logo { display: block; }
.footer-tag { font-size: 0.8125rem; color: var(--text-tertiary); margin-top: 4px; }

.footer-links { display: flex; align-items: center; gap: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .hero h1, .hero p { opacity: 1; transform: none; animation: none; }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
