/* ============================================================
   style.css — Ashutosh N Portfolio
   Shared stylesheet for index.html and blog.html
   Fonts: Lexend (display) + DM Mono (body/ui)
   ============================================================ */

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

/* ── Design tokens ───────────────────────────────────────── */
:root {
  --ink: #1a1a1a;
  --ink-mid: #555;
  --ink-dim: #999;
  --rule: #e2e2e2;
  --bg: #f9f8f6;
  --bg-card: #f2f1ef;
  --max-w: 960px;
  --font-display: 'Lexend', sans-serif;
  --font-mono: "Roboto Mono", monospace;
  --nav-h: 60px;
}

/* ── Base ────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Layout ──────────────────────────────────────────────── */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 64px 0;
}

/* ── Navigation ──────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

nav .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--nav-h);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

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

.nav-links a {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mid);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
}

/* ── Section label ───────────────────────────────────────── */
.section-label {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 24px;
}

/* ── Intro / Hero (index only) ───────────────────────────── */
#intro {
  padding: 74px 0 52px;
}

.hero-eyebrow {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 20px;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 64px);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 20px;
}

.hero-name em {
  font-style: normal;
  font-weight: 300;
  color: var(--ink-mid);
}

.hero-role,
.page-role {
  font-size: 16px;
  color: var(--ink-mid);
  max-width: 540px;
  line-height: 1.7;
}

/* ── About (index only) ──────────────────────────────────── */
.about-text {
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink-mid);
  max-width: 100%;
}

.about-text p+p {
  margin-top: 14px;
}

/* ── Work list (index only) ──────────────────────────────── */
#work {
  padding-top: 56px;
}

.work-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.work-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  width: 100%;
  text-align: left;
}

.work-item:first-child {
  border-top: 1px solid var(--rule);
}

.work-item:hover .work-title {
  color: var(--ink);
}

.work-item:hover .work-arrow {
  opacity: 1;
  transform: translateX(4px);
}

.work-item:focus-visible {
  outline: 2px solid var(--ink-mid);
  outline-offset: 3px;
  border-radius: 2px;
}

.work-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.work-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 400;
  color: var(--ink-mid);
  transition: color 0.15s;
  line-height: 1.3;
}

.work-title a {
  color: inherit;
  text-decoration: none;
}

.work-desc {
  font-size: 14px;
  color: var(--ink-dim);
  line-height: 1.5;
}

.work-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.work-tag {
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-dim);
  background: var(--bg-card);
  border: 1px solid var(--rule);
  padding: 3px 8px;
  border-radius: 2px;
}

.work-arrow {
  font-size: 13px;
  color: var(--ink-dim);
  opacity: 0;
  transform: translateX(0);
  transition: opacity 0.15s, transform 0.2s ease;
}

/* ── Footer / Contact ────────────────────────────────────── */
footer {
  border-top: none;
}

/* Portfolio footer */
.footer-portfolio {
  padding: 52px 0 64px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-contact h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 14px;
  color: var(--ink);
}

.footer-email {
  display: inline-block;
  font-size: 13px;
  color: var(--ink-mid);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
  transition: color 0.15s, border-color 0.15s;
}

.footer-email:hover {
  color: var(--ink);
  border-color: var(--ink-mid);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.footer-links a {
  font-size: 13px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-decoration: none;
  transition: color 0.15s;
}

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

.footer-copy {
  margin-top: 60px;
  font-size: 11px;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
}

/* Blog footer */
.footer-blog {
  padding: 56px 0 72px;
  margin-top: 84px;
}

.footer-blog .footer-inner {
  align-items: center;
}

.footer-back {
  font-size: 13px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-back:hover {
  color: var(--ink);
}

/* ── Blog page header ────────────────────────────────────── */
.page-header {
  padding: 44px 0 34px;
  border-bottom: none;
}

.page-eyebrow {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 16px;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.5vw, 56px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 20px;
}

.page-title em {
  font-style: normal;
  font-weight: 300;
  color: var(--ink-mid);
}

/* ── Blog list ───────────────────────────────────────────── */
.blog-section {
  padding: 0;
  margin-bottom: 32px;
}


.blog-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 0;
  align-items: start;
}

.blog-list li {
  list-style: none;
  min-width: 0;
}

.blog-entry {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--rule);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.blog-entry:first-child {
  border-top: none;
}

.blog-entry:hover .entry-title {
  color: var(--ink);
}

.blog-entry:hover .entry-dot {
  opacity: 1;
}

.blog-entry:focus-visible {
  outline: 2px solid var(--ink-mid);
  outline-offset: 3px;
  border-radius: 2px;
}

.entry-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.entry-dot {
  flex-shrink: 0;
  width: 4px;
  height: 4px;
  background: var(--ink);
  border-radius: 50%;
  margin-bottom: 2px;
  opacity: 0;
  transition: opacity 0.15s;
}

.entry-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  color: var(--ink-mid);
  transition: color 0.15s;
  line-height: 1.35;
}

.entry-date {
  flex-shrink: 0;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
  text-align: right;
  white-space: nowrap;
  opacity: 0.95;
}

/* ── Single blog post ───────────────────────────────────── */
h3 {
  font-size: 18px;
  font-weight: 500;
  margin-top: 40px;
}

.post-back {
  display: inline-block;
  margin-bottom: 30px;
  font-size: 13px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-decoration: none;
  transition: color 0.15s;
}

.post-back:hover {
  color: var(--ink);
}

.post-meta {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.post-section {
  padding-top: 0;
  padding-bottom: 60px;
}

.post-content {
  max-width: 720px;
}

.post-content h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--ink);
  margin-top: 40px;
  margin-bottom: 12px;
}

.post-content p {
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink-mid);
  margin-bottom: 10px;
  margin-top: 10px;
}

/* ── Year group marker (injected by JS) ──────────────────── */
.year-marker {
  display: block;
  font-size: 13px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding: 18px 0 6px;
  pointer-events: none;
  user-select: none;
}

.blog-list .year-marker:first-child {
  padding-top: 8px;
}

/* ── Scroll reveal — base (hidden) state ─────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

/* Staggered work list items */
.reveal-list .work-item {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.reveal-list.visible .work-item {
  opacity: 1;
  transform: none;
}

.reveal-list.visible .work-item:nth-child(1) {
  transition-delay: 0.05s;
}

.reveal-list.visible .work-item:nth-child(2) {
  transition-delay: 0.12s;
}

.reveal-list.visible .work-item:nth-child(3) {
  transition-delay: 0.19s;
}

.reveal-list.visible .work-item:nth-child(4) {
  transition-delay: 0.26s;
}

.reveal-list.visible .work-item:nth-child(5) {
  transition-delay: 0.33s;
}

.reveal-list.visible .work-item:nth-child(6) {
  transition-delay: 0.40s;
}

/* Staggered blog entries */
.stagger .blog-entry {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.stagger.visible .blog-entry {
  opacity: 1;
  transform: translateY(0);
}

.stagger.visible .blog-entry:nth-child(1) {
  transition-delay: 0.04s;
}

.stagger.visible .blog-entry:nth-child(2) {
  transition-delay: 0.09s;
}

.stagger.visible .blog-entry:nth-child(3) {
  transition-delay: 0.14s;
}

.stagger.visible .blog-entry:nth-child(4) {
  transition-delay: 0.19s;
}

.stagger.visible .blog-entry:nth-child(5) {
  transition-delay: 0.24s;
}

.stagger.visible .blog-entry:nth-child(6) {
  transition-delay: 0.29s;
}

.stagger.visible .blog-entry:nth-child(7) {
  transition-delay: 0.34s;
}

.stagger.visible .blog-entry:nth-child(8) {
  transition-delay: 0.39s;
}

.stagger.visible .blog-entry:nth-child(9) {
  transition-delay: 0.44s;
}

.stagger.visible .blog-entry:nth-child(10) {
  transition-delay: 0.49s;
}

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 480px) {
  .nav-links {
    gap: 16px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-links {
    align-items: flex-start;
  }

  .entry-title {
    font-size: 16px;
  }

  .page-title {
    font-size: 34px;
  }
}

@media (max-width: 860px) {
  #intro {
    padding: 60px 0 42px;
  }

  #work {
    padding-top: 42px;
  }

  .page-header {
    padding: 34px 0 24px;
  }
}