/* ========================================
   WCA Technologies - Design System
   Inspired by dub.co aesthetic
   ======================================== */

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Design Tokens */
:root {
  /* Neutral Scale */
  --neutral-50: #fafafa;
  --neutral-100: #f5f5f5;
  --neutral-200: #e5e5e5;
  --neutral-300: #d4d4d4;
  --neutral-400: #a3a3a3;
  --neutral-500: #737373;
  --neutral-600: #525252;
  --neutral-700: #404040;
  --neutral-800: #262626;
  --neutral-900: #171717;
  --neutral-950: #0a0a0a;

  /* Light Mode (default) */
  --bg-page: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-secondary: var(--neutral-50);
  --bg-surface-hover: var(--neutral-100);

  --border-default: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.2);
  --grid-border: rgba(0, 0, 0, 0.06);

  --text-primary: rgba(0, 0, 0, 0.7);
  --text-secondary: var(--neutral-600);
  --text-tertiary: var(--neutral-500);
  --text-muted: var(--neutral-400);

  /* Semantic */
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-info: #3b82f6;

  /* Typography */
  --font-default: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "SF Mono", "Fira Code", monospace;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 48px;
  --space-10: 64px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 0 0 1px var(--border-default), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-elevated: 0 0 0 1px var(--border-default), 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-floating: 0 0 0 1px var(--border-default), 0 8px 24px rgba(0, 0, 0, 0.12);

  /* Timing */
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --duration-fast: 0.1s;
  --duration-default: 0.15s;
  --duration-slow: 0.3s;

  /* Layout */
  --header-height: 48px;
  --footer-height: 48px;
  --container-max: 1200px;
  --container-padding: 24px;
}

/* Base Styles */
html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  scrollbar-width: none; /* Firefox */
}

html::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}

body {
  font-family: var(--font-default);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  background-color: var(--bg-page);
  background-image: radial-gradient(circle, rgba(0, 0, 0, 0.12) 1px, transparent 1px);
  background-size: 20px 20px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* Main Content Area */
.main {
  padding-top: var(--header-height);
}

.main--no-pad-top {
  padding-top: 0;
}

/* ========================================
   Header
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--container-padding);
  background: var(--bg-page);
  border-bottom: 1px solid var(--border-default);
  z-index: 100;
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}

.header--hidden {
  opacity: 0;
  pointer-events: none;
}

.header--visible {
  opacity: 1;
  pointer-events: auto;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.header-logo-mark {
  font-weight: 700;
}

.header-logo-img {
  height: 24px;
  width: auto;
}

.header-logo-name {
  color: var(--text-secondary);
}

.header-tagline {
  font-size: 13px;
  color: var(--text-tertiary);
  font-style: italic;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--duration-default) var(--ease-default);
}

.header-nav-link:hover {
  color: var(--text-primary);
}

@media (max-width: 640px) {
  .header-logo-name {
    display: none;
  }
}

/* ========================================
   Full-page Section Base
   ======================================== */
.snap-section {
  min-height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
}

/* ========================================
   Landing Section - First viewport
   ======================================== */
.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 20px;
  transition: transform 0.1s linear, opacity 0.3s ease;
  will-change: transform, opacity;
}

.landing-logo {
  height: 80px;
  width: auto;
}

.landing-name {
  font-family: 'Satoshi', var(--font-default);
  font-size: clamp(32px, 8vw, 72px);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--text-primary);
}

@media (max-width: 500px) {
  .landing-brand {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .landing-logo {
    height: 100px;
  }

  .landing-name {
    font-size: 28px;
  }
}

.landing-scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0;
  animation: fadeIn 1s ease 0.5s forwards;
}

.landing-scroll-hint svg {
  animation: bounce 2s ease-in-out infinite;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ========================================
   Hero Section - Giant Typography Style
   ======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.hero-title {
  font-size: clamp(40px, 10vw, 140px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: clamp(14px, 2vw, 18px);
  color: var(--text-tertiary);
  margin-top: 16px;
  font-weight: 400;
}

/* ========================================
   Intro Section
   ======================================== */
.intro-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  perspective: 1000px;
}

/* Contact Card */
.contact-card {
  max-width: 820px;
  margin: 0 auto;
  padding: 56px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  transform-style: preserve-3d;
  will-change: transform;
  user-select: none;
  box-shadow: var(--shadow-elevated);
}

.contact-card-header {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 32px;
}

.contact-card-photo {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  flex-shrink: 0;
}

.contact-card-info {
  flex: 1;
}

.contact-card-name {
  font-family: 'Satoshi', var(--font-default);
  font-size: 38px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.contact-card-title {
  font-size: 20px;
  color: var(--text-tertiary);
}

.contact-card-bio {
  font-size: 22px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.contact-card-socials {
  display: flex;
  gap: 12px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--text-tertiary);
  background: var(--bg-surface-secondary);
  border-radius: var(--radius-md);
  transition: color 0.15s var(--ease-default), background 0.15s var(--ease-default);
}

.social-link:hover {
  color: var(--text-primary);
  background: var(--bg-surface-hover);
}

@media (max-width: 640px) {
  .contact-card {
    padding: 24px;
  }

  .contact-card-header {
    gap: 16px;
  }

  .contact-card-photo {
    width: 80px;
    height: 80px;
  }

  .contact-card-name {
    font-size: 22px;
  }

  .contact-card-title {
    font-size: 14px;
  }

  .contact-card-bio {
    font-size: 16px;
  }

  .social-link {
    width: 40px;
    height: 40px;
  }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ========================================
   Sections
   ======================================== */
.section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--container-padding) 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.section-header {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-default);
  margin-bottom: 24px;
}

/* ========================================
   Project Grid
   ======================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

.projects-grid--page {
  margin-top: 40px;
}

.project-card {
  aspect-ratio: 4/3;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--bg-surface-secondary);
  display: block;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.project-card:hover img {
  transform: scale(1.05);
}

.project-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 50%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s var(--ease-default);
}

.project-card:hover .project-card-overlay {
  opacity: 1;
}

.project-card--disabled {
  cursor: default;
}

.project-card--disabled .project-card-overlay {
  opacity: 1;
}

.project-card-tag {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 4px;
}

.project-card-title {
  font-size: 18px;
  font-weight: 600;
  color: white;
}

.coming-soon {
  font-size: 16px;
  color: var(--text-tertiary);
  padding: 48px 0;
}

/* ========================================
   Article List
   ======================================== */
.article-list {
  display: flex;
  flex-direction: column;
}

.article-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border-default);
  transition: padding 0.2s var(--ease-default);
}


.article-item:hover {
  padding-left: 16px;
}

.article-thumb {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-surface-secondary);
}

.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-content {
  flex: 1;
  min-width: 0;
}

.article-title {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.article-excerpt {
  font-size: 14px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.article-tag {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  padding: 4px 10px;
  background: var(--bg-surface-secondary);
  border-radius: var(--radius-full);
}

.article-arrow {
  font-size: 20px;
  color: var(--text-muted);
  transition: transform 0.2s var(--ease-default), color 0.2s var(--ease-default);
}

.article-item:hover .article-arrow {
  transform: translateX(4px);
  color: var(--text-primary);
}

.view-all-link {
  display: inline-block;
  margin-top: 32px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.15s var(--ease-default);
}

.view-all-link:hover {
  color: var(--text-primary);
}

@media (max-width: 640px) {
  .article-item {
    flex-wrap: wrap;
  }

  .article-thumb {
    width: 48px;
    height: 48px;
  }

  .article-content {
    flex: 1;
    min-width: calc(100% - 72px);
  }

  .article-meta {
    width: 100%;
    margin-top: 12px;
    padding-left: 60px;
  }

  .article-excerpt {
    white-space: normal;
  }
}

/* ========================================
   Footer
   ======================================== */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--footer-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--container-padding);
  background: var(--bg-page);
  border-top: 1px solid var(--border-default);
  z-index: 100;
  transition: opacity 0.4s var(--ease-out);
}

.footer--hidden {
  opacity: 0;
  pointer-events: none;
}

.footer--visible {
  opacity: 1;
  pointer-events: auto;
}

.footer-copyright {
  font-size: 12px;
  color: var(--text-tertiary);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-link {
  font-size: 13px;
  color: var(--text-secondary);
  background: none;
  border: none;
  transition: color 0.15s var(--ease-default);
}

.footer-link:hover {
  color: var(--text-primary);
}

.footer-scroll-top {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  transition: color 0.15s var(--ease-default);
}

.footer-scroll-top:hover {
  color: var(--text-primary);
}

@media (max-width: 640px) {
  .footer-copyright {
    display: none;
  }
}

/* ========================================
   Contact Modal
   ======================================== */
.contact-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-default);
}

.contact-modal[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
}

.contact-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.contact-modal-content {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  padding: 32px;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.3s var(--ease-spring);
}

.contact-modal[data-open="true"] .contact-modal-content {
  transform: translateY(0) scale(1);
}

.contact-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
}

.contact-modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-surface-hover);
}

.contact-modal-header {
  margin-bottom: 24px;
}

.contact-modal-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
}

.contact-modal-subtitle {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* ========================================
   Form Elements
   ======================================== */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 480px) {
  .contact-form-row {
    grid-template-columns: 1fr;
  }
}

.contact-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  transition: border-color var(--duration-default) var(--ease-default),
              box-shadow var(--duration-default) var(--ease-default);
}

.input::placeholder {
  color: var(--text-muted);
}

.input:hover {
  border-color: var(--border-strong);
}

.input:focus {
  outline: none;
  border-color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.contact-form-textarea {
  min-height: 120px;
  padding: 12px;
  resize: vertical;
}

.captcha-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-surface-secondary);
  border-radius: var(--radius-md);
}

.captcha-question {
  font-size: 14px;
  color: var(--text-secondary);
}

.captcha-input {
  width: 60px;
  text-align: center;
}

.contact-form-submit {
  margin-top: 8px;
}

/* ========================================
   Buttons
   ======================================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--bg-page);
  background: var(--text-primary);
  border: none;
  border-radius: var(--radius-md);
  transition: opacity 0.15s var(--ease-default);
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-page);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  transition: background 0.15s var(--ease-default);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
}

/* ========================================
   Scroll Reveal Animations
   ======================================== */
.reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 1.6s var(--ease-out), transform 1.6s var(--ease-out);
}

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

/* Intro text specific animation */
.intro-text.reveal {
  transform: translateY(80px);
  transition: opacity 2s var(--ease-out), transform 2s var(--ease-out);
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.4s var(--ease-out), transform 1.4s var(--ease-out);
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.15s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.25s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.35s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.45s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.55s; }

.reveal-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   Utilities
   ======================================== */
.hidden {
  display: none !important;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}
