/* 
  EDITORIAL GRID DESIGN SYSTEM FOR DHIRAN REDDY PORTFOLIO
  Featuring a 5-column CSS grid, mixed serif-italic & bold sans-serif typography,
  custom dark mode, and native CSS scroll-driven reveal animations.
*/

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&display=swap');

:root {
  /* Colors - cool concrete grey palette matching the reference */
  --bg-color: #E8E8E5;
  --text-color: #111111;
  --text-muted: #666666;
  --grid-line-color: #CBCAC6;
  --accent-color: #111111;
  --bg-card: #D8D8D4;
  --dot-color: #111111;

  /* Fonts */
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;

  /* Transitions */
  --transition-smooth: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-color: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

/* Dark Mode Overrides - true black for maximum contrast */
html.dark-mode {
  --bg-color: #0C0C0C;
  --text-color: #F0F0F0;
  --text-muted: #888888;
  --grid-line-color: #1E1E1E;
  --accent-color: #FFFFFF;
  --bg-card: #161616;
  --dot-color: #F0F0F0;
}

/* RESET & BASE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-sans);
  transition: var(--transition-color);
}

body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  font-weight: 400;
  line-height: 1.5;
}

/* TYPOGRAPHY UTILITIES */
.serif-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

.sans-bold {
  font-family: var(--font-sans);
  font-weight: 800;
}

.sans-light {
  font-family: var(--font-sans);
  font-weight: 300;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

/* CUSTOM CURSOR */
/* Hide the system cursor everywhere */
*, *::before, *::after {
  cursor: none !important;
}

#custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  background-color: var(--text-color);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition:
    width 0.25s cubic-bezier(0.25, 1, 0.5, 1),
    height 0.25s cubic-bezier(0.25, 1, 0.5, 1),
    background-color 0.25s ease,
    opacity 0.25s ease;
  will-change: transform;
}

/* Cursor grows + becomes a ring over interactive elements */
#custom-cursor.hovering {
  width: 36px;
  height: 36px;
  background-color: transparent;
  border: 1.5px solid var(--text-color);
  opacity: 0.6;
}

/* Cursor shrinks + darkens on click */
#custom-cursor.clicking {
  width: 8px;
  height: 8px;
  opacity: 1;
}

/* SCROLL PROGRESS BAR */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--text-color);
  z-index: 9998;
  transition: width 0.1s linear, background-color 0.4s ease;
  will-change: width;
}

/* PAGE LOAD FADE-IN */
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-wrapper {
  animation: pageFadeIn 0.6s cubic-bezier(0.25, 1, 0.5, 1) both;
}

/* BACKGROUND GRID OVERLAY */
.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  pointer-events: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 1; /* Behind elements but visible as lines */
}

.grid-col-line {
  border-right: 1px solid var(--grid-line-color);
  height: 100%;
  transition: var(--transition-color);
}

.grid-col-line:last-child {
  border-right: none;
}

/* LAYOUT CONTAINER */
.page-wrapper {
  position: relative;
  z-index: 2; /* Sits on top of the grid background overlay */
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
}

/* GRID SYSTEM */
.grid-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: 100%;
  transition: var(--transition-color);
}

.border-bottom {
  border-bottom: 1px solid var(--grid-line-color);
}

/* HEADER SECTION */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  background-color: rgba(232, 232, 229, 0.85);
  /* No border-bottom — let the vertical grid lines run uninterrupted */
  transition: var(--transition-color);
}

html.dark-mode header {
  background-color: rgba(12, 12, 12, 0.88);
}

header .grid-container {
  height: 11vh;
  align-items: center;
}

.header-logo {
  grid-column: 1;
  padding-left: 2rem;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.header-logo span {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

/* Nav group — centered cluster spanning the middle of the header */
.header-nav {
  grid-column: 2 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  height: 100%;
}

.header-nav-link {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

.header-nav-link:hover,
.header-nav-link.nav-active {
  color: var(--text-color);
  font-weight: 600;
}

.header-status {
  grid-column: 5;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-right: 2rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  gap: 0.4rem;
  pointer-events: none;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #10B981;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s infinite;
}

/* HERO SECTION */
#hero {
  min-height: 85vh;
  position: relative;
}

/* Offset anchor scroll for sticky header */
section[id] {
  scroll-margin-top: 11vh;
}

.hero-title-container {
  grid-column: 1 / 6;
  text-align: center;
  padding: 4rem 0 2rem 0;
  position: relative;
}

.hero-main-title {
  font-size: 8.5vw;
  font-weight: 800;
  letter-spacing: -4px;
  line-height: 0.88;
  /* No uppercase — mixed serif italic + bold sans-serif is the aesthetic */
}

.hero-subtitle {
  font-size: 1rem;
  margin-top: 1.8rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* HERO GRID DETAILS */
.hero-details-row {
  grid-column: 1 / 6;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  padding-bottom: 4rem;
}


.theme-toggle-dot {
  /* Smaller in header — 14px pill sitting beside the logo text */
  width: 14px;
  height: 14px;
  background-color: var(--dot-color);
  border-radius: 50%;
  cursor: none;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.theme-toggle-dot:hover {
  transform: scale(1.35);
  opacity: 0.7;
}

.hero-left-text {
  grid-column: 2;
  font-size: 1.1rem;
  line-height: 1.6;
  padding: 0 1.5rem;
  color: var(--text-color);
}

.hero-left-text span.serif-italic,
.hero-right-text span.serif-italic {
  font-size: 1.35rem;
}

.hero-center-img-col {
  grid-column: 3;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 1rem;
}

.hero-center-img {
  width: 100%;
  max-width: 320px;
  height: auto;
  filter: grayscale(100%);
  transition: var(--transition-smooth);
}

.hero-center-img:hover {
  filter: grayscale(0%);
  transform: translateY(-5px);
}

.hero-right-text {
  grid-column: 4;
  font-size: 1.1rem;
  line-height: 1.6;
  padding: 0 1.5rem;
  color: var(--text-color);
}

.hero-right-text p {
  margin-bottom: 1rem;
}

.hero-right-text p:last-child {
  margin-bottom: 0;
}

/* SECTION HEADER STYLE */
.section-intro-header {
  grid-column: 1 / 6;
  position: relative;
  height: 25vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.section-bg-text-outline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 12vw;
  color: transparent;
  /* Stronger stroke in light mode to be visible against the grey */
  -webkit-text-stroke: 1px rgba(17, 17, 17, 0.12);
  line-height: 1;
  user-select: none;
  transition: var(--transition-color);
  white-space: nowrap;
}

html.dark-mode .section-bg-text-outline {
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.1);
}

.section-fg-text {
  position: absolute;
  font-size: 4.5vw;
  font-weight: 800;
  /* No uppercase — Title Case looks more premium */
  letter-spacing: -1px;
  margin-top: 1.5vw;
  z-index: 3;
}

/* Year label floated above the section's solid title text */
.works-year-label {
  position: absolute;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  /* Sit just above the solid 'Works' text */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -190%);
  z-index: 4;
  white-space: nowrap;
}


/* ── Tab Bar ── */
.works-tab-bar {
  grid-column: 1 / 6;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  height: 56px;
  position: relative; /* anchor for the sliding indicator */
}

/* Sliding underline indicator */
#tab-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background-color: var(--text-color);
  transition: left 0.3s cubic-bezier(0.25, 1, 0.5, 1),
              width 0.3s cubic-bezier(0.25, 1, 0.5, 1),
              background-color 0.4s ease;
  pointer-events: none;
}

.works-tab {
  background: none;
  border: none;
  border-bottom: none;
  padding: 0 2.5rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  cursor: none;
  transition: color 0.2s ease;
  position: relative;
}

.works-tab:hover {
  color: var(--text-color);
}

.works-tab.active {
  color: var(--text-color);
  font-weight: 600;
}

/* ── Panel show/hide with fade ── */
.works-panel {
  display: none;
  opacity: 0;
  animation: panelFadeIn 0.25s ease forwards;
}

.works-panel.active {
  display: block;
  opacity: 1;
}

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

/* ── BLOG PANEL ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}

.blog-card {
  padding: 3.5rem 3rem;
  border-bottom: 1px solid var(--grid-line-color);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.blog-card-border {
  border-left: 1px solid var(--grid-line-color);
}

.blog-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.blog-platform {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 500;
}

.blog-date {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.blog-title {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.3px;
}

.blog-excerpt {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-muted);
  flex: 1;
}

.blog-link {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-color);
  text-decoration: none;
  border-bottom: 1px solid var(--grid-line-color);
  padding-bottom: 2px;
  align-self: flex-start;
  transition: border-color 0.2s ease;
}

.blog-link:hover {
  border-bottom-color: var(--text-color);
}

/* ── CERTIFICATIONS PANEL ── */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.cert-card {
  padding: 3rem 2.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  border-bottom: 1px solid var(--grid-line-color);
  transition: var(--transition-color);
}

.cert-card-border-left { border-left: 1px solid var(--grid-line-color); }
.cert-card-border-top  { border-top: 1px solid var(--grid-line-color); }

.cert-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}

.cert-icon-nvidia  { background: #76b900; }
.cert-icon-google  { background: #4285F4; }
.cert-icon-dl      { background: #e74c3c; font-size: 0.65rem; }
.cert-icon-unisys  { background: #005B96; }
.cert-icon-py      { background: #3572A5; font-size: 0.7rem; }
.cert-icon-nest    { background: #E0234E; }

.cert-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cert-name {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.2px;
}

.cert-issuer {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 400;
}

.cert-year {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}


.works-grid {
  grid-column: 1 / 6;
  display: grid;
  /* 3 equal columns — all 3 projects in one horizontal row */
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
/* Staggered card entrance */
@keyframes cardSlideUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

#works.revealed .work-card-wrapper,
#works .work-card-wrapper {
  animation: cardSlideUp 0.55s cubic-bezier(0.25, 1, 0.5, 1) both;
}

#works .work-card-wrapper:nth-child(1) { animation-delay: 0.05s; }
#works .work-card-wrapper:nth-child(2) { animation-delay: 0.18s; }
#works .work-card-wrapper:nth-child(3) { animation-delay: 0.31s; }

.work-card-wrapper {
  border-bottom: 1px solid var(--grid-line-color);
  padding: 3.5rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition-color);
}

/* Cards with right border to separate columns */
.work-card-left {
  border-right: 1px solid var(--grid-line-color);
}

/* Middle card — right border only */
.work-card-mid {
  border-right: 1px solid var(--grid-line-color);
}

/* Right card — no extra border */
.work-card-right {
  /* no extra border needed */
}


.work-img-container {
  width: 100%;
  background-color: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16/10;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
  transition: var(--transition-smooth);
}

.work-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: var(--transition-smooth);
}

.work-card-wrapper:hover .work-img-container img {
  filter: grayscale(0%);
  transform: scale(1.03);
}

.work-info {
  display: flex;
  flex-direction: column;
}

.work-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.work-number {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.75rem;
  color: var(--text-muted);
}

.work-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.work-tag {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--grid-line-color);
  border-radius: 20px;
  color: var(--text-muted);
}

.work-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.work-desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.work-btn {
  align-self: flex-start;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--text-color);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: transparent;
  color: var(--text-color);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.work-btn:hover {
  background-color: var(--text-color);
  color: var(--bg-color);
}

/* EXPERIENCE & RESEARCH SECTION */
#experience-section {
  padding-bottom: 4rem;
}

.exp-sidebar {
  grid-column: 1 / 3;
  padding: 4rem 2rem;
  border-right: 1px solid var(--grid-line-color);
}

.exp-sidebar-sticky {
  position: sticky;
  top: 15vh;
}

.exp-sidebar h3 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.exp-sidebar p {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.6;
}

.exp-timeline {
  grid-column: 3 / 6;
  padding: 4rem 2rem;
}

.exp-item {
  margin-bottom: 4rem;
  position: relative;
}

.exp-item:last-child {
  margin-bottom: 0;
}

.exp-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.exp-role {
  font-size: 1.5rem;
  font-weight: 800;
}

.exp-duration {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--text-muted);
}

.exp-company {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.exp-bullets {
  list-style: none;
}

.exp-bullets li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.exp-bullets li::before {
  content: "+";
  position: absolute;
  left: 0;
  color: var(--text-color);
  font-weight: 700;
}

/* RESEARCH PAPERS timeline adaptation */
.research-list {
  margin-top: 5rem;
  border-top: 1px solid var(--grid-line-color);
  padding-top: 4rem;
}

.research-list h4 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 2rem;
  text-transform: uppercase;
}

.research-item {
  margin-bottom: 3rem;
}

.research-item:last-child {
  margin-bottom: 0;
}

.research-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.research-pub {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.research-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* CAPABILITIES SECTION */
#capabilities {
  padding-bottom: 4rem;
}

.capabilities-table {
  grid-column: 1 / 6;
  border-top: 1px solid var(--grid-line-color);
}

.cap-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-bottom: 1px solid var(--grid-line-color);
  padding: 3rem 0;
  align-items: baseline;
  transition: var(--transition-smooth);
}

.cap-row:hover {
  background-color: var(--bg-card);
}

.cap-index {
  grid-column: 1;
  padding-left: 2rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--text-muted);
}

.cap-category {
  grid-column: 2;
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
}

.cap-items {
  grid-column: 3 / 6;
  padding-right: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cap-badge {
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.3rem 0.8rem;
  background-color: var(--bg-color);
  border: 1px solid var(--grid-line-color);
  border-radius: 4px;
  color: var(--text-color);
  transition: var(--transition-smooth);
}

.cap-row:hover .cap-badge {
  border-color: var(--text-color);
}

/* ABOUT / LEADERSHIP SECTION */
#about-section {
  padding-bottom: 4rem;
}

.about-text-col {
  grid-column: 2 / 5;
  padding: 5rem 2rem;
  font-size: 1.35rem;
  line-height: 1.8;
  color: var(--text-color);
}

.about-text-col p {
  margin-bottom: 2rem;
}

.about-text-col p:last-child {
  margin-bottom: 0;
}

.about-highlight {
  font-size: 2rem;
  line-height: 1.4;
  margin-bottom: 3rem;
  border-left: 4px solid var(--text-color);
  padding-left: 1.5rem;
}

/* CONTACT SECTION */
#contact-section {
  padding: 6rem 0;
  text-align: center;
}

.contact-container {
  grid-column: 1 / 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
}

.contact-pre {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.contact-email {
  font-size: 4vw;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
  color: var(--text-color);
  transition: var(--transition-smooth);
}

.contact-email::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--text-color);
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.4s cubic-bezier(0.86, 0, 0.07, 1);
}

.contact-email:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.contact-socials-row {
  display: flex;
  gap: 3rem;
  justify-content: center;
  flex-wrap: wrap;
}

.social-link {
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
}

.social-link:hover {
  color: var(--text-color);
  transform: translateY(-2px);
}

/* FOOTER */
footer {
  border-top: 1px solid var(--grid-line-color);
  padding: 3rem 0;
  transition: var(--transition-color);
}

footer .grid-container {
  align-items: center;
}

.footer-copy {
  grid-column: 1 / 3;
  padding-left: 2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-links {
  grid-column: 4 / 6;
  display: flex;
  justify-content: flex-end;
  gap: 2rem;
  padding-right: 2rem;
}

.footer-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

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

/* HAMBURGER & MOBILE NAVIGATION */
.mobile-nav-toggle {
  display: none;
  grid-column: 5;
  justify-self: end;
  margin-right: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 150;
  position: relative;
  width: 30px;
  height: 20px;
}

.mobile-nav-toggle span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  background: var(--text-color);
  border-radius: 2px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: .25s ease-in-out;
}

.mobile-nav-toggle span:nth-child(1) { top: 0px; }
.mobile-nav-toggle span:nth-child(2) { top: 9px; }
.mobile-nav-toggle span:nth-child(3) { top: 18px; }

.mobile-nav-toggle.open span:nth-child(1) {
  top: 9px;
  transform: rotate(135deg);
}

.mobile-nav-toggle.open span:nth-child(2) {
  opacity: 0;
  left: -60px;
}

.mobile-nav-toggle.open span:nth-child(3) {
  top: 9px;
  transform: rotate(-135deg);
}

.mobile-nav-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 400px;
  height: 100vh;
  background-color: var(--bg-color);
  border-left: 1px solid var(--grid-line-color);
  z-index: 120;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 2rem;
  gap: 2rem;
  transition: right 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: -10px 0 30px rgba(0,0,0,0.05);
}

.mobile-nav-menu.open {
  right: 0;
}

.mobile-nav-link {
  font-size: 2rem;
  font-weight: 800;
  text-transform: uppercase;
}

/* ANIMATIONS & EFFECTS */
@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* NATIVE SCROLL-DRIVEN REVEAL ANIMATIONS */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes reveal-up {
      from {
        opacity: 0;
        transform: translateY(60px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* Apply scroll-driven animations to key container areas */
    .scroll-reveal {
      animation: reveal-up auto linear;
      animation-timeline: view();
      animation-range: entry 5% cover 30%;
    }
  }
}

/* Fallback reveal styling for older browsers / Firefox (via IntersectionObserver) */
.no-scroll-timeline .scroll-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.no-scroll-timeline .scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}