/* Clevenider Petit — portfólio
   UI: branding clevencode (Swiss / Inter / #2563EB) */

:root {
  --blue: #2563eb;
  --black: #0d1117;
  --gray: #6b7280;
  --line: #e5e7eb;
  --white: #ffffff;
  --muted: #9ca3af;
  --bg: var(--white);
  --text: var(--black);
  --font: Inter, ui-sans-serif, system-ui, sans-serif;
  --container: 1100px;
  --nav-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: var(--font);
  font-feature-settings: "ss01", "cv11";
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(37, 99, 235, 0.18); color: var(--black); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
strong { color: var(--black); font-weight: 600; }
ul { list-style: none; }
button { font: inherit; }

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

/* ——— Nav ——— */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: #0d1117;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s;
}

.navbar.scrolled { border-bottom-color: #21262d; }

.nav-container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--black);
}

.logo-mark {
  width: 22px;
  height: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  flex-shrink: 0;
}

.logo-mark i {
  display: block;
  background: var(--black);
  border-radius: 2px;
}

.logo-mark i.spark {
  background: var(--blue);
  transform: translate(1px, 1px);
}

.logo-word {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.logo-word .dot { color: var(--blue); }

.navbar .nav-logo { color: var(--white); }
.navbar .logo-mark i { background: var(--white); }
.navbar .logo-mark i.spark { background: var(--blue); }

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

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--white); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ——— Hero ——— */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: var(--nav-h);
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fafc 50%, #ffffff 100%);
}

.hero-grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 48px 24px 64px;
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100dvh - var(--nav-h));
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.hero-greeting {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}

.hero-name {
  font-size: clamp(2.6rem, 6.5vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.05;
  color: var(--black);
  margin-bottom: 14px;
}

.hero-role {
  font-size: 1.15rem;
  color: var(--gray);
  min-height: 1.8em;
  margin-bottom: 28px;
}

.hero-role .cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--blue);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-social {
  display: flex;
  gap: 12px;
}

.hero-social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  color: var(--gray);
  font-size: 1.1rem;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.hero-social a:hover {
  color: var(--blue);
  border-color: var(--blue);
  background: rgba(37, 99, 235, 0.06);
}

.hero-media {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: stretch;
  min-height: 420px;
}

.hero-photo {
  width: 100%;
  height: 100%;
  max-height: min(78vh, 720px);
  object-fit: cover;
  object-position: center top;
  border: 1px solid var(--line);
  background: var(--white);
  animation: heroIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-copy {
  animation: copyIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

@keyframes heroIn {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
}

.btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--black);
  border-color: var(--line);
}

.btn-outline:hover { border-color: var(--black); }

.btn-lg { padding: 14px 26px; font-size: 0.95rem; }

/* ——— Sections ——— */
.section {
  padding: 112px 0;
  border-top: 1px solid var(--line);
}

.section-header {
  text-align: left;
  margin-bottom: 48px;
  max-width: 640px;
}

.section-tag {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.85rem, 3.5vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--black);
}

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

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

/* ——— About ——— */
.about-content { max-width: 720px; }

.about-text p {
  font-size: 1.05rem;
  color: var(--gray);
  margin-bottom: 16px;
  line-height: 1.8;
}

.about-stats {
  display: flex;
  gap: 40px;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.stat-number {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ——— Skills ——— */
.skills { background: var(--white); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.skill-card {
  background: var(--white);
  padding: 28px 24px 26px;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  transition: background 0.2s;
}

.skill-card:hover { background: #f8fafc; }

.skill-card:hover .skill-icon {
  border-color: var(--blue);
  color: var(--blue);
}

.skill-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.skill-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--black);
  font-size: 0.95rem;
  flex-shrink: 0;
  transition: border-color 0.2s, color 0.2s;
}

.skill-index {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--gray);
  font-variant-numeric: tabular-nums;
}

.skill-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 6px;
}

.skill-card p {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--gray);
  max-width: 22ch;
}

.section-desc {
  margin-top: 14px;
  font-size: 1.05rem;
  color: var(--gray);
  line-height: 1.6;
}

/* ——— Products ——— */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.product-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 0;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

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

a.product-link {
  display: block;
  color: inherit;
  height: 100%;
}

.product-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 132px;
  padding: 20px;
  background: var(--black);
}

.preview-bar,
.preview-row,
.preview-week,
.preview-hero,
.preview-cols,
.preview-slide {
  display: block;
  background: rgba(255, 255, 255, 0.18);
  height: 8px;
}

.preview-bar { width: 42%; height: 10px; }
.preview-bar.short { width: 24%; height: 6px; background: var(--blue); }
.preview-row { width: 100%; height: 6px; }
.preview-row.faint { width: 68%; opacity: 0.5; }

.product-preview:has(.preview-week) {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.preview-week {
  height: 48px;
  background: rgba(255, 255, 255, 0.12);
}

.preview-week.accent { background: var(--blue); }

.product-preview.site {
  display: grid;
  grid-template-rows: 48px 1fr;
  gap: 8px;
}

.preview-hero { height: 48px; background: var(--blue); }
.preview-cols { height: 48px; background: rgba(255, 255, 255, 0.12); }

.product-preview.slides {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 8px;
}

.preview-slide {
  height: 92px;
  background: rgba(255, 255, 255, 0.12);
}

.preview-slide:first-child { background: var(--blue); }

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 0;
}

.product-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  padding: 10px 24px 0;
}

.product-card p {
  font-size: 0.95rem;
  color: var(--gray);
  line-height: 1.6;
  padding: 8px 24px 0;
}

.product-card .card-tags {
  padding: 16px 24px 24px;
}

/* ——— Projects ——— */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.project-card {
  border: 1px solid var(--line);
  background: var(--white);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

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

a.project-hit {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}

.project-preview {
  min-height: 132px;
  padding: 20px;
  background: var(--black);
}

.project-preview.radio {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 16px;
}

.eq {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 64px;
}

.eq i {
  display: block;
  width: 8px;
  background: rgba(255, 255, 255, 0.18);
}

.eq i:nth-child(1) { height: 28%; }
.eq i:nth-child(2) { height: 62%; }
.eq i:nth-child(3) { height: 44%; background: var(--blue); }
.eq i:nth-child(4) { height: 88%; }
.eq i:nth-child(5) { height: 36%; }
.eq i:nth-child(6) { height: 70%; background: var(--blue); }
.eq i:nth-child(7) { height: 22%; }

.eq-track {
  display: block;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  position: relative;
}

.eq-track::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 38%;
  height: 100%;
  background: var(--blue);
}

.project-preview.site {
  display: grid;
  grid-template-rows: 48px 1fr;
  gap: 8px;
}

.project-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.project-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
}

.project-link {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray);
}

.project-card:hover .project-link { color: var(--blue); }

.project-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.project-card p {
  font-size: 0.95rem;
  color: var(--gray);
  line-height: 1.6;
  margin-bottom: 16px;
}

.project-card .card-tags { margin-top: auto; }

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

.card-tags span {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray);
  border: 1px solid var(--line);
  padding: 4px 10px;
}

/* ——— Contact ——— */
.contact {
  background: var(--black);
  color: var(--white);
  border-top: none;
}

.contact .section-tag { color: var(--blue); }
.contact .section-title { color: var(--white); }

.contact-inner { max-width: 640px; }

.contact-text {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 28px;
}

.contact-social {
  display: flex;
  gap: 24px;
  margin-top: 28px;
}

.contact-social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}

.contact-social a:hover { color: var(--blue); }

.contact .btn-outline {
  color: var(--white);
  border-color: #30363d;
  margin-left: 12px;
}

.contact .btn-outline:hover { border-color: var(--white); }

/* ——— Footer ——— */
footer {
  padding: 28px 0;
  background: var(--black);
  border-top: 1px solid #21262d;
}

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

footer .nav-logo { color: var(--white); }
footer .logo-mark i { background: var(--white); }
footer .logo-mark i.spark { background: var(--blue); }
footer .logo-word { color: var(--white); }

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

/* ——— Responsive ——— */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 40px;
    min-height: auto;
  }

  .hero-media {
    min-height: 360px;
    order: -1;
  }

  .hero-photo {
    max-height: 480px;
    aspect-ratio: 1 / 1;
  }

  .skills-grid,
  .projects-grid {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 720px) {
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    right: 0;
    left: 0;
    flex-direction: column;
    gap: 0;
    background: #0d1117;
    border-bottom: 1px solid #21262d;
    padding: 8px 24px 20px;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid #21262d;
  }

  .nav-links li:last-child a { border-bottom: none; }

  .nav-toggle { display: flex; }

  .section { padding: 80px 0; }

  .skills-grid,
  .products-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .about-stats { gap: 24px; }

  .contact .btn-outline {
    margin-left: 0;
    margin-top: 12px;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

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