/* Memorial Website for Professor Hamid Ahmad Khan */

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #2d2d2d;
    --accent-color: #000000;
    --light-bg: #f5f5f0;
    --white: #ffffff;
    --text-dark: #1a1a1a;
    --text-light: #4a4a4a;
    --border-color: #d0d0d0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.25);
}

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

body {
    font-family: 'Georgia', 'Garamond', 'Times New Roman', serif;
    line-height: 1.9;
    color: var(--text-dark);
    background-color: var(--light-bg);
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 1.9em,
            rgba(0, 0, 0, 0.02) 1.9em,
            rgba(0, 0, 0, 0.02) calc(1.9em + 1px)
        );
}

/* Header Styles */
.site-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 2.5rem 0;
    border-bottom: 4px double #000;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.site-title {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: 'Georgia', serif;
}

.site-subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    font-style: italic;
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* Navigation */
.main-nav {
    background-color: var(--white);
    border-top: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 99;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.nav-toggle span {
    width: 32px;
    height: 3px;
    background-color: var(--text-dark);
    transition: all 0.3s ease-in-out;
    transform-origin: center;
    border-radius: 3px;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(14.5px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-14.5px) rotate(-45deg);
}

.nav-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 0;
}

.nav-list li a {
    color: var(--text-dark);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.2s ease;
    border-radius: 0;
    font-family: 'Georgia', serif;
    font-size: 0.9rem;
    min-height: 44px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: 2px solid transparent;
}

.nav-list li a:hover,
.nav-list li a.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Main Content Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Hero Section */
.hero-section {
    background-color: var(--white);
    border-radius: 8px;
    padding: 3rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
    text-align: center;
}

.hero-image {
    margin: 2rem auto;
    max-width: 350px;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.hero-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 400;
}

.hero-years {
    font-size: 1.3rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.hero-description {
    font-size: 1.15rem;
    line-height: 2;
    color: var(--text-dark);
    max-width: 900px;
    margin: 0 auto;
    text-align: justify;
}

/* Content Sections */
.content-section {
    background-color: var(--white);
    border-radius: 0;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.section-title {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px double var(--primary-color);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: 'Georgia', serif;
}

.section-subtitle {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin: 2rem 0 1rem 0;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Cards */
.card {
    background-color: var(--white);
    border-radius: 0;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
    border: 2px solid var(--primary-color);
}

.card:hover {
    box-shadow: var(--shadow-hover);
    background-color: var(--light-bg);
}

.card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.card p {
    color: var(--text-dark);
    line-height: 1.9;
}

/* Book/Writing Items */
.writing-item {
    background-color: var(--white);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 0;
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--primary-color);
    transition: all 0.2s ease;
}

.writing-item:hover {
    background-color: var(--light-bg);
    box-shadow: var(--shadow);
    border-left-width: 5px;
}

.writing-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.writing-item .year {
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.writing-item .description {
    color: var(--text-dark);
    line-height: 1.9;
}

.writing-item a {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.2s ease;
}

.writing-item a:hover {
    color: var(--text-light);
}

/* Photo Gallery */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.photo-item:hover {
    box-shadow: var(--shadow-hover);
    transform: scale(1.03);
}

.photo-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: var(--white);
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.photo-item:hover .photo-caption {
    transform: translateY(0);
}

/* Links Section */
.link-list {
    list-style: none;
    margin-top: 1.5rem;
}

.link-list li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}

.link-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

.link-list li a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.05rem;
    transition: all 0.3s ease;
}

.link-list li a:hover {
    color: var(--accent-color);
    padding-left: 0.5rem;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 2rem auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-family: 'Arial', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

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

.btn {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 3rem;
    margin-top: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--accent-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -3.45rem;
    top: 0.5rem;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: var(--accent-color);
    border: 3px solid var(--white);
    box-shadow: 0 0 0 3px var(--accent-color);
}

.timeline-year {
    font-weight: bold;
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.timeline-content {
    background-color: var(--light-bg);
    padding: 1.5rem;
    border-radius: 6px;
}

/* Footer */
.site-footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-note {
    margin-bottom: 1rem;
    opacity: 0.9;
}

.footer-note a {
    color: var(--accent-color);
    text-decoration: none;
}

.footer-note a:hover {
    text-decoration: underline;
}

/* Notice/Alert Box */
.notice {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 4px;
}

.notice a {
    color: var(--primary-color);
    font-weight: 500;
}

/* Tribute Quote */
.tribute-quote {
    background-color: var(--white);
    border: 2px solid var(--primary-color);
    border-left: 5px solid var(--primary-color);
    padding: 2rem;
    margin: 2rem 0;
    font-style: italic;
    font-size: 1.2rem;
    text-align: center;
    border-radius: 0;
    line-height: 1.9;
    font-family: 'Georgia', serif;
}

.tribute-author {
    margin-top: 1rem;
    font-weight: 700;
    font-style: normal;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .site-header {
        padding: 1.5rem 0;
    }

    .site-title {
        font-size: 1.8rem;
    }

    .site-subtitle {
        font-size: 1rem;
    }

    .nav-container {
        padding: 0.75rem 1rem;
        display: block;
        position: relative;
        min-height: 50px;
    }

    .nav-toggle {
        display: flex;
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        z-index: 102;
        padding: 0.5rem;
        margin: 0;
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        border-top: 1px solid var(--border-color);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .nav-list.active {
        max-height: 500px;
        padding: 0.5rem 0;
    }

    .nav-list li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-list li:last-child {
        border-bottom: none;
    }

    .nav-list li a {
        padding: 1rem 1.5rem;
        border-radius: 0;
        width: 100%;
    }

    .nav-list li a:hover,
    .nav-list li a.active {
        transform: none;
    }

    .hero-section {
        padding: 2rem 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .container {
        padding: 2rem 1rem;
    }

    .content-section {
        padding: 1.5rem;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .timeline {
        padding-left: 2rem;
    }

    .timeline-item::before {
        left: -2.45rem;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 1.5rem;
    }

    .site-subtitle {
        font-size: 0.9rem;
    }

    .header-content {
        padding: 0 1rem;
    }

    .container {
        padding: 1.5rem 0.75rem;
    }

    .content-section {
        padding: 1.25rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }
}

/* Print Styles */
@media print {
    .main-nav,
    .site-footer {
        display: none;
    }

    .container {
        max-width: 100%;
    }
}
