/*
Theme Name: Dr. Aijaz Rasool Chaudhry Portfolio
Description: A professional academic portfolio theme for Dr. Aijaz Rasool Chaudhry, Assistant Professor of Physics at University of Bisha. Features responsive design with computational physics elements.
Author: Custom Theme
Version: 1.0
Text Domain: dr-aijaz-portfolio
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.site-header {
    background: linear-gradient(135deg, #1a237e 0%, #283593 50%, #3949ab 100%);
    color: white;
    padding: 0.75rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid #64b5f6;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    min-height: 60px;
}

.site-title {
    font-size: 1.6rem;
    font-weight: 700;
    text-decoration: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Ensure site title link inherits white color */
.site-title a {
    color: #ffffff;
    text-decoration: none;
}
.site-title a:hover,
.site-title a:focus {
    color: #e3f2fd;
}

.site-title::before {
    content: "⚛";
    margin-right: 10px;
    font-size: 1.8rem;
    color: #64b5f6;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    align-items: center;
    height: 100%;
}

.nav-menu li {
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-menu a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    padding: 0.75rem 1rem;
    position: relative;
    border-radius: 6px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    margin: 0 2px;
    display: flex;
    align-items: center;
    height: 40px;
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a.current {
    color: #ffffff;
    background: rgba(100, 181, 246, 0.9);
    border-color: rgba(100, 181, 246, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(100, 181, 246, 0.3);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #64b5f6, #42a5f5);
    transition: width 0.3s ease;
    border-radius: 1px;
}

.nav-menu a:hover::after,
.nav-menu a.current::after {
    width: 80%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(30, 60, 114, 0.8), rgba(42, 82, 152, 0.8)), 
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="grid" width="50" height="50" patternUnits="userSpaceOnUse"><path d="M 50 0 L 0 0 0 50" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    color: white;
    padding: 6rem 0;
    text-align: center;
    background-size: cover;
    background-position: center;
}

/* Hero media (image/placeholder) */
.hero-media { display: flex; align-items: center; justify-content: center; }
.profile-image { width: 280px; max-width: 100%; border-radius: 12px; box-shadow: 0 8px 20px rgba(0,0,0,0.25); }
.profile-placeholder { width: 280px; height: 280px; border-radius: 12px; border: 2px dashed rgba(255,255,255,0.6); background: rgba(255,255,255,0.08); }

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content .subtitle {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #e3f2fd;
}

.hero-content .affiliation {
    font-size: 1.1rem;
    color: #bbdefb;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    background-color: #64b5f6;
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(100, 181, 246, 0.3);
}

.cta-button:hover {
    background-color: #42a5f5;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(100, 181, 246, 0.4);
}

/* Main Content */
.main-content {
    padding: 2rem 0;
}

.content-section {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    color: #1e3c72;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #64b5f6;
}

/* Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid #64b5f6;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.card h3 {
    color: #1e3c72;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.card p {
    color: #666;
    line-height: 1.6;
}

/* Research Areas */
.research-areas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.research-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.research-item:hover {
    transform: translateY(-3px);
}

.research-icon {
    font-size: 3rem;
    color: #64b5f6;
    margin-bottom: 1rem;
}

/* Publications */
.publication-item {
    background: white;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    border-left: 4px solid #64b5f6;
}

.publication-title {
    font-weight: 600;
    color: #1e3c72;
    margin-bottom: 0.5rem;
}

.publication-authors {
    color: #666;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.publication-journal {
    color: #2a5298;
    font-weight: 500;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #64b5f6;
    box-shadow: 0 0 0 2px rgba(100, 181, 246, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    background-color: #1e3c72;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background-color: #2a5298;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 60, 114, 0.3);
}

/* Legal Pages Styles */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.legal-section {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.legal-section:last-child {
    border-bottom: none;
}

.legal-section h2 {
    color: #1e3c72;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #64b5f6;
    display: inline-block;
}

.legal-section h3 {
    color: #2a5298;
    font-size: 1.2rem;
    margin: 1.5rem 0 0.75rem 0;
}

.legal-section ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.legal-section li {
    margin-bottom: 0.5rem;
}

.contact-info {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #64b5f6;
    margin: 1rem 0;
}

/* Footer */
.site-footer {
    background-color: #1e3c72;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #64b5f6;
}

.footer-section p,
.footer-section a {
    color: #e3f2fd;
    text-decoration: none;
    line-height: 1.6;
}

.footer-section a:hover {
    color: #64b5f6;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #2a5298;
    color: #bbdefb;
}

/* Enhanced Mobile-First Responsive Design */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #1e3c72;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        margin: 0.5rem 0;
        width: 100%;
        border-bottom: 1px solid #2a5298;
    }
    
    .nav-menu a {
        padding: 1rem;
        display: block;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-content .subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .research-areas {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .site-title {
        font-size: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-section {
        padding: 4rem 0;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .card,
    .contact-form {
        padding: 1.5rem;
    }
    
    .submit-btn {
        width: 100%;
        padding: 1rem;
    }
    
    .legal-content {
        padding: 0 1rem;
    }
    
    .legal-section ul {
        padding-left: 1.5rem;
    }
}

/* 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: 0;
}

/* Enhanced accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card,
    .research-item,
    .publication-item {
        border: 2px solid #000;
    }
    
    .cta-button,
    .submit-btn {
        border: 2px solid #000;
    }
}

/* Enhanced focus styles for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 3px solid #64b5f6;
    outline-offset: 2px;
}

/* Skip link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #64b5f6;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Enhanced Physics-themed animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.research-icon {
    animation: float 3s ease-in-out infinite;
    position: relative;
    display: inline-block;
}

.research-icon::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #64b5f6, #2196f3, #1976d2, #0d47a1);
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.research-item:hover .research-icon::before {
    opacity: 0.3;
}

/* Quantum-inspired animations */
@keyframes quantum-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

.research-item:hover,
.card:hover {
    animation: quantum-pulse 2s infinite;
}

/* Mathematical formula styling */
.formula {
    font-family: 'Times New Roman', serif;
    font-style: italic;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border-left: 3px solid #64b5f6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        min-height: auto;
        padding: 0.5rem 0;
        align-items: flex-start;
    }
    
    .site-title {
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
    }
    
    .site-title::before {
        font-size: 1.6rem;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0.25rem;
        width: 100%;
        align-items: stretch;
    }
    
    .nav-menu li {
        width: 100%;
        height: auto;
    }
    
    .nav-menu a {
        width: 100%;
        height: auto;
        padding: 0.6rem 1rem;
        text-align: center;
        font-size: 0.9rem;
        margin: 0;
        border-radius: 4px;
    }
    
    .menu-toggle {
        display: block;
        background: rgba(255,255,255,0.1);
        border: 1px solid rgba(255,255,255,0.2);
        color: white;
        padding: 0.5rem;
        border-radius: 6px;
        backdrop-filter: blur(10px);
    }
    
    .menu-toggle:hover {
        background: rgba(100, 181, 246, 0.9);
    }
    
    .main-navigation.mobile-menu-open .nav-menu {
        display: flex;
    }
    
    .main-navigation:not(.mobile-menu-open) .nav-menu {
        display: none;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-content .subtitle {
        font-size: 1.1rem;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .research-areas {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .site-header {
        padding: 0.5rem 0;
    }
    
    .site-title {
        font-size: 1.2rem;
    }
    
    .nav-menu a {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .hero-section {
        padding: 4rem 0;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .card {
        padding: 1.5rem;
    }
}

/* Enhanced Print styles */
@media print {
    .site-header,
    .site-footer,
    .menu-toggle,
    .contact-form {
        display: none;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .hero-section {
        background: none;
        color: #333;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    .card,
    .research-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}