/*--------------------------------------------------------------
# Font & Color Variables
# Help: https://bootstrapmade.com/color-system/
--------------------------------------------------------------*/
/* Fonts */
:root {
  --default-font: 'Inconsolata', system-ui, -apple-system, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, 'Noto Sans', 'Liberation Sans', sans-serif,
    'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  --heading-font: 'Inconsolata', sans-serif;
  --nav-font: 'Inconsolata', sans-serif;
}

/* Global Colors */
:root {
  --background-color: #09141f;
  --default-color: #ffffff;
  --heading-color: #ffffff;
  --accent-color: #e63334;
  --surface-color: #ffffff;
  --contrast-color: #ffffff;
}

/* Nav Menu Colors */
:root {
  --nav-color: #ffffff;
  --nav-hover-color: #e63334;
  --nav-mobile-background-color: #ffffff;
  --nav-dropdown-background-color: #ffffff;
  --nav-dropdown-color: #212529;
  --nav-dropdown-hover-color: #e63334;
}

/* Color Presets */
.light-background {
  --background-color: #f9f9f9;
  --surface-color: #ffffff;
}

.dark-background {
  --background-color: #060606;
  --default-color: #ffffff;
  --heading-color: #ffffff;
  --surface-color: #252525;
  --contrast-color: #ffffff;
}

.accent-background {
  --background-color: #070720;
  --default-color: #ffffff;
  --heading-color: #ffffff;
  --accent-color: #ffffff;
  --surface-color: #070720;
  --contrast-color: #ffffff;
}

/* Smooth scroll */
:root {
  scroll-behavior: smooth;
}

/*--------------------------------------------------------------
# General Styling & Shared Classes
--------------------------------------------------------------*/
body {
  color: var(--default-color);
  background-color: var(--background-color);
  font-family: var(--default-font);
}

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

a:hover {
  color: color-mix(in srgb, var(--accent-color), transparent 25%);
  text-decoration: none;
}

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

/* PHP Email Form Messages */
.php-email-form .error-message,
.php-email-form .sent-message {
  display: none;
  color: #ffffff;
  background: #059652;
  text-align: center;
  padding: 15px;
  margin-bottom: 24px;
  font-weight: 600;
}

.php-email-form .error-message {
  background: #df1529;
}

.php-email-form .loading {
  display: none;
  background: var(--surface-color);
  text-align: center;
  padding: 15px;
  margin-bottom: 24px;
}

.php-email-form .loading:before {
  content: '';
  display: inline-block;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  margin: 0 10px -6px 0;
  border: 3px solid var(--accent-color);
  border-top-color: var(--surface-color);
  animation: php-email-form-loading 1s linear infinite;
}

@keyframes php-email-form-loading {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/*--------------------------------------------------------------
# Header
--------------------------------------------------------------*/
.header {
  --background-color: #070720;
  color: #ffffff;
  background-color: transparent;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  padding: 8px 0;
  position: sticky;
  top: 0;
  width: 100%;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  z-index: 1000;
}

.header .logo {
  line-height: 1;
}

.header .logo img {
  max-height: 32px;
  margin-right: 8px;
}

.header .logo h1 {
  font-size: 30px;
  margin: 0;
  font-weight: 700;
  color: var(--heading-color);
}

.scrolled .header {
  background-color: #070720;
}

/*--------------------------------------------------------------
# Navigation Menu
--------------------------------------------------------------*/
.navmenu ul {
  margin: 0;
  padding: 0;
  display: flex;
  list-style: none;
  align-items: center;
}

.navmenu li {
  position: relative;
}

.navmenu a, .navmenu a:focus {
  color: var(--nav-color);
  font-size: 17px;
  font-family: var(--nav-font);
  font-weight: 650;
  display: flex;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
  transition: 0.3s;
  position: relative;
}

.navmenu > ul > li {
  white-space: nowrap;
  padding: 15px 14px;
}

.navmenu > ul > li > a:before {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -6px;
  left: 0;
  background-color: var(--nav-hover-color);
  visibility: hidden;
  transition: all 0.3s ease-in-out 0s;
}

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

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

/* Mobile Navigation */
@media (max-width: 1199px) {
  .mobile-nav-toggle {
    color: var(--nav-color);
    font-size: 28px;
    line-height: 0;
    cursor: pointer;
    transition: color 0.3s;
  }

  .navmenu ul {
    display: none;
    position: absolute;
    inset: 60px 20px 20px 20px;
    padding: 10px 0;
    border-radius: 6px;
    background-color: var(--nav-mobile-background-color);
    overflow-y: auto;
    transition: 0.3s;
    z-index: 9998;
  }

  .navmenu a, .navmenu a:focus {
    color: var(--nav-dropdown-color);
    padding: 10px 20px;
  }

  .navmenu a:hover,
  .navmenu .active,
  .navmenu .active:focus {
    color: var(--nav-dropdown-hover-color);
  }

  .mobile-nav-active .navmenu {
    position: fixed;
    overflow: hidden;
    inset: 0;
    background: rgba(33, 37, 41, 0.8);
  }

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

/*--------------------------------------------------------------
# Sections & Titles
--------------------------------------------------------------*/
section, .section {
  padding: 60px 0;
  scroll-margin-top: 92px;
  overflow: clip;
}

@media (max-width: 1199px) {
  section, .section {
    scroll-margin-top: 76px;
  }
}

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

.section-title h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 20px;
  position: relative;
}

.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;
}

/*--------------------------------------------------------------
# Hero Section
--------------------------------------------------------------*/
.hero {
  margin-top: -70px;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0;
  width: 100%;
  position: relative;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

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

.hero .container {
  position: relative;
  z-index: 3;
}

.hero h3 {
  color: #8ba0ab;
}

.hero h2 {
  color: white;
  font-size: 64px;
  font-weight: 700;
  margin: 0;
}

.hero p {
  font-size: 30px;
  font-weight: 600;
  color: #8ba0ab;
  margin-top: 10px;
}

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

/*--------------------------------------------------------------
# About Section
--------------------------------------------------------------*/
.about .about-me p {
  font-size: 17px;
  text-align: justify;
}

.about .row {
  justify-content: center;
  align-items: center;
}

@media (max-width: 768px) {
  .about .container .row {
    flex-direction: column-reverse;
  }
}

/*--------------------------------------------------------------
# Experience Section (Timeline)
--------------------------------------------------------------*/
.timeline {
  position: relative;
  max-width: 1300px;
  margin: 0 auto;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 2px;
  background-color: var(--accent-color);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1px;
}

.experience-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
  box-sizing: border-box;
}

.experience-item::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background-color: #111827;
  border: 3px solid var(--accent-color);
  border-radius: 50%;
  top: 15px;
  z-index: 1;
}

.timeline .experience-item:nth-child(odd) {
  left: 0;
  text-align: right;
}

.timeline .experience-item:nth-child(odd)::after {
  right: -8px;
}

.timeline .experience-item:nth-child(even) {
  left: 50%;
  text-align: left;
}

.timeline .experience-item:nth-child(even)::after {
  left: -8px;
}

.experience-item h4 {
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.experience-item h5 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 10px;
  color: #9ca3af;
}

.experience-item p {
  font-size: 14px;
  text-align: justify;
  line-height: 2;
}

/*--------------------------------------------------------------
# Project Section
--------------------------------------------------------------*/
.project-filters {
  list-style: none;
  padding: 0;
  margin: 0 0 3rem 0;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.project-filters li {
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.project-filters li:hover, .project-filters li.active {
  color: var(--accent-color);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  max-width: 1350px;
  justify-content: center;
  gap: 2rem;
  margin: 0 auto;
}

.project-card {
  background-color: #1f2937;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  max-width: 340px;
  margin: 0 auto;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

.card-image-wrapper {
  position: relative;
  height: 200px;
}

.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: rgba(31, 41, 55, 0.8);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px;
}

.card-icon img {
  width: 24px;
  height: 24px;
}

.card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #f9fafb;
  margin: 0 0 8px 0;
}

.card-content p {
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: justify;
  margin: 0 0 24px 0;
  flex-grow: 1;
}

.view-project-btn {
  display: inline-block;
  text-decoration: none;
  color: #e5e7eb;
  font-weight: 500;
  padding: 10px 16px;
  border: 1px solid #4b5563;
  border-radius: 8px;
  text-align: center;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.view-project-btn:hover {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--contrast-color);
}

/*--------------------------------------------------------------
# Floating Social Buttons
--------------------------------------------------------------*/
.social-buttons {
  position: fixed;
  top: 50%;
  left: 70px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 30px;
  z-index: 1000;
}

.social-buttons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background-color: #e63334;
  color: white;
  font-size: 20px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.social-buttons a:hover {
  background-color: #ff4d4d;
  transform: scale(1.1);
}

/*--------------------------------------------------------------
# Contact Form
--------------------------------------------------------------*/
.contact-form {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-form label {
  display: block;
  margin-bottom: 0.5rem;
  color: #9ca3af;
  font-size: 0.875rem;
}

.contact-form .form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: #1f2937;
  border: 0.1px solid #1f2937;
  color: white;
  border-radius: 0.5rem;
  transition: box-shadow 0.3s ease;
}

.contact-form .form-input:focus {
  outline: none;
  /* box-shadow: 0 0 0 3px rgba(230, 51, 52, 0.4); */
  border: 1px solid transparent;
  border-color: whitesmoke;
}

.contact-form .form-button {
  padding: 0.65rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  background-color: #e5e7eb;
  color: #1f2937;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.contact-form .form-button:hover {
  background-color: var(--accent-color);
  color: var(--contrast-color);
  border-color: var(--default-color);
}

/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
.footer {
  font-size: 14px;
  padding: 40px 0;
  background-color: var(--background-color);
}

.footer .copyright p {
  margin-top: 15px;
  margin-bottom: 0;
}

.footer .social-links {
  margin-top: 20px;
}

.footer .social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 30%);
  font-size: 16px;
  color: color-mix(in srgb, var(--default-color), transparent 40%);
  margin: 0 5px;
  transition: 0.3s;
}

.footer .social-links a:hover {
  color: var(--default-color);
  border-color: var(--default-color);
}

.footer .credits {
  margin-top: 10px;
  font-size: 13px;
  text-align: center;
}

/*--------------------------------------------------------------
# Scroll Top & Preloader
--------------------------------------------------------------*/
.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: var(--contrast-color);
  line-height: 0;
}

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

#preloader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  overflow: hidden;
  background: var(--background-color);
  transition: all 0.6s ease-out;
}

#preloader:before {
  content: '';
  position: fixed;
  top: calc(50% - 30px);
  left: calc(50% - 30px);
  border: 6px solid var(--accent-color);
  border-top-color: transparent;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: animate-preloader 1s linear infinite;
}

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

/*--------------------------------------------------------------
# Mobile Layout Fixes
--------------------------------------------------------------*/
@media (max-width: 768px) {
  /* Hide floating social buttons on mobile */
  .social-buttons {
    display: none;
  }
  /* Fix for timeline on mobile */
  .timeline::after {
    left: 15px;
  }


  .experience-item {
    width: 100%;
    padding-left: 30px;
    padding-right: 15px;
    text-align: left !important;
  }

  .experience-item:nth-child(even) {
    left: 0% !important
  }

  /* Force all content within the item to be left-aligned */
  .experience-item h4,
  .experience-item h5 {
    text-align: left !important; /* Override desktop styles for all text */
  }

  .experience-item::after {
    left: 7px !important;
  }

  .experience-item p {
    text-align: justify;
  }
}
