/**
* Portfolio Website - Clean Dark Theme
* Navy (#050E3C) + Red (#DC0000) Color Scheme
*/

/* =========================================================
   FONTS & ROOT VARIABLES
   ========================================================= */
:root {
  --default-font: "Roboto", system-ui, -apple-system, sans-serif;
  --heading-font: "Raleway", sans-serif;
  --nav-font: "Poppins", sans-serif;
  
  /* Dark Navy + Red Theme */
  --background-color: transparent;
  --surface-color: rgba(5, 14, 60, 0.95);
  --default-color: #ffffff;
  --heading-color: #ffffff;
  --accent-color: #DC0000;
  --accent-soft: #FF3838;
  --contrast-color: #ffffff;
  --nav-dark: #050E3C;
  
  scroll-behavior: smooth;
}

/* =========================================================
   GLOBAL BACKGROUND IMAGE (ENTIRE WEBSITE)
   ========================================================= */
body {
  position: relative;
  background: transparent;
  color: var(--default-color);
  font-family: var(--default-font);
}



/* =========================================================
   TYPOGRAPHY
   ========================================================= */
a {
  color: var(--accent-color);
  text-decoration: none;
  transition: 0.3s;
}

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

h1, h2, h3, h4, h5, h6 {
  color: var(--heading-color);
  font-family: var(--heading-font);
}

/* =========================================================
   HEADER & NAVIGATION
   ========================================================= */
/* Sticky transparent header */
/* Translucent glass header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(5, 14, 60, 0.6); /* translucent navy */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 999;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}



.header .logo h1 {
  font-size: 30px;
  margin: 0;
  font-weight: 700;
  color: #ffffff;
}

.scrolled .header {
  background: rgba(5, 14, 60, 0.92); /* more solid on scroll */
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.4);
}


/* =========================================================
   Desktop Navigation
   ========================================================= */
@media (min-width: 1200px) {

  .navmenu ul {
    margin: 0;
    padding: 0;
    display: flex;
    list-style: none;
    align-items: center;
  }

  .navmenu > ul > li {
    position: relative; /* REQUIRED for dropdown */
    white-space: nowrap;
    padding: 15px 14px;
  }

  .navmenu a {
    color: #ffffff;
    font-size: 15px;
    font-family: var(--nav-font);
    font-weight: 400;
    transition: 0.3s;
    position: relative;
  }

  /* underline animation */
  .navmenu > ul > li > a::before {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -6px;
    left: 0;
    background-color: var(--accent-soft);
    visibility: hidden;
    transition: all 0.3s ease-in-out;
  }

  .navmenu a:hover::before,
  .navmenu .active::before {
    visibility: visible;
    width: 100%;
  }

  .navmenu li:hover > a,
  .navmenu .active {
    color: var(--accent-soft);
  }

  /* ================= DROPDOWN ================= */

  .navmenu .dropdown {
    position: relative;
  }

  .navmenu .dropdown ul {
    position: absolute;
    top: 120%;
    left: 0;
    background: var(--nav-dark);
    min-width: auto;
    width: max-content;
    padding: 10px 0;
    border-radius: 6px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    visibility: hidden;
    opacity: 0;
    transition: 0.3s ease;
    z-index: 99;
    display: flex;
    flex-direction: column;
  }

  .navmenu .dropdown:hover > ul {
    visibility: visible;
    opacity: 1;
    top: 100%;
  }

  .navmenu .dropdown ul li {
    padding: 0;
  }

  .navmenu .dropdown ul a {
    padding: 10px 20px;
    color: #ffffff;
    display: block !important;
    white-space: nowrap;
    text-align: left;
  }
  
  .navmenu .dropdown ul a i,
  .navmenu .dropdown ul a img {
    margin-right: 8px;
    vertical-align: middle;
  }
  
  .navmenu .dropdown ul a span {
    vertical-align: middle;
  }

  .navmenu .dropdown ul a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent-soft);
  }
}





/* Mobile Navigation */
@media (max-width: 1199px) {
  .mobile-nav-toggle {
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
  }

  .navmenu ul {
    display: none;
    position: absolute;
    inset: 60px 20px 20px 20px;
    background-color: rgba(5, 14, 60, 0.98);
    border-radius: 6px;
    box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.3);
    z-index: 9998;
  }

  .navmenu a {
    color: #ffffff;
    padding: 10px 20px;
    font-size: 17px;
    font-weight: 500;
  }

  .mobile-nav-active .navmenu > ul {
    display: block;
  }
}

/* =========================================================
   SECTIONS
   ========================================================= */
section, .section {
  background-color: var(--surface-color);
  backdrop-filter: blur(2px);
  padding: 60px 0;
  overflow: clip;
  color: #ffffff;
  position: relative;
}

/* Allow hero background image to show */
#hero.section,
#hero {
  background-color: transparent !important;
}


.light-background {
  background-color: rgba(5, 14, 60, 0.90) !important;
}

.section-title {
  text-align: center;
  padding-bottom: 60px;
  position: relative;
  z-index: 10;
}

.section-title h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 20px;
  color: #ffffff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.section-title h2:after {
  content: "";
  position: absolute;
  display: block;
  width: 50px;
  height: 3px;
  background: var(--accent-color);
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
}

.section-title p {
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* =========================================================
   HERO SECTION
   ========================================================= */

   /* Hero background image */
#hero {
  position: relative;
  background-image: url("../img/conny-schneider-xuTJZ7uD7PI-unsplash.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero {
  width: 100%;
  min-height: 100vh;
  position: relative;
  padding: 60px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.hero::before {
  content: "";
  background: rgba(0, 0, 0, 0.55);
  position: absolute;
  inset: 0;
  z-index: 2;
}

.hero img {
  display: none; /* Hide hero section image */
}

.hero .container {
  padding-top: 120px;
  position: relative;
  z-index: 3;
}

.hero h2,
.hero p {
  color: #ffffff;
  margin: 0;
}

.hero h2 {
  font-size: 64px;
  font-weight: 700;
}

.hero p {
  font-size: 36px;
  font-weight: 600;
  margin-top: 5px;
}



@media (max-width: 768px) {
  .hero h2 { font-size: 32px; }
  .hero p { font-size: 20px; }
}

/* =========================================================
   ABOUT SECTION
   ========================================================= */
.about .container {
  background-color: rgba(5, 14, 60, 0.95);
  box-shadow: 0px 2px 15px rgba(0, 0, 0, 0.3);
  padding: 30px;
  color: #ffffff;
}

.about .about-info p {
  color: rgba(255, 255, 255, 0.85);
}

.about .about-info p strong {
  color: #ffffff;
}

.about .about-me h4 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 30px;
  padding-bottom: 10px;
  position: relative;
  color: #ffffff;
}

.about .about-me h4:after {
  content: "";
  position: absolute;
  width: 64px;
  height: 3px;
  background: var(--accent-color);
  left: 0;
  bottom: 0;
}

.about .about-me p {
  color: rgba(255, 255, 255, 0.9);
}

.about .skills-content h5 {
  font-size: 18px;
  font-weight: 700;
  margin: 30px 0 15px 0;
  color: #ffffff;
}

.about .progress .skill {
  padding: 0;
  margin: 0 0 6px 0;
  text-transform: uppercase;
  font-weight: 600;
  font-family: var(--heading-font);
  color: rgba(255, 255, 255, 0.9);
}

/* =========================================================
   SKILLS GRID
   ========================================================= */
.skills-tools {
  background: transparent;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.skill-card {
  background: rgba(5, 14, 60, 0.85);
  border-radius: 18px;
  padding: 30px 20px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: 0.3s ease;
}

.skill-card img {
  width: 56px;
  height: 56px;
  margin-bottom: 15px;
}

.skill-card span {
  font-size: 16px;
  font-weight: 500;
  color: #ffffff;
}

.skill-card:hover {
  transform: translateY(-5px);
  background: rgba(220, 0, 0, 0.3);
  border-color: var(--accent-color);
  box-shadow: 0 10px 30px rgba(220, 0, 0, 0.3);
}

@media (max-width: 992px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
  .skills-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   PROJECT CARDS
   ========================================================= */
.project-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.project-card {
  background: rgba(5, 14, 60, 0.95);
  padding: 32px;
  border-radius: 20px;
  min-height: 300px;
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: all 0.35s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(220, 0, 0, 0.2), rgba(255, 56, 56, 0.1));
  opacity: 0;
  transition: 0.35s ease;
}

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

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 45px rgba(220, 0, 0, 0.4);
  border-color: var(--accent-color);
}

.project-card h3,
.project-desc,
.project-cta {
  position: relative;
  z-index: 2;
}

.project-card h3 {
  font-size: 22px;
  margin-bottom: 10px;
  color: #ffffff;
}

.project-desc {
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  flex-grow: 1;
  margin-bottom: 20px;
}

.project-cta {
  font-size: 15px;
  font-weight: 500;
  color: var(--accent-soft);
}

/* =========================================================
   CONTACT SECTION
   ========================================================= */
.contact .info-wrap {
  background-color: rgba(5, 14, 60, 0.95);
  box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.3);
  padding: 30px;
  margin-bottom: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact .info-item h3 {
  color: #ffffff;
}

.contact .info-item p {
  color: rgba(255, 255, 255, 0.85);
}

.contact .info-item i {
  font-size: 20px;
  color: var(--accent-color);
  width: 56px;
  height: 56px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  border: 1px solid rgba(220, 0, 0, 0.4);
  margin-right: 15px;
  transition: 0.3s;
}

.contact .info-item:hover i {
  background: var(--accent-color);
  color: #ffffff;
}

.contact .php-email-form {
  background-color: rgba(5, 14, 60, 0.95);
  box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.3);
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact .php-email-form input[type=text],
.contact .php-email-form input[type=email],
.contact .php-email-form textarea {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.contact .php-email-form input::placeholder,
.contact .php-email-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.contact .php-email-form button[type=submit] {
  color: #ffffff;
  background: var(--accent-color);
  border: 0;
  padding: 10px 30px;
  border-radius: 50px;
  transition: 0.4s;
}

.contact .php-email-form button[type=submit]:hover {
  background: var(--accent-soft);
}

/* =========================================================
   FOOTER
   ========================================================= */
.custom-footer {
  background-color: rgba(5, 14, 60, 0.95);
  padding: 30px 20px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.footer-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

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

.footer-links a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color 0.25s ease;
}

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

/* =========================================================
   SCROLL TOP BUTTON
   ========================================================= */
.scroll-top {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  right: 15px;
  bottom: -15px;
  z-index: 99999;
  background-color: var(--accent-color);
  width: 44px;
  height: 44px;
  border-radius: 50px;
  transition: all 0.4s;
}

.scroll-top i {
  font-size: 24px;
  color: #ffffff;
  line-height: 0;
}

.scroll-top:hover {
  background-color: var(--accent-soft);
}

.scroll-top.active {
  visibility: visible;
  opacity: 1;
  bottom: 15px;
}

/* =========================================================
   PRELOADER
   ========================================================= */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: var(--nav-dark);
  transition: all 0.6s ease-out;
}


@keyframes animate-preloader {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* =========================================================
   UTILITIES
   ========================================================= */
.light-background {
  background-color: rgba(249, 249, 249, 0.95);
}

.dark-background {
  background-color: rgba(6, 6, 6, 0.95);
  color: #ffffff;
}

@media screen and (max-width: 768px) {
  [data-aos-delay] {
    transition-delay: 0 !important;
  }
}

/* ================= FORCE TOP NAV DROPDOWN ================= */

/* Anchor dropdown properly */
.navmenu > ul > li.dropdown {
  position: relative !important;
}

/* Hide dropdown by default */
.navmenu > ul > li.dropdown > ul {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  right: auto !important;

  min-width: 200px;
  background: var(--nav-dark);
  padding: 10px 0;
  border-radius: 6px;

  visibility: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.25s ease;

  z-index: 9999;
}

/* Auto-align dropdown to right if parent is near right edge */
.navmenu > ul > li.dropdown:last-child > ul,
.navmenu > ul > li.dropdown:nth-last-child(2) > ul {
  left: auto !important;
  right: 0 !important;
}

/* Show on hover (DESKTOP) */
@media (min-width: 1200px) {
  .navmenu > ul > li.dropdown:hover > ul {
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateY(0);
  }
}

/* Mobile click support */
.navmenu .dropdown.active > ul {
  visibility: visible !important;
  opacity: 1 !important;
  position: static !important;
  transform: none !important;
}

/* ========== ENHANCED LOADING SCREEN ========== */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: linear-gradient(135deg, #050E3C 0%, #0A1854 50%, #050E3C 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.loaded {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  text-align: center;
  position: relative;
}

/* Animated Settings Gear Icon */
.loader-icon {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 40px;
}

.gear {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.gear-outer {
  width: 100px;
  height: 100px;
  animation: rotate 4s linear infinite;
}

.gear-inner {
  width: 60px;
  height: 60px;
  animation: rotate-reverse 3s linear infinite;
}

@keyframes rotate {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes rotate-reverse {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(-360deg); }
}

.gear svg {
  filter: drop-shadow(0 0 20px rgba(220, 0, 0, 0.6));
}

/* Glowing particles around gear */
.particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #DC0000;
  border-radius: 50%;
  box-shadow: 0 0 10px #DC0000;
  animation: float 3s ease-in-out infinite;
}

.particle:nth-child(1) {
  top: 10%;
  left: 20%;
  animation-delay: 0s;
}

.particle:nth-child(2) {
  top: 80%;
  left: 70%;
  animation-delay: 0.5s;
}

.particle:nth-child(3) {
  top: 30%;
  right: 15%;
  animation-delay: 1s;
}

.particle:nth-child(4) {
  bottom: 20%;
  left: 15%;
  animation-delay: 1.5s;
}

@keyframes float {
  0%, 100% { 
    transform: translateY(0) scale(1);
    opacity: 0.8;
  }
  50% { 
    transform: translateY(-20px) scale(1.2);
    opacity: 1;
  }
}

.loader-logo {
  font-size: 42px;
  font-weight: 700;
  color: #ffffff;
  font-family: var(--heading-font);
  margin-bottom: 30px;
  letter-spacing: 2px;
  text-shadow: 0 0 20px rgba(220, 0, 0, 0.5);
}

.progress-container {
  width: 320px;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin: 0 auto 20px;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #DC0000, #FF3838, #DC0000);
  background-size: 200% 100%;
  width: 0%;
  transition: width 0.3s ease;
  box-shadow: 0 0 15px rgba(220, 0, 0, 0.8);
  animation: shimmer 2s linear infinite;
  position: relative;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: slide 1.5s linear infinite;
}

@keyframes slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.progress-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 22px;
  font-weight: 600;
  font-family: var(--default-font);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.loading-status {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  margin-top: 15px;
  font-family: var(--default-font);
  height: 20px;
}

/* Fix background image to be more visible */
body::before {
  filter: brightness(0.4) contrast(1.1) !important;
}

.site-logo {
  height: 72px;
  width: auto;
  display: block;
}


.view-resume a {
  font-size: 16px;
  color: #6c757d;
  text-decoration: none;
  font-weight: 500;
}

.view-resume a:hover {
  text-decoration: underline;
}

.skill-card img[alt="Express.js"] {
  filter: invert(1);
}
