/* ===================================
   RESPONSIVE DESIGN - COMPLETE
   Portfolio Website by Danysh Mushtaq
   Mobile-First Responsive Styles
   =================================== */

/* ===================================
   LARGE DESKTOP - 1200px to 1440px
   =================================== */
@media (max-width: 1200px) {
    .container {
        padding: 0 30px;
    }
    
    .hero-wrapper {
        grid-template-columns: 350px 1fr;
        gap: 60px;
    }
    
    .story-grid {
        grid-template-columns: 350px 1fr;
        gap: 60px;
    }
    
    .literature-hero-grid {
        grid-template-columns: 300px 1fr;
        gap: 50px;
    }
}

/* ===================================
   TABLET LANDSCAPE - 1024px and below
   =================================== */
@media (max-width: 1024px) {
    /* Typography */
    .page-title {
        font-size: 48px;
    }
    
    .hero-name {
        font-size: 48px;
    }
    
    .section-heading {
        font-size: 36px;
    }
    
    /* Layout Adjustments */
    .hero-wrapper,
    .story-grid,
    .about-grid,
    .contact-grid,
    .literature-hero-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    /* Profile Frame */
    .profile-frame {
        max-width: 350px;
        margin: 0 auto;
    }
    
    /* Grids - 2 Columns */
    .domains-grid-clean {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .expertise-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .projects-grid-equal,
    .blog-grid-equal {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .work-grid-masonry {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .blog-grid-page {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .literature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .related-projects-grid,
    .related-blogs-grid,
    .related-literature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Project Detail */
    .project-hero-title {
        font-size: 40px;
    }
    
    /* Literature Detail */
    .book-title {
        font-size: 36px;
    }
    
    .book-cover-section {
        position: relative;
        top: 0;
        max-width: 350px;
        margin: 0 auto;
    }
    
    /* Footer */
    .footer-main {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .footer-links {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
}

/* ===================================
   TABLET PORTRAIT - 900px and below
   =================================== */
@media (max-width: 900px) {
    /* Show mobile menu at 900px */
    .navbar {
        padding: 0px 0;
    }
    
    /* FIXED: Mobile Menu - No Scroll Issues */
    .nav-menu {
        display: none;
        position: fixed;
        top: 66px;
        left: 0;
        right: 0;
        height: calc(100vh - 66px);
        background: var(--bg-primary);
        padding: 20px 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        z-index: 999;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        box-shadow: 0 10px 30px var(--shadow-lg);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    /* Nav Links */
    .nav-menu > a.nav-link {
        padding: 18px 20px;
        border-bottom: 1px solid var(--border-light);
        font-size: 16px;
        flex-shrink: 0;
    }
    
    /* Last nav link should have border */
    .nav-menu > .nav-link:last-of-type {
        border-bottom: 1px solid var(--border-light);
    }
    
    /* Dropdown in Mobile */
    .dropdown {
        width: 100%;
        flex-shrink: 0;
    }
    
    .dropdown > .nav-link {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 18px 20px;
        border-bottom: 1px solid var(--border-light);
    }
    
    .dropdown .arrow {
        transition: transform 0.3s ease;
        font-size: 12px;
        opacity: 0.6;
    }
    
    .dropdown.active .arrow {
        transform: rotate(180deg);
    }
    
    /* Dropdown Menu */
    .dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        background: var(--bg-secondary);
        border: none;
        border-radius: 0;
        padding: 0;
        margin: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        width: 100%;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
    
    .dropdown-menu a {
        padding: 14px 40px;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        font-size: 15px;
        display: block;
    }
    
    .dropdown-menu a:last-child {
        border-bottom: 1px solid var(--border-light);
    }
    
    /* Mobile Menu Toggle */
    .menu-toggle {
        display: flex;
    }
    
    /* Prevent body scroll when menu open */
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
}


/* ===================================
   TABLET - 768px and below
   =================================== */
@media (max-width: 768px) {
    /* Base */
    .container {
        padding: 0 20px;
    }
    
    section {
        padding: 60px 0;
    }
    
    /* Navigation */
    .logo img {
        width: 32px;
        height: 32px;
    }
    
    .logo span {
        font-size: 16px;
    }
    
    .nav-menu {
        top: 65px;
    }
    
    /* ==================
       HERO SECTION
       ================== */
    .hero-elegant {
        padding: 100px 0 60px;
        min-height: auto;
    }
    
    .hero-wrapper {
        gap: 40px;
    }
    
    .profile-frame {
        max-width: 280px;
    }
    
    .hero-name {
        font-size: 40px;
        letter-spacing: -1px;
    }
    
    .hero-desc {
        font-size: 16px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 25px 0;
    }
    
    .stat-box {
        width: 100%;
    }
    
    .stat-value {
        font-size: 32px;
    }
    
    .stat-divider {
        display: none;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn-elegant {
        width: 100%;
        justify-content: center;
    }
    
    .scroll-hint {
        display: none;
    }
    
    /* ==================
       PAGE HERO
       ================== */
    .page-hero {
        padding: 120px 0 60px;
    }
    
    .page-title {
        font-size: 36px;
        letter-spacing: -1px;
    }
    
    .page-subtitle {
        font-size: 16px;
    }
    
    /* ==================
       SECTIONS
       ================== */
    .section-heading {
        font-size: 32px;
        letter-spacing: -1px;
    }
    
    .section-subtitle {
        font-size: 16px;
    }
    
    .section-header-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .section-header-flex .btn-elegant {
        width: 100%;
    }
    
    /* ==================
       ABOUT PAGE
       ================== */
    .about-grid {
        gap: 40px;
    }
    
    .about-visual {
        grid-template-columns: 1fr;
    }
    
    .story-content h2 {
        font-size: 28px;
    }
    
    .experience-card {
        padding: 24px;
    }
    
    /* Timeline */
    .timeline::before {
        left: 15px;
    }
    
    .timeline-item {
        padding-left: 50px;
    }
    
    .timeline-dot {
        left: 6px;
    }
    
    /* ==================
       GRIDS - 1 COLUMN
       ================== */
    .domains-grid-clean,
    .expertise-grid,
    .stats-grid,
    .values-grid,
    .projects-grid-equal,
    .blog-grid-equal,
    .work-grid-masonry,
    .blog-grid-page,
    .literature-grid,
    .related-projects-grid,
    .related-blogs-grid,
    .related-literature-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    /* ==================
       WORK PAGE - FILTERS
       ================== */
    .filter-section {
        padding: 40px 0;
    }
    
    .filter-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
    
    .search-bar {
        max-width: 100%;
    }
    
    .category-filter {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .filter-btn {
        font-size: 13px;
        padding: 10px 18px;
    }
    
    /* ==================
       PROJECT DETAIL
       ================== */
    .project-hero {
        padding: 120px 0 40px;
    }
    
    .project-hero-title {
        font-size: 32px;
        letter-spacing: -1px;
    }
    
    .project-hero-desc {
        font-size: 16px;
    }
    
    .project-hero-meta {
        flex-direction: column;
        gap: 20px;
    }
    
    .project-featured-image {
        padding: 40px 0;
    }
    
    .project-content-section {
        padding: 60px 0;
    }
    
    .content-html h2 {
        font-size: 28px;
    }
    
    .content-html h3 {
        font-size: 22px;
    }
    
    .content-html h4 {
        font-size: 18px;
    }
    
    /* ==================
       BLOG DETAIL
       ================== */
    .blog-detail-hero {
        padding: 120px 0 40px;
    }
    
    .blog-detail-title {
        font-size: 32px;
        letter-spacing: -1px;
    }
    
    .author-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .author-avatar {
        width: 48px;
        height: 48px;
    }
    
    .post-info {
        flex-wrap: wrap;
        font-size: 13px;
    }
    
    .blog-featured-image {
        padding: 40px 0;
    }
    
    .blog-content-section {
        padding: 60px 0;
    }
    
    .blog-excerpt {
        padding: 24px;
    }
    
    .blog-excerpt p {
        font-size: 16px;
    }
    
    .blog-share-section {
        padding: 30px 20px;
    }
    
    .share-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .share-btn {
        justify-content: center;
        width: 100%;
    }
    
    /* ==================
       LITERATURE DETAIL
       ================== */
    .literature-detail-hero {
        padding: 120px 0 60px;
    }
    
    .literature-hero-grid {
        gap: 40px;
    }
    
    .book-cover-wrapper {
        max-width: 300px;
        margin: 0 auto;
    }
    
    .book-title {
        font-size: 28px;
        text-align: center;
    }
    
    .book-author {
        font-size: 16px;
        text-align: center;
    }
    
    .book-rating-large {
        justify-content: center;
        flex-direction: column;
        gap: 12px;
    }
    
    .rating-stars {
        gap: 6px;
    }
    
    .star {
        font-size: 24px;
    }
    
    .book-meta-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .literature-content-section {
        padding: 60px 0;
    }
    
    .key-takeaways-section {
        padding: 30px 20px;
    }
    
    .literature-share-section {
        padding: 30px 20px;
    }
    
    /* ==================
       CONTACT PAGE
       ================== */
    .contact-section {
        padding: 60px 0;
    }
    
    .contact-grid {
        gap: 50px;
    }
    
    .contact-info h2 {
        font-size: 28px;
        text-align: center;
    }
    
    .contact-intro {
        text-align: center;
    }
    
    .contact-method {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .contact-social {
        text-align: center;
    }
    
    .social-links-contact {
        justify-content: center;
    }
    
    .contact-form-wrapper {
        padding: 30px 20px;
    }
    
    /* ==================
       FOOTER
       ================== */
    .footer-advanced {
        padding: 60px 0 0;
    }
    
    .footer-main {
        gap: 40px;
        padding-bottom: 40px;
    }
    
    .footer-brand {
        text-align: center;
    }
    
    .footer-bio {
        margin: 0 auto 30px;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .footer-column {
        text-align: center;
    }
    
    .footer-column h4 {
        font-size: 15px;
    }
    
    .footer-column ul li a {
        font-size: 13px;
    }
    
    .footer-bottom {
        padding: 25px 0;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    /* ==================
       CTA SECTION
       ================== */
    .cta-box h2 {
        font-size: 28px;
        letter-spacing: -1px;
    }
    
    .cta-box p {
        font-size: 16px;
    }
    
    .cta-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .cta-actions .btn-elegant {
        width: 100%;
    }
    
    /* ==================
       CARDS
       ================== */
    .work-card-content,
    .project-info-equal,
    .blog-card-info-page,
    .blog-info-equal {
        padding: 24px;
    }
    
    .work-card-content h3,
    .project-info-equal h3,
    .blog-card-info-page h3,
    .blog-info-equal h3 {
        font-size: 18px;
    }
    
    /* ==================
       BACK TO TOP
       ================== */
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
}

/* ===================================
   MOBILE - 480px and below
   =================================== */
@media (max-width: 480px) {
    /* Base */
    .container {
        padding: 0 15px;
    }
    
    section {
        padding: 50px 0;
    }
    
    /* Typography */
    .page-title {
        font-size: 28px;
    }
    
    .hero-name {
        font-size: 32px;
    }
    
    .section-heading {
        font-size: 28px;
    }
    
    h2 {
        font-size: 26px;
    }
    
    h3 {
        font-size: 20px;
    }
    
    /* Navigation */
    .logo span {
        font-size: 15px;
    }
    
    .logo img {
        width: 28px;
        height: 28px;
    }
    
    .nav-menu {
        padding: 0;
        top: 63px;
    }
    
    .nav-menu > a.nav-link {
        padding: 16px 15px;
    }
    
    .dropdown > .nav-link {
        padding: 16px 15px;
    }
    
    .dropdown-menu a {
        padding: 12px 30px;
    }
    
    /* Hero */
    .hero-elegant {
        padding: 80px 0 50px;
    }
    
    .profile-frame {
        max-width: 240px;
    }
    
    .hero-greeting {
        font-size: 14px;
    }
    
    .hero-name {
        font-size: 28px;
    }
    
    .hero-desc {
        font-size: 15px;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    /* Page Hero */
    .page-hero {
        padding: 100px 0 50px;
    }
    
    .page-title {
        font-size: 26px;
    }
    
    .page-subtitle {
        font-size: 15px;
    }
    
    /* Buttons */
    .btn-elegant {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .btn-sm {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    /* Section Elements */
    .section-tag {
        font-size: 11px;
        padding: 5px 12px;
    }
    
    .section-heading {
        font-size: 26px;
    }
    
    .section-subtitle {
        font-size: 15px;
    }
    
    /* Cards */
    .domain-card-clean,
    .expertise-card,
    .value-card {
        padding: 30px 20px;
    }
    
    .domain-icon-clean {
        font-size: 40px;
    }
    
    .domain-card-clean h3 {
        font-size: 18px;
    }
    
    .domain-tech li {
        font-size: 11px;
        padding: 3px 8px;
    }
    
    .experience-card {
        padding: 20px;
    }
    
    .card-icon {
        font-size: 28px;
    }
    
    /* Project Detail */
    .project-hero {
        padding: 100px 0 40px;
    }
    
    .project-hero-title {
        font-size: 26px;
    }
    
    .project-hero-desc {
        font-size: 15px;
    }
    
    .meta-value {
        font-size: 15px;
    }
    
    .content-html {
        font-size: 15px;
    }
    
    .content-html h2 {
        font-size: 24px;
    }
    
    .content-html h3 {
        font-size: 20px;
    }
    
    .content-html h4 {
        font-size: 17px;
    }
    
    /* Blog Detail */
    .blog-detail-hero {
        padding: 100px 0 40px;
    }
    
    .blog-detail-title {
        font-size: 26px;
    }
    
    .author-avatar {
        width: 40px;
        height: 40px;
    }
    
    .author-name {
        font-size: 15px;
    }
    
    .post-info {
        font-size: 12px;
    }
    
    .blog-excerpt {
        padding: 20px;
    }
    
    .blog-excerpt p {
        font-size: 15px;
    }
    
    /* Literature Detail */
    .literature-detail-hero {
        padding: 100px 0 50px;
    }
    
    .book-cover-wrapper {
        max-width: 260px;
    }
    
    .book-title {
        font-size: 24px;
    }
    
    .book-author {
        font-size: 15px;
    }
    
    .rating-stars .star {
        font-size: 20px;
    }
    
    .rating-number {
        font-size: 20px;
    }
    
    .key-takeaways-section {
        padding: 25px 15px;
    }
    
    .takeaway-item {
        padding: 12px;
    }
    
    .takeaway-icon {
        font-size: 20px;
    }
    
    /* Filters */
    .filter-btn {
        font-size: 12px;
        padding: 8px 14px;
        flex: 1;
        min-width: 90px;
    }
    
    .search-input {
        font-size: 14px;
        padding: 12px 45px 12px 16px;
    }
    
    /* Contact */
    .contact-form-wrapper {
        padding: 25px 15px;
    }
    
    .form-control {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .contact-method {
        padding: 20px;
    }
    
    .method-icon {
        width: 40px;
        height: 40px;
    }
    
    /* Footer */
    .footer-advanced {
        padding: 50px 0 0;
    }
    
    .footer-brand h3 {
        font-size: 20px;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .social-icon {
        width: 40px;
        height: 40px;
    }
    
    .footer-bottom {
        padding: 20px 0;
    }
    
    .copyright {
        font-size: 13px;
    }
    
    .made-with {
        font-size: 13px;
    }
    
    /* CTA */
    .cta-elegant {
        padding: 60px 0;
    }
    
    .cta-box {
        padding: 0 15px;
    }
    
    .cta-box h2 {
        font-size: 24px;
    }
    
    .cta-box p {
        font-size: 15px;
    }
    
    /* Tags */
    .work-tag,
    .tag-pill,
    .blog-tag-item,
    .project-tag-item,
    .literature-tag-item {
        font-size: 11px;
        padding: 4px 10px;
    }
    
    /* Back to Top */
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
    }
}

/* ===================================
   EXTRA SMALL - 360px and below
   =================================== */
@media (max-width: 360px) {
    .container {
        padding: 0 12px;
    }
    
    .hero-name,
    .page-title {
        font-size: 24px;
    }
    
    .section-heading {
        font-size: 24px;
    }
    
    .btn-elegant {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .filter-btn {
        font-size: 11px;
        padding: 7px 12px;
    }
}

/* ===================================
   LANDSCAPE MODE - PHONES
   =================================== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-elegant {
        padding: 60px 0 40px;
        min-height: auto;
    }
    
    .profile-frame {
        max-width: 200px;
    }
    
    .hero-name {
        font-size: 32px;
    }
    
    .page-hero {
        padding: 80px 0 40px;
    }
    
    .nav-menu {
        top: 55px;
        max-height: calc(100vh - 55px);
    }
}

/* ===================================
   PRINT STYLES
   =================================== */
@media print {
    .navbar,
    .menu-toggle,
    .hero-cta,
    .filter-section,
    .cta-elegant,
    .footer-advanced,
    .back-to-top,
    .share-buttons,
    .contact-form-wrapper {
        display: none !important;
    }
    
    .page-hero,
    section {
        padding: 20px 0;
    }
    
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    a {
        text-decoration: underline;
    }
    
    .content-html,
    .blog-body,
    .review-body {
        color: black !important;
    }
}

