/* ═══════════════════════════════════════════════════════════════
   NILESH GUPTA — Shared Design System
   Import this file on every page: <link rel="stylesheet" href="/style.css">
   ═══════════════════════════════════════════════════════════════ */

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

/* ── TOKENS ── */
:root {
  /* ── Neutrals ── */
  --bg: #faf9f6;
  --hero-bg: #f5f3ee;
  --white: #ffffff;
  --black: #0d0d0d;
  --text: #111111;
  --muted: #5a5a5a;
  --dimmed: #9a9090;
  --border: #dedad4;
  --line: #111111;
  --surface: #edeae4;

  /* ── Brand accents ── */
  --accent: #E0673A;
  /* warm coral / terracotta */
  --accent-2: #3D7A5F;
  /* forest green */
  --accent-3: #5B5BD6;
  /* indigo */
  --accent-4: #C8883A;
  /* amber */

  --radius: 8px;
  --nav-h: 60px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── BASE ── */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── TYPOGRAPHY HELPERS ── */
.text-muted {
  color: var(--muted);
}

.text-dimmed {
  color: var(--dimmed);
}

.text-upper {
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-size: 11px;
}

/* ═══════════════════════ LOAD ANIMATIONS ═══════════════════════ */

/* All animatable elements start invisible */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children inside a container */
[data-reveal-group]>* {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}

[data-reveal-group].is-visible>*:nth-child(1) {
  opacity: 1;
  transform: none;
  transition-delay: 0.0s;
}

[data-reveal-group].is-visible>*:nth-child(2) {
  opacity: 1;
  transform: none;
  transition-delay: 0.07s;
}

[data-reveal-group].is-visible>*:nth-child(3) {
  opacity: 1;
  transform: none;
  transition-delay: 0.14s;
}

[data-reveal-group].is-visible>*:nth-child(4) {
  opacity: 1;
  transform: none;
  transition-delay: 0.21s;
}

[data-reveal-group].is-visible>*:nth-child(5) {
  opacity: 1;
  transform: none;
  transition-delay: 0.28s;
}

[data-reveal-group].is-visible>*:nth-child(6) {
  opacity: 1;
  transform: none;
  transition-delay: 0.35s;
}

[data-reveal-group].is-visible>*:nth-child(7) {
  opacity: 1;
  transform: none;
  transition-delay: 0.42s;
}

[data-reveal-group].is-visible>*:nth-child(8) {
  opacity: 1;
  transform: none;
  transition-delay: 0.49s;
}

[data-reveal-group].is-visible>*:nth-child(9) {
  opacity: 1;
  transform: none;
  transition-delay: 0.56s;
}

[data-reveal-group].is-visible>*:nth-child(10) {
  opacity: 1;
  transform: none;
  transition-delay: 0.63s;
}

[data-reveal-group].is-visible>*:nth-child(n+11) {
  opacity: 1;
  transform: none;
  transition-delay: 0.63s;
}

/* Hero specific — fast slide up on load */
.hero-animate {
  opacity: 0;
  transform: translateY(36px);
  animation: heroSlideUp 0.9s var(--ease-out) forwards;
}

.hero-animate:nth-child(1) {
  animation-delay: 0.1s;
}

.hero-animate:nth-child(2) {
  animation-delay: 0.22s;
}

.hero-animate:nth-child(3) {
  animation-delay: 0.36s;
}

.hero-animate:nth-child(4) {
  animation-delay: 0.50s;
}

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

/* Nav fade in */
.nav-animate {
  opacity: 0;
  animation: navFade 0.5s var(--ease-out) 0.05s forwards;
}

@keyframes navFade {
  to {
    opacity: 1;
  }
}

/* ═══════════════════════ NAVIGATION ═══════════════════════ */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(240, 240, 235, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  padding: 0 52px;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.nav-logo svg {
  display: block;
}

/* Logo hover — subtle scale */
.nav-logo:hover svg {
  transform: rotate(45deg);
  transition: transform 0.4s var(--ease-out);
}

.nav-logo svg {
  transition: transform 0.4s var(--ease-out);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 44px;
}

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

.nav-links a {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: color 0.2s;
  position: relative;
}

/* Underline grow on hover — coral accent */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.25s var(--ease-out);
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Active nav link */
.nav-links a.active {
  color: var(--accent);
}

.nav-links a.active::after {
  width: 100%;
  background: var(--accent);
}

.nav-socials {
  display: flex;
  gap: 14px;
  align-items: center;
}

.nav-socials a {
  color: var(--muted);
  display: flex;
  align-items: center;
  transition: color 0.2s, transform 0.2s var(--ease-out);
}

.nav-socials a:hover {
  color: var(--accent);
  transform: scale(1.15);
}

/* ═══════════════════════ LAYOUT ═══════════════════════ */

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 52px;
}

/* Section scaffolding */
.section {
  padding: 0 52px;
}

.section-inner {
  max-width: 1320px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 64px 0 88px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 88px;
}

.section-heading {
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--text);
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}

.section-label {
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: block;
  font-weight: 500;
}

/* Anchor scroll offset */
.anchor {
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

/* ═══════════════════════ HOVER EFFECTS ═══════════════════════ */

/* List rows — used in Writing, Reading, Traits */
.hover-row {
  position: relative;
  transition: opacity 0.2s;
}

/* Subtle translate right on hover */
.hover-row:hover {
  opacity: 0.5;
}

/* Article / Reading links — only title fades */
.article-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  gap: 24px;
  cursor: pointer;
  transition: none;
}

.article-item:first-of-type {
  border-top: 1px solid var(--border);
}

.article-title {
  font-size: 17px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.4;
  transition: opacity 0.18s;
}

.article-meta {
  font-size: 13px;
  color: var(--dimmed);
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.18s;
}

.article-item:hover .article-title {
  opacity: 0.38;
}

.article-item:hover .article-meta {
  opacity: 0.38;
}

/* Reading rows */
.reading-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  gap: 24px;
}

.reading-item:first-of-type {
  border-top: 1px solid var(--border);
}

.reading-type {
  font-size: 11px;
  color: var(--dimmed);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.reading-title {
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.01em;
  transition: opacity 0.18s;
}

.reading-author {
  font-size: 13px;
  color: var(--dimmed);
  flex-shrink: 0;
  white-space: nowrap;
  padding-top: 14px;
  transition: opacity 0.18s;
}

.reading-item:hover .reading-title {
  opacity: 0.38;
}

.reading-item:hover .reading-author {
  opacity: 0.38;
}

/* ═══════════════════════ BUTTONS ═══════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 13px 26px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.01em;
  cursor: pointer;
  border-radius: var(--radius);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s, background 0.2s;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: opacity 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(224, 103, 58, 0.35);
  background: #d45a2e;
}

.btn:hover::before {
  opacity: 1;
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Ghost button variant */
.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.btn-ghost:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(224, 103, 58, 0.25);
}

/* ═══════════════════════ FORMS ═══════════════════════ */

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 11px;
  color: var(--dimmed);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

input,
textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  padding: 12px 15px;
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(224, 103, 58, 0.12);
}

textarea {
  resize: vertical;
  min-height: 130px;
}

::placeholder {
  color: var(--dimmed);
}

/* ═══════════════════════ FOOTER ═══════════════════════ */

.site-footer {
  padding: 0 52px;
}

.site-footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 56px 0 52px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 52px;
  align-items: start;
}

.footer-logo {
  color: var(--text);
}

.footer-statement {
  font-size: clamp(26px, 3.2vw, 42px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--text);
  margin-bottom: 28px;
  max-width: 560px;
}

.footer-cta {
  margin-bottom: 40px;
}

.footer-links-row {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links-row a {
  font-size: 14px;
  color: var(--dimmed);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links-row a:hover {
  color: var(--text);
}

.footer-copyright {
  font-size: 14px;
  color: var(--dimmed);
}

/* ═══════════════════════ PAGE HEADER (inner pages) ═══════════════════════ */

.page-header {
  background: var(--hero-bg);
  padding: calc(var(--nav-h) + 64px) 52px 64px;
}

.page-header-inner {
  max-width: 1320px;
  margin: 0 auto;
}

.page-header-label {
  font-size: 12px;
  color: var(--dimmed);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: block;
}

.page-header-title {
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.0;
  color: var(--text);
}

/* ═══════════════════════ RESPONSIVE ═══════════════════════ */

@media (max-width: 900px) {
  nav {
    padding: 0 24px;
  }

  .nav-links {
    display: none;
  }

  .container {
    padding: 0 24px;
  }

  .section {
    padding: 0 24px;
  }

  .site-footer {
    padding: 0 24px;
  }

  .page-header {
    padding: calc(var(--nav-h) + 40px) 24px 48px;
  }

  .section-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 48px 0 64px;
  }

  .section-heading {
    position: static;
    font-size: 34px;
  }

  .site-footer-inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .page-header-title {
    font-size: 44px;
  }
}