/*
Theme Name: Saddam Portfolio Theme
Theme URI: https://saddamhossen.dev
Author: Saddam Hossen
Author URI: https://saddamhossen.dev
Description: Professional WordPress developer portfolio theme showcasing custom plugin development, WooCommerce expertise, and performance optimization skills. Built from scratch following WordPress coding standards.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: saddam-portfolio
Tags: portfolio, developer, custom-theme, responsive, accessibility-ready

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned.
*/

/* ==========================================================================
   CSS Reset & Base Styles
   ========================================================================== */

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

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

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu,
    Cantarell, "Helvetica Neue", sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
}

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

a {
  color: #2271b1;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover,
a:focus {
  color: #135e96;
}

/* Skip to content link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #2271b1;
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #1e1e1e;
}

h1 {
  font-size: 2.5rem;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.75rem;
}
h4 {
  font-size: 1.5rem;
}
h5 {
  font-size: 1.25rem;
}
h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

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

.section-title h2 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.section-title p {
  font-size: 1.125rem;
  color: #666;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-block;
  padding: 12px 30px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border-radius: 5px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background-color: #2271b1;
  color: white;
  border-color: #2271b1;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #135e96;
  border-color: #135e96;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.btn-secondary {
  background-color: transparent;
  color: #2271b1;
  border-color: #2271b1;
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: #2271b1;
  color: white;
  transform: translateY(-2px);
}

.btn-group {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.site-header.scrolled {
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
}

.site-header.scrolled .header-inner {
  padding: 15px 0; /* Slightly reduced padding when scrolled */
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  min-height: 70px;
  transition: padding 0.3s ease;
}

.site-branding {
  flex-shrink: 0;
}

.site-title {
  font-size: 1.5rem;
  margin: 0;
}

.site-title a {
  color: #1e1e1e;
  font-weight: 700;
}

.site-title a:hover {
  color: #2271b1;
}

.main-navigation {
  display: flex;
  align-items: center;
}

.main-navigation ul {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
}

.main-navigation a {
  color: #333;
  font-weight: 500;
  padding: 5px 0;
  position: relative;
}

.main-navigation a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #2271b1;
  transition: width 0.3s ease;
}

.main-navigation a:hover::after,
.main-navigation a:focus::after,
.main-navigation .current-menu-item a::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #333;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 120px 0;
  text-align: center;
}

.hero-content h1 {
  font-size: 3rem;
  color: white;
  margin-bottom: 1rem;
  animation: fadeInUp 0.8s ease;
}

.hero-content .hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.95;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 30px;
  margin-top: 50px;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.stat-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 10px;
  backdrop-filter: blur(10px);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  display: block;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* ==========================================================================
   Services Section
   ========================================================================== */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.service-card {
  background: #fff;
  padding: 40px 30px;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border-top: 4px solid #2271b1;
}

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

.service-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
  color: white;
}

.service-card h3 {
  margin-bottom: 1rem;
  color: #1e1e1e;
}

.service-card p {
  color: #666;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   Portfolio/Projects Section
   ========================================================================== */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

.project-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

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

.project-image {
  width: 100%;
  height: 250px;
  overflow: hidden;
  position: relative;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.1);
}

.project-content {
  padding: 30px;
}

.project-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.project-title a {
  color: #1e1e1e;
}

.project-title a:hover {
  color: #2271b1;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 1rem;
}

.project-tag {
  background: #f0f0f1;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.875rem;
  color: #666;
}

.project-excerpt {
  color: #666;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   Testimonials Section
   ========================================================================== */

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.testimonial-card {
  background: #fff;
  padding: 40px 30px;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  position: relative;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 20px;
  left: 30px;
  font-size: 4rem;
  color: #2271b1;
  opacity: 0.2;
  font-family: Georgia, serif;
}

.testimonial-text {
  font-style: italic;
  color: #666;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 15px;
}

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
}

.author-info h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.author-info p {
  font-size: 0.875rem;
  color: #666;
  margin: 0;
}

.rating {
  color: #f0a000;
  margin-top: 0.5rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background-color: #1e1e1e;
  color: #fff;
  padding: 60px 0 20px;
}

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-widget h3 {
  color: #fff;
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.footer-widget ul {
  list-style: none;
  padding: 0;
}

.footer-widget ul li {
  margin-bottom: 10px;
}

.footer-widget a {
  color: #ccc;
}

.footer-widget a:hover {
  color: #fff;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-link {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: #2271b1;
  transform: translateY(-3px);
}

.site-info {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  text-align: center;
  color: #999;
}

/* ==========================================================================
   Contact Form
   ========================================================================== */

.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 5px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2271b1;
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

/* ==========================================================================
   Animations
   ========================================================================== */

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

.fade-in-up {
  animation: fadeInUp 0.8s ease;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

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

.mt-1 {
  margin-top: 1rem;
}
.mt-2 {
  margin-top: 2rem;
}
.mt-3 {
  margin-top: 3rem;
}

.mb-1 {
  margin-bottom: 1rem;
}
.mb-2 {
  margin-bottom: 2rem;
}
.mb-3 {
  margin-bottom: 3rem;
}

.bg-light {
  background-color: #f8f9fa;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media screen and (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .main-navigation ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    gap: 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  }

  .main-navigation ul.mobile-menu-active {
    display: flex;
  }

  .main-navigation li {
    border-bottom: 1px solid #f0f0f1;
  }

  .main-navigation a {
    display: block;
    padding: 15px 20px;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content .hero-subtitle {
    font-size: 1rem;
  }

  .section {
    padding: 60px 0;
  }

  .projects-grid,
  .services-grid {
    grid-template-columns: 1fr;
  }

  .btn-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

@media screen and (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.75rem;
  }

  .hero-section {
    padding: 80px 0;
  }

  .service-card,
  .project-card,
  .testimonial-card {
    padding: 30px 20px;
  }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  .site-header,
  .site-footer,
  .btn,
  .menu-toggle {
    display: none;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
  }
}
