/* ============================================================
   style.css — Vijay Raj Murugesan
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300;1,9..40,400&display=swap');

/* ------------------------------------------------------------
   Variables
   ------------------------------------------------------------ */
:root {
  --bg:             #F9F7F4;
  --text:           #1A1A1A;
  --text-secondary: #6B6B6B;
  --accent:         #C9A96E;
  --border:         #E5E0D8;
  --font-heading:   'Playfair Display', Georgia, serif;
  --font-body:      'DM Sans', system-ui, -apple-system, sans-serif;
  --ease:           0.2s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  animation: pageFadeIn 0.4s ease both;
}

@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

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

ul, ol {
  list-style: none;
}

/* ------------------------------------------------------------
   Typography
   ------------------------------------------------------------ */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.2;
}

/* ------------------------------------------------------------
   Shared: Tags & Timestamps
   ------------------------------------------------------------ */
.tag {
  display: inline-block;
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0.15rem 0.5rem;
  font-family: var(--font-body);
}

.timestamp {
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
}

/* Subtle arrow link */
.subtle-link {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  display: inline-block;
  border-bottom: 1px solid transparent;
  transition: color var(--ease), border-color var(--ease);
}
.subtle-link:hover {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* Section label — small-caps uppercase */
.section-label {
  font-size: 0.6875rem;
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* ============================================================
   HOMEPAGE LAYOUT
   ============================================================ */

.home-layout {
  display: flex;
  min-height: 100vh;
}

/* Left fixed column */
.fixed-intro {
  width: 36%;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  padding: 3.5rem 2.75rem;
  display: flex;
  flex-direction: column;
}

.intro-inner {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  min-height: 100%;
}

/* Right scrollable column */
.scroll-content {
  flex: 1;
  min-width: 0;
  padding: 4rem 4rem 6rem;
}

/* ------------------------------------------------------------
   Left Column: Identity
   ------------------------------------------------------------ */
.site-name {
  font-size: 1.625rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 1.25rem;
}

.intro-role {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.intro-bio {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ------------------------------------------------------------
   Social Links
   ------------------------------------------------------------ */
.intro-socials {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: color var(--ease);
  letter-spacing: 0.03em;
}
.social-link:hover {
  color: var(--text);
}
.social-link svg {
  flex-shrink: 0;
  opacity: 0.65;
  transition: opacity var(--ease);
}
.social-link:hover svg {
  opacity: 1;
}

/* ------------------------------------------------------------
   Left Nav
   ------------------------------------------------------------ */
.intro-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: auto;
}

.nav-link {
  display: inline-block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 0.3rem 0;
  letter-spacing: 0.03em;
  transition: color var(--ease);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--ease);
}
.nav-link:hover,
.nav-link.active {
  color: var(--text);
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ------------------------------------------------------------
   Right Column: Content
   ------------------------------------------------------------ */
.signal-line {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.65;
  padding-bottom: 2.75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3.5rem;
}

.section {
  margin-bottom: 4.5rem;
}

.section-title {
  display: block;
  font-size: 0.6875rem;
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* Work entries */
.work-entries {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.work-header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.625rem 0.875rem;
  margin-bottom: 0.375rem;
}

.work-company {
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 500;
}

.work-role {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.work-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* Project cards */
.project-cards {
  display: flex;
  flex-direction: column;
}

.project-card {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
}
.project-card:first-child {
  border-top: 1px solid var(--border);
}

.project-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.375rem;
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.1875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.project-status {
  font-size: 0.625rem;
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
  flex-shrink: 0;
}
.project-status.active   { background: #EAF4EC; color: #2D6A4F; }
.project-status.ongoing  { background: #FEF3E2; color: #92400E; }
.project-status.archive  { background: #F3F4F6; color: #6B7280; }

.project-subtitle {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 0.625rem;
}

.project-desc {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 1rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 1rem;
}

.project-link {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  border-bottom: 1px solid transparent;
  transition: color var(--ease), border-color var(--ease);
}
.project-link:hover {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* Section teaser (Notes preview) */
.section-teaser {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* Reads & Watches preview grid */
.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1.25rem;
}

.preview-col-title {
  font-size: 0.6875rem;
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.875rem;
}

.media-entry {
  margin-bottom: 0.625rem;
}
.media-title {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.35;
}
.media-author {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
}

/* ============================================================
   INNER PAGE LAYOUT (Now, Reads, Watches, Notes)
   ============================================================ */

.inner-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 3rem;
}

.inner-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 800px;
  margin: 0 auto;
  height: 58px;
}

.inner-home-link {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  color: var(--text);
  opacity: 0.75;
  transition: opacity var(--ease);
}
.inner-home-link:hover {
  opacity: 1;
}

.inner-nav {
  display: flex;
  gap: 1.5rem;
}
.inner-nav .nav-link {
  font-size: 0.8125rem;
}

.page-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 4.5rem 3rem 7rem;
}

.page-heading {
  font-size: 2.625rem;
  font-weight: 400;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}

.page-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3.5rem;
}

/* ------------------------------------------------------------
   Now Page
   ------------------------------------------------------------ */
.now-sections {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.now-section-title {
  font-size: 0.6875rem;
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.now-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.now-list li {
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.65;
  padding-left: 1.25rem;
  position: relative;
}
.now-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ------------------------------------------------------------
   Reads Page
   ------------------------------------------------------------ */
.reads-sections {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.reads-section-title {
  font-size: 0.6875rem;
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.read-card {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}
.read-card:last-child {
  border-bottom: none;
}

.read-cover {
  width: 52px;
  height: 70px;
  background: var(--border);
  flex-shrink: 0;
  border-radius: 2px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.read-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.read-info {
  flex: 1;
  min-width: 0;
}

.read-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.2rem;
  line-height: 1.3;
}

.read-author {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.read-note {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.6;
  font-family: var(--font-heading);
}

/* ------------------------------------------------------------
   Watches Page
   ------------------------------------------------------------ */
.watches-sections {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.watches-section-title {
  font-size: 0.6875rem;
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.watch-card {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}
.watch-card:last-child {
  border-bottom: none;
}

.watch-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.2rem;
}

.watch-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.3;
}

.watch-year {
  font-size: 0.75rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.watch-creator {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.watch-note {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.6;
  font-family: var(--font-heading);
}

/* ------------------------------------------------------------
   Notes Page
   ------------------------------------------------------------ */
.notes-placeholder {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.note-preview {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
  transition: opacity var(--ease);
}
.note-preview:first-child {
  border-top: 1px solid var(--border);
}
.note-preview:hover {
  opacity: 0.7;
}

.note-preview a {
  display: block;
}

.note-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  line-height: 1.35;
}

.note-date {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}

.note-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.note-tags {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

/* ============================================================
   PROJECT PAGES (projects/hikari.html, projects/forkochi.html)
   ============================================================ */

.project-page-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 4.5rem 3rem 7rem;
}

.project-hero {
  margin-bottom: 3.5rem;
  padding-bottom: 2.75rem;
  border-bottom: 1px solid var(--border);
}

.project-hero-label {
  font-size: 0.6875rem;
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  display: block;
}

.project-hero-title {
  font-size: 3rem;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 0.625rem;
}

.project-hero-subtitle {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.project-hero-tags {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.project-sections {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.project-section-title {
  font-size: 0.6875rem;
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  display: block;
}

.project-body {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--text);
}
.project-body p + p {
  margin-top: 1rem;
}

/* Screenshot grid — 2 columns */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.875rem;
  margin-top: 0.25rem;
}

.screenshot {
  background: var(--border);
  border-radius: 3px;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  position: relative;
}
.screenshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.screenshot-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Explore list */
.explore-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.explore-list li {
  font-size: 0.9375rem;
  line-height: 1.65;
  padding-left: 1.25rem;
  position: relative;
  color: var(--text);
}
.explore-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.8125rem;
  top: 0.05em;
}

/* Image grid — 3 columns (Forkochi) */
.image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.image-grid-item {
  background: var(--border);
  border-radius: 2px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.image-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-placeholder {
  font-size: 0.6rem;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* CTA block */
.project-cta {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.project-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: var(--text);
  border-bottom: 1px solid var(--text);
  padding-bottom: 0.15rem;
  transition: color var(--ease), border-color var(--ease);
}
.project-cta-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ============================================================
   HOMEPAGE v2 — Minimal + particle canvas
   ============================================================ */

/* Homepage-specific overrides */
body.home-page {
  animation: none;
  background-color: #fdfdc9;
}

/* kept for any references; homepage now uses hp-sidebar / hp-content */
.home-main {
  position: relative;
  min-height: 100vh;
  padding: 18vh 5rem 5rem;
}

/* Two-column homepage */
.hp-sidebar {
  width: 33.333%;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid transparent;
  transition: border-color 0.25s ease;
  padding: 4rem 3rem 4rem 6rem;
  display: flex;
  flex-direction: column;
}

.hp-sidebar-inner {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.hp-identity {
  animation: itemReveal 0.55s ease both;
  animation-delay: 0.05s;
}

.hp-nav {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  animation: itemReveal 0.55s ease both;
  animation-delay: 0.31s;
}

/* Right panel — hidden until activated */
.hp-content {
  flex: 1;
  min-width: 0;
  padding: 4rem 4rem 7rem;
}

.hp-section {
  display: none;
  max-width: 560px;
}

.hp-section.active {
  display: block;
  animation: panelReveal 0.3s ease both;
}

@keyframes panelReveal {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hp-sidebar.panel-open {
  border-right-color: rgba(0, 0, 0, 0.08);
}

.hp-section-header {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.hp-section-title {
  font-size: 0.6875rem;
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
}

/* Per-element stagger reveal */
@keyframes itemReveal {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.home-identity {
  margin-bottom: 2rem;
  animation: itemReveal 0.55s ease both;
  animation-delay: 0.05s;
}

.home-name {
  font-family: var(--font-heading);
  font-size: 1.875rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: 0.45rem;
}

.home-role {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.home-socials {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  animation: itemReveal 0.55s ease both;
  animation-delay: 0.18s;
}

.home-social-link {
  display: inline-flex;
  align-items: center;
  color: var(--text-secondary);
  transition: color var(--ease);
}
.home-social-link:hover {
  color: var(--text);
}

.home-divider {
  border: none;
  border-top: 1px solid var(--border);
  width: 200px;
  margin: 0 0 2.5rem;
  animation: itemReveal 0.55s ease both;
  animation-delay: 0.31s;
}

.home-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  animation: itemReveal 0.55s ease both;
  animation-delay: 0.44s;
}

.home-links-row {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.home-nav-link {
  display: inline-block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 0.2rem 0;
  letter-spacing: 0.02em;
  transition: color var(--ease);
  position: relative;
}
.home-nav-link::after {
  content: '';
  position: absolute;
  bottom: 1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--ease);
}
.home-nav-link:hover {
  color: var(--text);
}
.home-nav-link:hover::after {
  width: 100%;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 960px) {
  .fixed-intro {
    width: 38%;
    padding: 3rem 2rem;
  }
  .scroll-content {
    padding: 3.5rem 3rem 5rem;
  }
}

@media (max-width: 720px) {
  /* Homepage: stack vertically */
  .home-layout {
    flex-direction: column;
  }

  .fixed-intro {
    width: 100%;
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 2.5rem 1.5rem 2rem;
    overflow: visible;
  }

  .intro-inner {
    gap: 2rem;
  }

  .intro-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    margin-top: 0;
  }

  .scroll-content {
    padding: 2.5rem 1.5rem 4rem;
  }

  .preview-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Inner pages */
  .inner-header {
    padding: 0 1.5rem;
  }
  .inner-nav {
    gap: 1rem;
  }

  .page-content {
    padding: 3rem 1.5rem 5rem;
  }
  .page-heading {
    font-size: 2rem;
  }

  .project-page-content {
    padding: 3rem 1.5rem 5rem;
  }
  .project-hero-title {
    font-size: 2.25rem;
  }

  .screenshot-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .image-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 420px) {
  .screenshot-grid {
    grid-template-columns: 1fr;
  }
  .image-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .inner-nav {
    gap: 0.75rem;
  }
}

/* Homepage mobile */
@media (max-width: 600px) {
  .home-main {
    padding: 14vh 2rem 4rem;
  }
  .home-name {
    font-size: 1.5rem;
  }
  .home-socials {
    gap: 1.25rem;
  }
  .home-divider {
    width: 140px;
  }
}

/* Two-column homepage: stack on mobile */
@media (max-width: 700px) {
  .home-layout {
    flex-direction: column;
  }
  .hp-sidebar {
    width: 100%;
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 2.5rem 1.5rem 2rem;
    overflow: visible;
  }
  .hp-nav {
    margin-top: 0;
  }
  .hp-content {
    padding: 2rem 1.5rem 5rem;
  }
}
