/* ============================================
   BRACKETS LABS — Portfolio
   Premium dark theme with electric accents
   ============================================ */

/* --- Custom Properties --- */
:root {
  --bg:          #0a0a0a;
  --bg-elevated: #111111;
  --bg-card:     #141414;
  --surface:     #1a1a1a;
  --border:      #222222;
  --text:        #f0ece2;
  --text-muted:  #888888;
  --text-dim:    #555555;
  --accent:      #c8ff00;
  --accent-rgb:  200, 255, 0;
  --white:       #ffffff;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --header-h: 72px;
  --container-w: 1320px;
  --gap: clamp(16px, 3vw, 32px);

  --cursor-blend: difference;
  --grain-opacity: 0.035;
  --card-hover-bg: rgba(255,255,255,0.04);
  --card-hover-bg-strong: rgba(255,255,255,0.06);
  --scrolled-header-bg: rgba(10, 10, 10, 0.85);
}

/* --- Light Theme --- */
[data-theme="light"] {
  --bg:          #f5f2eb;
  --bg-elevated: #ece8df;
  --bg-card:     #ffffff;
  --surface:     #e8e4dc;
  --border:      #d4d0c8;
  --text:        #1a1a1a;
  --text-muted:  #5a5a5a;
  --text-dim:    #8a8a8a;
  --accent:      #2d5a27;
  --accent-rgb:  45, 90, 39;
  --white:       #000000;

  --cursor-blend: exclusion;
  --grain-opacity: 0.02;
  --card-hover-bg: rgba(0,0,0,0.03);
  --card-hover-bg-strong: rgba(0,0,0,0.05);
  --scrolled-header-bg: rgba(245, 242, 235, 0.88);
}

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

html {
  scroll-behavior: auto; /* Lenis handles scroll */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  cursor: none;
}

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

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

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

ul, ol {
  list-style: none;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

/* --- Grain Overlay --- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* --- Custom Cursor --- */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  pointer-events: none;
  mix-blend-mode: var(--cursor-blend);
}

.cursor__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--white);
  position: absolute;
  top: -3px;
  left: -3px;
  transition: transform 0.15s var(--ease-out-expo);
}

.cursor__outline {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.5);
  position: absolute;
  top: -20px;
  left: -20px;
  transition: transform 0.3s var(--ease-out-expo),
              width 0.3s var(--ease-out-expo),
              height 0.3s var(--ease-out-expo),
              top 0.3s var(--ease-out-expo),
              left 0.3s var(--ease-out-expo),
              border-color 0.3s;
}

.cursor--hover .cursor__outline {
  width: 64px;
  height: 64px;
  top: -32px;
  left: -32px;
  border-color: var(--accent);
}

.cursor--hover .cursor__dot {
  transform: scale(2);
  background: var(--accent);
}

/* --- Preloader --- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.preloader__inner {
  text-align: center;
}

.preloader__text {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 36px);
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 32px;
}

.preloader__bracket {
  color: var(--accent);
}

.preloader__bar {
  width: 200px;
  height: 2px;
  background: var(--border);
  margin: 0 auto 16px;
  border-radius: 2px;
  overflow: hidden;
}

.preloader__progress {
  width: 0%;
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.1s linear;
}

.preloader__counter {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 48px);
  transition: background 0.4s, backdrop-filter 0.4s;
}

.header--scrolled {
  background: var(--scrolled-header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.header__logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.header__bracket {
  color: var(--accent);
}

.header__nav {
  display: flex;
  gap: 36px;
}

.header__link {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.3s;
  position: relative;
}

.header__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.4s var(--ease-out-expo);
}

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

.header__link:hover::after {
  width: 100%;
}

.header__menu {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  cursor: none;
}

.header__menu span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.4s var(--ease-out-expo), opacity 0.3s;
}

.header__menu--active span:first-child {
  transform: translateY(3.75px) rotate(45deg);
}

.header__menu--active span:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}

/* --- Header Actions (toggle + menu) --- */
.header__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* --- Theme Toggle --- */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: border-color 0.3s, color 0.3s, background 0.3s, transform 0.4s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
  transform: rotate(15deg);
}

.theme-toggle__icon {
  position: absolute;
  transition: opacity 0.4s, transform 0.5s var(--ease-out-expo);
}

/* Dark mode: show sun icon (to switch to light), hide moon */
.theme-toggle__icon--dark {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}
.theme-toggle__icon--light {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

/* Light mode: show moon icon (to switch to dark), hide sun */
[data-theme="light"] .theme-toggle__icon--dark {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}
[data-theme="light"] .theme-toggle__icon--light {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* Smooth global transition for theme change */
.theme-transitioning,
.theme-transitioning *,
.theme-transitioning *::before,
.theme-transitioning *::after {
  transition: background-color 0.6s var(--ease-out-quart),
              color 0.6s var(--ease-out-quart),
              border-color 0.6s var(--ease-out-quart),
              box-shadow 0.6s var(--ease-out-quart),
              opacity 0.4s var(--ease-out-quart) !important;
}

/* --- Language Toggle --- */
.lang-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 100px;
  overflow: hidden;
}

.lang-toggle__btn {
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.3s, background 0.3s;
}

.lang-toggle__btn--active {
  color: var(--bg);
  background: var(--accent);
}

.lang-toggle__btn:hover:not(.lang-toggle__btn--active) {
  color: var(--text);
}

[data-theme="light"] .lang-toggle__btn--active {
  color: #fff;
}

.lang-toggle--mobile {
  display: none;
}

@media (max-width: 768px) {
  .header__actions .lang-toggle {
    display: none;
  }
  .lang-toggle--mobile {
    display: flex;
    justify-content: center;
    margin-top: 24px;
  }
}

/* Light theme specific overrides */
[data-theme="light"] .preloader {
  background: var(--bg);
}

[data-theme="light"] .preloader__bracket {
  color: #2d5a27;
}

[data-theme="light"] .preloader__progress {
  background: #2d5a27;
}

[data-theme="light"] .mobile-nav {
  background: var(--bg);
}

[data-theme="light"] .cursor__dot {
  background: var(--text);
}

[data-theme="light"] .cursor__outline {
  border-color: rgba(26, 26, 26, 0.4);
}

[data-theme="light"] .cursor--hover .cursor__outline {
  border-color: #2d5a27;
}

[data-theme="light"] .cursor--hover .cursor__dot {
  background: #2d5a27;
}

[data-theme="light"] .hero__scroll-line {
  background: linear-gradient(to bottom, #2d5a27, transparent);
}

[data-theme="light"] .hero__marquee-track {
  color: #8a8a8a;
}

[data-theme="light"] .hero__marquee-track span:nth-child(odd) {
  color: #5a5a5a;
}

[data-theme="light"] .section-label__number {
  color: #2d5a27;
}

[data-theme="light"] .about__stat-badge {
  color: #2d5a27;
}

[data-theme="light"] .about__stat-badge svg {
  color: #d4a017;
}

[data-theme="light"] .about__stat:hover {
  border-color: rgba(45, 90, 39, 0.25);
  box-shadow: 0 4px 16px rgba(45, 90, 39, 0.06);
}

[data-theme="light"] .about__stat {
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

[data-theme="light"] .service__number {
  color: #2d5a27;
}

[data-theme="light"] .service:hover .service__title {
  color: #2d5a27;
}

[data-theme="light"] .service:hover .service__icon {
  color: #2d5a27;
}

[data-theme="light"] .service:hover .service__tags span {
  border-color: rgba(45, 90, 39, 0.25);
  color: #2d5a27;
}

[data-theme="light"] .project__visual::before {
  opacity: 0.08;
}

[data-theme="light"] .project__inner {
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

[data-theme="light"] .project__inner:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.07);
}

[data-theme="light"] .project__cta {
  color: #2d5a27;
}

[data-theme="light"] .work__arrow:hover {
  border-color: #2d5a27;
  color: #2d5a27;
  background: rgba(45, 90, 39, 0.06);
}

[data-theme="light"] .stack__marquee-track span:hover {
  border-color: #2d5a27;
  color: #2d5a27;
  background: rgba(45, 90, 39, 0.05);
}

[data-theme="light"] .btn--primary {
  background: #2d5a27;
  color: #fff;
}

[data-theme="light"] .btn--primary:hover {
  background: #1e3d1a;
  color: #fff;
  transform: scale(1.03);
}

[data-theme="light"] .btn--outline:hover {
  border-color: #2d5a27;
  color: #2d5a27;
  background: rgba(45, 90, 39, 0.05);
}

[data-theme="light"] .header__link:hover {
  color: #2d5a27;
}

[data-theme="light"] .header__link::after {
  background: #2d5a27;
}

[data-theme="light"] .header__bracket,
[data-theme="light"] .footer__bracket {
  color: #2d5a27;
}

[data-theme="light"] .footer__link:hover {
  color: #2d5a27;
}

[data-theme="light"] .theme-toggle:hover {
  border-color: #2d5a27;
  color: #2d5a27;
  background: rgba(45, 90, 39, 0.08);
}

[data-theme="light"] .mobile-nav__link:hover {
  color: #2d5a27;
}

[data-theme="light"] .cs-modal__category {
  color: #2d5a27;
}

[data-theme="light"] .cs-modal__section ul li::before {
  background: #2d5a27;
}

[data-theme="light"] .cs-modal__close:hover {
  border-color: #2d5a27;
  color: #2d5a27;
}

[data-theme="light"] .cs-modal__overlay {
  background: rgba(0,0,0,0.3);
}

[data-theme="light"] .header__menu span {
  background: var(--text);
}

/* --- Mobile Nav --- */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease-out-expo);
}

.mobile-nav--active {
  opacity: 1;
  pointer-events: all;
}

.mobile-nav__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.mobile-nav__link {
  font-family: var(--font-display);
  font-size: clamp(32px, 6vw, 48px);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  transition: color 0.3s;
}

.mobile-nav__link:hover {
  color: var(--accent);
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: calc(var(--header-h) + 40px) clamp(20px, 4vw, 48px) 120px;
  overflow: hidden;
}

.hero__content {
  text-align: center;
  max-width: 1000px;
}

.hero__label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  opacity: 0;
}

.hero__label-line {
  width: 40px;
  height: 1px;
  background: var(--accent);
}

.hero__label-text {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(56px, 12vw, 160px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
}

.hero__line {
  display: block;
  overflow: hidden;
}

.hero__word {
  display: inline-block;
  transform: translateY(105%);
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.7;
  opacity: 0;
  transform: translateY(20px);
}

.hero__scroll {
  position: absolute;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
}

.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

.hero__scroll-text {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* Hero Marquee */
.hero__marquee {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  overflow: hidden;
  border-top: 1px solid var(--border);
  padding: 16px 0;
}

.hero__marquee-track {
  display: flex;
  gap: 48px;
  white-space: nowrap;
  animation: marquee 30s linear infinite;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- Section Label --- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.section-label__number {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.section-label__text {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* --- About --- */
.about {
  padding: clamp(80px, 12vw, 160px) 0;
  border-top: 1px solid var(--border);
  overflow: hidden;
}

.about__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}

.about__heading {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 32px;
  letter-spacing: -0.01em;
}

.about__description {
  font-size: clamp(15px, 1.2vw, 17px);
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 20px;
}

.about__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.about__stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 24px;
  transition: border-color 0.4s, transform 0.4s var(--ease-out-expo);
}

.about__stat:hover {
  border-color: rgba(var(--accent-rgb), 0.3);
  transform: translateY(-2px);
}

.about__stat-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
  margin-bottom: 8px;
}

.about__stat-badge svg {
  color: #d4a017;
  flex-shrink: 0;
}

.about__stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(32px, 3.5vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 8px;
}

.about__stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* --- Clients / Trusted By --- */
.clients {
  padding: clamp(48px, 8vw, 80px) 0;
  border-top: 1px solid var(--border);
  overflow: hidden;
}

.clients__label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.clients__grid {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.clients__item {
  padding: 12px clamp(20px, 3vw, 32px);
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: border-color 0.3s, background 0.3s, transform 0.4s var(--ease-out-expo);
}

.clients__item:hover {
  border-color: rgba(var(--accent-rgb), 0.3);
  background: rgba(var(--accent-rgb), 0.04);
  transform: translateY(-2px);
}

.clients__name {
  font-family: var(--font-display);
  font-size: clamp(14px, 1.4vw, 17px);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  transition: color 0.3s;
  white-space: nowrap;
}

.clients__item:hover .clients__name {
  color: var(--text);
}

[data-theme="light"] .clients__item:hover {
  border-color: rgba(45, 90, 39, 0.3);
  background: rgba(45, 90, 39, 0.04);
}

[data-theme="light"] .clients__item:hover .clients__name {
  color: #2d5a27;
}

/* --- Founder --- */
.founder {
  padding: clamp(80px, 12vw, 160px) 0;
  border-top: 1px solid var(--border);
  overflow: hidden;
}

.founder__grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: clamp(48px, 6vw, 96px);
  align-items: start;
  margin-top: clamp(40px, 6vw, 64px);
}

.founder__photo-col {
  position: sticky;
  top: calc(var(--header-h) + 32px);
}

.founder__photo {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.founder__photo::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.2));
  pointer-events: none;
}

.founder__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  filter: grayscale(20%);
  transition: filter 0.6s ease;
}

.founder__photo:hover .founder__img {
  filter: grayscale(0%);
}

.founder__heading {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: clamp(24px, 3vw, 40px);
}

.founder__text {
  font-family: var(--font-body);
  font-size: clamp(16px, 1.2vw, 18px);
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.founder__text:last-of-type {
  margin-bottom: clamp(32px, 4vw, 48px);
}

.founder__text strong {
  color: var(--text);
  font-weight: 600;
}

.founder__signature {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: clamp(24px, 3vw, 32px);
  border-top: 1px solid var(--border);
}

.founder__name {
  font-family: var(--font-display);
  font-size: clamp(18px, 1.4vw, 22px);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.founder__role {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-transform: uppercase;
}

[data-theme="light"] .founder__img {
  filter: grayscale(10%);
}

[data-theme="light"] .founder__photo:hover .founder__img {
  filter: grayscale(0%);
}

[data-theme="light"] .founder__photo::after {
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.08));
}

@media (max-width: 968px) {
  .founder__grid {
    grid-template-columns: 1fr;
    gap: clamp(32px, 5vw, 48px);
  }

  .founder__photo-col {
    position: static;
    max-width: 280px;
  }
}

@media (max-width: 480px) {
  .founder__photo-col {
    max-width: 220px;
  }
}

/* --- Services --- */
.services {
  padding: clamp(80px, 12vw, 160px) 0;
  border-top: 1px solid var(--border);
  overflow: hidden;
}

.services__heading {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: clamp(40px, 6vw, 72px);
  letter-spacing: -0.02em;
}

.services__list {
  display: flex;
  flex-direction: column;
}

.service {
  border-top: 1px solid var(--border);
  padding: clamp(24px, 3vw, 40px) 0;
  transition: background 0.4s;
}

.service:last-child {
  border-bottom: 1px solid var(--border);
}

.service__header {
  display: flex;
  align-items: center;
  gap: 24px;
  cursor: none;
}

.service__number {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.05em;
  min-width: 28px;
}

.service__title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.5vw, 32px);
  font-weight: 600;
  flex: 1;
  transition: color 0.3s;
}

.service:hover .service__title {
  color: var(--accent);
}

.service__icon {
  color: var(--text-dim);
  transition: color 0.3s;
}

.service:hover .service__icon {
  color: var(--accent);
}

.service__content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s var(--ease-out-expo), padding 0.6s var(--ease-out-expo);
  padding-left: 52px;
}

.service--active .service__content {
  max-height: 300px;
  padding-top: 16px;
  padding-bottom: 8px;
}

.service__content p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
  max-width: 600px;
}

.service__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service__tags span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-muted);
  transition: border-color 0.3s, color 0.3s;
}

.service:hover .service__tags span {
  border-color: rgba(var(--accent-rgb), 0.2);
  color: var(--text);
}

/* --- Intelligent Automation --- */
.automation {
  padding: clamp(80px, 12vw, 160px) 0;
  border-top: 1px solid var(--border);
  overflow: hidden;
}

.automation__heading {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.automation__subtitle {
  font-size: clamp(16px, 1.4vw, 20px);
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 680px;
  margin-bottom: clamp(48px, 6vw, 80px);
}

.automation__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.automation__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 28px;
  transition: border-color 0.4s, transform 0.4s var(--ease-out-expo);
}

.automation__card:hover {
  border-color: rgba(var(--accent-rgb), 0.3);
  transform: translateY(-3px);
}

.automation__metric {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(36px, 3.5vw, 48px);
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
  margin-bottom: 4px;
}

.automation__metric-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 4px;
}

.automation__card-title {
  font-family: var(--font-display);
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 10px;
}

.automation__card-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

@media (max-width: 1024px) {
  .automation__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .automation__grid {
    grid-template-columns: 1fr;
  }
}

/* --- Work / Portfolio --- */
.work {
  padding: clamp(80px, 12vw, 160px) 0 clamp(40px, 6vw, 80px);
  border-top: 1px solid var(--border);
}

.work__heading {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: clamp(40px, 6vw, 72px);
  letter-spacing: -0.02em;
}

.work__gallery {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 clamp(20px, 4vw, 48px);
  margin-bottom: 32px;
}

.work__gallery::-webkit-scrollbar {
  display: none;
}

.work__track {
  display: flex;
  gap: 24px;
  width: max-content;
}

.project {
  width: clamp(340px, 40vw, 480px);
  flex-shrink: 0;
}

.project__inner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.4s, transform 0.4s var(--ease-out-expo);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.project__inner:hover {
  border-color: var(--accent, var(--border));
  transform: translateY(-4px);
}

.project__visual {
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.05), var(--surface));
  padding: 40px 32px;
  position: relative;
  overflow: hidden;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project__visual::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, var(--accent), transparent 70%);
  opacity: 0.03;
}

.project__icon-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.project__icon-grid span {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  padding: 10px 16px;
  background: var(--card-hover-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: center;
  color: var(--accent, var(--text-muted));
  transition: background 0.3s;
}

.project__inner:hover .project__icon-grid span {
  background: var(--card-hover-bg-strong);
}

.project__info {
  padding: 28px 28px 32px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project__category {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent, var(--text-dim));
  margin-bottom: 12px;
}

.project__title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 16px;
}

.project__desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
  flex: 1;
}

.project__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project__stack span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  background: var(--card-hover-bg);
  border-radius: 100px;
  color: var(--text-dim);
  transition: color 0.3s, background 0.3s;
}

.project__inner:hover .project__stack span {
  color: var(--text-muted);
  background: var(--card-hover-bg-strong);
}

/* Project CTA */
.project__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 16px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s, transform 0.4s var(--ease-out-expo), color 0.3s;
}

.project__cta svg {
  transition: transform 0.3s var(--ease-out-expo);
}

.project__inner:hover .project__cta {
  opacity: 1;
  transform: translateY(0);
  color: var(--accent);
}

.project__inner:hover .project__cta svg {
  transform: translate(2px, -2px);
}

[data-case-study] {
  cursor: none;
}

@media (max-width: 768px) {
  [data-case-study] { cursor: pointer; }
  .project__cta { opacity: 1; transform: none; color: var(--text-muted); }
}

/* ============================================
   Case Study Modal
   ============================================ */
.cs-modal {
  position: fixed;
  inset: 0;
  z-index: 10002;
  pointer-events: none;
  opacity: 0;
}

.cs-modal--active {
  pointer-events: all;
  opacity: 1;
}

.cs-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  opacity: 0;
  transition: opacity 0.5s;
}

.cs-modal--active .cs-modal__overlay {
  opacity: 1;
}

[data-theme="light"] .cs-modal__overlay {
  background: rgba(0,0,0,0.35);
}

.cs-modal__container {
  position: absolute;
  top: 0;
  right: 0;
  width: min(860px, 100vw);
  height: 100%;
  background: var(--bg);
  overflow-y: auto;
  overflow-x: hidden;
  transform: translateX(100%);
  transition: transform 0.6s var(--ease-out-expo);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.cs-modal--active .cs-modal__container {
  transform: translateX(0);
}

.cs-modal__container::-webkit-scrollbar {
  width: 6px;
}

.cs-modal__container::-webkit-scrollbar-track {
  background: transparent;
}

.cs-modal__container::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

/* Modal Header */
.cs-modal__header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: flex-end;
  padding: 24px 32px;
}

.cs-modal__close {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: var(--bg);
  transition: border-color 0.3s, color 0.3s, background 0.3s, transform 0.3s var(--ease-out-expo);
  cursor: none;
}

@media (max-width: 768px) {
  .cs-modal__close { cursor: pointer; }
}

.cs-modal__close:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: rotate(90deg);
}

/* Modal Hero */
.cs-modal__hero {
  padding: 0 clamp(24px, 4vw, 56px) clamp(32px, 4vw, 56px);
  border-bottom: 1px solid var(--border);
}

.cs-modal__category {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.cs-modal__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

/* Modal Content */
.cs-modal__content {
  padding: clamp(32px, 4vw, 56px);
}

.cs-modal__grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: clamp(32px, 4vw, 56px);
  align-items: start;
}

@media (min-width: 721px) {
  .cs-modal__sidebar {
    position: sticky;
    top: 96px;
  }
}

@media (max-width: 720px) {
  .cs-modal__grid {
    grid-template-columns: 1fr;
  }
  .cs-modal__sidebar {
    order: -1;
  }
}

/* Modal Sections */
.cs-modal__section {
  margin-bottom: 36px;
}

.cs-modal__section:last-child {
  margin-bottom: 0;
}

.cs-modal__section h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}

.cs-modal__section p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.8;
}

.cs-modal__section ul {
  list-style: none;
  padding: 0;
}

.cs-modal__section ul li {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  padding-left: 20px;
  position: relative;
  margin-bottom: 8px;
}

.cs-modal__section ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Modal Sidebar */
.cs-modal__sidebar {
}

.cs-modal__meta {
  margin-bottom: 32px;
}

.cs-modal__meta-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.cs-modal__meta-item:first-child {
  padding-top: 0;
}

.cs-modal__meta-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.cs-modal__meta-value {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}

.cs-modal__stack-section h4 {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.cs-modal__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cs-modal__stack span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-muted);
}

/* Work Controls */
.work__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.work__counter {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.work__counter-sep {
  margin: 0 8px;
  color: var(--text-dim);
}

.work__arrows {
  display: flex;
  gap: 12px;
}

.work__arrow {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}

.work__arrow:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.05);
}

/* --- Tech Stack --- */
.stack {
  padding: clamp(80px, 12vw, 160px) 0;
  border-top: 1px solid var(--border);
  overflow: hidden;
}

.stack__heading {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: clamp(40px, 6vw, 72px);
  letter-spacing: -0.02em;
}

.stack__marquee {
  overflow: hidden;
  padding: 12px 0;
}

.stack__marquee-track {
  display: flex;
  gap: 16px;
  white-space: nowrap;
  width: max-content;
}

.stack__marquee-track[data-direction="left"] {
  animation: stackMarqueeLeft 40s linear infinite;
}

.stack__marquee-track[data-direction="right"] {
  animation: stackMarqueeRight 40s linear infinite;
}

@keyframes stackMarqueeLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes stackMarqueeRight {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

.stack__marquee-track span {
  font-family: var(--font-display);
  font-size: clamp(14px, 1.5vw, 18px);
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 12px 28px;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-muted);
  transition: border-color 0.3s, color 0.3s, background 0.3s;
  flex-shrink: 0;
}

.stack__marquee-track span:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.05);
}

/* --- Contact --- */
.contact {
  padding: clamp(80px, 12vw, 160px) 0;
  border-top: 1px solid var(--border);
  overflow: hidden;
}

.contact__content {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.contact__heading {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.contact__desc {
  font-size: clamp(15px, 1.2vw, 18px);
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 48px;
}

.contact__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 64px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 16px 36px;
  border-radius: 100px;
  transition: all 0.4s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: var(--accent);
  color: var(--bg);
}

.btn--primary:hover {
  background: var(--white);
  transform: scale(1.03);
}

.btn--outline {
  border: 1px solid var(--border);
  color: var(--text);
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.05);
}

.btn__icon {
  display: flex;
  transition: transform 0.3s var(--ease-out-expo);
}

.btn:hover .btn__icon {
  transform: translate(2px, -2px);
}

/* Contact Info */
.contact__info {
  display: flex;
  justify-content: center;
  gap: 64px;
}

.contact__info-item {
  text-align: center;
}

.contact__info-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.contact__info-value {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
}

/* --- Footer --- */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer__left {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer__logo {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.footer__bracket {
  color: var(--accent);
}

.footer__copy {
  font-size: 13px;
  color: var(--text-dim);
}

.footer__right {
  display: flex;
  gap: 32px;
}

.footer__link {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  transition: color 0.3s;
}

.footer__link:hover {
  color: var(--accent);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
  .about__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 60px;
  }

  body {
    cursor: auto;
  }

  .cursor {
    display: none;
  }

  .header__nav {
    display: none;
  }

  .header__menu {
    display: flex;
  }

  .hero {
    padding-bottom: 80px;
  }

  .hero__scroll {
    bottom: 80px;
  }

  .about__stats {
    grid-template-columns: 1fr 1fr;
  }

  .service__header {
    gap: 16px;
  }

  .project {
    width: clamp(290px, 80vw, 400px);
  }

  .contact__info {
    flex-direction: column;
    gap: 24px;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .footer__left {
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .about__stats {
    grid-template-columns: 1fr;
  }

  .contact__actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* --- Utility: reveal animation helpers --- */
[data-animate] {
  will-change: transform, opacity;
}
