/* ═══════════════════════════════════════════════════════
   PATRICK PEREZ — PORTFOLIO v2
   Dark Cyberpunk Theme | Syne + Inter + Space Mono
═══════════════════════════════════════════════════════ */

/* ── VARIABLES ───────────────────────────────────────── */
:root {
  --bg:         #080c14;
  --bg-2:       #0d1117;
  --bg-card:    #131929;
  --bg-card-2:  #1a2235;
  --accent:     #00d4ff;
  --accent-2:   #7b2fff;
  --accent-glow:rgba(0, 212, 255, 0.15);
  --text:       #e8edf8;
  --text-2:     #8892a4;
  --text-muted: #4a5568;
  --border:     rgba(255, 255, 255, 0.06);
  --border-h:   rgba(0, 212, 255, 0.3);
  --radius:     12px;
  --radius-lg:  20px;
  --shadow:     0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow:0 0 40px rgba(0, 212, 255, 0.12);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-display:'Syne', sans-serif;
  --font-body:   'Inter', sans-serif;
  --font-mono:   'Space Mono', monospace;
  --nav-h:       70px;
}

/* ── RESET ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { font-family: inherit; cursor: none; }
.hidden { display: none !important; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.text-center { text-align: center; }
.me-2 { margin-right: 0.5rem; }
.w-full { width: 100%; }

/* ── CONTAINER ───────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* ── SPLASH SCREEN ───────────────────────────────────── */
#splash {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#splash.hidden { opacity: 0; visibility: hidden; }
.splash-inner { text-align: center; }
.splash-monogram {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: splashPulse 1.2s ease-in-out infinite alternate;
}
@keyframes splashPulse {
  from { opacity: 0.6; transform: scale(0.95); }
  to   { opacity: 1;   transform: scale(1.05); }
}
.splash-bar {
  width: 120px; height: 2px;
  background: var(--border);
  margin: 1.5rem auto;
  position: relative; overflow: hidden;
  border-radius: 2px;
}
.splash-bar::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: splashSlide 1.2s ease-in-out infinite;
}
@keyframes splashSlide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%);  }
}
.splash-label { font-size: 0.8rem; color: var(--text-muted); font-family: var(--font-mono); letter-spacing: 2px; text-transform: uppercase; }

/* ── CUSTOM CURSOR ───────────────────────────────────── */
#cursor-dot {
  position: fixed; width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%; pointer-events: none; z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
}
#cursor-ring {
  position: fixed; width: 36px; height: 36px;
  border: 1.5px solid rgba(0, 212, 255, 0.5);
  border-radius: 50%; pointer-events: none; z-index: 9997;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, border-color 0.3s, transform 0.08s linear;
}
body.cursor-hover #cursor-dot { width: 12px; height: 12px; background: var(--accent-2); }
body.cursor-hover #cursor-ring { width: 50px; height: 50px; border-color: rgba(123, 47, 255, 0.6); }

/* ── SCROLL PROGRESS ─────────────────────────────────── */
#scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; z-index: 9996;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  width: 0%; transition: width 0.1s linear;
}

/* ── HEADER ──────────────────────────────────────────── */
#header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition);
}
#header.scrolled {
  background: rgba(8, 12, 20, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}
.nav {
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.dot { -webkit-text-fill-color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a {
  font-size: 0.9rem; font-weight: 500; color: var(--text-2);
  position: relative; transition: color var(--transition);
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1px; background: var(--accent);
  transition: width var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 4px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }

/* ── BUTTONS ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center;
  padding: 0.75rem 1.75rem;
  border-radius: 8px; font-weight: 600; font-size: 0.9rem;
  border: none; transition: all var(--transition); white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #0099cc);
  color: #000; box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0, 212, 255, 0.4); }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border-h);
}
.btn-ghost:hover { background: var(--accent-glow); border-color: var(--accent); color: var(--accent); }

/* ── SECTION BASE ────────────────────────────────────── */
.section { padding: 7rem 0; }
.section-dark { background: var(--bg-2); }
.section-header { margin-bottom: 3rem; }
.section-label {
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700;
  color: var(--accent); letter-spacing: 3px; text-transform: uppercase;
  display: block; margin-bottom: 0.5rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800; line-height: 1.15;
}

/* ── HERO ────────────────────────────────────────────── */
#hero {
  min-height: 100vh; display: flex; align-items: center;
  position: relative; overflow: hidden;
  padding-top: var(--nav-h);
}
.hero-bg-shapes { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.shape {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: 0.12;
}
.shape-1 { width: 500px; height: 500px; background: var(--accent); top: -100px; right: -100px; animation: shapeFloat 20s ease-in-out infinite; }
.shape-2 { width: 350px; height: 350px; background: var(--accent-2); bottom: -50px; left: -80px; animation: shapeFloat 25s ease-in-out infinite reverse; }
.shape-3 { width: 250px; height: 250px; background: var(--accent); top: 50%; left: 40%; animation: shapeFloat 18s ease-in-out infinite 3s; }
@keyframes shapeFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(30px, -20px) scale(1.05); }
  66%       { transform: translate(-20px, 30px) scale(0.95); }
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr auto;
  gap: 4rem; align-items: center; width: 100%;
  padding: 4rem 1.5rem;
}
.hero-greeting { font-family: var(--font-mono); font-size: 0.9rem; color: var(--accent); letter-spacing: 2px; margin-bottom: 0.5rem; }
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 800; line-height: 1.1;
  background: linear-gradient(135deg, var(--text) 60%, var(--text-2));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 0.75rem;
}
.hero-role {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 400; color: var(--text-2); margin-bottom: 1rem;
}
.typed-prefix { color: var(--text-2); }
.typed { color: var(--accent); font-weight: 600; }
.hero-tagline { color: var(--text-muted); font-size: 1rem; margin-bottom: 2rem; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.hero-socials { display: flex; gap: 1rem; }
.hero-socials a {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2); font-size: 1.1rem;
  transition: all var(--transition);
}
.hero-socials a:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); box-shadow: 0 4px 15px var(--accent-glow); }

/* Profile Card */
.profile-card {
  position: relative; width: 280px; height: 280px;
  border-radius: 50%;
  transform-style: preserve-3d;
  transition: transform 0.1s linear;
}
.profile-card-inner { position: relative; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; }
.profile-photo { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.gif-overlay { position: absolute; inset: 0; opacity: 0; transition: opacity 0.3s ease; }
.profile-card:hover .gif-overlay { opacity: 1; }
.profile-card-glow {
  position: absolute; inset: -10px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--accent));
  z-index: -1; opacity: 0.4;
  animation: glowRotate 4s linear infinite;
}
@keyframes glowRotate { to { transform: rotate(360deg); } }

.scroll-down {
  position: absolute; bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted); font-size: 1.4rem;
  animation: bounce 2s ease-in-out infinite;
}
@keyframes bounce { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(8px); } }

/* ── ABOUT ───────────────────────────────────────────── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.about-text p { color: var(--text-2); font-size: 1.05rem; line-height: 1.8; }
.info-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem;
}
.info-item { display: flex; align-items: flex-start; gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.info-item:last-child { border-bottom: none; }
.info-item i { color: var(--accent); font-size: 1.1rem; margin-top: 2px; flex-shrink: 0; }
.info-label { display: block; font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 2px; }
.info-value { font-size: 0.9rem; color: var(--text); }
.info-value.available { color: #4ade80; }
.services-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.service-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem;
  transition: all var(--transition);
}
.service-card:hover { border-color: var(--border-h); transform: translateY(-2px); }
.service-card i { font-size: 1.3rem; color: var(--accent); margin-bottom: 0.5rem; display: block; }
.service-card h4 { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.3rem; font-family: var(--font-display); }
.service-card p { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }

/* ── SKILLS ──────────────────────────────────────────── */
#skills .section-header { text-align: center; }
.skills-marquee-wrap { margin-top: 1.5rem; overflow: hidden; display: flex; flex-direction: column; gap: 1rem; }
.skills-marquee { display: flex; gap: 1rem; width: max-content; animation: marqueeLeft 30s linear infinite; }
.skills-marquee-reverse { animation: marqueeRight 30s linear infinite; }
.skills-marquee-wrap:hover .skills-marquee,
.skills-marquee-wrap:hover .skills-marquee-reverse { animation-play-state: paused; }
@keyframes marqueeLeft  { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes marqueeRight { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.skill-badge {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.6rem 1.2rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 50px; white-space: nowrap;
  font-size: 0.85rem; font-weight: 500; color: var(--text-2);
  transition: all var(--transition);
}
.skill-badge:hover { border-color: var(--border-h); color: var(--text); transform: scale(1.05); }
.skill-badge img { width: 20px; height: 20px; object-fit: contain; }

/* ── EXPERIENCE ──────────────────────────────────────── */
.timeline-tabs { display: flex; gap: 0.5rem; margin-bottom: 2.5rem; }
.timeline-tab {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.4rem; border-radius: 50px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-2); font-size: 0.9rem; font-weight: 500;
  transition: all var(--transition);
}
.timeline-tab.active, .timeline-tab:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px; background: linear-gradient(to bottom, var(--accent), var(--accent-2), transparent);
}
.timeline-item { position: relative; padding-bottom: 2.5rem; }
.timeline-item::before {
  content: ''; position: absolute; left: -2.4rem; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg);
  box-shadow: 0 0 12px var(--accent);
}
.timeline-period {
  font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--accent); margin-bottom: 0.4rem; display: block;
}
.timeline-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; margin-bottom: 0.2rem; }
.timeline-company { font-size: 0.9rem; color: var(--text-2); margin-bottom: 0.75rem; }
.timeline-desc { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.timeline-highlights { padding-left: 1rem; }
.timeline-highlights li { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.3rem; position: relative; }
.timeline-highlights li::before { content: '▹'; color: var(--accent); position: absolute; left: -1rem; }
.timeline-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.timeline-badge {
  padding: 0.2rem 0.7rem; border-radius: 20px;
  background: var(--bg-card-2); border: 1px solid var(--border);
  font-size: 0.75rem; color: var(--text-2);
}

/* ── PROJECTS ────────────────────────────────────────── */
.project-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.filter-btn {
  padding: 0.5rem 1.2rem; border-radius: 50px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-2); font-size: 0.85rem; font-weight: 500;
  transition: all var(--transition);
}
.filter-btn.active, .filter-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.project-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: all var(--transition);
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
}
.project-card:hover { border-color: var(--border-h); transform: translateY(-5px); box-shadow: var(--shadow-glow); }
.project-card.filtered-out { display: none; }
.project-thumb { position: relative; overflow: hidden; aspect-ratio: 16/9; }
.project-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.project-card:hover .project-thumb img { transform: scale(1.08); }
.project-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  display: flex; align-items: flex-end; padding: 1rem;
  opacity: 0; transition: opacity var(--transition);
}
.project-card:hover .project-overlay { opacity: 1; }
.project-link-icon { color: var(--accent); font-size: 1.3rem; }
.project-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.project-title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; }
.project-desc { font-size: 0.83rem; color: var(--text-muted); line-height: 1.6; flex: 1; margin-bottom: 0.75rem; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.project-tag {
  padding: 0.2rem 0.6rem; border-radius: 20px;
  background: var(--bg-card-2); border: 1px solid var(--border);
  font-size: 0.72rem; color: var(--text-muted);
}

/* ── CONTACT ─────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 4rem; align-items: start; }
.contact-info > p { color: var(--text-2); margin-bottom: 1.5rem; font-size: 1rem; }
.contact-links { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }
.contact-link {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text-2);
  font-size: 0.9rem; transition: all var(--transition);
}
.contact-link:hover { border-color: var(--border-h); color: var(--accent); }
.contact-link i { color: var(--accent); font-size: 1.1rem; }
.contact-map { border-radius: var(--radius); overflow: hidden; height: 200px; border: 1px solid var(--border); }
.contact-map iframe { width: 100%; height: 100%; border: 0; }
.contact-form { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 500; color: var(--text-2); margin-bottom: 0.5rem; }
.form-group input,
.form-group textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.75rem 1rem;
  color: var(--text); font-family: var(--font-body); font-size: 0.9rem;
  transition: border-color var(--transition);
}
.form-group input:focus,
.form-group textarea:focus { outline: none; border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 120px; }
#form-status { margin-bottom: 1rem; font-size: 0.9rem; border-radius: 8px; }
#form-status.success { padding: 0.75rem; background: rgba(74, 222, 128, 0.1); border: 1px solid rgba(74, 222, 128, 0.3); color: #4ade80; }
#form-status.error   { padding: 0.75rem; background: rgba(248, 113, 113, 0.1); border: 1px solid rgba(248, 113, 113, 0.3); color: #f87171; }

/* ── FOOTER ──────────────────────────────────────────── */
#footer { background: var(--bg-2); border-top: 1px solid var(--border); padding: 2rem 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-logo { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.footer-copy { font-size: 0.85rem; color: var(--text-muted); }
.footer-socials { display: flex; gap: 0.75rem; }
.footer-socials a { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg-card); display: flex; align-items: center; justify-content: center; color: var(--text-2); font-size: 1rem; transition: all var(--transition); }
.footer-socials a:hover { border-color: var(--accent); color: var(--accent); }

/* ── SCROLL TOP ──────────────────────────────────────── */
#scroll-top {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-2); font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: all var(--transition);
}
#scroll-top.visible { opacity: 1; pointer-events: auto; }
#scroll-top:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); }

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-image { display: flex; justify-content: center; order: -1; }
  .profile-card { width: 200px; height: 200px; }
  .hero-cta, .hero-socials { justify-content: center; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 640px) {
  .nav-links { display: none; flex-direction: column; position: fixed; inset: 0; background: var(--bg); z-index: 99; align-items: center; justify-content: center; gap: 2rem; }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1.3rem; }
  .nav-toggle { display: flex; }
  .hero-inner { padding: 2rem 0; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  #cursor-dot, #cursor-ring { display: none; }
  body { cursor: auto; }
  button { cursor: pointer; }
}
