:root {
  --bg: #0b0c10;
  --bg-alt: #0f1117;
  --text: #e6e8ec;
  --muted: #a6adbb;
  --brand: #6ee7f3; /* cyan */
  --brand-2: #a78bfa; /* violet */
  --accent: #f59e0b; /* amber */
  --card: #12141b;
  --border: #23262f;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: radial-gradient(1200px 800px at 10% -10%, #161a22, transparent), radial-gradient(1200px 800px at 100% 10%, #141826, transparent), var(--bg);
  line-height: 1.6;
  padding-top: 60px; /* keep content clear of fixed header */
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 8px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  backdrop-filter: saturate(1.2) blur(8px);
  background: color-mix(in hsl, var(--bg-alt) 70%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease, transform .45s cubic-bezier(0.22, 1, 0.36, 1), opacity .3s ease;
}
.site-header.scrolled {
  border-color: var(--border);
  background: color-mix(in hsl, var(--bg-alt) 92%, transparent);
}
.site-header > .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.brand {
  color: white;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: .2px;
}
  .brand .brand-x {
   display: inline-block;
   background: linear-gradient(90deg, var(--brand), var(--brand-2));
   -webkit-background-clip: text;
   background-clip: text;
   color: transparent;
   filter: drop-shadow(0 0 6px rgba(110, 231, 243, 0.6)) drop-shadow(0 0 12px rgba(167, 139, 250, 0.35));
   background-size: 200% 100%;
    animation: brandXShift 6s linear infinite alternate, brandXPulse 3.6s ease-in-out infinite alternate, brandXDrift 10s ease-in-out infinite alternate;
   position: relative;
   transform-origin: 50% 55%;
   will-change: filter, transform, background-position;
 }

  .brand .brand-x::after {
   content: "";
   position: absolute;
   top: -20%;
   bottom: -20%;
   left: -40%;
   width: 30%;
   background: linear-gradient(120deg, rgba(255,255,255,0) 30%, rgba(255,255,255,0.85) 50%, rgba(255,255,255,0) 70%);
   filter: blur(2px);
   transform: skewX(-20deg);
   mix-blend-mode: screen;
   pointer-events: none;
    animation: brandXGlint 3.8s linear infinite alternate;
 }

@keyframes brandXShift {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

@keyframes brandXPulse {
  0% { filter: drop-shadow(0 0 4px rgba(110, 231, 243, 0.35)) drop-shadow(0 0 10px rgba(167, 139, 250, 0.2)); }
  100% { filter: drop-shadow(0 0 10px rgba(110, 231, 243, 0.9)) drop-shadow(0 0 20px rgba(167, 139, 250, 0.6)); }
}

@keyframes brandXDrift {
  0% { transform: rotate(-0.6deg) scale(1); }
  100% { transform: rotate(0.6deg) scale(1.02); }
}

@keyframes brandXGlint {
  0% { left: -40%; }
  100% { left: 110%; }
}

/* Hover intensifies effect */
.brand:hover .brand-x {
  animation-duration: 3.5s, 2.4s, 8s;
}

@media (prefers-reduced-motion: reduce) {
  .brand .brand-x { animation: none; }
  .brand .brand-x::after { display: none; }
}
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: 0;
  padding: 8px;
}
.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}
.nav__links {
  display: flex;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
  background-image: linear-gradient(90deg, var(--brand), var(--brand-2));
  background-size: 0% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: color .2s ease, background-size .25s ease;
}
.nav__links a:hover {
  color: white;
  background: #171a22;
  background-image: linear-gradient(90deg, var(--brand), var(--brand-2));
  background-size: 100% 2px;
}

/* Hero */
.section {
  padding: 80px 0;
  position: relative;
}
.section--full {
  min-height: 100svh;
  display: grid;
  place-items: center;
  position: relative;
  overflow: clip;
}
.section--alt {
  background: linear-gradient(to bottom, color-mix(in hsl, var(--bg-alt) 85%, transparent), var(--bg));
}
.section + .section {
  box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.04);
}
.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
}
.hero__content h1 {
  font-size: clamp(32px, 4.8vw, 64px);
  line-height: 1.1;
  margin: 0 0 12px 0;
}
.gradient {
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gradient2 {
    background: linear-gradient(270deg, var(--brand), var(--brand-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
.hero__cta {
  display: inline-flex;
  gap: 12px;
  margin-top: 16px;
}
.btn {
  display: inline-block;
  padding: 12px 16px;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--text);
  position: relative;
  overflow: hidden;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn--primary {
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  color: #0b0c10;
  border: none;
  font-weight: 700;
}
.btn--primary:hover {
  box-shadow: 0 8px 26px rgba(110, 231, 243, 0.18), 0 6px 18px rgba(167, 139, 250, 0.16);
  transform: translateY(-1px);
}
.btn--primary:active { transform: translateY(0); }
.btn--primary-dark {
  background:
    linear-gradient(180deg, #0f1523, #0b101c) padding-box,
    linear-gradient(90deg, var(--brand), var(--brand-2)) border-box;
  border: 1px solid transparent;
  color: #f4f6fb;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), 0 6px 18px rgba(0,0,0,0.35);
}
.btn--primary-dark:hover {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), 0 10px 24px rgba(0,0,0,0.45);
  transform: translateY(-1px);
}
.btn--primary-dark:active { transform: translateY(0); }
.btn--ghost:hover {
  background: #171a22;
}

/* Focus styles */
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(110, 231, 243, 0.25);
}

/* Global focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.project-card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(110, 231, 243, 0.25);
}
.hero__bg {
  position: absolute;
  inset: -10% -10% -10% -10%;
  width: 120%;
  height: 120%;
  z-index: 0;
}

/* Page transition overlay */
.page-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background:
    radial-gradient(800px 400px at 10% 0%, #1a1f2e, transparent),
    radial-gradient(800px 400px at 90% 0%, #171c2b, transparent),
    rgba(11,12,16,0.98);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .45s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.page-overlay.is-active {
  transform: scaleY(1);
}

/* Button ripple */
.ripple {
  position: absolute;
  border-radius: 999px;
  transform: scale(0);
  pointer-events: none;
  background: radial-gradient(circle, rgba(255,255,255,0.5), rgba(255,255,255,0));
  animation: ripple .6s ease-out forwards;
  mix-blend-mode: screen;
}
@keyframes ripple {
  to { transform: scale(12); opacity: 0; }
}

/* Content sections */
.grid {
  display: grid;
  gap: 28px;
}
.grid--2 {
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
}
.section__head {
  margin-bottom: 24px;
}
.section__head h2 {
  position: relative;
  margin-bottom: 12px;
}
.section__head h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 90%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.bullets {
  padding-left: 16px;
}
.bullets li {
  margin: 6px 0;
}
.media-tilt {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0f131b;
  transform: perspective(1000px) rotateX(0) rotateY(0);
  transition: transform .2s ease;
}
.media-tilt img {
  display: block;
  width: 100%;
  height: auto;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  perspective: 1000px;
}
.project-card {
  display: grid;
  grid-template-rows: auto 1fr;
  text-decoration: none;
  border-radius: 16px;
  overflow: hidden;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(90deg, color-mix(in hsl, var(--brand) 60%, transparent), color-mix(in hsl, var(--brand-2) 60%, transparent)) border-box;
  border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .25s ease, outline-color .2s ease;
  transform-style: preserve-3d;
  will-change: transform;
}
.project-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: radial-gradient(600px 400px at 20% 0%, #23283a, #111319);
}
.project-card__meta {
  padding: 14px;
}
.project-card h3 {
  margin: 0 0 6px 0;
  color: white;
}
.project-card p {
  margin: 0;
  color: var(--muted);
}
.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
}

/* Capabilities */
.capabilities {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.capability {
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
}
.capability h3 {
  margin: 0 0 6px 0;
}

/* CTA */
.section--cta {
  background: linear-gradient(180deg, #121521, #0c0d12);
  text-align: center;
}
.cta-buttons {
  display: inline-flex;
  gap: 12px;
  margin-top: 8px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 18px 0;
  color: var(--muted);
}
.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.to-top {
  color: var(--muted);
  text-decoration: none;
}
.to-top:hover {
  color: white;
}

/* Slide-over contact panel */
.contact-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100svh;
  width: min(480px, 92vw);
  background: linear-gradient(180deg, #0f1320, #0c0f19);
  border-left: 1px solid var(--border);
  box-shadow: -6px 0 24px rgba(0,0,0,0.45);
  transform: translateX(100%);
  transition: transform .45s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 220; /* above header */
  display: flex;
  flex-direction: column;
}
.contact-panel.open { transform: translateX(0); }
.contact-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px;
  border-bottom: 1px solid var(--border);
}
.contact-panel__title { margin: 0; }
.contact-panel__close {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 10px;
  padding: 6px 10px;
}
.contact-panel__body { padding: 16px; overflow: auto; }
.form {
  display: grid;
  gap: 12px;
}
.field label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%;
  background: #0f131b;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: 10px;
}
.field textarea { min-height: 100px; resize: vertical; }
.form-actions { display: flex; gap: 10px; margin-top: 8px; }
.contact-panel__hint { color: var(--muted); font-size: 13px; margin-top: 6px; }

.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  z-index: 210;
}
.backdrop.open { opacity: 1; pointer-events: auto; }

/* Utils */
.is-hidden { display: none !important; }

/* Cursor glow */
.cursor-glow {
  position: fixed;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  pointer-events: none;
  mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(110, 231, 243, 0.5) 0%, rgba(167, 139, 250, 0.35) 50%, rgba(0,0,0,0) 60%);
  transform: translate(-50%, -50%) scale(1);
  opacity: 0;
  transition: opacity .25s ease, transform .12s ease;
  z-index: 215;
}
.cursor-glow.is-active { opacity: .7; }
.cursor-glow.is-click { transform: translate(-50%, -50%) scale(0.85); }
@media (hover: none) { .cursor-glow { display: none; } }
@media (prefers-reduced-motion: reduce) { .cursor-glow { display: none; } }

/* Header transition states */
.site-header--leaving {
  transform: translateY(-20px);
  opacity: 0;
}
.site-header--enter {
  animation: headerEnter .48s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes headerEnter {
  from { transform: translateY(-16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header--enter { animation: none; }
}

/* Scroll progress */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 60;
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

/* Animations */
.fade-up {
  animation: fadeUp .8s ease both .1s;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { opacity: 0; transform: translateY(8px); }
.reveal { opacity: 0; transform: translateY(12px) scale(.98); }
.reveal--visible, .fade-in.in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity .6s ease, transform .6s ease;
}

/* Responsive */
@media (max-width: 960px) {
  .grid--2 { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .capabilities { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .nav__toggle { display: flex; }
  .nav__links { display: none; position: absolute; right: 16px; top: 56px; flex-direction: column; background: var(--card); border: 1px solid var(--border); padding: 8px; border-radius: 12px; }
  .nav__links.open { display: flex; }
  .projects-grid { grid-template-columns: 1fr; }
}


