/* 
 * styles.css
 * Custom stylesheet for Javier Orti Priego's Personal Website
 * High-fidelity dark mode with neon blue accents, orange app section, and glassmorphic panels
 */

/* ==========================================================================
   1. VARIABLES & BASE STYLES
   ========================================================================== */
:root {
  --bg-primary: #07090e;
  --bg-secondary: #0e1219;
  --bg-glass: rgba(14, 18, 25, 0.75);
  --border-glass: rgba(255, 255, 255, 0.05);
  --border-glass-hover: rgba(255, 255, 255, 0.12);

  --color-primary: #0084ff; /* Electric Blue */
  --color-primary-glow: rgba(0, 132, 255, 0.25);
  --color-secondary: #00f2fe; /* Electric Cyan */
  --color-secondary-glow: rgba(0, 242, 254, 0.25);

  /* App-specific Branding (Radar de gasolineras) */
  --color-app-orange: #e17604;
  --color-app-orange-glow: rgba(225, 118, 4, 0.25);
  --color-app-bg-tint: rgba(225, 118, 4, 0.05);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dark: #64748b;

  --font-family-title: "Outfit", sans-serif;
  --font-family-body: "Inter", sans-serif;

  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-main: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-neon: 0 0 20px var(--color-primary-glow);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-family-body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Background Grids & Glows */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -3;
}

.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: -2;
}

.bg-glow {
  position: fixed;
  top: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(
    circle,
    rgba(0, 132, 255, 0.04) 0%,
    rgba(0, 242, 254, 0.01) 50%,
    transparent 100%
  );
  filter: blur(100px);
  pointer-events: none;
  z-index: -1;
}

/* Containers */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   2. TYPOGRAPHY & BUTTONS
   ========================================================================== */
h1,
h2,
h3,
h4 {
  font-family: var(--font-family-title);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.glow-text {
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-secondary) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(0, 132, 255, 0.2));
}

p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-cta-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family-title);
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-secondary) 100%
  );
  color: #030406;
  padding: 14px 28px;
  box-shadow: 0 4px 15px rgba(0, 132, 255, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 132, 255, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  border: 1px solid var(--border-glass);
  padding: 14px 28px;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-glass-hover);
  transform: translateY(-2px);
}

.btn-cta-small {
  background: rgba(0, 132, 255, 0.1);
  color: #00d2ff;
  border: 1px solid rgba(0, 132, 255, 0.25);
  padding: 8px 18px;
  font-size: 0.9rem;
}

.btn-cta-small:hover {
  background: rgba(0, 132, 255, 0.2);
  border-color: var(--color-primary);
  box-shadow: 0 0 12px var(--color-primary-glow);
}

/* Glass Panels */
.card-panel {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow-main);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ==========================================================================
   3. HEADER / NAVIGATION
   ========================================================================== */
.main-header {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(7, 9, 14, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
  z-index: 100;
  transition: var(--transition-smooth);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.logo {
  font-family: var(--font-family-title);
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--text-main);
  letter-spacing: -0.05em;
}

.logo span {
  color: var(--color-primary);
  text-shadow: 0 0 10px var(--color-primary-glow);
}

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

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.nav-links a:hover {
  color: var(--color-primary);
  text-shadow: 0 0 8px var(--color-primary-glow);
}

/* ==========================================================================
   4. HERO SECTION
   ========================================================================== */
.hero-section {
  padding: 80px 0 100px 0;
  position: relative;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
}

/* Status Badge Link */
.badge-status-link {
  text-decoration: none;
  display: inline-block;
  margin-bottom: 24px;
  transition: var(--transition-smooth);
}

.badge-status-link:hover {
  transform: translateY(-2px);
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 132, 255, 0.05);
  border: 1px solid rgba(0, 132, 255, 0.15);
  color: #38bdf8;
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: var(--font-family-title);
  transition: var(--transition-smooth);
}

.badge-status-link:hover .badge-status {
  border-color: var(--color-primary);
  background: rgba(0, 132, 255, 0.12);
  box-shadow: 0 0 15px var(--color-primary-glow);
  color: #fff;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-primary);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px var(--color-primary);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(0, 132, 255, 0.6);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(0, 132, 255, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(0, 132, 255, 0);
  }
}

.hero-content h1 {
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero-content h2 {
  font-size: 1.8rem;
  color: var(--color-secondary);
  font-weight: 500;
  margin-bottom: 24px;
}

.hero-desc {
  font-size: 1.15rem;
  margin-bottom: 36px;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 10px;
}

/* Social Links & Badges */
.social-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
  scroll-margin-top: 100px; /* Smooth scroll offset */
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

.social-icon:hover {
  background: rgba(0, 132, 255, 0.06);
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 132, 255, 0.15);
}

.coit-badge {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border-glass);
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  transition: var(--transition-smooth);
}

.coit-badge:hover {
  border-color: var(--color-secondary);
  color: var(--color-secondary);
  background: rgba(0, 242, 254, 0.06);
}

/* Profile Photo Card */
.hero-image-area {
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-card-outer {
  position: relative;
  border-radius: 24px;
  padding: 8px;
  background: linear-gradient(
    135deg,
    var(--border-glass) 0%,
    rgba(0, 132, 255, 0.15) 100%
  );
  box-shadow: var(--shadow-main);
  animation: float 6s ease-in-out infinite;
}

.profile-card {
  background: var(--bg-secondary);
  border-radius: 18px;
  overflow: hidden;
  width: 280px;
  border: 1px solid var(--border-glass);
}

.profile-img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}

.profile-info {
  padding: 20px;
  text-align: center;
}

.profile-info h3 {
  font-size: 1.25rem;
  margin-bottom: 6px;
}

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

@keyframes float {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(1deg);
  }
  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

/* ==========================================================================
   5. RADAR APP SHOWCASE SECTION (APP ACCENT ORANGE #e17604)
   ========================================================================== */
.radar-app-section {
  padding: 100px 0;
  background: linear-gradient(
    180deg,
    var(--bg-primary) 0%,
    var(--bg-secondary) 100%
  );
  border-top: 1px solid var(--border-glass);
}

.radar-app-section .section-title {
  color: var(--color-app-orange);
  text-shadow: 0 0 15px rgba(225, 118, 4, 0.15);
}

.radar-app-section h3 {
  color: var(--color-app-orange);
}

.app-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.app-intro-text {
  font-size: 1.15rem;
  margin-bottom: 40px;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

.radar-app-section .feature-card {
  background: rgba(225, 118, 4, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 24px;
  border-radius: 16px;
  transition: var(--transition-smooth);
}

.radar-app-section .feature-card:hover {
  background: var(--color-app-bg-tint);
  border-color: rgba(225, 118, 4, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 10px 25px -10px rgba(225, 118, 4, 0.1);
}

.radar-app-section .feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(225, 118, 4, 0.08);
  border: 1px solid rgba(225, 118, 4, 0.25);
  color: var(--color-app-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 0 10px rgba(225, 118, 4, 0.1);
}

.feature-card h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Download button (Official Google Play Badge style - Bigger and responsive) */
.download-cta {
  display: flex;
  margin-top: 20px;
}

.google-play-badge-link {
  display: inline-block;
  transition: var(--transition-smooth);
}

.google-play-badge-link:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 6px 18px rgba(225, 118, 4, 0.35));
}

.google-play-badge-img {
  height: 64px; /* User request: make it larger */
  display: block;
}

/* Phone CSS Mockup (Modern Bezel-Less phone) */
.app-mockup-wrapper {
  display: flex;
  justify-content: center;
}

.phone-frame {
  width: 290px;
  height: 590px;
  border-radius: 40px;
  background: #000;
  border: 8px solid #222;
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.8),
    0 0 12px rgba(225, 118, 4, 0.15) inset;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 10px;
  overflow: hidden;
}

/* Modern hole punch camera notch centered at the top */
.phone-camera {
  width: 12px;
  height: 12px;
  background: #080a0f;
  border: 1.5px solid #222;
  border-radius: 50%;
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  box-shadow: 0 0 3px rgba(255, 255, 255, 0.05);
}

.phone-screen {
  flex-grow: 1;
  border-radius: 28px;
  background: #084d6e; /* Fill background color as specified by user */
  overflow: hidden;
  position: relative;
}

/* Screenshot Slider inside Phone */
.screenshot-carousel {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  cursor: grab; /* User request: visual indicator for swiping/dragging */
}

.screenshot-carousel:active {
  cursor: grabbing;
}

.carousel-track {
  display: flex;
  width: 600%; /* 6 images */
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  user-select: none;
  -webkit-user-drag: none;
}

.screenshot-slide {
  width: 16.6666%; /* 1/6th of total track */
  height: 100%;
  object-fit: contain; /* User request: fit entirely, do not crop */
  background: #084d6e; /* Match container background */
  pointer-events: none; /* Prevents image dragging ghost overlay */
  user-select: none;
  -webkit-user-drag: none;
}

/* Carousel dots */
.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.dot.active {
  background: var(--color-app-orange);
  width: 16px;
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(225, 118, 4, 0.4);
}

/* ==========================================================================
   6. REDESIGNED ABOUT ME SECTION
   ========================================================================== */
.about-section {
  padding: 100px 0;
  background: linear-gradient(
    180deg,
    var(--bg-secondary) 0%,
    var(--bg-primary) 100%
  );
  border-top: 1px solid var(--border-glass);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: flex-start; /* Align elements to top for a cleaner structure */
}

.about-text-content {
  padding-right: 20px;
}

.about-text-content h2 {
  font-size: 2.5rem;
  margin-bottom: 24px;
  position: relative;
  display: inline-block;
}

.about-text-content h2::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 2px;
}

.about-text-content p {
  font-size: 1.1rem;
  margin-bottom: 24px;
  color: var(--text-muted);
}

.text-link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px dashed var(--color-primary);
  transition: var(--transition-smooth);
}

.text-link:hover {
  color: #fff;
  border-bottom-style: solid;
}

.endesa-link {
  color: #5fc5e6;
  text-decoration: none;
  font-weight: 600;
}

.endesa-link:hover {
  text-decoration: underline;
}

.about-quote-highlight {
  margin-top: 36px;
  background: rgba(255, 255, 255, 0.02);
  border-left: 4px solid var(--color-primary);
  padding: 18px 24px;
  border-radius: 0 16px 16px 0;
  box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.2);
}

.about-quote-highlight blockquote {
  font-family: var(--font-family-title);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-main);
}

/* Redesigned Skill Cards Column */
.about-skills-cards {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.skill-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

/* Subtle accent overlay on cards */
.skill-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: transparent;
  transition: var(--transition-smooth);
}

.skill-card:hover {
  transform: translateX(6px);
  background: rgba(20, 25, 35, 0.85);
}

.skill-card.python-card:hover::before {
  background: #96A820;
}
.skill-card.web-card:hover::before {
  background: #a855f7;
}
.skill-card.telecom-card:hover::before {
  background: #cbd5e1;
}

.skill-card.python-card:hover {
  border-color: rgba(150, 168, 32, 0.3);
  box-shadow: 0 8px 30px -10px rgba(150, 168, 32, 0.15);
}

.skill-card.web-card:hover {
  border-color: rgba(168, 85, 247, 0.3);
  box-shadow: 0 8px 30px -10px rgba(168, 85, 247, 0.15);
}

.skill-card.telecom-card:hover {
  border-color: rgba(203, 213, 225, 0.3);
  box-shadow: 0 8px 30px -10px rgba(203, 213, 225, 0.15);
}

.skill-icon {
  font-size: 2rem;
  width: 56px;
  height: 56px;
  min-width: 56px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.skill-details {
  flex-grow: 1;
}

.skill-details h3 {
  font-size: 1.25rem;
  margin-bottom: 2px;
  color: var(--text-main);
  font-family: var(--font-family-title);
}

.skill-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.python-card .skill-badge {
  background: rgba(150, 168, 32, 0.08);
  color: #96A820;
  border: 1px solid rgba(150, 168, 32, 0.2);
}

.web-card .skill-badge {
  background: rgba(168, 85, 247, 0.08);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.telecom-card .skill-badge {
  background: rgba(203, 213, 225, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(203, 213, 225, 0.2);
}

.skill-details p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   7. FOOTER
   ========================================================================== */
.main-footer {
  background: #040507;
  border-top: 1px solid var(--border-glass);
  padding: 50px 0;
  text-align: center;
  color: var(--text-dark);
  font-size: 0.9rem;
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-tech {
  font-size: 0.8rem;
  color: #475569;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition-smooth);
}

.footer-links a:hover {
  color: var(--color-primary);
}

.footer-links .sep {
  color: #334155;
}

/* ==========================================================================
   8. RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-content h1 {
    font-size: 3.2rem;
  }
  .app-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .app-mockup-wrapper {
    order: -1; /* Display phone on top of features in tablet/mobile */
    margin-top: 32px; /* Margin between phone and promotional text above it on mobile */
    margin-bottom: 32px; /* Ensure margin under mockup before features text */
  }
  .download-cta {
    justify-content: center; /* User request: center on tablet/mobile screens */
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding: 40px 0 30px 0; /* Reduced padding to make sections tighter on mobile */
  }
  .radar-app-section,
  .about-section {
    padding: 40px 0; /* Reduced padding between sections */
  }
  .hero-container {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }
  .hero-actions {
    justify-content: center;
  }
  .social-links {
    justify-content: center;
  }
  .hero-image-area {
    order: -1; /* Picture on top on mobile */
  }
  .nav-links {
    display: none;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .about-quote-highlight blockquote {
    font-size: 1.1rem;
  }
}
