/* Main Stylesheet for Portfolio - Modern Minimalistic Design */

/* CSS Custom Properties - Design System */
:root {
  /* Light theme (default) - Inspired by Luay's portfolio */
  --bg-primary: #f5efe6;
  --bg-secondary: #ebe5dc;
  --text-primary: #333333;
  --text-secondary: #5d5d5d;
  --text-muted: #7a7a7a;
  --icon-color: #5d5d5d;
  --icon-hover: #8a8a8a;
  --accent-color: #333333;
  --accent-hover: #5d5d5d;
  --border-color: #d4cec5;
  --shadow-color: rgba(0, 0, 0, 0.06);
  --transition-speed: 0.3s;
  --transition-timing: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode - Optional, can be toggled manually */
.dark-mode {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2a2a2a;
  --text-primary: #f0f0f0;
  --text-secondary: #b0b0b0;
  --text-muted: #808080;
  --icon-color: #b0b0b0;
  --icon-hover: #d0d0d0;
  --accent-color: #f0f0f0;
  --accent-hover: #b0b0b0;
  --border-color: #3a3a3a;
  --shadow-color: rgba(0, 0, 0, 0.3);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Main Container - Full viewport centered layout */
.main-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  position: relative;
}

/* Profile Section - Centered content */
.profile-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 600px;
  width: 100%;
  animation: fadeInUp 0.8s var(--transition-timing) forwards;
  opacity: 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Profile Image */
.profile-image-wrapper {
  position: relative;
  margin-bottom: 2rem;
}

.profile-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--border-color);
  transition: transform var(--transition-speed) var(--transition-timing),
    border-color var(--transition-speed) var(--transition-timing),
    box-shadow var(--transition-speed) var(--transition-timing);
}

.profile-image:hover {
  transform: scale(1.05);
  border-color: var(--accent-color);
  box-shadow: 0 20px 40px var(--shadow-color);
}

/* Profile Name */
.profile-name {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 40px;
  font-weight: 400;
  line-height: 64px;
  letter-spacing: 0;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  transition: color var(--transition-speed) var(--transition-timing);
}

/* Profile Tagline */
.profile-tagline {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 19px;
  font-weight: 300;
  line-height: 37.7px;
  letter-spacing: 0;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* Social Links */
.social-links {
  display: flex;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: transparent;
  color: var(--icon-color);
  text-decoration: none;
  transition: color var(--transition-speed) var(--transition-timing);
  border: none;
}

.social-link:hover {
  color: var(--icon-hover);
}

.social-link svg {
  width: 22px;
  height: 22px;
}

/* Navigation Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-link {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 25.6px;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 1.5rem;
  transition: color var(--transition-speed) var(--transition-timing);
  position: relative;
}

.nav-link:hover {
  color: var(--icon-hover);
}

/* Resume link attention animation */
.nav-link-highlight {
  animation: pulseAttention 2s ease-in-out infinite;
}

@keyframes pulseAttention {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.7;
  }
}

.nav-link-highlight:hover {
  animation: none;
  transform: scale(1.08);
  opacity: 1;
}

.nav-separator {
  display: none;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.lang-btn {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 25.6px;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  transition: color var(--transition-speed) var(--transition-timing);
}

.lang-btn:hover {
  color: var(--icon-hover);
}

.lang-btn.active {
  color: var(--text-primary);
}

.lang-divider {
  color: var(--text-muted);
  opacity: 0.5;
}

/* Footer */
.footer {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.footer p {
  font-size: 0.875rem;
  color: var(--text-muted);
  opacity: 0.7;
  transition: opacity var(--transition-speed) var(--transition-timing);
}

.footer:hover p {
  opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
  .main-container {
    padding: 1.5rem;
    justify-content: flex-start;
    padding-top: 4rem;
  }

  .profile-image {
    width: 120px;
    height: 120px;
  }

  .profile-section {
    margin-bottom: 4rem;
  }

  .social-links {
    gap: 0.75rem;
  }

  .social-link {
    width: 44px;
    height: 44px;
  }

  .nav-links {
    gap: 0.5rem;
  }

  .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }

  .footer {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    margin-top: auto;
    padding-top: 2rem;
  }
}

@media (max-width: 480px) {
  .profile-image {
    width: 100px;
    height: 100px;
  }

  .profile-name {
    font-size: 28px;
    line-height: 44px;
  }

  .profile-tagline {
    font-size: 16px;
    line-height: 28px;
  }

  .social-link {
    width: 40px;
    height: 40px;
  }

  .social-link svg {
    width: 18px;
    height: 18px;
  }
}

/* Smooth page load animation */
@keyframes pageLoad {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

body {
  animation: pageLoad 0.5s var(--transition-timing) forwards;
}

/* Focus styles for accessibility - only show for keyboard navigation */
.social-link:focus,
.nav-link:focus,
.lang-btn:focus {
  outline: none;
}

.social-link:focus-visible,
.nav-link:focus-visible,
.lang-btn:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 4px;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: #ffffff;
  border-radius: 4px;
  max-width: 520px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  padding: 2.5rem 3rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  font-size: 28px;
  color: #5d5d5d;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: #8a8a8a;
}

.modal-title {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 24px;
  font-weight: 400;
  color: #333333;
  text-align: center;
  margin-bottom: 1.5rem;
}

.modal-image-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.modal-image {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e5e5e5;
}

.modal-body {
  text-align: center;
}

.modal-body p {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.7;
  color: #5d5d5d;
  margin-bottom: 1.25rem;
}

.modal-body p:last-child {
  margin-bottom: 0;
}

/* Modal WhatsApp Link - Arabic only */
.modal-whatsapp-link {
  display: none;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  margin: 1.5rem auto 0;
  border-radius: 50%;
  background-color: #25d366;
  color: #ffffff;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.modal-whatsapp-link:hover {
  background-color: #128c7e;
  transform: scale(1.1);
}

.rtl .modal-whatsapp-link {
  display: flex;
}

/* RTL Modal Styles */
.rtl .modal-content {
  direction: rtl;
}

.rtl .modal-close {
  right: auto;
  left: 1.25rem;
}

/* Responsive Modal */
@media (max-width: 600px) {
  .modal-content {
    padding: 2rem 1.5rem;
    margin: 1rem;
    width: calc(100% - 2rem);
  }

  .modal-title {
    font-size: 20px;
  }

  .modal-body p {
    font-size: 14px;
  }

  .modal-image {
    width: 80px;
    height: 80px;
  }
}

/* Resume Modal Styles */
.resume-modal-overlay {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background-color: rgba(0, 0, 0, 0.5);
}

.resume-modal-content {
  background-color: #ffffff;
  border-radius: 8px;
  max-width: 900px;
  width: 95%;
  height: 90vh;
  max-height: 90vh;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: translateY(-20px) scale(0.95);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.resume-modal-overlay.active .resume-modal-content {
  transform: translateY(0) scale(1);
}

.resume-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e5e5e5;
  flex-shrink: 0;
}

.resume-modal-header .modal-title {
  margin-bottom: 0;
  font-size: 20px;
}

.resume-modal-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.resume-download-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: #333333;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.resume-download-btn:hover {
  background-color: #5d5d5d;
  transform: translateY(-1px);
}

.resume-download-btn svg {
  flex-shrink: 0;
}

.resume-modal-close {
  position: relative;
  top: auto;
  right: auto;
  font-size: 32px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.resume-modal-close:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.resume-pdf-wrapper {
  flex: 1;
  overflow: hidden;
  padding: 0;
}

.resume-pdf-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Resume Modal Responsive */
@media (max-width: 768px) {
  .resume-modal-content {
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .resume-modal-header {
    padding: 0.75rem 1rem;
  }

  .resume-modal-header .modal-title {
    font-size: 18px;
  }

  .resume-download-btn {
    padding: 0.4rem 0.75rem;
    font-size: 13px;
  }

  .resume-download-btn span {
    display: none;
  }
}

/* RTL Resume Modal */
.rtl .resume-modal-header {
  direction: rtl;
}

.rtl .resume-modal-close {
  order: -1;
}
