@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@200;300;400;600;800&family=Playfair+Display:ital,wght@0,400;0,600;1,400;1,600&display=swap');

:root {
  /* Light Theme Variables */
  --color-bg-light: #faf3e0;
  --color-bg-alt-light: #f1e7d0;
  --color-text-light-theme: #1a1a1a;
  
  /* Dark Theme Variables */
  --color-bg-dark: #121212;
  --color-bg-alt-dark: #1e1e1e;
  --color-text-dark-theme: #f5f5f5;

  /* Current Active Variables */
  --color-bg: var(--color-bg-light);
  --color-bg-alt: var(--color-bg-alt-light);
  --color-primary: #500604;
  --color-primary-light: #7a1210;
  --color-text: var(--color-text-light-theme);
  --color-text-inverse: #faf3e0;
  --color-text-muted: #555555;
  
  --font-sans: 'Outfit', sans-serif;
  --font-serif: 'Playfair Display', serif;
  --transition-smooth: cubic-bezier(0.77, 0, 0.175, 1);
  --section-padding: 8rem 0;
}

[data-theme="dark"] {
  --color-bg: var(--color-bg-dark);
  --color-bg-alt: var(--color-bg-alt-dark);
  --color-text: var(--color-text-dark-theme);
  --color-text-inverse: #1a1a1a;
  --color-text-muted: #aaaaaa;
  --color-primary: #ff4d4d; /* Brighter red for dark mode */
  --color-primary-light: #ff7a7a;
}

::selection {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background-color: var(--color-bg);
  color: var(--color-text);
}

/* View Transitions for Theme Toggle */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-old(root) {
  z-index: 1;
}
::view-transition-new(root) {
  z-index: 2;
}

/* Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-bg);
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.preloader-content {
  text-align: center;
  color: var(--color-primary);
  overflow: hidden;
}

.preloader-brand {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 600;
  font-style: italic;
  margin-bottom: 1rem;
  clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
}

.preloader-percentage {
  font-family: var(--font-sans);
  font-size: 2rem;
  font-weight: 800;
  opacity: 0;
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s, transform 0.3s;
}

.theme-toggle:hover {
  color: var(--color-primary);
  transform: scale(1.1);
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.1;
}

.serif-italic {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  font-size: 1.1em;
  color: var(--color-primary);
}

.text-reveal {
  overflow: hidden;
  display: inline-block;
  vertical-align: top;
}

.text-reveal span {
  display: inline-block;
  transform: translateY(100%);
  transition: transform 1s var(--transition-smooth);
}

.text-reveal.active span {
  transform: translateY(0);
}

/* Utilities */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2vw;
}

/* Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem 0;
  z-index: 100;
  transition: padding 0.5s var(--transition-smooth), background 0.5s;
}

.header.scrolled {
  padding: 1rem 0;
  background: var(--color-bg);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
  color: var(--color-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 101;
}

.logo-img {
  height: 120px;
  width: auto;
  object-fit: contain;
  transition: height 0.4s var(--transition-smooth);
}

.header.scrolled .logo-img {
  height: 80px;
}

.logo-img-footer {
  height: 140px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 3rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--transition-smooth);
}

.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.lang-switch {
  display: flex;
  gap: 1rem;
}

.lang-switch button {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
  opacity: 0.5;
  cursor: pointer;
  transition: color 0.3s, opacity 0.3s;
}

.lang-switch button.active, .lang-switch button:hover {
  color: var(--color-primary);
  opacity: 1;
}

.hero {
  min-height: 100vh;
  min-height: 100svh;
  padding-top: 160px;
  padding-bottom: 60px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

@media (max-width: 768px) {
  .hero {
    padding-top: 220px;
  }
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 80% 20%, rgba(80, 6, 4, 0.05) 0%, transparent 40%),
              radial-gradient(circle at 20% 80%, rgba(80, 6, 4, 0.03) 0%, transparent 40%);
  z-index: -1;
}

.hero h1 {
  font-size: clamp(4rem, 8vw, 9rem);
  letter-spacing: -2px;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 2;
}

.hero p {
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  max-width: 600px;
  color: var(--color-text-muted);
  margin-bottom: 3rem;
  font-weight: 300;
}

.btn-magnet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 3rem;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-radius: 100px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--transition-smooth);
}

.btn-magnet span {
  position: relative;
  z-index: 2;
  transition: transform 0.3s var(--transition-smooth);
}

.btn-magnet::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-primary-light);
  border-radius: 100px;
  transform: scale(0);
  transition: transform 0.5s var(--transition-smooth);
  z-index: 1;
}

.btn-magnet:hover::before {
  transform: scale(1);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-text);
  cursor: pointer;
}

.btn-outline:hover span {
  color: #ffffff;
}

/* Marquee */
.marquee-wrapper {
  padding: 2rem 0;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  overflow: hidden;
  display: flex;
  white-space: nowrap;
  transform: rotate(-2deg) scale(1.05);
  position: relative;
  z-index: 10;
  margin: 4rem 0;
}

.marquee-inner {
  display: flex;
  animation: marquee 20s linear infinite;
}

.marquee-inner span {
  font-size: 2.5rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0 2rem;
  font-family: var(--font-sans);
}

.marquee-inner span i {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  margin-left: 10px;
}

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

/* Services */
.services {
  padding: var(--section-padding);
}

.section-title {
  font-size: clamp(3rem, 5vw, 6rem);
  margin-bottom: 4rem;
  border-bottom: 2px solid rgba(80, 6, 4, 0.1);
  padding-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.section-title span {
  font-size: 1.2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.services-list {
  display: flex;
  flex-direction: column;
}

.service-item {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  padding: 3rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  cursor: pointer;
  position: relative;
  transition: padding-left 0.4s var(--transition-smooth);
}

.service-item:hover {
  padding-left: 2rem;
}

.service-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-bg-alt);
  z-index: -1;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.5s var(--transition-smooth);
}

.service-item:hover::before {
  transform: scaleY(1);
  transform-origin: top;
}

.service-number {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--color-primary);
}

.service-name {
  font-size: clamp(2rem, 3vw, 3.5rem);
  font-weight: 800;
  transition: color 0.3s;
}

.service-desc {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s var(--transition-smooth);
}

.service-item:hover .service-desc {
  opacity: 1;
  transform: translateY(0);
}

/* Works Mockup */
.works {
  padding: var(--section-padding);
  background: var(--color-text);
  color: var(--color-text-inverse);
}

.works .section-title {
  border-bottom-color: rgba(255,255,255,0.1);
}

.works .section-title span {
  color: var(--color-bg);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4rem;
  margin-top: 5rem;
}

.work-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 4/3;
  cursor: pointer;
}

.work-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--transition-smooth);
}

.work-card:hover img {
  transform: scale(1.05);
}

.work-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 3rem 2rem 2rem;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.5s var(--transition-smooth);
}

.work-card:hover .work-info {
  transform: translateY(0);
  opacity: 1;
}

/* Click Hint Bubble */
.click-hint {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  animation: pulse-hint 2s infinite;
  pointer-events: none; /* Let clicks pass through to the card */
}
@keyframes pulse-hint {
  0% { transform: scale(1); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
  50% { transform: scale(1.05); box-shadow: 0 4px 20px rgba(0,0,0,0.4); }
  100% { transform: scale(1); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
}

.work-info h3 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #ffffff;
}

.work-info p {
  font-family: var(--font-serif);
  font-style: italic;
  color: rgba(255,255,255,0.7);
}

/* Lab / Playground */
.lab-section {
  padding: var(--section-padding);
  background: var(--color-bg);
  overflow: hidden;
}

.lab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  margin-top: 5rem;
}

.extra-grid {
  margin-top: 0;
}

.lab-card {
  position: relative;
  border-radius: 20px;
  background: var(--color-bg-alt);
  min-height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* 3D Tilt Card */
.tilt-card {
  perspective: 1000px;
  background: transparent;
  box-shadow: none;
}
.tilt-card-inner {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
  border-radius: 20px;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.1s ease;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  border: 1px solid rgba(255,255,255,0.05);
}
.tilt-card-glare {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.tilt-card-inner h3 {
  transform: translateZ(50px);
  font-size: 2rem;
  margin-bottom: 1rem;
}
.tilt-card-inner p {
  transform: translateZ(30px);
  color: var(--color-text-muted);
}
.tilt-card-inner .lab-icon {
  transform: translateZ(60px);
  margin-top: 2rem;
  color: var(--color-primary);
}

/* Scramble Card */
.scramble-card {
  padding: 3rem;
  background: #0f1115; /* Dark background for terminal feel */
  color: #fff;
}
.scramble-content {
  width: 100%;
}
.scramble-text {
  font-family: monospace;
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: #00ff66; /* Matrix green */
}
.scramble-card p {
  color: rgba(255,255,255,0.6);
  margin-bottom: 2rem;
}
.code-line {
  font-family: monospace;
  background: rgba(0,0,0,0.5);
  padding: 1rem;
  border-radius: 5px;
  color: #a9b7c6;
}
.cursor-blink {
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

/* Gooey Card */
.gooey-card {
  background: var(--color-primary);
  color: #fff;
  cursor: crosshair;
}
.gooey-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: url('#goo');
  position: relative;
}
.gooey-container h3 {
  position: relative;
  z-index: 10;
  font-size: 2rem;
  pointer-events: none;
}
.blob {
  position: absolute;
  width: 80px;
  height: 80px;
  background: var(--color-primary-light);
  border-radius: 50%;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.blob.b1 {
  transform: translate(-30px, -20px);
  animation: float1 4s ease-in-out infinite alternate;
}
.blob.b2 {
  transform: translate(30px, 20px);
  animation: float2 5s ease-in-out infinite alternate;
}
@keyframes float1 {
  to { transform: translate(30px, 20px) scale(1.2); }
}
@keyframes float2 {
  to { transform: translate(-30px, -20px) scale(0.8); }
}

/* Micro Interaction Card */
.micro-card {
  padding: 3rem;
  background: var(--color-bg-alt);
  display: flex;
  flex-direction: column;
}
.micro-content {
  width: 100%;
}
.micro-content h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}
.micro-content p {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}
.stateful-btn {
  position: relative;
  width: 180px;
  height: 50px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 25px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stateful-btn.loading {
  width: 50px;
  color: transparent;
}
.stateful-btn.success {
  width: 50px;
  background: #28a745; /* Success green */
}
.btn-text {
  transition: opacity 0.3s;
}
.stateful-btn.loading .btn-text,
.stateful-btn.success .btn-text {
  opacity: 0;
}
.btn-loader {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  opacity: 0;
  animation: spin 1s linear infinite;
}
.stateful-btn.loading .btn-loader {
  opacity: 1;
}
.btn-check {
  position: absolute;
  width: 24px;
  height: 24px;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.stateful-btn.success .btn-check {
  opacity: 1;
  transform: scale(1);
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Data SVG Card */
.data-card {
  padding: 3rem;
  background: #1e2128;
  color: #fff;
  display: flex;
  flex-direction: column;
}
.data-content { width: 100%; }
.data-content h3 { font-size: 1.8rem; margin-bottom: 1rem; }
.data-content p { color: rgba(255,255,255,0.6); margin-bottom: 2rem; }
.progress-ring-container {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto;
}
.progress-ring {
  transform: rotate(-90deg);
}
.progress-ring__circle {
  stroke-dasharray: 326.72; /* 2 * pi * r (52) */
  stroke-dashoffset: 326.72;
  transition: stroke-dashoffset 2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.progress-ring-container:hover .progress-ring__circle {
  stroke-dashoffset: 6.5; /* Approx 98% */
}
.progress-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-sans);
}

/* Skeleton Card */
.skeleton-card {
  padding: 3rem;
  background: var(--color-bg-alt);
  display: flex;
  flex-direction: column;
}
.skeleton-content { width: 100%; }
.skeleton-content h3 { font-size: 1.8rem; margin-bottom: 1rem; }
.skeleton-content p { color: var(--color-text-muted); margin-bottom: 2rem; }

.profile-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--color-bg);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  cursor: pointer;
  transition: transform 0.2s;
}
.profile-card:hover {
  transform: translateY(-5px);
}
.skeleton {
  background: linear-gradient(90deg, rgba(130, 130, 130, 0.1) 25%, rgba(130, 130, 130, 0.2) 50%, rgba(130, 130, 130, 0.1) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 4px;
}
.skel-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}
.skel-info {
  flex: 1;
}
.skel-line {
  height: 12px;
  width: 100%;
  margin-bottom: 8px;
}
.skel-line.short {
  width: 60%;
  margin-bottom: 0;
}
@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.real-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
}
.real-avatar {
  width: 50px;
  height: 50px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
}
.real-info h4 { margin: 0 0 4px 0; font-size: 1.1rem; }
.real-info p { margin: 0; font-size: 0.9rem; color: var(--color-text-muted); }

/* Extra Grid Wrapper */
.lab-extra-wrapper {
  height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0; /* Will be toggled by JS */
}

/* Experiment 7: Spotlight Card */
.spotlight-card { padding: 3rem; flex-direction: column; }
.spotlight-content { width: 100%; }
.spotlight-content h3 { font-size: 1.8rem; margin-bottom: 1rem; }
.spotlight-content p { color: var(--color-text-muted); margin-bottom: 2rem; }
.spotlight-box {
  width: 100%;
  height: 120px;
  background: #111;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.spotlight-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle 100px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.spotlight-box:hover::before { opacity: 1; }

/* Experiment 8: Compare Slider */
.compare-card { padding: 3rem; flex-direction: column; }
.compare-content { width: 100%; }
.compare-content h3 { font-size: 1.8rem; margin-bottom: 1rem; }
.compare-content p { color: var(--color-text-muted); margin-bottom: 2rem; }
.compare-slider {
  position: relative;
  width: 100%;
  height: 120px;
  background: #222;
  border-radius: 12px;
  overflow: hidden;
  cursor: col-resize;
}
.compare-img {
  position: absolute;
  top: 0; left: 0; height: 100%; width: 100%;
  display: flex; align-items: center; justify-content: center;
  font-weight: bold; font-size: 1.2rem;
}
.compare-img.before { background: #ff4757; color: white; }
.compare-img.after {
  background: #2ed573; color: white; width: 50%;
  border-right: 2px solid white;
  overflow: hidden;
}
.compare-handle {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 30px; height: 30px;
  background: white; color: #333;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: bold;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

/* Experiment 9: Password Feedback */
.pass-card { padding: 3rem; flex-direction: column; }
.pass-content { width: 100%; }
.pass-content h3 { font-size: 1.8rem; margin-bottom: 1rem; }
.pass-content p { color: var(--color-text-muted); margin-bottom: 2rem; }
#passInput {
  width: 100%; padding: 12px 15px;
  border-radius: 8px; border: 1px solid rgba(150,150,150,0.3);
  background: var(--color-bg); color: var(--color-text);
  font-size: 1rem; outline: none; margin-bottom: 10px;
}
.pass-strength {
  width: 100%; height: 6px;
  background: rgba(150,150,150,0.2);
  border-radius: 3px; overflow: hidden;
}
.pass-bar {
  height: 100%; width: 0%;
  background: #ff4757;
  transition: all 0.3s ease;
}

/* Experiment 10: Tooltip Popover */
.tooltip-card { padding: 3rem; flex-direction: column; }
.tooltip-content { width: 100%; }
.tooltip-content h3 { font-size: 1.8rem; margin-bottom: 1rem; }
.tooltip-content p { color: var(--color-text-muted); margin-bottom: 2rem; }
.tooltip-target {
  display: inline-block;
  padding: 10px 20px;
  background: rgba(150,150,150,0.1);
  border-radius: 8px; cursor: help;
  position: relative; font-weight: bold;
}
.tooltip-box {
  position: absolute;
  bottom: 150%; left: 50%;
  transform: translateX(-50%) translateY(10px) scale(0.9);
  background: var(--color-primary); color: white;
  padding: 8px 15px; border-radius: 6px;
  font-size: 0.9rem; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.tooltip-box::after {
  content: ''; position: absolute;
  top: 100%; left: 50%; transform: translateX(-50%);
  border-width: 6px; border-style: solid;
  border-color: var(--color-primary) transparent transparent transparent;
}
.tooltip-target:hover .tooltip-box {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

/* Experiment 11: Logo Ticker */
.ticker-card { padding: 3rem; flex-direction: column; }
.ticker-content { width: 100%; overflow: hidden; }
.ticker-content h3 { font-size: 1.8rem; margin-bottom: 1rem; }
.ticker-content p { color: var(--color-text-muted); margin-bottom: 2rem; }
.ticker-wrapper {
  width: 100%; overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.ticker-track {
  display: flex; gap: 2rem;
  width: max-content;
  animation: scroll-ticker 10s linear infinite;
}
.ticker-track:hover { animation-play-state: paused; }
.ticker-track span {
  font-size: 1.5rem; font-weight: bold; color: rgba(150,150,150,0.5);
}
@keyframes scroll-ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - 1rem)); }
}

/* Experiment 12: Drag & Drop */
.drag-card { padding: 3rem; flex-direction: column; }
.drag-content { width: 100%; }
.drag-content h3 { font-size: 1.8rem; margin-bottom: 1rem; }
.drag-content p { color: var(--color-text-muted); margin-bottom: 2rem; }
.drag-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.drag-item {
  padding: 15px; background: rgba(150,150,150,0.1);
  border-radius: 8px; cursor: grab;
  font-weight: 500; display: flex; align-items: center;
}
.drag-item::before {
  content: '≡'; margin-right: 15px; color: var(--color-text-muted); font-size: 1.2rem;
}
.drag-item.dragging { opacity: 0.5; background: var(--color-primary-light); color: white; }

/* Experiment 13: Toast Notifications */
.toast-card { padding: 3rem; flex-direction: column; position: relative; }
.toast-content { width: 100%; height: 100%; display: flex; flex-direction: column; }
.toast-content h3 { font-size: 1.8rem; margin-bottom: 1rem; }
.toast-content p { color: var(--color-text-muted); margin-bottom: 2rem; }
.toast-container {
  position: absolute; bottom: 20px; right: 20px;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none; z-index: 10;
}
.toast {
  background: var(--color-bg); color: var(--color-text);
  padding: 12px 20px; border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  border-left: 4px solid var(--color-primary);
  font-size: 0.9rem; font-weight: 500;
  animation: slideInToast 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes slideInToast {
  from { transform: translateX(100%) scale(0.8); opacity: 0; }
  to { transform: translateX(0) scale(1); opacity: 1; }
}

/* Experiment 14: Dynamic Filters */
.filter-card { padding: 3rem; flex-direction: column; }
.filter-content { width: 100%; }
.filter-content h3 { font-size: 1.8rem; margin-bottom: 1rem; }
.filter-content p { color: var(--color-text-muted); margin-bottom: 2rem; }
.filter-controls { display: flex; gap: 10px; margin-bottom: 20px; }
.filter-controls button {
  background: rgba(150,150,150,0.1); border: none;
  padding: 5px 15px; border-radius: 20px; color: var(--color-text-muted);
  cursor: pointer; transition: all 0.2s; font-weight: bold;
}
.filter-controls button.active, .filter-controls button:hover {
  background: var(--color-primary); color: white;
}
.filter-grid {
  display: flex; flex-wrap: wrap; gap: 10px;
  position: relative; height: 120px; align-items: flex-start;
}
.filter-item {
  background: var(--color-bg); padding: 15px 25px;
  border-radius: 8px; font-weight: bold;
  border: 1px solid rgba(255,255,255,0.05);
}

/* Experiment 15: Interactive Chart */
.chart-card { padding: 3rem; flex-direction: column; }
.chart-content { width: 100%; }
.chart-content h3 { font-size: 1.8rem; margin-bottom: 1rem; }
.chart-content p { color: var(--color-text-muted); margin-bottom: 2rem; }
.chart-container {
  width: 100%; background: var(--color-bg);
  border-radius: 12px; padding: 15px;
  position: relative;
}
.line-chart { width: 100%; height: auto; overflow: visible; }
.data-point {
  fill: var(--color-bg); stroke: var(--color-primary);
  stroke-width: 2; cursor: pointer; transition: r 0.2s;
}
.data-point:hover { r: 8; fill: var(--color-primary); }
.chart-tooltip {
  position: absolute; top: -10px; left: 0;
  background: white; color: black;
  padding: 4px 10px; border-radius: 4px;
  font-size: 0.8rem; font-weight: bold;
  opacity: 0; pointer-events: none;
  transform: translate(-50%, -100%);
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* About Grid */
.about {
  padding: var(--section-padding);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 6rem;
  align-items: center;
}

.about-text h2 {
  font-size: clamp(2.5rem, 4vw, 4.5rem);
  margin-bottom: 2rem;
}

.about-text p {
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 1.5rem;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 4rem;
}

.stat h4 {
  font-size: 4rem;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat p {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
}

.about-image-wrapper {
  position: relative;
}

.about-img {
  width: 100%;
  border-radius: 20px;
  box-shadow: -20px 20px 0 var(--color-primary);
}

/* Footer */
footer {
  background: var(--color-bg-alt);
  padding: 6rem 0 2rem;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 6rem;
}

.footer-top h2 {
  font-size: clamp(4rem, 6vw, 8rem);
  line-height: 1;
  letter-spacing: -2px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  border-top: 1px solid rgba(0,0,0,0.1);
  padding-top: 4rem;
}

.footer-col h5 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: var(--color-primary);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.8rem;
}

.footer-col a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  transition: color 0.3s;
}

.footer-col a:hover {
  color: var(--color-primary);
}

  .footer-bottom {
    margin-top: 6rem;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(0,0,0,0.5);
  }
  
  /* Work Button */
  .work-btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
    background: var(--color-primary);
    color: var(--color-text-light);
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.3s var(--transition-smooth), transform 0.3s var(--transition-smooth);
  }
  
  .work-btn:hover {
    background: var(--color-primary-light);
    transform: translateY(-2px);
  }
  
  /* Modal */
  .modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .modal.show {
    display: block;
    opacity: 1;
  }
  
  .modal-content {
    background-color: var(--color-bg);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 1200px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    transform: translateY(20px);
    transition: transform 0.3s ease;
  }
  
  .modal.show .modal-content {
    transform: translateY(0);
  }
  
  .close-modal {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10;
  }
  
  .close-modal:hover,
  .close-modal:focus {
    color: var(--color-primary);
    text-decoration: none;
    cursor: pointer;
  }
  
  .modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 1rem;
  }
  
  .modal-body img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-height: 70vh;
    object-fit: contain;
    background: #000;
  }
  
  .modal-body iframe {
    width: 100%;
    height: 70vh;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    background: #fff;
  }
  
  .modal-footer {
    margin-top: 2rem;
    text-align: center;
    width: 100%;
  }
  
  .modal-btn {
    padding: 1rem 3rem;
  }
  
  /* Responsive */
  @media (max-width: 1024px) {
  .service-item {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 2rem 0;
  }
  .service-desc {
    opacity: 1;
    transform: none;
  }
  .works-grid, .about-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .section-title {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .logo-img {
    height: 80px;
  }
  .header.scrolled .logo-img {
    height: 60px;
  }
}
