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

:root {
  --accent: #e91e63;
  --accent-dark: #c2185b;
  --bg: #ffffff;
  --bg-alt: #f8f8fa;
  --fg: #1a1a2e;
  --fg-light: #555;
  --border: #e8e8ee;
  --radius: 16px;
}

html {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--fg);
  background: var(--bg);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--fg);
}

.logo img {
  height: 32px;
}

/* ---- Hero ---- */

.bg-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100dvh;
  padding: 5rem 0;
}

.hero-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 5.5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: 1.5rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--fg-light);
  max-width: 560px;
  margin-bottom: 1rem;
}

.hero-sub-secondary {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--fg-light);
  opacity: 0.7;
  max-width: 560px;
  margin-bottom: 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 100px;
  transition: background 0.2s;
}

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

/* ---- Projects ---- */

.projects {
  padding: 5rem 0;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.projects h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 2.5rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.project-card {
  position: relative;
  display: flex;
  overflow: hidden;
  border-radius: var(--radius);
  text-decoration: none;
  color: #fff;
  min-height: 360px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.18);
}

.card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(0px) brightness(0.9);
  transform: scale(1.05);
  transition: transform 0.4s;
}

.project-card:hover .card-bg {
  transform: scale(1.1);
}

.card-overlay {
  position: absolute;
  inset: 0;
}

.card-retroleague .card-overlay {
  background: linear-gradient(180deg, rgba(119, 80, 248, 0.85) 0%, rgba(75, 40, 200, 0.35) 100%);
}

.card-sortana .card-overlay {
  background: linear-gradient(180deg, rgba(233, 30, 99, 0.85) 0%, rgba(180, 20, 70, 0.35) 100%);
}

/* Fallback when no bg image — solid gradient */
.card-retroleague {
  background: linear-gradient(160deg, #7750f8 0%, #4b28c8 100%);
}

.card-sortana {
  background: linear-gradient(160deg, #e91e63 0%, #b41446 100%);
}

.card-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  width: 100%;
}

.project-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  margin-bottom: 1.25rem;
}

.project-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
  align-self: flex-start;
  margin-bottom: 0.75rem;
}

.card-retroleague .project-logo {
  filter: brightness(0) invert(1);
}

.project-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.project-card p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.project-tags span {
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
}

.project-link {
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  opacity: 0.8;
  transition: opacity 0.2s;
}

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

/* ---- Footer ---- */

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

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

.footer-brand {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--fg);
}

.footer-email {
  font-size: 0.85rem;
  color: var(--fg-light);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-email:hover {
  color: var(--accent);
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
  .hero {
    padding: 4rem 0;
  }

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

  .project-card {
    min-height: 300px;
  }
}
