/* balasree.com — playful & bold portfolio styles */

:root {
  --bg: #fdf6ec;          /* warm paper */
  --fg: #211b18;
  --muted: #7a6f66;
  --line: #e8ddcb;
  --ink: #211b18;

  /* playful palette */
  --coral: #ff5d4d;
  --sun: #a884ff;   /* purple (replaces the old yellow) */
  --teal: #2ec4b6;
  --grape: #6a4cff;
  --accent: var(--coral);

  --max: 1200px;
  --gap: clamp(1rem, 3vw, 2rem);
  --radius: 18px;
  --shadow: 6px 6px 0 var(--ink);
  --header-h: 64px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; height: 100%; }

body {
  margin: 0;
  scroll-padding-top: var(--header-h);
  font-family: "Helvetica Neue", Arial, system-ui, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* subtle dotted texture for warmth */
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 22px 22px;
}

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

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

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.5rem, 8vw, 5.5rem); }
h2 { font-size: clamp(2rem, 5vw, 3.25rem); }
h3 { font-size: 1.2rem; font-family: inherit; letter-spacing: -0.01em; }

p { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gap); }

.muted { color: var(--muted); }

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--sun);
  padding: 0.35em 0.8em;
  border-radius: 999px;
  transform: rotate(-2deg);
  margin-bottom: 1.25rem;
}

.lead { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--muted); max-width: 52ch; }

/* Chunky pill button with offset shadow */
.btn {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.85rem 1.6rem;
  background: var(--coral);
  color: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-weight: 700;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(253, 246, 236, 0.85);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 2px solid var(--ink);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.brand {
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.nav ul { list-style: none; display: flex; gap: 1.25rem; margin: 0; padding: 0; }
.nav a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  padding: 0.2em 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.nav a:hover { border-bottom-color: var(--coral); }

/* Full-viewport sections */
.hero,
.section {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

/* Decorative floating shapes */
.blob {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0.85;
}
.blob--coral { background: var(--coral); }
.blob--sun   { background: var(--sun); }
.blob--teal  { background: var(--teal); }
.blob--grape { background: var(--grape); }
.hero .blob--sun   { width: 160px; height: 160px; top: 12%; right: 8%; }
.hero .blob--teal  { width: 90px;  height: 90px;  bottom: 16%; left: 6%; }
.section > .container { position: relative; z-index: 1; }

/* Hero */
.hero { padding: clamp(3rem, 8vw, 6rem) 0; }
.hero .container { position: relative; z-index: 1; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--gap);
  align-items: center;
}
.hero h1 .pop { color: var(--coral); }
.hero-media img {
  width: 100%;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  object-fit: cover;
  aspect-ratio: 16 / 10;
  transform: rotate(2deg);
}

/* Sections */
.section { padding: clamp(3rem, 8vw, 6rem) 0; }
.section + .section, .work { border-top: 2px dashed var(--line); }
.section-head { margin-bottom: 2.5rem; }

.work { justify-content: flex-start; }

/* Work grid — tilted playful cards */
.work-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.25rem);
}
.work-card a {
  display: block;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 0.75rem 0.75rem 1rem;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
/* alternate the resting tilt so the grid feels hand-placed */
.work-card:nth-child(odd) a  { transform: rotate(-1.5deg); }
.work-card:nth-child(even) a { transform: rotate(1.5deg); }
.work-card a:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 9px 9px 0 var(--ink);
}
.work-media { overflow: hidden; border-radius: calc(var(--radius) - 8px); }
.work-media img {
  width: 100%;
  aspect-ratio: 9 / 7;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.work-card a:hover .work-media img { transform: scale(1.05); }
.work-meta { margin-top: 0.85rem; padding: 0 0.25rem; }
.work-meta h3 { margin: 0; }
.work-meta .muted {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--teal);
}

/* About */
.about-inner {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}
.about-media img {
  width: 100%;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: -6px 6px 0 var(--ink);
  object-fit: cover;
  aspect-ratio: 4 / 5;
  transform: rotate(-2deg);
}

/* Now page — simple, text-first (nownownow.com style) */
.now { justify-content: flex-start; }
.now-page { max-width: 42rem; margin: 0 auto; }
.now-updated {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--teal);
  margin: 0 0 2rem;
}
.now-page .lead { max-width: none; color: var(--fg); }
.now-block { margin-top: 2.5rem; }
.now-block h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
.now-list { margin: 0.5rem 0 0; padding-left: 1.1rem; }
.now-list li { margin-bottom: 0.5rem; }
.now-list li::marker { color: var(--coral); }
.now-back {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 2px dashed var(--line);
}
.now-back a {
  font-weight: 700;
  border-bottom: 2px solid var(--coral);
}
.now-back a:hover { color: var(--coral); }

/* Journey — full-page vertical timeline */
.journey {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(4rem, 10vw, 7rem);
}
.journey-inner { position: relative; z-index: 1; max-width: 42rem; margin: 0 auto; }
.journey-head { margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.journey-head .lead { max-width: none; color: var(--fg); }

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 0.4rem;
  bottom: 0.4rem;
  left: 5.5rem;
  width: 2px;
  background: repeating-linear-gradient(
    to bottom,
    var(--line) 0,
    var(--line) 6px,
    transparent 6px,
    transparent 12px
  );
}
.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 4rem 3rem 1fr;
  align-items: start;
  gap: 0 1rem;
  padding-bottom: clamp(2rem, 5vw, 3rem);
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-year {
  grid-column: 1;
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--coral);
  padding-top: 0.15rem;
  text-align: right;
}
.timeline-dot {
  grid-column: 2;
  justify-self: center;
  width: 18px;
  height: 18px;
  margin-top: 0.2rem;
  border-radius: 50%;
  background: var(--sun);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.timeline-item:nth-child(3n+2) .timeline-dot { background: var(--teal); }
.timeline-item:nth-child(3n+3) .timeline-dot { background: var(--grape); }
/* Optional per-entry override via front matter: accent: coral|sun|teal|grape */
.timeline-dot--coral { background: var(--coral) !important; }
.timeline-dot--sun   { background: var(--sun) !important; }
.timeline-dot--teal  { background: var(--teal) !important; }
.timeline-dot--grape { background: var(--grape) !important; }
.timeline-content { grid-column: 3; }
.timeline-content h2 { font-size: clamp(1.25rem, 3vw, 1.6rem); margin-bottom: 0.35rem; }
.timeline-content p { color: var(--muted); margin-bottom: 0.75rem; }
.timeline-content p:last-child { margin-bottom: 0; }
.timeline-media { margin-bottom: 1rem; max-width: 22rem; }
.timeline-media img {
  width: 100%;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--ink);
  object-fit: cover;
  aspect-ratio: 16 / 10;
}

@media (max-width: 560px) {
  .timeline::before { left: 1.4rem; }
  .timeline-item {
    grid-template-columns: 2rem 1fr;
    gap: 0 0.85rem;
  }
  .timeline-year {
    grid-column: 1 / -1;
    text-align: left;
    margin-bottom: 0.5rem;
  }
  .timeline-dot { grid-column: 1; grid-row: 2; justify-self: start; }
  .timeline-content { grid-column: 2; grid-row: 2; }
}

/* Contact */
.contact-inner { max-width: 60ch; }
.social { list-style: none; display: flex; flex-wrap: wrap; gap: 1rem; margin: 1.5rem 0 0; padding: 0; }
.social a {
  font-weight: 600;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0.4em 1em;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.social a:hover { background: var(--grape); color: #fff; transform: rotate(-2deg); }

/* Footer */
.site-footer { border-top: 2px solid var(--ink); padding: 2rem 0; }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-inner .social { margin: 0; }

/* Side up/down navigation */
.snap-nav {
  position: fixed;
  right: clamp(0.75rem, 2vw, 1.5rem);
  bottom: clamp(1rem, 4vh, 2.5rem);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.snap-btn {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--sun);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition: background 0.2s ease, transform 0.12s ease, box-shadow 0.12s ease;
}
.snap-btn:hover:not(:disabled) { background: var(--coral); color: #fff; transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.snap-btn:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.snap-btn:disabled { opacity: 0.35; cursor: default; box-shadow: none; }

/* Responsive */
@media (max-width: 720px) {
  .hero-inner, .about-inner { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .nav ul { gap: 0.85rem; }
  .snap-nav { display: none; }
  .work-card a, .hero-media img, .about-media img { transform: none; }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
  .work-card a, .hero-media img, .about-media img, .eyebrow { transform: none !important; }
}
