/* ================================================
   CLEARPATH DIGITAL
   ================================================ */

:root {
  --bg: #0a0a0c;
  --surface: #131316;
  --surface-hover: #1a1a1e;
  --border: #232328;
  --border-light: #2e2e34;

  --text: #e8e8ec;
  --text-secondary: #7c7c86;
  --text-muted: #4a4a54;

  --accent: #00e09e;
  --accent-hover: #00ffb4;
  --accent-dim: #00a876;
  --accent-glow: rgba(0, 224, 158, 0.12);
  --accent-glow-strong: rgba(0, 224, 158, 0.25);

  --font-display: 'Syne', sans-serif;
  --font-body: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --container: 1100px;
  --gutter: 24px;
}


/* --- Reset --- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}


/* --- Layout --- */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section {
  padding: 120px 0;
}


/* --- Typography --- */

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 {
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 700;
  margin-bottom: 48px;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
}

p {
  color: var(--text-secondary);
  line-height: 1.7;
}

.mono-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 16px;
}


/* --- Header / Nav --- */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: padding 0.3s ease, background 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

header.scrolled {
  padding: 14px 0;
  background: rgba(10, 10, 12, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}

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

.logo {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a:hover::after {
  width: 100%;
}


/* --- Hero --- */

#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  will-change: transform;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  top: -10%;
  right: -5%;
  animation: float1 22s ease-in-out infinite;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #7c3aed 0%, transparent 70%);
  bottom: -5%;
  left: -10%;
  animation: float2 28s ease-in-out infinite;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #2563eb 0%, transparent 70%);
  top: 40%;
  left: 40%;
  animation: float3 32s ease-in-out infinite;
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-80px, 60px) scale(1.08); }
  66% { transform: translate(40px, -40px) scale(0.95); }
}

@keyframes float2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(60px, -50px) scale(1.05); }
  66% { transform: translate(-30px, 70px) scale(0.92); }
}

@keyframes float3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-50px, -60px) scale(1.12); }
  66% { transform: translate(70px, 30px) scale(0.88); }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero-content .mono-label {
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.hero-content h1 {
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}

.hero-desc {
  font-size: 1.125rem;
  max-width: 560px;
  margin-top: 24px;
  line-height: 1.7;
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1s both;
}

.scroll-hint .mono-label {
  font-size: 0.625rem;
  margin-bottom: 0;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  animation: none;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scrollPulse 2.5s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 0.8; transform: scaleY(1.15); }
}


/* --- About --- */

#about {
  position: relative;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.about-card {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.about-card:hover {
  border-color: var(--border-light);
  box-shadow: 0 0 40px rgba(0, 224, 158, 0.04);
  transform: translateY(-2px);
}

.card-number {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 16px;
}

.about-card h3 {
  font-size: 1.125rem;
}

.about-card p {
  font-size: 0.9375rem;
  line-height: 1.7;
}


/* --- Portfolio --- */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-card {
  padding: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.project-card.featured {
  grid-column: 1 / -1;
  border-color: rgba(0, 224, 158, 0.15);
}

.project-card.featured:hover {
  border-color: rgba(0, 224, 158, 0.35);
  box-shadow: 0 0 60px rgba(0, 224, 158, 0.06);
}

.project-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.project-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.project-info h3 {
  margin-bottom: 2px;
  font-size: 1.5rem;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.project-status {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 100px;
  flex-shrink: 0;
}

.project-status.live {
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(0, 224, 158, 0.2);
}

.project-card > p {
  font-size: 1rem;
  margin-bottom: 28px;
  line-height: 1.7;
}

.project-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 24px var(--accent-glow-strong);
}

.btn-primary .arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.btn-primary:hover .arrow {
  transform: translate(2px, -2px);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
}


/* Feature Chips */

.feature-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.chip {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 5px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.chip:hover {
  border-color: var(--border-light);
  color: var(--text);
}

/* Project Footer */

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.platform-tags {
  display: flex;
  gap: 8px;
}

.platform {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

.platform.dim {
  opacity: 0.5;
}


/* Coming Soon Cards */

.project-card.coming-soon {
  border-style: dashed;
  border-color: var(--border);
}

.project-card.coming-soon:hover {
  border-color: var(--border-light);
}

.coming-soon-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.project-card.coming-soon h3 {
  color: var(--text-secondary);
  font-size: 1.125rem;
}

.project-card.coming-soon p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 0;
}


/* --- Contact --- */

#contact {
  text-align: center;
  padding: 160px 0;
}

#contact h2 {
  margin-bottom: 16px;
}

.contact-desc {
  font-size: 1.125rem;
  margin-bottom: 36px;
}

.email-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.5vw, 1.375rem);
  color: var(--accent);
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.25s ease;
}

.email-link:hover {
  border-bottom-color: var(--accent);
}


/* --- Footer --- */

footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-sm {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.logo-sm span {
  color: var(--accent-dim);
}

footer p {
  font-size: 0.8125rem;
  color: var(--text-muted);
}


/* --- Scroll Reveal --- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.about-card.reveal:nth-child(2) { transition-delay: 0.1s; }
.about-card.reveal:nth-child(3) { transition-delay: 0.2s; }

.project-card.coming-soon.reveal:nth-child(2) { transition-delay: 0.08s; }
.project-card.coming-soon.reveal:nth-child(3) { transition-delay: 0.16s; }


/* --- Responsive --- */

@media (max-width: 768px) {
  :root {
    --gutter: 20px;
  }

  section {
    padding: 80px 0;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    gap: 20px;
  }

  .nav-links a {
    font-size: 0.8125rem;
  }

  #hero {
    padding: 100px 0 60px;
  }

  .project-meta {
    flex-wrap: wrap;
  }

  .project-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
  }

  .project-info h3 {
    font-size: 1.25rem;
  }

  .project-status {
    margin-left: 0;
    order: 3;
    width: fit-content;
  }

  .project-card {
    padding: 24px;
  }

  .project-links {
    flex-direction: column;
  }

  .btn {
    justify-content: center;
  }

  .project-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .platform-tags {
    justify-content: flex-start;
  }

  footer .container {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  #contact {
    padding: 100px 0;
  }

  .email-link {
    font-size: 1rem;
  }

  .orb-1 { width: 400px; height: 400px; }
  .orb-2 { width: 300px; height: 300px; }
  .orb-3 { width: 250px; height: 250px; }

  .scroll-hint {
    display: none;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2.25rem;
  }

  h2 {
    font-size: 1.75rem;
    margin-bottom: 32px;
  }

  .hero-desc {
    font-size: 1rem;
  }

  .about-card {
    padding: 24px;
  }
}


/* --- Accessibility --- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .orb {
    animation: none !important;
  }

  .scroll-line {
    animation: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-content .mono-label,
  .hero-content h1,
  .hero-desc,
  .scroll-hint {
    animation: none !important;
  }
}


/* --- Selection --- */

::selection {
  background: var(--accent-glow-strong);
  color: var(--text);
}
