/* ==========================================================================
   YouCloud.ovh — Premium Minimal Dark
   Fonts: Sora (display) + Work Sans (body)
   ========================================================================== */

:root {
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-hover: #2c2c2e;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  --text: #f5f5f7;
  --muted: #86868b;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-soft: rgba(99, 102, 241, 0.12);
  --ok: #30d158;
  --down: #ff453a;
  --radius: 20px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --max-w: 1080px;
  --space-section: clamp(4rem, 8vw, 6rem);
}

/* Reset & Base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: "Work Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul {
  list-style: none;
}

::selection {
  background: rgba(99, 102, 241, 0.3);
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--surface-hover);
  border-radius: 4px;
}

/* Layout
   ========================================================================== */

.container {
  width: min(var(--max-w), calc(100% - 3rem));
  margin: 0 auto;
}

/* Navigation
   ========================================================================== */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  background: rgba(0, 0, 0, 0.72);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text);
  transition: opacity 0.2s;
}

.brand:hover {
  opacity: 0.7;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.875rem;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.lang-link {
  margin-left: 0.5rem;
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 600;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 8px;
  transition: background 0.2s;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
}

.menu-toggle i {
  width: 22px;
  height: 22px;
}

/* Hero
   ========================================================================== */

.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  max-width: 640px;
  position: relative;
}

.hero-content > * {
  opacity: 0;
  animation: heroFadeIn 0.8s ease forwards;
}

.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.2s; }
.hero-content > *:nth-child(3) { animation-delay: 0.35s; }
.hero-content > *:nth-child(4) { animation-delay: 0.5s; }
.hero-content > *:nth-child(5) { animation-delay: 0.65s; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(48, 209, 88, 0.2);
  background: rgba(48, 209, 88, 0.06);
  color: var(--ok);
  font-size: 0.78rem;
  font-weight: 500;
}

.status-badge.is-down {
  border-color: rgba(255, 69, 58, 0.2);
  background: rgba(255, 69, 58, 0.06);
  color: var(--down);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.5);
  animation: pulse 2s ease infinite;
}

.status-dot.is-down {
  background: var(--down);
  box-shadow: 0 0 0 0 rgba(255, 69, 58, 0.5);
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(48, 209, 88, 0); }
}

.hero-name {
  font-family: "Sora", sans-serif;
  font-size: clamp(2.8rem, 7vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-top: 1.8rem;
}

.hero-role {
  font-family: "Sora", sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 400;
  color: var(--accent);
  margin-top: 0.6rem;
  letter-spacing: 0.02em;
}

.hero-tagline {
  font-size: 1.05rem;
  color: var(--muted);
  margin-top: 1.5rem;
  max-width: 48ch;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  border: none;
  padding: 0.7rem 1.4rem;
  font-family: "Work Sans", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn i {
  width: 16px;
  height: 16px;
}

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

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

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

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.28);
}

/* Sections
   ========================================================================== */

.section {
  padding: var(--space-section) 0;
}

.section-header {
  margin-bottom: 3rem;
}

.section-title {
  font-family: "Sora", sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.section-subtitle {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 52ch;
}

.section-divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  border: none;
}

/* Featured Projects
   ========================================================================== */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  min-height: 260px;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--project-color, var(--border-hover));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4),
              0 0 0 1px var(--project-color, transparent);
}

.project-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-xs);
  background: var(--project-color, var(--accent-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.project-icon i {
  width: 22px;
  height: 22px;
  color: #fff;
}

.project-name {
  font-family: "Sora", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.project-desc {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  flex-grow: 1;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: auto;
  transition: gap 0.2s ease;
}

.project-card:hover .project-link {
  gap: 0.5rem;
}

.project-link i {
  width: 14px;
  height: 14px;
}

/* Tech Tags
   ========================================================================== */

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.tech-tag {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: border-color 0.2s;
}

.project-card:hover .tech-tag {
  border-color: var(--border-hover);
}

/* Services Grid
   ========================================================================== */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.service-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.15rem 1.25rem;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.service-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.service-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.service-icon i {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.service-card:hover .service-icon i {
  color: var(--text);
}

.service-info {
  flex: 1;
  min-width: 0;
}

.service-name {
  font-family: "Sora", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.service-desc {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.service-arrow {
  width: 16px;
  height: 16px;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.service-card:hover .service-arrow {
  opacity: 1;
}

/* Stack / Technologies
   ========================================================================== */

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.stack-category {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  transition: border-color 0.2s;
}

.stack-category:hover {
  border-color: var(--border-hover);
}

.stack-category-title {
  font-family: "Sora", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.stack-category-title i {
  width: 14px;
  height: 14px;
}

.stack-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.stack-pill {
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text);
  font-weight: 500;
  transition: border-color 0.2s, background 0.2s;
}

.stack-pill:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* Open Source / Repo Grid
   ========================================================================== */

.repo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.repo-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  min-height: 130px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.repo-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
}

.repo-name {
  font-family: "Sora", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
}

.repo-desc {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  flex-grow: 1;
}

.repo-meta {
  margin-top: auto;
  font-size: 0.75rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.lang-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.skeleton {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-height: 130px;
  background-image: linear-gradient(
    90deg,
    var(--surface) 25%,
    var(--surface-hover) 50%,
    var(--surface) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}

@keyframes shimmer {
  to { background-position: -200% 0; }
}

/* Infrastructure Status
   ========================================================================== */

.infra-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.infra-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.infra-panel-title {
  font-family: "Sora", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.infra-panel-title i {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.status-list {
  display: grid;
  gap: 0.4rem;
}

.status-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.2s;
}

.status-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.status-item a {
  padding: 0.6rem 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.status-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-updated {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.75rem;
}

/* Contact
   ========================================================================== */

.contact {
  text-align: center;
  padding: var(--space-section) 0;
}

.contact-title {
  font-family: "Sora", sans-serif;
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.contact-desc {
  color: var(--muted);
  margin-top: 0.75rem;
  font-size: 1rem;
}

.contact-actions {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Footer
   ========================================================================== */

.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.footer-links {
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--muted);
  transition: color 0.2s;
}

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

/* Animations
   ========================================================================== */

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

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.15s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.2s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.25s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.3s; }
.reveal-stagger.visible > *:nth-child(7) { transition-delay: 0.35s; }
.reveal-stagger.visible > *:nth-child(8) { transition-delay: 0.4s; }

/* Responsive
   ========================================================================== */

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

  .infra-section {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: auto;
  }

  .stack-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

@media (max-width: 768px) {
  .container {
    width: min(var(--max-w), calc(100% - 2rem));
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    flex-direction: column;
    gap: 0.25rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links .nav-link {
    padding: 0.7rem 1rem;
    width: 100%;
    text-align: left;
    font-size: 1rem;
  }

  .nav-links .lang-link {
    margin-left: 0;
    margin-top: 0.5rem;
    width: fit-content;
  }

  .menu-toggle {
    display: flex;
    align-items: center;
  }

  .hero {
    padding-top: 5rem;
    min-height: 90dvh;
  }

  .hero-name {
    font-size: clamp(2.2rem, 10vw, 3rem);
  }

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

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

  .section-header {
    margin-bottom: 2rem;
  }

  :root {
    --space-section: 4rem;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .contact-actions {
    flex-direction: column;
    align-items: center;
  }
}
