/*
Theme Name: Raiyan Haider Portfolio
Theme URI: https://raiyanhaider.com
Author: Raiyan Haider
Author URI: https://raiyanhaider.com
Description: Ultra-fast, minimalistic portfolio theme for content writer, SEO expert, and researcher. Inspired by Apple's clean design philosophy.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: raiyan-haider
Tags: portfolio, minimal, fast, responsive, blog
*/

/* CSS Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #1d1d1f;
  --secondary-color: #ffffff;
  --accent-color: #0071e3;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --border-color: #d2d2d7;
  --hover-bg: #f5f5f7;
  --font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);
}

body {
  font-family: var(--font-primary);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--secondary-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

a:hover {
  opacity: 0.8;
}

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

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  padding: 16px 0;
}

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

.site-logo {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo img {
  height: 40px;
  width: auto;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 32px;
  align-items: center;
}

.main-nav a {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 400;
  position: relative;
  padding: 8px 0;
}

.main-nav a:hover,
.main-nav a.current {
  color: var(--accent-color);
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: width 0.3s;
}

.main-nav a:hover::after,
.main-nav a.current::after {
  width: 100%;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-primary);
}

/* Hero Section */
.hero-section {
  padding: 100px 0;
  text-align: center;
  background: linear-gradient(135deg, #f5f5f7 0%, #ffffff 100%);
}

.hero-content h1 {
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  line-height: 1.1;
}

.hero-content p {
  font-size: 21px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: inline-flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 980px;
  font-size: 17px;
  font-weight: 500;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background: var(--accent-color);
  color: white;
}

.btn-primary:hover {
  background: #0077ed;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
  background: var(--accent-color);
  color: white;
}

/* Section */
.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 21px;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.card {
  background: white;
  border-radius: 18px;
  padding: 40px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.card h3 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 12px;
}

.card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Portfolio Grid */
.portfolio-filters {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 24px;
  border-radius: 20px;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
  font-size: 15px;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--text-primary);
  color: white;
  border-color: var(--text-primary);
}

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

.portfolio-item {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 16/10;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.portfolio-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 30px;
  color: white;
  transform: translateY(100%);
  transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay {
  transform: translateY(0);
}

.portfolio-overlay h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.portfolio-overlay p {
  font-size: 14px;
  opacity: 0.9;
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 40px;
}

.blog-card {
  background: white;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.blog-card-image {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.05);
}

.blog-card-content {
  padding: 30px;
}

.blog-meta {
  display: flex;
  gap: 16px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.blog-card h3 {
  font-size: 24px;
  margin-bottom: 12px;
  line-height: 1.3;
}

.blog-card p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.read-more {
  color: var(--accent-color);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* List Items */
.list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.list-item {
  background: white;
  padding: 30px;
  border-radius: 12px;
  border-left: 4px solid var(--accent-color);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.list-item:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow-lg);
}

.list-item h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.list-item p {
  color: var(--text-secondary);
  font-size: 15px;
}

.list-item-meta {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* Contact Section */
.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  margin-top: 60px;
}

.contact-card {
  text-align: center;
  padding: 40px;
  background: white;
  border-radius: 18px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.contact-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.contact-icon {
  font-size: 48px;
  color: var(--accent-color);
  margin-bottom: 20px;
}

.contact-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.contact-card a {
  color: var(--text-secondary);
  word-break: break-word;
}

.contact-card a:hover {
  color: var(--accent-color);
}

/* Footer */
.site-footer {
  background: var(--primary-color);
  color: white;
  padding: 60px 0 30px;
  margin-top: 80px;
}

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

.footer-section h3 {
  font-size: 18px;
  margin-bottom: 20px;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 12px;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
}

.footer-section a:hover {
  color: white;
}

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

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--accent-color);
  transform: translateY(-4px);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 20px;
  }

  .main-nav.active {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 16px;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .hero-content h1 {
    font-size: 40px;
  }

  .hero-content p {
    font-size: 18px;
  }

  .section-title {
    font-size: 36px;
  }

  .section-subtitle {
    font-size: 18px;
  }

  .cards-grid,
  .portfolio-grid,
  .blog-grid,
  .list-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 60px 0;
  }
}

/* Loading & Performance */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Print Styles */
@media print {
  .site-header,
  .site-footer,
  .hero-cta {
    display: none;
  }
}