/* ==========================================================================
   Waris Ali — Portfolio
   Theme: Minimalist Monochrome (Permanent Single Theme)
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500;1,600;1,700&family=Lora:ital,wght@0,400;0,500;0,600;1,400;1,500&family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,600;1,400&family=Inter:wght@400;500;600&display=swap");

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0 !important; /* Strict sharp corners as in reference mono-sharp */
}

:root {
  /* Core Monochrome Palette */
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f5;
  --bg-tertiary: #e5e5e5;
  --bg-overlay: rgba(255, 255, 255, 0.95);

  --text-primary: #000000;
  --text-secondary: #1a1a1a;
  --text-tertiary: #4a4a4a;
  --text-muted: #595959;
  --text-dim: #8a8a8a;
  --text-inverse: #ffffff;

  --accent-primary: #000000;
  --accent-secondary: #1a1a1a;
  --accent-tertiary: #4a4a4a;
  --accent-glow: rgba(0, 0, 0, 0.08);

  --border-color: #000000;
  --border-primary: #000000;
  --border-light: #d9d9d9;
  --shadow-color: rgba(0, 0, 0, 0.12);

  /* Reference Theme Specific Tokens */
  --t-ink: #000000;
  --t-paper: #ffffff;
  --t-soft: #f5f5f5;
  --t-line: #d9d9d9;
  --t-muted: #595959;
  --t-accent: #000000;
  --t-accent-ink: #000000;
  --t-card: #ffffff;
  --t-invert-bg: #000000;
  --t-invert-ink: #ffffff;
  --t-invert-muted: #bdbdbd;

  /* Typography Scale */
  --font-primary: "Playfair Display", Georgia, serif;
  --font-heading: "Playfair Display", Georgia, serif;
  --font-secondary: Georgia, "Times New Roman", serif;
  --font-body: "Lora", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Courier New", monospace;
  --font-label: "IBM Plex Mono", ui-monospace, "Courier New", monospace;

  --t-xl: clamp(3rem, 11.4vw, 9rem);
  --t-h2: clamp(2.4rem, 5.6vw, 4.25rem);
  --t-h3: clamp(1.5rem, 2.6vw, 2.25rem);
  --t-lead: clamp(1.15rem, 1.9vw, 1.5rem);
  --t-gap: clamp(4.5rem, 9vw, 8rem);

  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-sharp: cubic-bezier(0.7, 0, 0.2, 1);
}

html {
  line-height: 1.5;
  font-family: var(--font-body);
  background-color: var(--t-paper);
  color: var(--t-ink);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--t-paper);
  color: var(--t-ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 9px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
  border-left: 1px solid var(--border-color);
}
::-webkit-scrollbar-thumb {
  background: var(--text-primary);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}
::selection {
  background-color: #000000;
  color: #ffffff;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s ease;
}

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

button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}

/* ==========================================================================
   Utility Classes & Layout Elements
   ========================================================================== */

.t-wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 20px;
}

@media (min-width: 640px) {
  .t-wrap {
    padding-inline: 32px;
  }
}
@media (min-width: 1024px) {
  .t-wrap {
    padding-inline: 48px;
  }
}
@media (min-width: 1900px) {
  .t-wrap {
    max-width: 1500px;
  }
}

.t-page {
  background: var(--t-paper);
  color: var(--t-ink);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.t-sect {
  padding-block: var(--t-gap);
  position: relative;
}

.t-ink-bg {
  background: var(--t-invert-bg) !important;
  color: var(--t-invert-ink) !important;
}

.t-soft-bg {
  background: var(--t-soft);
}

.t-label {
  font-family: var(--t-label);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.4;
}

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

.t-display {
  font-family: var(--t-heading);
  font-size: var(--t-xl);
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.035em;
  color: inherit;
}

.t-h2 {
  font-family: var(--t-heading);
  font-size: var(--t-h2);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: inherit;
}

.t-h3 {
  font-family: var(--t-heading);
  font-size: var(--t-h3);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.012em;
  color: inherit;
}

.t-lead {
  font-size: var(--t-lead);
  line-height: 1.5;
}

.t-prose {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--t-ink);
}

@media (min-width: 640px) {
  .t-prose {
    font-size: 1.125rem;
  }
}

.t-rule {
  display: block;
  height: 1px;
  width: 100%;
  background: var(--t-ink);
  transform-origin: left center;
}

.t-rule--soft {
  background: var(--t-line);
}

.t-clip-x {
  overflow-x: clip;
}

/* Editorial Serif & Sans helper classes */
.editorial-serif {
  font-family: var(--font-primary);
}

.mono-sharp * {
  border-radius: 0 !important;
}

/* ==========================================================================
   Buttons & Links
   ========================================================================== */

.t-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0 2rem;
  font-family: var(--t-label);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid var(--t-ink);
  cursor: pointer;
  background: var(--t-ink);
  color: var(--t-paper);
  transition: color 0.45s var(--ease-sharp), transform 0.2s ease, box-shadow 0.2s ease;
}

.t-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--t-paper);
  transform: translateY(101%);
  transition: transform 0.45s var(--ease-sharp);
}

.t-btn:hover::before {
  transform: translateY(0);
}

.t-btn:hover {
  color: var(--t-ink);
}

.t-btn--ghost {
  background: var(--t-paper);
  color: var(--t-ink);
}

.t-btn--ghost::before {
  background: var(--t-ink);
}

.t-btn--ghost:hover {
  color: var(--t-paper);
}

.t-btn--light {
  background: var(--t-invert-ink);
  color: var(--t-invert-bg);
  border-color: var(--t-invert-ink);
}

.t-btn--light::before {
  background: var(--t-invert-bg);
}

.t-btn--light:hover {
  color: var(--t-invert-ink);
}

.t-btn--dark {
  background: var(--t-invert-bg);
  color: var(--t-invert-ink);
  border-color: var(--t-invert-ink);
}

.t-btn--dark::before {
  background: var(--t-invert-ink);
}

.t-btn--dark:hover {
  color: var(--t-invert-bg);
}

/* Navigation & Row Animated Underline */
.t-ul {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  font-family: var(--t-label);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 calc(100% - 10px);
  background-size: 100% 1px;
  transition: background-size 0.45s var(--ease-sharp);
  color: var(--t-ink);
}

.t-ul:hover {
  background-size: 0 1px;
  background-position: 100% calc(100% - 10px);
}

/* Badge / Tech Chips */
.t-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--t-ink);
  padding: 3px 12px;
  font-family: var(--t-label);
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1.5;
  background: transparent;
  color: inherit;
}

.t-chip--solid {
  background: var(--t-ink);
  color: var(--t-paper);
}

/* Magnetic Wrapper Container */
.magnetic-wrap {
  display: inline-block;
  padding: 0.75rem;
  margin: -0.75rem;
  vertical-align: middle;
}

/* ==========================================================================
   Interactive Progress Bar & Cursor
   ========================================================================== */

#scroll-progress {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 60;
  height: 3px;
  pointer-events: none;
}

#scroll-progress-fill {
  height: 100%;
  background: #000000;
  transform-origin: left center;
  transform: scaleX(0);
  will-change: transform;
}

/* Custom Magnetic Difference Cursor */
.t-cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9999;
  pointer-events: none;
  mix-blend-mode: difference;
  will-change: transform;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.t-cursor-inner {
  width: 12px;
  height: 12px;
  border-radius: 50% !important;
  background: #ffffff;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.t-cursor.is-active .t-cursor-inner {
  transform: scale(5);
}

@media (hover: none), (pointer: coarse) {
  .t-cursor {
    display: none !important;
  }
}

/* ==========================================================================
   Fullscreen Intro Screen Overlay
   ========================================================================== */

.intro-cover {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #000000;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(20px, 4vw, 48px);
  user-select: none;
  cursor: pointer;
  transition: transform 1.1s var(--ease-sharp);
}

.intro-header {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.intro-footer {
  width: 100%;
}

.intro-counter {
  font-family: var(--font-primary);
  font-weight: 800;
  font-size: clamp(6rem, 26vw, 20rem);
  letter-spacing: -0.04em;
  line-height: 0.9;
  padding-bottom: 0.08em;
}

.intro-bar {
  height: 2px;
  background: #ffffff;
  transform-origin: left center;
  margin-top: 12px;
  transform: scaleX(0);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  transition: transform 0.4s var(--ease-expo), background-color 0.3s;
}

.nav-content {
  display: flex;
  height: 4rem; /* 64px */
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.nav-logo {
  font-family: var(--font-primary);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  text-decoration: none;
}

@media (min-width: 640px) {
  .nav-logo {
    font-size: 1.35rem;
  }
}
@media (min-width: 768px) {
  .nav-logo {
    font-size: 1.5rem;
  }
}

.nav-links-desktop {
  display: none;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

@media (min-width: 768px) {
  .nav-links-desktop {
    display: flex;
  }
}

.nav-links-desktop li a {
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--t-ink);
}

.mobile-menu-btn {
  display: flex;
  height: 2.75rem;
  width: 2.75rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
}

/* Mobile Menu Overlay */
.mobile-nav-drawer {
  position: fixed;
  top: 4rem;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 39;
  background: var(--t-paper);
  border-top: 1px solid var(--t-ink);
  display: none;
  flex-direction: column;
  padding: 1.5rem 1.25rem;
  height: calc(100vh - 4rem);
  overflow-y: auto;
}

.mobile-nav-drawer.is-open {
  display: flex;
}

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

.mobile-nav-item {
  position: relative;
  border-bottom: 1px solid var(--t-line);
}

.mobile-nav-link {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--text-primary);
}

.mobile-nav-index {
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}

.mobile-nav-title {
  font-family: var(--font-primary);
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  font-weight: 700;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

#top {
  position: relative;
  background: var(--t-paper);
  color: var(--t-ink);
  padding-top: 4rem; /* Nav offset */
}

.hero-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3rem;
  padding-top: 3rem;
  padding-bottom: 2.5rem;
  min-height: calc(100svh - 4rem);
}

@media (min-width: 640px) {
  .hero-inner {
    padding-top: 4rem;
  }
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
}

.hero-title {
  font-family: var(--t-heading);
  font-size: var(--t-xl);
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.035em;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.hero-char {
  display: inline-block;
  will-change: transform;
  transition: transform 0.1s linear;
}

.hero-content-split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2.5rem 4rem;
}

.hero-left-col {
  flex: 1 1 22rem;
  max-width: 34rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.hero-btn-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .hero-btn-group {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

.hero-spec-list {
  flex: 1 1 16rem;
  width: 100%;
  max-width: 22rem;
}

.hero-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  border-bottom: 1px solid var(--t-line);
  padding: 0.75rem 0;
  font-size: 15px;
  line-height: 1.35;
}

.hero-spec-row dt {
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--t-muted);
}

.hero-spec-row dd {
  text-align: right;
  font-weight: 500;
}

.hero-scroll-cue {
  display: none;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 640px) {
  .hero-scroll-cue {
    display: flex;
  }
}

.scroll-line-track {
  position: relative;
  display: block;
  height: 1px;
  width: 6rem;
  overflow: hidden;
  background: var(--t-line);
}

.scroll-line-runner {
  position: absolute;
  inset-block: 0;
  left: 0;
  width: 33.333%;
  background: var(--t-ink);
  animation: scrollCue 1.8s cubic-bezier(0.7, 0, 0.2, 1) infinite;
}

@keyframes scrollCue {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(300%);
  }
}

/* ==========================================================================
   Technologies Running Ticker (Dual Row Marquee)
   ========================================================================== */

.ticker-section {
  position: relative;
  z-index: 10;
  overflow: hidden;
  background-color: #000000;
  color: #ffffff;
  padding-block: 1.5rem;
}

@media (min-width: 640px) {
  .ticker-section {
    padding-block: 2.5rem;
  }
}

.ticker-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ticker-track-wrap {
  overflow: hidden;
  display: flex;
}

.ticker-track {
  display: flex;
  width: max-content;
  align-items: center;
  white-space: nowrap;
  will-change: transform;
}

.ticker-item {
  padding-inline: 1.25rem;
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: clamp(3rem, 8.5vw, 7.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

@media (min-width: 640px) {
  .ticker-item {
    padding-inline: 2rem;
  }
}

.ticker-item.is-italic {
  font-style: italic;
}

.ticker-item.t-outline {
  color: transparent;
  -webkit-text-stroke: 1.5px #ffffff;
}

.ticker-glyph {
  display: inline-block;
  height: 0.75rem;
  width: 0.75rem;
  flex-shrink: 0;
  background: #ffffff;
}

@media (min-width: 640px) {
  .ticker-glyph {
    height: 1rem;
    width: 1rem;
  }
}

.ticker-glyph.t-outline {
  background: transparent;
  border: 1.5px solid #ffffff;
}

/* ==========================================================================
   Projects Section
   ========================================================================== */

#projects {
  background: var(--t-paper);
}

.section-header {
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .section-header {
    margin-bottom: 4rem;
  }
}

.section-meta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1rem;
  color: var(--t-muted);
}

.flagship-article {
  display: grid;
  align-items: center;
  gap: 2.5rem;
}

@media (min-width: 1024px) {
  .flagship-article {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 3.5rem;
  }
}

.flagship-visual {
  width: 100%;
}

@media (min-width: 1024px) {
  .flagship-visual {
    grid-column: span 7 / span 7;
  }
}

.t-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  width: 100%;
  border: 1px solid var(--t-ink);
  background: repeating-linear-gradient(135deg, var(--t-soft) 0 14px, var(--t-line) 14px 28px);
}

.t-frame img {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-sharp);
}

.t-halftone {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  mix-blend-mode: multiply;
  background-image: radial-gradient(circle at center, #111 0 1.4px, transparent 1.7px);
  background-size: 6px 6px;
}

.flagship-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .flagship-info {
    grid-column: span 5 / span 5;
  }
}

.project-title-sub {
  display: block;
  font-size: 0.5em;
  font-weight: 400;
  opacity: 0.7;
  letter-spacing: 0;
  margin-top: 0.25rem;
  font-style: italic;
  font-family: var(--font-secondary);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
}

.project-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

@media (min-width: 640px) {
  .project-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* Secondary Project Rows */
.projects-rows-wrap {
  margin-top: 5rem;
}

@media (min-width: 768px) {
  .projects-rows-wrap {
    margin-top: 7rem;
  }
}

.t-row {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 14px 40px;
  grid-template-columns: 1fr;
  padding: 28px 0;
  border-bottom: 1px solid var(--t-line);
  color: inherit;
  text-decoration: none;
  transition: color 0.4s ease, padding 0.5s var(--ease-sharp);
}

@media (min-width: 1024px) {
  .t-row {
    grid-template-columns: 56px minmax(0, 1.15fr) minmax(0, 1.5fr) minmax(0, 0.9fr);
    align-items: baseline;
    padding: 34px 0;
  }
}

.t-row::before {
  content: "";
  position: absolute;
  inset: 0 -20px;
  z-index: -1;
  background: var(--t-invert-bg);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.5s var(--ease-sharp);
}

@media (hover: hover) and (min-width: 1024px) {
  .t-row:hover::before {
    transform: scaleY(1);
  }
  .t-row:hover {
    color: var(--t-invert-ink);
    padding-inline: 20px;
  }
  .t-row:hover .t-row-muted {
    color: var(--t-invert-muted);
  }
  .t-row:hover .t-chip {
    border-color: var(--t-invert-ink);
  }
}

.t-row-thumb {
  display: block;
}

@media (min-width: 1024px) {
  .t-row-thumb {
    display: none;
  }
}

.t-row-muted {
  color: var(--t-muted);
  transition: color 0.4s ease;
}

.row-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

/* Floating Project Image Hover Preview */
.t-preview {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 60;
  width: 340px;
  height: 215px;
  pointer-events: none;
  opacity: 0;
  border: 1px solid var(--t-ink);
  background: var(--t-soft);
  overflow: hidden;
  will-change: transform;
}

.t-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (hover: none), (max-width: 1023px) {
  .t-preview {
    display: none !important;
  }
}

/* ==========================================================================
   Skills Section
   ========================================================================== */

#skills {
  position: relative;
  background-color: var(--bg-primary);
  padding-top: 3rem;
}

@media (min-width: 768px) {
  #skills {
    padding-top: 5rem;
  }
}

.skills-header-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 2rem;
}

.skills-track-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
}

@media (min-width: 768px) {
  .skills-track-viewport {
    height: 100vh;
  }
}

.skills-track {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 3rem;
}

@media (min-width: 768px) {
  .skills-track {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: max-content;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 2rem;
    padding-bottom: 0;
    will-change: transform;
  }
}

.skills-card-wrapper {
  width: 100%;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .skills-card-wrapper {
    width: 520px;
    height: 380px;
  }
}

.skills-card {
  height: 100%;
  width: 100%;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

@media (min-width: 640px) {
  .skills-card {
    padding: 1.75rem;
  }
}

.skills-card header {
  margin-bottom: 1.5rem;
}

.skills-card-category {
  font-family: var(--font-secondary);
  color: var(--text-tertiary);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.skills-card-title {
  font-family: var(--font-primary);
  color: var(--text-primary);
  font-size: clamp(1.5rem, 2.5vw, 1.875rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.skills-card-caption {
  font-family: var(--font-secondary);
  color: var(--text-tertiary);
  font-size: 0.875rem;
  font-style: italic;
  margin-top: 0.5rem;
}

.skills-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  flex: 1;
  overflow: auto;
}

.skills-chip {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-secondary);
  font-style: italic;
  color: var(--text-primary);
  letter-spacing: 0.01em;
  font-size: 0.95rem;
  cursor: default;
  user-select: none;
}

.skills-chip-dash {
  margin-right: 0.5rem;
  font-style: normal;
  color: var(--text-tertiary);
}

.skills-chip-text {
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: border-color 0.2s;
}

.skills-chip:hover .skills-chip-text {
  border-bottom-color: var(--text-primary);
}

.skills-card-line {
  height: 1px;
  background: var(--text-primary);
  margin-top: 1.5rem;
  transition: height 0.2s;
}

.skills-card:hover .skills-card-line {
  height: 2px;
}

/* ==========================================================================
   Services Section (3D Stack Deck)
   ========================================================================== */

#services {
  position: relative;
  background-color: var(--bg-primary);
}

.services-stage-wrap {
  position: relative;
}

@media (min-width: 768px) {
  .services-stage-wrap {
    height: 100vh;
  }
}

.services-stage-container {
  padding-inline: 1rem;
  padding-bottom: 3rem;
}

@media (min-width: 768px) {
  .services-stage-container {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-inline: 2.5rem;
    padding-bottom: 0;
  }
}

.services-stage {
  margin-inline: auto;
  display: flex;
  width: 100%;
  max-width: 64rem;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .services-stage {
    position: relative;
    display: block;
    height: min(80vh, 620px);
  }
}

.services-slot {
  position: relative;
}

@media (min-width: 768px) {
  .services-slot {
    position: absolute;
    inset: 0;
    will-change: transform, opacity;
  }
}

.service-stack-card {
  height: 100%;
  width: 100%;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--text-primary);
  background: var(--bg-secondary);
  font-family: var(--font-primary);
  color: var(--text-primary);
}

@media (min-width: 640px) {
  .service-stack-card {
    padding: 2.5rem;
  }
}
@media (min-width: 1024px) {
  .service-stack-card {
    padding: 3rem;
  }
}

.service-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  font-style: italic;
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.service-card-icon {
  margin-bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3.5rem;
  width: 3.5rem;
  border: 1px solid var(--text-primary);
  color: var(--text-primary);
}

.service-card-icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

.service-card-title {
  font-family: var(--font-primary);
  font-size: clamp(1.875rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.service-card-desc {
  font-family: var(--font-secondary);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  font-style: italic;
  color: var(--text-tertiary);
  margin-top: 1rem;
  line-height: 1.6;
}

.service-card-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-secondary);
  font-size: 0.75rem;
  font-style: italic;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

/* ==========================================================================
   About Section
   ========================================================================== */

#about {
  background: var(--t-soft);
}

.about-grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .about-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 4rem;
  }
}

.about-statement {
  font-family: var(--t-heading);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.3vw, 2.7rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--t-ink);
}

@media (min-width: 1024px) {
  .about-statement {
    grid-column: span 5 / span 5;
  }
}

.about-narrative {
  display: flex;
  flex-direction: column;
}

@media (min-width: 1024px) {
  .about-narrative {
    grid-column: span 7 / span 7;
  }
}

.about-narrative .t-prose {
  margin-bottom: 1.25rem;
}

.about-narrative strong {
  font-weight: 700;
  color: var(--t-ink);
}

.about-subhead {
  font-family: var(--t-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--t-ink);
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.about-bullet-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.about-bullet-list li {
  position: relative;
  padding-left: 1.5rem;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--t-ink);
}

.about-bullet-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--t-muted);
  font-family: var(--font-mono);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */

#contact {
  background: var(--t-invert-bg) !important;
  color: var(--t-invert-ink) !important;
}

.contact-grid {
  display: grid;
  gap: 3.5rem;
}

@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 4rem;
  }
}

.contact-left {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .contact-left {
    grid-column: span 6 / span 6;
  }
}

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

@media (min-width: 1024px) {
  .contact-list {
    grid-column: span 6 / span 6;
  }
}

.t-contact-row {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  min-height: 72px;
  padding: 18px 0;
  border-bottom: 1px solid var(--t-invert-muted);
  color: var(--t-invert-ink);
  text-decoration: none;
  transition: padding 0.5s var(--ease-sharp), color 0.3s ease, background-color 0.3s ease;
}

.contact-list li:first-child .t-contact-row {
  border-top: 1px solid var(--t-invert-muted);
}

.t-contact-row:hover {
  padding-inline: 18px;
  background: var(--t-invert-ink);
  color: var(--t-invert-bg);
}

.t-contact-row:hover .t-label {
  color: var(--t-invert-bg) !important;
  opacity: 0.7;
}

.t-contact-arrow {
  font-size: 1.4rem;
  transition: transform 0.5s var(--ease-sharp);
}

.t-contact-row:hover .t-contact-arrow {
  transform: translate(4px, -4px);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--t-invert-bg);
  color: var(--t-invert-ink);
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--t-invert-muted);
}

.footer-marquee-wrap {
  overflow: hidden;
  padding-top: 2.5rem;
}

@media (min-width: 640px) {
  .footer-marquee-wrap {
    padding-top: 3.5rem;
  }
}

.footer-marquee-word {
  display: flex;
  width: max-content;
  white-space: nowrap;
  line-height: 1;
  font-family: var(--t-heading);
  font-weight: 800;
  font-size: clamp(5rem, 17vw, 15rem);
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--t-invert-ink);
  padding-bottom: 0.1em;
  will-change: transform;
}

.footer-bottom-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px solid var(--t-invert-muted);
  padding-block: 1.5rem;
  text-align: center;
  color: var(--t-invert-muted);
}

@media (min-width: 640px) {
  .footer-bottom-bar {
    flex-direction: row;
    text-align: left;
  }
}

.back-to-top-btn {
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--t-invert-ink);
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  cursor: pointer;
}

/* ==========================================================================
   Case Study Modal / Drawer Component
   ========================================================================== */

.case-study-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.case-study-overlay.is-active {
  display: flex;
}

.case-study-modal {
  background: #ffffff;
  color: #000000;
  border: 2px solid #000000;
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 2.5rem;
}

@media (max-width: 640px) {
  .case-study-modal {
    padding: 1.5rem;
  }
}

.case-study-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  border: 1px solid #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-label);
  font-size: 1.25rem;
  cursor: pointer;
  background: #ffffff;
  transition: all 0.2s;
}

.case-study-close:hover {
  background: #000000;
  color: #ffffff;
}

.case-study-tagline {
  font-family: var(--font-secondary);
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.5;
  margin-top: 0.75rem;
  color: var(--text-secondary);
}

.case-study-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--t-line);
}

.case-study-section h4 {
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--t-muted);
  margin-bottom: 0.75rem;
}

.feature-box {
  border: 1px solid var(--t-line);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  background: var(--bg-secondary);
}

.feature-box h5 {
  font-family: var(--font-primary);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
