/* ============================================
   Carlos Franco Portfolio - Styles
   Dark & Modern Theme
   ============================================ */

/* --- Custom Properties --- */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #161616;
  --bg-card-hover: #1a1a1a;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.15);
  --text-primary: #e5e5e5;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --border: #1f1f1f;
  --border-light: #2a2a2a;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --nav-height: 72px;
  --container-width: 1100px;
  --transition: 0.3s ease;
}

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

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

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

ul {
  list-style: none;
}

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

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

.section {
  padding: 100px 0;
}

.section__title {
  font-size: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
  margin-bottom: 60px;
  position: relative;
}

.section__title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 16px auto 0;
  border-radius: 2px;
}

/* --- Scroll Animations --- */
.animate-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  z-index: 1000;
  transition: border-color var(--transition), background var(--transition);
}

.nav--scrolled {
  border-bottom-color: var(--border);
  background: rgba(10, 10, 10, 0.95);
}

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

.nav__logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 1px;
}

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

.nav__menu {
  display: flex;
  gap: 36px;
}

.nav__link {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  transition: color var(--transition);
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav__link:hover,
.nav__link.active {
  color: var(--text-primary);
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

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

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: transform var(--transition), opacity var(--transition);
}

.nav__toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav__toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: calc(var(--nav-height) + 40px) 24px 80px;
  background:
    radial-gradient(ellipse at 25% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 20%, rgba(59, 130, 246, 0.04) 0%, transparent 50%),
    var(--bg-primary);
}

.hero__container {
  max-width: var(--container-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 56px;
}

.hero__image-wrapper {
  flex-shrink: 0;
  position: relative;
}

.hero__image-wrapper::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent), rgba(59, 130, 246, 0.2));
  opacity: 0.5;
  z-index: 0;
}

.hero__image {
  position: relative;
  z-index: 1;
  width: 380px;
  height: 420px;
  border-radius: 16px;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--border-light);
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.4),
    0 0 60px rgba(59, 130, 246, 0.08);
}

.hero__content {
  max-width: 540px;
}

.hero__greeting {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero__name {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero__title {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.hero__divider {
  color: var(--accent);
  margin: 0 4px;
}

.hero__tagline {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 36px;
}

.hero__cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-8px); }
  60% { transform: translateX(-50%) translateY(-4px); }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 6px;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}

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

.btn--primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.25);
}

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

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* --- About Section --- */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.about__text p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.8;
}

.about__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  transition: border-color var(--transition), transform var(--transition);
}

.stat:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.stat__number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

.stat__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- Experience Timeline --- */
.experience {
  background: var(--bg-secondary);
}

.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline__item {
  position: relative;
  width: 50%;
  padding: 0 40px 60px;
}

.timeline__item:nth-child(odd) {
  left: 0;
  text-align: right;
  padding-right: 50px;
  padding-left: 0;
}

.timeline__item:nth-child(even) {
  left: 50%;
  text-align: left;
  padding-left: 50px;
  padding-right: 0;
}

.timeline__dot {
  position: absolute;
  top: 4px;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border: 3px solid var(--bg-secondary);
  border-radius: 50%;
  z-index: 1;
}

.timeline__item:nth-child(odd) .timeline__dot {
  right: -7px;
}

.timeline__item:nth-child(even) .timeline__dot {
  left: -7px;
}

.timeline__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  transition: border-color var(--transition), transform var(--transition);
}

.timeline__card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
}

.timeline__date {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.timeline__role {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.timeline__company {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 16px;
}

.timeline__details {
  text-align: left;
}

.timeline__details li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.timeline__details li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
}

.timeline__details li:last-child {
  margin-bottom: 0;
}

/* --- Featured Projects Section --- */
.projects {
  background: var(--bg-secondary);
}

.projects__subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  margin: -30px auto 48px;
  max-width: 500px;
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  align-items: start;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}

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

.project-card__accent {
  height: 4px;
  background: linear-gradient(90deg, var(--accent), #60a5fa);
}

.project-card__metric {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent);
  padding: 28px 28px 0;
  line-height: 1.3;
}

.project-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  padding: 12px 28px 0;
}

.project-card__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 6px 28px 0;
}

.project-card__summary {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  padding: 16px 28px 0;
}

.project-card__results {
  padding: 16px 28px 0 28px;
  list-style: none;
}

.project-card__results li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.project-card__results li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
}

.project-card__results li:last-child {
  margin-bottom: 0;
}

.project-card__quote {
  margin: 20px 28px 28px;
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  background: rgba(59, 130, 246, 0.04);
  border-radius: 0 8px 8px 0;
}

.project-card__quote p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.7;
  margin-bottom: 8px;
}

.project-card__quote cite {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: normal;
  display: block;
  text-align: right;
}

/* Project card without quote needs bottom padding */
.project-card:last-child .project-card__results {
  padding-bottom: 28px;
}

/* --- Skills Section --- */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 60px;
}

.skills__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  transition: border-color var(--transition), transform var(--transition);
}

.skills__card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.skills__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--accent-glow);
  border-radius: 12px;
  margin-bottom: 20px;
  color: var(--accent);
}

.skills__category {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.skills__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.tag {
  display: inline-block;
  padding: 6px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: border-color var(--transition), color var(--transition);
}

.tag:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

/* --- Education --- */
.education {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px;
}

.education__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
}

.education__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.education__item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  color: var(--accent);
}

.education__item svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.education__item strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.education__item p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* --- Contact Section --- */
.contact {
  background: var(--bg-secondary);
}

.contact__intro {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 500px;
  margin: -30px auto 48px;
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.contact__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 16px;
  text-align: center;
  transition: border-color var(--transition), transform var(--transition);
  color: var(--text-primary);
}

a.contact__card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  color: var(--text-primary);
}

.contact__card svg {
  color: var(--accent);
}

.contact__label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

.contact__value {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* --- Footer --- */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

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

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

.footer__nav {
  display: flex;
  gap: 24px;
}

.footer__nav a {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color var(--transition);
}

.footer__nav a:hover {
  color: var(--text-primary);
}

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

/* Tablet */
@media (max-width: 1024px) {
  .hero__container {
    flex-direction: column;
    text-align: center;
  }

  .hero__content {
    max-width: 100%;
  }

  .hero__cta {
    justify-content: center;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .skills__grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .contact__grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 768px) {
  .section {
    padding: 70px 0;
  }

  .section__title {
    font-size: 1.6rem;
    margin-bottom: 40px;
  }

  /* Mobile Nav */
  .nav__toggle {
    display: flex;
  }

  .nav__menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s ease, opacity 0.4s ease;
  }

  .nav__menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav__menu li {
    width: 100%;
    text-align: center;
  }

  .nav__link {
    display: block;
    padding: 16px 24px;
    font-size: 1rem;
  }

  .nav__link::after {
    display: none;
  }

  /* Hero Mobile */
  .hero {
    padding-top: calc(var(--nav-height) + 20px);
  }

  .hero__name {
    font-size: 2.5rem;
  }

  .hero__title {
    font-size: 1.05rem;
  }

  .hero__image {
    width: 280px;
    height: 320px;
    border-radius: 14px;
  }

  .hero__image-wrapper::before {
    border-radius: 18px;
  }

  /* Timeline Mobile */
  .timeline::before {
    left: 20px;
  }

  .timeline__item,
  .timeline__item:nth-child(odd),
  .timeline__item:nth-child(even) {
    left: 0;
    width: 100%;
    text-align: left;
    padding-left: 50px;
    padding-right: 0;
  }

  .timeline__item:nth-child(odd) .timeline__dot,
  .timeline__item:nth-child(even) .timeline__dot {
    left: 13px;
    right: auto;
  }

  .timeline__card {
    padding: 20px;
  }

  /* Projects Mobile */
  .projects__grid {
    grid-template-columns: 1fr;
  }

  /* Skills Mobile */
  .skills__grid {
    grid-template-columns: 1fr;
  }

  .education {
    padding: 24px;
  }

  /* Contact Mobile */
  .contact__grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Footer Mobile */
  .footer__container {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero__image {
    width: 240px;
    height: 280px;
    border-radius: 12px;
  }

  .hero__image-wrapper::before {
    border-radius: 16px;
  }

  .hero__name {
    font-size: 2rem;
  }

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

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

  .about__stats {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .stat {
    padding: 20px 12px;
  }

  .stat__number {
    font-size: 1.5rem;
  }

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