/* Scroll Snap & Home config */
html {
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

body {
  timeline-scope: --p1, --p2, --p3, --p4;
}

section {
  width: 100%;
  min-height: 100dvh;
  padding-left: 12%;
  padding-right: 12%;
  box-sizing: border-box;
  scroll-snap-align: start;
}

/* Reset Snap Mobile */
@media (max-width: 768px) {
  html, body {
    scroll-snap-type: none;
    scroll-behavior: auto;
    overscroll-behavior: auto;
  }

  body {
    timeline-scope: none;
  }

  * {
    scroll-snap-align: none;
    scroll-snap-stop: normal;
  }

  section {
    min-height: auto;
    padding-bottom: 120px;
    padding-left: 5%;
    padding-right: 5%;
  }

  .hs-05 {
    padding-top: 120px !important;
    gap: 36px !important;
  }

  .hs-05__copy {
    gap: 2px !important;
  }

  .hs-05 p {
    width: 100% !important;
  }

  .projects-controls {
    margin-top: 24px !important;
  }
  .about-photo {
    width: 100% !important;
  } 
}


/* Menu Highlight Scroll */
@keyframes menu-active-link {
  0%, 25% { 
    color: var(--text-primary); 
    opacity: 0.9;
  }
  45%, 55% { 
    color: var(--primary); 
    opacity: 1;
  }
  75%, 100% { 
    color: var(--text-primary); 
    opacity: 0.9;
  }
}

.nav__links a[data-section="home"],
.nav__links a[data-section="services"],
.nav__links a[data-section="projects"],
.nav__links a[data-section="about"] {
  animation-name: menu-active-link;
  animation-timing-function: linear;
  animation-fill-mode: both;
  animation-range: cover 0% cover 100%;
}

.nav__links a[data-section="home"] { animation-timeline: --p1; }
.nav__links a[data-section="services"] { animation-timeline: --p2; }
.nav__links a[data-section="projects"] { animation-timeline: --p3; }
.nav__links a[data-section="about"] { animation-timeline: --p4; }

/* Dot Navigation */
#home { 
  view-timeline-name: --p1; 
  view-timeline-axis: block; 
}

#services { 
  view-timeline-name: --p2; 
  view-timeline-axis: block; 
}

#projects { 
  view-timeline-name: --p3; 
  view-timeline-axis: block; 
}

#about { 
  view-timeline-name: --p4; 
  view-timeline-axis: block; 
}

.fps-dot--1 { animation-timeline: --p1; }
.fps-dot--2 { animation-timeline: --p2; }
.fps-dot--3 { animation-timeline: --p3; }
.fps-dot--4 { animation-timeline: --p4; }

.fps-rail {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 999;
}

@media (max-width: 768px) {
  .fps-rail {
    display: none;
  }
}

.fps-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 30px;
  min-height: 30px;
  text-decoration: none;
}

.fps-label {
  position: absolute;
  right: 36px;
  color: var(--text-primary);
  background: var(--bg-secondary);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateX(8px);
}

.fps-link:hover .fps-label {
  opacity: 1;
  transform: translateX(0);
}

.fps-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #ffffff;
  opacity: 0.3;
  transition: background-color 0.3s ease;
  animation-name: fps-active-dot;
  animation-timing-function: linear;
  animation-fill-mode: both;
  animation-range: cover 0% cover 100%;
}

@keyframes fps-active-dot {
  0%, 25% { 
    transform: scale(1); 
    opacity: 0.3; 
  }
  45%, 55% { 
    transform: scale(1.8); 
    opacity: 1; 
    background-color: var(--primary); 
  }
  75%, 100% { 
    transform: scale(1); 
    opacity: 0.3; 
  }
}

/* Hero Section */
.hs-05 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3.5vw, 48px);
  align-items: center;
  background: repeating-linear-gradient(0deg, transparent 0 31px, rgba(122, 122, 122, 0.04) 31px 32px), var(--bg-main);
  color: var(--text-primary);
  box-sizing: border-box;
  min-width: 0;
}

.hero-svg {
  width: 60%;
  height: auto;
}

.hs-05__copy-2 {
  display: flex;
  justify-content: center;
}

.hs-05__copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.hs-05 h2 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.hs-05 h2 em {
  color: var(--primary);
  font-style: normal;
}

.hs-05 h2 em::before {
  content: '> ';
  opacity: 0.6;
}

.hs-05 p {
  margin: 0 0 24px;
  font-size: 1.15rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-primary);
  width: 80%;
}

.hs-05__cta {
  display: table;
  margin: 1.5rem auto 0;
  padding: 12px 22px;
  background: var(--primary);
  color: #000000;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 0;
  transition: background 0.15s;
}

.hs-05__cta:hover {
  background: var(--bg-main);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px #ffffff;
}

.hs-05__line {
  color: #5fff8c;
  text-shadow: 0 0 8px rgba(95,255,140,0.5);
}

.hs-05__prompt {
  color: #ffb348;
  text-shadow: 0 0 8px rgba(255,179,72,0.5);
  margin-right: 6px;
}

.hs-05__out {
  color: #88a890;
  opacity: 0.9;
  padding-left: 14px;
}

.hs-05__ok {
  color: #5fff8c;
  padding-left: 14px;
  font-weight: 700;
}

.hs-05__cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: #5fff8c;
  vertical-align: text-bottom;
  animation: hs-05-blink 1s steps(2) infinite;
}

@keyframes hs-05-blink {
  to {
    opacity: 0;
  }
}

@media (max-width: 720px) {
  .hs-05 {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hs-05__cursor {
    animation: none;
  }
}

/* SVG Animations */
#progress-bar {
  clip-path: inset(0 100% 0 0);
  animation: fill 6s ease-in-out forwards;
}

#label {
  opacity: 0;
  animation: fade-in .6s ease-out 6s forwards;
}

#keyboard {
  animation: blink 1.4s steps(1, end) infinite;
}

@keyframes fill { to { clip-path: inset(0 0 0 0); } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes blink {
  0% { fill: #00a6fb; }
  50%, 100% { fill: #737a80; }
}

@media (prefers-reduced-motion: reduce) {
  #progress-bar { animation: none; clip-path: none; }
  #label { animation: none; opacity: 1; }
  #keyboard { animation: none; fill: #00a6fb; }
}

/* Services Section */
.services {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin: 0 auto;
}

.services__more {
  color: var(--text-secondary);
  font-size: 1rem;
  text-align: center;
  max-width: 480px;
}

.services__more a {
  color: var(--primary);
  text-decoration: underline;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 440px));
  gap: 42px;
  justify-content: center;
  width: 100%;
}

@media (max-width: 860px) {
  .services__grid { grid-template-columns: 1fr; }
}

.services__card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 28px 26px 28px;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important; 
  transition: border-color 0.7s ease, transform 0.7s ease;
}

.services__card__icon {
  width: 40px;
  height: 40px;
  margin-bottom: 18px;
  color: var(--primary) !important;
  display: block !important;
}

.services__card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 8px;
  width: 100% !important;
  text-align: left !important;
  display: block !important;
}

.services__card__lead {
  color: var(--text-secondary);
  font-size: 0.98rem;
  font-weight: 400;
  line-height: 1.55;
  margin: 0 0 20px;
}

.services__card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.services__tag {
  font-size: 0.82rem;
  background: var(--border-color);
  color: var(--text-secondary);
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

.services__card__list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  flex-grow: 1;
}

.services__card__list li {
  position: relative;
  padding-left: 18px;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.services__card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.services__card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Projects Section */
.projects-section {
  --projects-bg: #0a0c10;
  --projects-border: #232733;
  --projects-text: #f1f3f8;
  --projects-text-muted: #8b93a7;
  --projects-accent: #3ea6ff;
  --projects-accent-soft: rgba(62, 166, 255, 0.12);

  color: var(--projects-text);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.projects-section *,
.projects-section *::before,
.projects-section *::after {
  box-sizing: border-box;
}

.projects-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.projects-slider__track {
  display: flex;
  width: 100%;
  transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform;
}

.projects-slide {
  flex: 0 0 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
  min-height: 440px;
}

.projects-slide__info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}

.projects-slide__tag {
  font-family: monospace;
  font-size: 0.97rem;
  color: var(--projects-accent);
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}

.projects-slide__info h3 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 16px;
}

.projects-slide__info p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.65;
  margin: 0 0 24px;
  max-width: 46ch;
}

.projects-slide__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.projects-chip {
  font-family: monospace;
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--bg-card);
  border: solid 1px var(--border-color);
  color: var(--text-primary);
  padding: 5px 10px;
  border-radius: 6px;
}

.projects-slide__cta {
  display: inline-flex;
  width: fit-content;
  align-items: center;
}

.projects-slide__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 340px;
  min-width: 0;
}

.projects-slide__img {
  width: 85%;
  margin: 0 auto;
  height: auto;
  display: block;
}

.projects-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

.projects-arrow {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: var(--projects-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.projects-arrow:hover {
  border-color: var(--projects-accent);
  color: var(--projects-accent);
}

.projects-arrow svg {
  width: 18px;
  height: 18px;
  display: block;
  stroke: var(--projects-text) !important;
  fill: none !important;
}

.projects-arrow:hover svg {
  stroke: var(--projects-accent) !important;
}

.projects-dots {
  display: flex;
  gap: 8px;
}

.projects-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.projects-dot.is-active {
  background: var(--projects-accent);
  transform: scale(1.25);
}

@media (max-width: 760px) {
  .projects-slide {
    grid-template-columns: 1fr;
    gap: 28px;
    min-height: auto;
  }

  .projects-slide__visual {
    order: -1;
    min-height: 260px;
  }

  .projects-slide__info h3 {
    font-size: 1.5rem;
  }
}

/* About Section */
.about-section {
  --about-accent: #3ea6ff;
  --about-text-muted: #8b93a7;
  --about-border: #232733;

  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-section *,
.about-section *::before,
.about-section *::after {
  box-sizing: border-box;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.about-photo-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.about-photo {
  width: 70%;
  margin: 0 auto;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}

.about-photo-placeholder {
  width: 85%;
  aspect-ratio: 4 / 5;
  border: 1px dashed var(--about-border);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--about-text-muted);
  font-family: monospace;
  font-size: 0.75rem;
  text-align: center;
  padding: 20px;
}

.about-content {
  display: flex;
  justify-content: center;
  flex-direction: column;
  min-width: 0;
}

.about-eyebrow {
  font-family: monospace;
  font-size: 0.97rem;
  color: var(--about-accent);
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}

.about-content h2 {
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 16px;
}

.about-content p {
  font-size: 1.11rem;
  font-weight: 300;
  line-height: 1.65;
  margin: 0 0 28px;
  max-width: 52ch;
}

.about-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

@media (max-width: 760px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .about-photo-wrap {
    order: -1;
  }

  .about-content h2 {
    font-size: 1.5rem;
  }
}