:root {
  --bg-900: #0b0b0d;
  --glass-border: rgba(255, 255, 255, 0.06);
  --muted: #9aa0a6;
  --accent: #8b5cf6;
  --accent-strong: #7a3df0;
  color-scheme: dark;
  font-family: Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg-900); color: #e6e6e6; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }

@font-face {
  font-family: 'nasalization-rg';
  src: url('/fonts/nasalization-rg.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

.navbar {
  position: fixed; left: 0; right: 0; top: 0; height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 35px; z-index: 100;
  background: rgba(255, 255, 255, 0.04); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
}

.brand { 
  display: flex; 
  align-items: center;
  gap: 10px; 
}

.logo-container {
  width: 55px;
  height: 40px;
  border-radius: 5px;
  display: flex;
  align-items: center;
}

.logo {
  width: 100%;
  height: 100%;
  border-radius: 5px;
}

.logo-text {
  font-family: 'nasalization-rg', Inter, system-ui, sans-serif;
  font-size: 20px;
  color: #fff;
  position: static;
  margin: 0;
  line-height: 1;
}

.navbarbtn {
  padding: 10px 16px; border-radius: 12px; border: 1px solid transparent; background: rgba(255, 255, 255, 0.05); cursor: pointer; font-weight: 600; transition: .3s;
}

.navbarbtn:hover {
  background: var(--accent); color: #fff;
}

.hero { 
  position: relative; 
  min-height: 100vh; 
  display: flex; 
  align-items: center; 
  padding: 96px 6vw; 
  overflow: hidden; 
}

.hero-content { 
  position: relative; 
  z-index: 10; 
  max-width: 900px; 
  text-align: left; 
}

.hero h2 { 
  font-size: 56px; 
  line-height: 1.1; 
  margin: 0 0 10px; 
  text-align: left; 
  font-weight: 700; 
}
.hero h2 .changing-word { 
  color: var(--accent); 
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: inline-block;
}
.hero p { color: var(--muted); font-size: 20px; margin: 0; text-align: left; }

.image-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('/image/backgroundsw.png');
  background-size: cover;
  background-position: center;
  z-index: 1;
  opacity: 1;
  transition: opacity 1.8s ease;
}

.video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  opacity: 0;
  transition: opacity 1.8s ease;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 11, 13, 0.7);
  z-index: 3;
  opacity: 0;
  transition: opacity 1.8s ease;
}

.hero.video-loaded .video-bg {
  opacity: 1;
}

.hero.video-loaded .video-overlay {
  opacity: 1;
}

.hero.video-loaded .image-bg {
  opacity: 0;
}

.marquee-container {
  width: 100%;
  overflow: hidden;
  background: rgba(139, 92, 246, 0.1);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  padding: 12px 0;
  position: relative;
  mask: linear-gradient(90deg,
    transparent,
    black 20%,
    black 80%,
    transparent
  );
  -webkit-mask: linear-gradient(90deg,
    transparent,
    black 20%,
    black 80%,
    transparent
  );
}

.marquee-track {
  display: flex;
  white-space: nowrap;
  will-change: transform;
  animation: marquee 45s linear infinite;
}

.marquee-content {
  display: flex;
  align-items: center;
}

.marquee-content span {
  white-space: nowrap;
  font-size: 16px;
  color: var(--muted);
  font-weight: 500;
  position: relative;
  padding: 6px 0;
  text-transform: none;
}

.marquee-content span::after {
  content: " // ";
  color: var(--accent);
  margin: 0 10px;
  opacity: 0.7;
  font-weight: 400;
}

.marquee-content:first-of-type span:last-child::after {
  content: none;
}

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

.marquee-container:hover .marquee-track {
  animation-play-state: paused;
}

@media (max-width: 768px) {
  .marquee-content span {
    font-size: 14px;
    font-weight: 400;
  }
  
  .marquee-content span::after {
    margin: 0 8px;
  }
  
  .marquee-container {
    mask: linear-gradient(90deg, 
      transparent, 
      black 10%, 
      black 90%, 
      transparent
    );
    -webkit-mask: linear-gradient(90deg, 
      transparent, 
      black 10%, 
      black 90%, 
      transparent
    );
  }
}

.section { padding: 80px 6vw; text-align: center; }
.section h3 { font-size: 32px; margin-bottom: 24px; }

.who { max-width: 700px; margin: 0 auto 60px; text-align: center; }
.who p { color: var(--muted); line-height: 1.6; text-align: left; }

.cards { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
  max-width: 800px;
  margin: 40px auto 0;
  text-align: left; 
}

.card { 
  background: rgba(255, 255, 255, 0.02); 
  border: 1px solid rgba(255, 255, 255, 0.05); 
  padding: 20px; 
  border-radius: 14px; 
  transition: .3s; 
  min-height: 180px;
}

.card h4 {
  margin: 0 0 12px 0;
  font-size: 18px;
  line-height: 1.3;
  word-wrap: break-word;
  hyphens: auto;
}

.card:hover { transform: translateY(-8px); border-color: rgba(139, 92, 246, 0.3); box-shadow: 0 0 25px rgba(139, 92, 246, 0.1); }

.projects-container { 
  display: flex; 
  flex-direction: column; 
  gap: 60px;
  max-width: 1100px; 
  margin: 0 auto; 
  text-align: left; 
}

.project-block { 
  display: flex; 
  flex-wrap: wrap; 
  align-items: center; 
  justify-content: space-between; 
  gap: 40px;
  min-height: auto;
  height: auto;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.06); 
  border-radius: 16px; 
  background: rgba(255, 255, 255, 0.02); 
}

.project-content { 
  text-align: left; 
  max-width: 500px; 
}

.project-block h4 { margin: 0 0 10px; font-size: 24px; }
.project-block p { margin: 0; color: var(--muted); }
.project-block img { max-width: 400px; border-radius: 12px; flex: 1 1 100px; object-fit: cover; }

.phone-frame-container {
  display: flex;
  justify-content: flex-end;
  flex: 1 1 300px;
}

.purple-frame {
  position: relative;
  width: 270px;
  height: 568px;
  border: 3px solid var(--accent);
  border-radius: 30px;
  padding: 6px;
  background: rgba(139, 92, 246, 0.05);
  box-shadow: 
    0 0 30px rgba(139, 92, 246, 0.2),
    inset 0 0 20px rgba(139, 92, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.frame-content {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contacts { 
  display: flex; 
  justify-content: center; 
  align-items: center;
  gap: 16px; 
  flex-wrap: wrap; 
  margin-top: 24px; 
}

.contact-item {
  position: relative;
  display: inline-block;
}

.link-pill { 
  padding: 10px 14px; 
  border: 1px solid var(--glass-border); 
  border-radius: 10px; 
  background: rgba(255, 255, 255, 0.02); 
  font-weight: 600; 
  transition: all 0.3s ease;
  display: inline-block;
}

.link-pill:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

.qr-code-container {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: rgba(45, 31, 45, 0.95);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  backdrop-filter: blur(10px);
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.3);
  text-align: center;
  min-width: 250px;
  min-height: 250px;
}

.qr-code {
  width: 200px;
  height: 200px;
  border-radius: 25px;
  margin-bottom: 12px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  transition: all 0.3s ease;
}

.qr-caption {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  font-weight: 500;
}

.contact-item:hover .qr-code {
  animation: pulse-border 2s ease-in-out infinite;
}

@keyframes pulse-border {
  0% {
    box-shadow: 
      0 0 5px rgba(139, 92, 246, 0.4),
      inset 0 0 5px rgba(139, 92, 246, 0.2);
  }
  50% {
    box-shadow: 
      0 0 20px rgba(139, 92, 246, 0.6),
      inset 0 0 15px rgba(139, 92, 246, 0.3);
  }
  100% {
    box-shadow: 
      0 0 5px rgba(139, 92, 246, 0.4),
      inset 0 0 5px rgba(139, 92, 246, 0.2);
  }
}

.contact-item:hover .qr-code-container {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-15px);
}

@media (max-width: 768px) {
  .hero h2 { font-size: 40px; }
  .project-block { flex-direction: column; text-align: center; }
  .project-content { text-align: center; }
  .phone-frame-container {
    justify-content: center;
  }
  .purple-frame {
    width: 100%;
    max-width: 300px;
    height: 600px;
  }
  
  .contacts {
    gap: 12px;
  }
  
  .link-pill {
    padding: 8px 12px;
    font-size: 14px;
  }
  
  .qr-code-container {
    min-width: 200px;
    min-height: 200px;
    padding: 15px;
  }
  
  .qr-code {
    width: 150px;
    height: 150px;
  }
}

img.lazy {
  opacity: 0;
  transition: opacity 0.3s ease;
}

img.lazy.loaded {
  opacity: 1;
}

footer { text-align: center; padding: 36px 6vw; border-top: 1px solid var(--glass-border); color: var(--muted); font-size: 14px; }
