/*
Theme Name: Akhtar Abbas Portfolio
Theme URI: https://akhtarabbas.com
Author: Akhtar Abbas
Author URI: https://akhtarabbas.com
Description: A modern, professional portfolio theme showcasing WordPress development expertise with advanced animations, transitions, and responsive design.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: akhtar-portfolio
Tags: portfolio, one-column, custom-colors, custom-menu, featured-images, full-width-template, responsive-layout
*/

/* ========================================
   CSS Variables & Reset
======================================== */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #f59e0b;
    --dark-bg: #0f172a;
    --light-bg: #f8fafc;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --white: #ffffff;
    --transition-speed: 0.3s;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
}

/* ========================================
   Typography
======================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: all var(--transition-speed) ease;
}

a:hover {
    color: var(--secondary-color);
}

/* ========================================
   Navigation
======================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-speed) ease;
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-bg);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-logo:hover {
    color: var(--primary-color);
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.main-navigation a {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 0;
    position: relative;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width var(--transition-speed) ease;
}

.main-navigation a:hover::after,
.main-navigation a.active::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-bg);
}

/* ========================================
   Hero Section
======================================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
    padding: 6rem 2rem 2rem;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)" /></svg>');
    opacity: 0.3;
}

.hero-content {
    max-width: 1400px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text {
    color: var(--white);
    animation: fadeInLeft 1s ease-out;
}

.hero-text h1 {
    margin-bottom: 1.5rem;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
}

.hero-text .tagline {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    font-weight: 500;
}

.hero-text p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--white);
    color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    color: var(--secondary-color);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-color);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInRight 1s ease-out;
}

.profile-image-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
}

.profile-image-wrapper::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: 20px;
    bottom: 20px;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    border-radius: 2rem;
    animation: float 6s ease-in-out infinite;
}

.profile-image {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 2rem;
    object-fit: cover;
    box-shadow: var(--shadow-xl);
    border: 5px solid var(--white);
    display: block;
}

/* ========================================
   Stats Section
======================================== */
.stats-section {
    background: var(--white);
    padding: 4rem 2rem;
    margin-top: -3rem;
    position: relative;
    z-index: 10;
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-speed) ease;
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 500;
}

/* ========================================
   About Section
======================================== */
.about-section {
    padding: 6rem 2rem;
    background: var(--light-bg);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.skill-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-speed) ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.skill-card h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.skill-card p {
    color: var(--text-light);
}

/* ========================================
   Portfolio Section
======================================== */
.portfolio-section {
    padding: 6rem 2rem;
    background: var(--white);
}

.portfolio-container {
    max-width: 1400px;
    margin: 0 auto;
}

.portfolio-grid {
    display: grid;
    gap: 4rem;
    margin-top: 3rem;
}

.portfolio-item {
    background: var(--light-bg);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-speed) ease;
}

.portfolio-item:hover {
    box-shadow: var(--shadow-xl);
}

.portfolio-header {
    padding: 2rem;
    background: var(--white);
}

.portfolio-header h3 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.portfolio-meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.portfolio-category,
.portfolio-url {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.95rem;
}

.portfolio-url a {
    color: var(--primary-color);
    font-weight: 500;
}

.portfolio-url a:hover {
    text-decoration: underline;
}

.portfolio-description {
    color: var(--text-light);
    line-height: 1.8;
}

/* Image Slider */
.image-slider {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    margin-bottom: 2rem;
    background: #0f172a;
}

.slider-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
}

.slider-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
}

.slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--dark-bg);
    transition: all var(--transition-speed) ease;
    z-index: 10;
    box-shadow: var(--shadow-md);
}

.slider-nav:hover {
    background: var(--white);
    box-shadow: var(--shadow-lg);
    transform: translateY(-50%) scale(1.1);
}

.slider-nav.prev {
    left: 1rem;
}

.slider-nav.next {
    right: 1rem;
}

.slider-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid var(--white);
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.slider-dot.active {
    background: var(--white);
    transform: scale(1.2);
}

/* Website Embed */
.website-embed-wrapper {
    padding: 2rem;
    background: var(--white);
}

.embed-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 0.5rem;
}

.device-toggle {
    display: flex;
    gap: 0.5rem;
}

.device-btn {
    padding: 0.5rem 1rem;
    background: var(--white);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
}

.device-btn.active,
.device-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

.visit-btn {
    padding: 0.5rem 1.5rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
}

.visit-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.embed-container {
    position: relative;
    width: 100%;
    background: var(--dark-bg);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transition: all 0.5s ease;
}

.embed-container.desktop {
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    max-height: none;
}

.embed-container.mobile {
    max-width: 412px;
    max-height: 915px;
    margin: 0 auto;
    padding-bottom: 0;
    height: 915px;
    position: relative;
}

.embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: var(--white);
}

/* Ensure mobile view never exceeds 915px */
.embed-container.mobile iframe {
    max-height: 915px;
}

/* ========================================
   Footer
======================================== */
.site-footer {
    background: var(--dark-bg);
    color: var(--white);
    padding: 3rem 2rem 1rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all var(--transition-speed) ease;
}

.social-link svg {
    width: 20px;
    height: 20px;
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.4);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: all var(--transition-speed) ease;
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* ========================================
   Animations
======================================== */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-image {
        order: -1;
    }
    
    .profile-image-wrapper {
        width: 300px;
        height: 300px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .main-navigation {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        background: var(--white);
        box-shadow: var(--shadow-xl);
        transition: left var(--transition-speed) ease;
        padding: 6rem 2rem 2rem;
        z-index: 999;
    }
    
    .main-navigation.active {
        left: 0;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .mobile-menu-toggle {
        display: block;
        z-index: 1001;
    }
    
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-speed) ease;
        z-index: 998;
    }
    
    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .slider-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .slider-nav.prev {
        left: 0.5rem;
    }
    
    .slider-nav.next {
        right: 0.5rem;
    }
}

@media (max-width: 640px) {
    .header-container {
        padding: 0.75rem 1rem;
    }
    
    .hero-section {
        padding: 4.5rem 0.75rem 1.5rem;
    }
    
    .hero-content {
        gap: 2rem;
    }
    
    .hero-text h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-text .tagline {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .hero-text p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .profile-image-wrapper {
        width: 220px;
        height: 220px;
    }
    
    .stats-section {
        padding: 2rem 0.75rem;
        margin-top: -2rem;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .about-section,
    .portfolio-section {
        padding: 3rem 0.75rem;
    }
    
    .about-content,
    .portfolio-grid {
        gap: 1.5rem;
    }
    
    .portfolio-header {
        padding: 1.5rem;
    }
    
    .portfolio-header h3 {
        font-size: 1.5rem;
    }
    
    .image-slider {
        height: 400px;
        margin-bottom: 1rem;
    }
    
    .slider-slide img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    
    /* Mobile embedded sites - fixed height */
    .embed-container {
        max-height: 915px !important;
        height: 915px !important;
        padding-bottom: 0 !important;
        position: relative;
    }
    
    .embed-container.desktop {
        max-height: 915px !important;
        height: 915px !important;
        padding-bottom: 0 !important;
    }
    
    .website-embed-wrapper {
        padding: 1rem;
    }
    
    .device-toggle {
        display: none !important;
    }
    
    .device-btn {
        width: 100%;
    }
    
    .embed-controls {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    /* Force mobile view on mobile devices - 412x915 ratio */
    .embed-container {
        max-width: 100% !important;
        padding-bottom: 222.09% !important; /* Mobile aspect ratio 915/412 = 2.2209 */
        margin: 0 !important;
    }
    
    .embed-container.desktop {
        max-width: 100% !important;
        padding-bottom: 222.09% !important;
    }
    
    .skill-card {
        padding: 1.5rem;
    }
    
    .section-title h2 {
        font-size: 1.75rem;
    }
    
    .section-title {
        margin-bottom: 2rem;
    }
    
    .site-footer {
        padding: 2rem 0.75rem 1rem;
    }
    
    .footer-content {
        gap: 2rem;
    }
    
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
}

/* ========================================
   Utility Classes
======================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Smooth Scrolling */
html {
    scroll-padding-top: 80px;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed) ease;
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
}
