/* ==========================================================================
   AMAR ZEKI ATIK - PERSONAL PORTFOLIO WEBSITE
   Author: Amar Zeki Atik
   Description: Core Design System, Variables, Layouts, & Custom Components
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Google Fonts & CSS Custom Properties (Theme System)
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Color Palette - Light Theme */
  --primary-color: #2563EB;
  --primary-hover: #1D4ED8;
  --secondary-color: #FFFFFF;
  --accent-color: #111111;
  --bg-color: #F8FAFC;
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-border: rgba(37, 99, 235, 0.12);
  --text-color: #0F172A;
  --text-muted: #64748B;
  --border-color: #E2E8F0;
  
  /* Shadows & Glows */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 25px -5px rgba(37, 99, 235, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 40px -15px rgba(37, 99, 235, 0.22);
  --glow-color: rgba(37, 99, 235, 0.25);

  /* Navigation & Blur */
  --nav-bg: rgba(248, 250, 252, 0.85);
  --glass-blur: blur(16px);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Overrides */
[data-theme="dark"] {
  --primary-color: #3B82F6;
  --primary-hover: #60A5FA;
  --secondary-color: #0F172A;
  --accent-color: #F8FAFC;
  --bg-color: #0B0F19;
  --card-bg: rgba(18, 24, 38, 0.8);
  --card-border: rgba(255, 255, 255, 0.08);
  --text-color: #F8FAFC;
  --text-muted: #94A3B8;
  --border-color: #1E293B;

  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 40px -15px rgba(59, 130, 246, 0.3);
  --glow-color: rgba(59, 130, 246, 0.4);
  --nav-bg: rgba(11, 15, 25, 0.85);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, textarea {
  font-family: inherit;
  outline: none;
  border: none;
}

button {
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   3. Custom Interactive Cursor Glow
   -------------------------------------------------------------------------- */
#cursor-glow {
  position: fixed;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, var(--glow-color) 0%, rgba(37, 99, 235, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 999;
  mix-blend-mode: screen;
  transition: transform 0.1s ease-out, opacity 0.3s ease;
  opacity: 0.6;
}

/* --------------------------------------------------------------------------
   4. Top Scroll Progress Bar
   -------------------------------------------------------------------------- */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), #60A5FA);
  width: 0%;
  z-index: 1000;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 10px var(--primary-color);
}

/* --------------------------------------------------------------------------
   5. Canvas Particle & Ambient Blob Background
   -------------------------------------------------------------------------- */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
}

.ambient-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: blobFloat 20s infinite alternate ease-in-out;
}

.blob-1 {
  width: 450px;
  height: 450px;
  background: var(--primary-color);
  top: -100px;
  left: -100px;
}

.blob-2 {
  width: 500px;
  height: 500px;
  background: #60A5FA;
  bottom: 10%;
  right: -100px;
  animation-delay: -7s;
}

.blob-3 {
  width: 350px;
  height: 350px;
  background: #818CF8;
  top: 45%;
  left: 30%;
  animation-delay: -14s;
}

/* --------------------------------------------------------------------------
   6. Layout & Utilities
   -------------------------------------------------------------------------- */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 7rem 0 5rem;
  position: relative;
}

.section-title-wrap {
  text-align: center;
  margin-bottom: 4rem;
}

.section-subtitle {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  display: inline-block;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-color);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}

/* Glassmorphism Card Style */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.glass-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(37, 99, 235, 0.3);
}

/* --------------------------------------------------------------------------
   7. Navigation Header
   -------------------------------------------------------------------------- */
header.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 900;
  padding: 1.25rem 0;
  transition: var(--transition-fast);
}

header.navbar.scrolled {
  background: var(--nav-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  padding: 0.85rem 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid var(--card-border);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.logo .dot {
  width: 10px;
  height: 10px;
  background-color: var(--primary-color);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px var(--primary-color);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 0.4rem 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition-fast);
  border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Dark Mode Toggle Button */
.theme-toggle-btn {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  font-size: 1.2rem;
  transition: var(--transition-fast);
}

.theme-toggle-btn:hover {
  background: var(--primary-color);
  color: #FFFFFF;
  transform: rotate(20deg) scale(1.05);
}

/* Mobile Hamburger Toggle */
.mobile-toggle {
  display: none;
  background: none;
  font-size: 1.5rem;
  color: var(--text-color);
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   8. Hero Section
   -------------------------------------------------------------------------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 6rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 3rem;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-greeting {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
  background: rgba(37, 99, 235, 0.1);
  padding: 0.4rem 1.2rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(37, 99, 235, 0.2);
  margin-bottom: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-greeting span {
  display: inline-block;
  animation: waveHand 2.5s infinite;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-color);
  margin-bottom: 0.75rem;
  letter-spacing: -1px;
}

.hero-subtitle {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  min-height: 2.5rem;
}

.hero-subtitle .typing-text {
  color: var(--primary-color);
  border-right: 3px solid var(--primary-color);
  padding-right: 4px;
  animation: blinkCursor 0.75s step-end infinite;
}

.hero-description {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

/* Premium Buttons */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 2rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  overflow: hidden;
  transition: var(--transition-fast);
  z-index: 1;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #FFFFFF;
  box-shadow: 0 10px 25px -5px var(--glow-color);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: 0 15px 30px -5px var(--glow-color);
}

.btn-outline {
  background: transparent;
  color: var(--text-color);
  border: 2px solid var(--border-color);
}

.btn-outline:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-3px);
  background: rgba(37, 99, 235, 0.05);
}

.social-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.social-link {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  font-size: 1.2rem;
  transition: var(--transition-fast);
}

.social-link:hover {
  background: var(--primary-color);
  color: #FFFFFF;
  transform: translateY(-4px) scale(1.05);
  box-shadow: var(--shadow-md);
}

/* Hero Image Container */
.hero-image-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-img-card {
  position: relative;
  width: 320px;
  height: 400px;
  border-radius: 30px;
  overflow: hidden;
  border: 4px solid var(--card-bg);
  box-shadow: var(--shadow-lg);
  animation: floatImage 6s ease-in-out infinite;
}

.profile-img-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-img-card:hover img {
  transform: scale(1.06);
}

.hero-glow-aura {
  position: absolute;
  width: 340px;
  height: 420px;
  background: radial-gradient(circle, var(--primary-color) 0%, rgba(37, 99, 235, 0) 70%);
  opacity: 0.3;
  filter: blur(35px);
  border-radius: 30px;
  z-index: -1;
  animation: auraPulse 4s ease-in-out infinite alternate;
}

/* --------------------------------------------------------------------------
   9. About Section
   -------------------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.about-text {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.about-text p {
  margin-bottom: 1.25rem;
}

.highlight-text {
  color: var(--primary-color);
  font-weight: 600;
}

.about-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.info-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.info-card .icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}

.info-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-color);
}

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

/* --------------------------------------------------------------------------
   10. Skills Section
   -------------------------------------------------------------------------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.75rem;
}

.skill-card {
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
}

.skill-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.skill-info {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.skill-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(37, 99, 235, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 1.3rem;
  transition: var(--transition-fast);
}

.skill-card:hover .skill-icon {
  background: var(--primary-color);
  color: #FFFFFF;
  transform: rotate(10deg) scale(1.1);
}

.skill-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-color);
}

.skill-percent {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-color);
}

.progress-track {
  width: 100%;
  height: 8px;
  background: var(--border-color);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary-color), #60A5FA);
  border-radius: var(--radius-full);
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px var(--glow-color);
}

/* --------------------------------------------------------------------------
   11. Projects Section
   -------------------------------------------------------------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

.project-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.project-img-wrap {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.project-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-img-wrap img {
  transform: scale(1.08);
}

.project-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tech-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-color);
  background: rgba(37, 99, 235, 0.08);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(37, 99, 235, 0.15);
}

.project-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 0.75rem;
}

.project-description {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.project-links {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.btn-sm {
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   12. Contact Section
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 3rem;
}

.contact-info-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem;
}

.contact-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.contact-details h5 {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.contact-details p {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-color);
}

.contact-form-wrap {
  padding: 2.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.9rem 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-color);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.form-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

textarea.form-input {
  resize: vertical;
  min-height: 140px;
}

/* Form Toast Notification */
.form-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #10B981;
  color: #FFFFFF;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: var(--transition-fast);
}

.form-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* --------------------------------------------------------------------------
   13. Footer & Back To Top Button
   -------------------------------------------------------------------------- */
footer {
  padding: 3rem 0;
  border-top: 1px solid var(--card-border);
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.footer-copyright {
  font-size: 0.9rem;
  color: var(--text-muted);
}

#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 8px 20px var(--glow-color);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-fast);
  z-index: 800;
}

#back-to-top.show {
  opacity: 1;
  visibility: visible;
}

#back-to-top:hover {
  background: var(--primary-hover);
  transform: translateY(-4px);
}

/* --------------------------------------------------------------------------
   14. Responsive Media Queries (Mobile First / Tablet / Desktop)
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .hero-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-content {
    align-items: center;
    text-align: center;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-title {
    font-size: 2.75rem;
  }

  .profile-img-card {
    width: 280px;
    height: 360px;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--nav-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    transition: var(--transition-smooth);
    border-left: 1px solid var(--card-border);
  }

  .nav-menu.active {
    right: 0;
  }

  .mobile-toggle {
    display: block;
    z-index: 950;
  }

  .section {
    padding: 5rem 0 3.5rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .about-cards-grid {
    grid-template-columns: 1fr;
  }
}
