:root {
  --bg: #0b0c10;
  --card-bg: #1f2833;
  --surface: rgba(69, 162, 158, 0.06);
  --glass-border: rgba(255, 255, 255, 0.08);
  --amber: #45a29e;
  --blue: #66fcf1;
  --violet: #9b59b6;
  --text: #f5f5f7;
  --muted: #c5c6c7;
  --card-text: #dcdde0;
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-organic: cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-mode {
  --bg: #f6f8fa;
  --card-bg: #ffffff;
  --surface: rgba(31, 40, 51, 0.04);
  --glass-border: rgba(0, 0, 0, 0.08);
  --text: #111114;
  --muted: #5f6368;
  --card-text: #444449;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.045'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: 0.6;
}

a, button, .interactive {
  cursor: pointer;
}

img {
  max-width: 100%;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.6rem;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-text {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -1px;
}

.loader-bar {
  width: 160px;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

body.light-mode .loader-bar {
  background: rgba(0, 0, 0, 0.08);
}

.loader-progress {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--amber), var(--blue));
  animation: loaderFill 1.4s ease forwards;
  box-shadow: 0 0 12px var(--amber);
}

@keyframes loaderFill {
  0% { width: 0%; }
  100% { width: 100%; }
}

.background {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(circle at 16% 20%, rgba(69, 162, 158, 0.16), transparent 48%),
    radial-gradient(circle at 84% 80%, rgba(102, 252, 241, 0.08), transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(31, 40, 51, 0.5), transparent 60%),
    #0d0d0d;
  transition: background 0.5s ease;
}

body.light-mode .background {
  background:
    radial-gradient(circle at 18% 22%, rgba(69, 162, 158, 0.10), transparent 45%),
    radial-gradient(circle at 82% 78%, rgba(102, 252, 241, 0.08), transparent 45%),
    radial-gradient(circle at 50% 55%, rgba(63, 92, 102, 0.05), transparent 42%),
    var(--bg);
}

.grid-lines {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.35;
  animation: gridMove 30s linear infinite;
  mask-image: radial-gradient(circle at center, black 20%, transparent 75%);
  transition: background-image 0.5s ease;
}

body.light-mode .grid-lines {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
}

@keyframes gridMove {
  0% { transform: translateY(0); }
  100% { transform: translateY(80px); }
}

.blobs {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  width: 650px;
  height: 650px;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.32;
  animation: drift 32s ease-in-out infinite alternate;
}

.blob-1 { background: var(--amber); top: -12%; left: -12%; }
.blob-2 { background: var(--blue); bottom: -18%; right: -12%; animation-delay: -12s; }
.blob-3 {
  background: var(--violet);
  width: 500px;
  height: 500px;
  top: 40%;
  left: 42%;
  opacity: 0.14;
  animation-delay: -22s;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(90px, 60px) scale(1.15); }
}

#particles {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(128, 128, 128, 0.35);
  border-radius: 50%;
  animation: floatParticle 8s ease-in-out infinite;
}

@keyframes floatParticle {
  0%, 100% { transform: translateY(0) translateX(0); opacity: 0.2; }
  50% { transform: translateY(-60px) translateX(25px); opacity: 0.8; }
}

#spotlight {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    circle 700px at var(--x, 50%) var(--y, 50%),
    var(--spot, rgba(255, 255, 255, 0.06)),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.5s ease, background 0.4s ease;
}

body:hover #spotlight {
  opacity: 1;
}

body.spot-amber { --spot: rgba(69, 162, 158, 0.09); }
body.spot-blue { --spot: rgba(102, 252, 241, 0.09); }
body.spot-violet { --spot: rgba(155, 89, 182, 0.08); }

#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--amber), var(--blue));
  width: 0%;
  z-index: 101;
  box-shadow: 0 0 10px var(--amber);
}

.glass {
  background: var(--surface);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--glass-border);
  border-radius: 26px;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
  transition: transform 0.45s var(--spring), box-shadow 0.4s ease;
}

.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(135deg, rgba(255,255,255,0.22), transparent 40%, transparent 60%, rgba(255,255,255,0.08));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.7;
}

body.light-mode .glass::before {
  background: linear-gradient(135deg, rgba(0,0,0,0.12), transparent 40%, transparent 60%, rgba(0,0,0,0.05));
  opacity: 0.6;
}

.glass::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle 260px at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.16),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

body.light-mode .glass::after {
  background: radial-gradient(
    circle 260px at var(--mx, 50%) var(--my, 50%),
    rgba(0, 0, 0, 0.08),
    transparent 70%
  );
}

.glass:hover::after {
  opacity: 1;
}

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 8, 10, 0.42);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.9rem 6%;
  transition: background 0.3s ease, padding 0.3s ease;
}

body.light-mode nav {
  background: rgba(246, 248, 250, 0.72);
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

nav.scrolled {
  background: rgba(8, 8, 10, 0.92);
  padding: 0.7rem 6%;
}

body.light-mode nav.scrolled {
  background: rgba(246, 248, 250, 0.96);
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.8px;
  background: linear-gradient(90deg, var(--text), var(--muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.3s var(--ease-organic);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--amber), var(--blue));
  transition: width 0.35s var(--ease-organic);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.theme-toggle {
  position: relative;
  width: 60px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: transparent;
  display: block;
  overflow: visible;
  font-size: 0;
  transition: background 0.4s var(--ease-organic), border-color 0.4s var(--ease-organic);
}

.theme-toggle::before {
  content: '☀️';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--blue));
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(69, 162, 158, 0.35);
  transition: transform 0.45s var(--spring), background 0.4s var(--ease-organic);
}

body.light-mode .theme-toggle::before {
  content: '🌙';
  transform: translateX(28px);
}

.theme-toggle:hover::before {
  filter: brightness(1.1);
}

.hamburger {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--surface);
  color: var(--text);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  z-index: 110;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 105;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.mobile-nav.open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav a {
  font-size: 2rem;
  font-weight: 700;
  color: var(--muted);
  transition: color 0.3s ease;
}

.mobile-nav a:hover {
  color: var(--text);
}

@media (max-width: 820px) {
  .nav-links {
    display: none;
  }
  .hamburger {
    display: flex;
  }
}

section {
  position: relative;
  z-index: 1;
  padding: 130px 6%;
  max-width: 1400px;
  margin: 0 auto;
}

[id] {
  scroll-margin-top: 100px;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 3.5rem;
  flex-wrap: wrap;
}

.section-title h2 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--amber) 0%, var(--amber) 40%, transparent 100%);
  border-radius: 2px;
  opacity: 0.6;
}

.section-title p {
  color: var(--muted);
  max-width: 520px;
}

.view-all {
  color: var(--muted);
  font-weight: 500;
  transition: color 0.3s ease;
}

.view-all:hover {
  color: var(--text);
}

.reveal {
  opacity: 0;
  transform: translateY(45px);
  transition: opacity 0.8s ease, transform 0.8s var(--spring);
  transition-delay: calc(var(--i, 0) * 80ms);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 150px 6% 80px 8%;
  max-width: 1400px;
  margin: 0 auto;
}

.kinetic-line {
  font-size: clamp(3.5rem, 11vw, 8.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -4px;
  margin: 0.6rem 0 1.4rem;
  color: var(--text);
}

.kinetic-line.hero-greeting {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 500;
  letter-spacing: -1px;
  margin: 0 0 0.2rem;
  color: var(--muted);
}

.kinetic-line.hero-name {
  font-weight: 700;
  letter-spacing: -3px;
}

.kinetic-line span {
  display: inline-block;
  opacity: 0;
  transform: translateY(60px) rotateX(20deg);
  background: linear-gradient(135deg, #fff 0%, #d0d0d5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: letterReveal 0.8s var(--spring) forwards;
  animation-delay: calc(var(--i) * 0.05s);
}

@keyframes letterReveal {
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0);
  }
}

.hero-pretitle {
  font-size: 1.25rem;
  color: var(--muted);
  opacity: 0;
  animation: fadeUp 1s ease forwards;
}

.hero .type-line {
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  font-weight: 500;
  color: var(--amber);
  margin-bottom: 1.8rem;
  opacity: 0;
  animation: fadeUp 1s 0.28s ease forwards;
}

.hero .sub {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 2.8rem;
  opacity: 0;
  animation: fadeUp 1s 0.5s ease forwards;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 1s 0.72s ease forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(35px); }
  to { opacity: 1; transform: translateY(0); }
}

.value-prop {
  padding-top: 0;
  margin-top: -30px;
}

.value-card {
  padding: 2rem 2.5rem;
  text-align: center;
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  font-weight: 500;
  line-height: 1.6;
}

.value-card span {
  background: linear-gradient(90deg, var(--amber), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

.about-section {
  padding-top: 100px;
}

.about-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 2rem;
  align-items: start;
}

.about-card {
  padding: 2.6rem;
}

.about-card p {
  color: var(--card-text);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.2rem;
}

.about-card p:last-child {
  margin-bottom: 0;
}

.about-card .lead {
  font-size: 1.25rem;
  color: var(--text);
  line-height: 1.65;
}

.about-card strong {
  color: var(--amber);
  font-weight: 600;
}

.about-highlights {
  display: grid;
  gap: 1.2rem;
}

.about-stat {
  padding: 1.6rem;
  text-align: center;
}

.about-stat-num {
  display: block;
  font-size: 2.8rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--amber), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.about-stat-label {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.5rem;
  display: block;
}

@media (max-width: 900px) {
  .about-layout {
    grid-template-columns: 1fr;
  }
  .about-highlights {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .about-highlights {
    grid-template-columns: 1fr;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.95rem 1.8rem;
  border-radius: 16px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.35s var(--spring), box-shadow 0.35s var(--ease-organic), border-color 0.3s var(--ease-organic), background 0.3s var(--ease-organic);
  border: 1px solid transparent;
  will-change: transform;
}

.btn-primary {
  background: linear-gradient(135deg, rgba(255,255,255,0.14), rgba(255,255,255,0.05));
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
  box-shadow: 0 8px 28px rgba(0,0,0,0.2);
}

body.light-mode .btn-primary {
  color: var(--text);
  background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
}

.btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(69, 162, 158, 0.25);
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.12);
  color: #e0e0e5;
}

body.light-mode .btn-secondary {
  color: var(--muted);
  border-color: rgba(0,0,0,0.12);
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-4px);
}

.featured-grid,
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2.2rem;
}

.featured-grid {
  grid-template-columns: 1.8fr 1fr 1fr;
}

.project-hero {
  grid-row: span 2;
  display: flex;
  flex-direction: column;
}

.project-hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  height: 100%;
  padding: 1.8rem;
}

.project-hero .thumb {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 0;
}

.hero-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-text h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 0.8rem;
  letter-spacing: -1px;
}

.project-description {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--card-text);
  margin-bottom: 0.8rem;
}

.project-meta {
  font-size: 0.85rem;
  color: var(--amber);
  font-weight: 500;
  padding-top: 1rem;
  border-top: 1px solid rgba(69, 162, 158, 0.15);
  margin-top: auto;
}

@media (max-width: 1100px) {
  .featured-grid {
    grid-template-columns: 1.5fr 1fr;
  }
  .project-hero {
    grid-row: span 1;
    grid-column: span 2;
  }
  .project-hero-content {
    flex-direction: row;
    align-items: flex-start;
    gap: 1.8rem;
  }
  .project-hero .thumb {
    width: 45%;
    height: 220px;
    flex-shrink: 0;
  }
}

@media (max-width: 800px) {
  .featured-grid {
    grid-template-columns: 1fr;
  }
  .project-hero {
    grid-column: span 1;
  }
  .project-hero-content {
    flex-direction: column;
  }
  .project-hero .thumb {
    width: 100%;
    height: 240px;
  }
}

.project-card {
  display: flex;
  flex-direction: column;
  padding: 1.4rem;
  position: relative;
}

.project-card .thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 20px;
  margin-bottom: 1.4rem;
  transition: transform 0.55s ease;
}

.project-card:hover .thumb {
  transform: scale(1.04);
}

.project-card h3 {
  font-size: 1.55rem;
  margin-bottom: 0.5rem;
}

.project-card p {
  color: var(--muted);
  font-size: 0.98rem;
  margin-bottom: 1.4rem;
  flex: 1;
}

.project-status {
  position: absolute;
  top: 1.9rem;
  right: 1.9rem;
  background: rgba(69, 162, 158, 0.16);
  border: 1px solid rgba(69, 162, 158, 0.35);
  color: var(--amber);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  z-index: 2;
}

body.light-mode .project-status {
  background: rgba(69, 162, 158, 0.12);
}

.card-actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.card-actions .btn {
  padding: 0.7rem 1.35rem;
  font-size: 0.92rem;
  border-radius: 13px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  width: 100%;
  max-width: 1020px;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 30px;
  padding: 2rem;
  transform: scale(0.94) translateY(20px);
  transition: transform 0.45s var(--spring);
}

.modal-overlay.open .modal-content {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.modal-title-wrap h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -1px;
}

.modal-category {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.modal-close {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background 0.3s ease;
  font-size: 1.4rem;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.18);
}

.modal-image {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border-radius: 22px;
  margin-bottom: 2rem;
}

.case-body {
  display: grid;
  gap: 1.8rem;
}

.case-block {
  padding: 1.6rem;
  border-radius: 22px;
}

.case-block h3 {
  font-size: 1.15rem;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.case-block p {
  color: var(--card-text);
  font-size: 0.97rem;
  line-height: 1.75;
}

.architecture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.8rem;
}

.arch-item {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 1rem 0.8rem;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 600;
  transition: transform 0.3s ease;
}

.arch-item:hover {
  transform: translateY(-3px);
}

.challenge-list {
  display: grid;
  gap: 1rem;
}

.challenge-item {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.1rem 1.3rem;
}

.challenge-item h4 {
  font-size: 0.98rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.challenge-item p {
  font-size: 0.93rem;
  color: var(--muted);
}

.modal-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.2rem;
}

.achievement-card {
  padding: 2.2rem 2rem;
  text-align: left;
  position: relative;
}

.achievement-year {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--amber);
  letter-spacing: 1px;
  margin-bottom: 0.8rem;
  padding: 0.35rem 0.8rem;
  background: rgba(69, 162, 158, 0.12);
  border: 1px solid rgba(69, 162, 158, 0.2);
  border-radius: 6px;
  display: block;
  width: fit-content;
}

.achievement-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.achievement-card p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.awards-section {
  margin-top: 3.5rem;
  text-align: center;
}

.awards-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: var(--text);
}

.awards-list {
  list-style: none;
  display: inline-flex;
  flex-direction: column;
  gap: 0.7rem;
  text-align: left;
}

.awards-list li {
  color: var(--card-text);
  font-size: 1.05rem;
  padding-left: 1.5rem;
  position: relative;
}

.awards-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--blue));
}

.awards-list li span {
  color: var(--muted);
  font-size: 0.9rem;
}

.leadership-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.2rem;
}

.leadership-card {
  padding: 2.2rem 2rem;
  text-align: center;
}

.leadership-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.7rem;
}

.leadership-card p {
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.65;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(160px, auto);
  gap: 1.4rem;
}

.skill-card {
  padding: 1.7rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.skill-card:nth-child(2),
.skill-card:nth-child(4) {
  grid-column: span 2;
}

.skill-card:nth-child(1),
.skill-card:nth-child(3),
.skill-card:nth-child(5),
.skill-card:nth-child(6) {
  grid-column: span 2;
}

@media (min-width: 1200px) {
  .skill-card:nth-child(2),
  .skill-card:nth-child(4) {
    grid-column: span 2;
  }
  .skill-card:nth-child(1) { grid-column: span 1; }
  .skill-card:nth-child(3) { grid-column: span 1; }
  .skill-card:nth-child(5) { grid-column: span 2; }
  .skill-card:nth-child(6) { grid-column: span 2; }
}

@media (max-width: 900px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .skill-card,
  .skill-card:nth-child(2),
  .skill-card:nth-child(4) {
    grid-column: span 2;
  }
}

@media (max-width: 560px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .skill-card {
    grid-column: span 1 !important;
  }
}

.skill-card h3 {
  font-size: 1.15rem;
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.skill-pills span {
  font-size: 0.86rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  font-weight: 500;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.skill-note {
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  line-height: 1.5;
}

.skill-wide {
  grid-column: span 2;
}

.skill-pills span:hover {
  transform: translateY(-2px);
  border-color: rgba(69, 162, 158, 0.5);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.testimonial-card {
  padding: 2rem;
}

.quote-mark {
  font-size: 2.5rem;
  line-height: 1;
  color: var(--amber);
  margin-bottom: 0.5rem;
}

.testimonial-text {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--card-text);
  margin-bottom: 1.2rem;
}

.testimonial-author {
  font-weight: 700;
  color: var(--text);
}

.testimonial-role {
  font-size: 0.9rem;
  color: var(--muted);
}

.timeline-section {
  padding-bottom: 120px;
}

.timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 0;
}

.timeline-track {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  transform: translateX(-50%);
  background: rgba(128, 128, 128, 0.12);
  border-radius: 4px;
}

.timeline-progress {
  position: absolute;
  left: 50%;
  top: 0;
  width: 4px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, var(--amber), var(--blue));
  border-radius: 4px;
  box-shadow: 0 0 24px rgba(69, 162, 158, 0.65), 0 0 48px rgba(102, 252, 241, 0.35);
  height: 0%;
  transition: height 0.15s linear;
}

.timeline-item {
  position: relative;
  width: 50%;
  margin-bottom: 4rem;
  padding: 0 3.5rem;
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s var(--spring);
}

.timeline-item.left {
  left: 0;
  text-align: right;
  transform: translateX(-30px);
}

.timeline-item.right {
  left: 50%;
  text-align: left;
  transform: translateX(30px);
}

.timeline-item.visible {
  opacity: 1;
  transform: translateX(0);
}

.timeline-marker {
  position: absolute;
  top: 0.8rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--amber);
  box-shadow: 0 0 22px rgba(69, 162, 158, 0.6);
  z-index: 2;
}

.timeline-item.left .timeline-marker { right: -11px; }
.timeline-item.right .timeline-marker { left: -11px; }

.timeline-card {
  padding: 1.8rem;
  text-align: inherit;
  display: inline-block;
  width: 100%;
}

.timeline-year {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 0.4rem;
  background: linear-gradient(135deg, var(--amber), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.timeline-desc {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.carousel-wrap {
  position: relative;
}

.carousel {
  display: flex;
  gap: 1.6rem;
  overflow-x: auto;
  padding: 1rem 0.5rem 1.8rem;
  scroll-behavior: smooth;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
}

.carousel:active {
  cursor: grabbing;
}

.carousel::-webkit-scrollbar {
  height: 8px;
}

.carousel::-webkit-scrollbar-track {
  background: rgba(128,128,128,0.08);
  border-radius: 4px;
}

.carousel::-webkit-scrollbar-thumb {
  background: rgba(128,128,128,0.25);
  border-radius: 4px;
}

.carousel-card {
  min-width: 360px;
  flex: 0 0 360px;
  padding: 1.3rem;
}

.carousel-card img {
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  margin-bottom: 1rem;
}

.carousel-card h4 {
  font-size: 1.3rem;
  margin-bottom: 0.35rem;
}

.carousel-card p {
  color: var(--muted);
  font-size: 0.93rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.stat-card {
  padding: 2.4rem 1.2rem;
  text-align: center;
}

.stat-number {
  font-size: clamp(2.8rem, 6vw, 4rem);
  font-weight: 800;
  background: linear-gradient(90deg, var(--amber), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.stat-label {
  color: var(--muted);
  font-size: 1rem;
  margin-top: 0.8rem;
}

.mission-section {
  padding-top: 80px;
  padding-bottom: 80px;
}

.mission-card {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem;
  text-align: center;
}

.mission-card h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1.2rem;
}

.mission-card p {
  font-size: 1.15rem;
  color: var(--card-text);
  line-height: 1.85;
}

.contact-section {
  text-align: center;
}

.contact-section h2 {
  margin-bottom: 0.8rem;
  font-size: clamp(2rem, 5vw, 3rem);
}

.contact-section > p {
  color: var(--muted);
  margin-bottom: 2.2rem;
}

.contact-form {
  max-width: 560px;
  margin: 0 auto 2rem;
  display: grid;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1rem 1.3rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.3s, background 0.3s;
}

.contact-form textarea {
  resize: vertical;
  min-height: 140px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(69, 162, 158, 0.5);
  background: rgba(69, 162, 158, 0.03);
}

body.light-mode .contact-form input:focus,
body.light-mode .contact-form textarea:focus {
  background: rgba(0, 0, 0, 0.02);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--muted);
}

.form-status {
  min-height: 1.5rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.form-status.success { color: #40c057; }
.form-status.error { color: #ff6b6b; }

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.projects-hero {
  padding-top: 150px;
  padding-bottom: 60px;
  text-align: center;
}

.projects-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 0.5rem;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 3.5rem;
}

.search-input {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 0.95rem 1.4rem;
  color: var(--text);
  font-size: 0.95rem;
  min-width: 280px;
  outline: none;
  transition: border-color 0.3s, background 0.3s;
}

.search-input:focus {
  border-color: rgba(69, 162, 158, 0.45);
}

.search-input::placeholder {
  color: var(--muted);
}

.category-btn {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  color: var(--muted);
  padding: 0.65rem 1.3rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.category-btn:hover,
.category-btn.active {
  background: rgba(69, 162, 158, 0.12);
  color: var(--text);
  border-color: rgba(69, 162, 158, 0.4);
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tech-stack span {
  font-size: 0.78rem;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  color: var(--muted);
}

.hidden {
  display: none !important;
}

footer {
  text-align: center;
  padding: 3.5rem 6%;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--glass-border);
  position: relative;
  z-index: 1;
}

@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;
  }

  .reveal,
  .timeline-item {
    opacity: 1 !important;
    transform: none !important;
  }

  .timeline-progress {
    transition: none !important;
  }

  .page-loader {
    display: none;
  }
}

@media (max-width: 900px) {
  .timeline-track,
  .timeline-progress {
    left: 24px;
    transform: none;
  }

  .timeline-item,
  .timeline-item.left,
  .timeline-item.right {
    width: 100%;
    left: 0;
    text-align: left;
    padding-left: 4rem;
    padding-right: 0;
  }

  .timeline-item.left .timeline-marker,
  .timeline-item.right .timeline-marker {
    left: 14px;
    right: auto;
    top: 0.9rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .modal-content {
    padding: 1.3rem;
    border-radius: 24px;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 130px 5% 60px;
  }

  section {
    padding: 90px 5%;
  }

  .featured-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .carousel-card {
    min-width: 300px;
    flex: 0 0 300px;
  }

  .modal-actions {
    flex-direction: column;
  }

  .kinetic-line {
    letter-spacing: -2px;
  }
}
