/* ===================================
   SHAZMA GAFFOOR - PORTFOLIO
   Editorial & Refined Aesthetic
   =================================== */

:root {
    /* Sophisticated Color Palette */
    --color-cream: #FAF7F2;
    --color-charcoal: #2B2B2B;
    --color-slate: #515B5F;
    --color-sage: #9BA590;
    --color-terracotta: #C4907A;
    --color-warm-white: #FFFFFF;
    --color-border: #D4CDC3;
    --color-accent: #8B7355;
    
    /* Typography Scale */
    --font-display: 'Cormorant Garamond', 'Georgia', serif;
    --font-body: 'Crimson Text', 'Georgia', serif;
    --font-secondary: 'Source Serif 4', 'Georgia', serif;
    
    /* Spacing System */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
    
    /* Layout */
    --max-width: 1000px;
    --border-radius: 2px;
}

/* ===================================
   RESET & BASE
   =================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.8;
    color: var(--color-charcoal);
    background: var(--color-cream);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

/* Subtle grain texture overlay */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.03;
    z-index: 9999;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Focus states */
*:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 4px;
}

a:focus {
    outline-color: var(--color-terracotta);
}

/* ===================================
   TYPOGRAPHY
   =================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-charcoal);
    letter-spacing: -0.01em;
}

h1 {
    font-size: 3.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.5rem;
    font-weight: 500;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

p {
    margin-bottom: var(--space-md);
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================
   LAYOUT CONTAINER
   =================================== */

.portfolio-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-lg);
    position: relative;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   HEADER SECTION
   =================================== */

.portfolio-header {
    margin-bottom: var(--space-2xl);
}

.header-content {
    display: grid;
    grid-template-columns: 300px 480px 280px;
    gap: 2.5rem;
    max-width: 1140px;
    margin: 0 auto var(--space-xl) auto;
    align-items: start;
    padding: 0 var(--space-lg);
}

/* Photo Section */
.photo-section {
    position: relative;
}

.photo-frame {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.05),
        0 4px 8px rgba(0, 0, 0, 0.08),
        0 12px 24px rgba(0, 0, 0, 0.06);
}

.photo-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
    pointer-events: none;
    z-index: 1;
}

.headshot {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(20%) contrast(1.05);
}

/* Contact Section */
.contact-section {
    padding-top: var(--space-sm);
}

.name {
    font-size: 3.5rem;
    margin-bottom: var(--space-xs);
    font-weight: 500;
    line-height: 1.1;
}

.title {
    font-family: var(--font-secondary);
    font-size: 1.25rem;
    color: var(--color-slate);
    margin-bottom: var(--space-lg);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 400;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

.contact-item:hover {
    padding-left: var(--space-sm);
    border-bottom-color: var(--color-accent);
}

.contact-item:hover .contact-value {
    color: var(--color-accent);
}

.contact-label {
    font-family: var(--font-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-slate);
    font-weight: 600;
}

.contact-value {
    font-size: 1.1rem;
    color: var(--color-charcoal);
    font-weight: 400;
}

/* Contact Info Display (Static) */
.contact-info-display {
    margin-bottom: var(--space-lg);
}

.contact-static-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--space-sm);
}

.contact-static-item:last-child {
    margin-bottom: 0;
}

/* LinkedIn Button */
.linkedin-button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.5rem;
    background: #0077B5;
    color: white;
    border-radius: 6px;
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-bottom: var(--space-md);
    box-shadow: 0 2px 8px rgba(0, 119, 181, 0.2);
}

.linkedin-button:hover {
    background: #005885;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 119, 181, 0.3);
}

.linkedin-button svg {
    flex-shrink: 0;
}

/* Contact Form Toggle Button */
.contact-form-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.5rem;
    background: var(--color-accent);
    color: white;
    border: none;
    border-radius: 6px;
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(139, 115, 85, 0.2);
}

.contact-form-toggle:hover {
    background: var(--color-terracotta);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 115, 85, 0.3);
}

.contact-form-toggle svg {
    flex-shrink: 0;
}

/* Contact Form Modal */
.contact-form-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(43, 43, 43, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: var(--space-lg);
    overflow-y: auto;
}

.contact-form-modal.active {
    display: flex;
}

.contact-form-container {
    background: var(--color-warm-white);
    border-radius: 12px;
    padding: var(--space-xl);
    max-width: 600px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-form {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: none;
    border: none;
    color: var(--color-charcoal);
    cursor: pointer;
    padding: var(--space-xs);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.close-form:hover {
    background: var(--color-border);
    transform: rotate(90deg);
}

.form-heading {
    font-size: 2rem;
    margin-bottom: var(--space-lg);
    color: var(--color-charcoal);
    font-weight: 600;
}

.contact-web-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.form-group label {
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-charcoal);
}

.required {
    color: var(--color-terracotta);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--color-border);
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-charcoal);
    background: var(--color-warm-white);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.1);
}

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

.submit-button {
    padding: 1rem 2rem;
    background: var(--color-accent);
    color: white;
    border: none;
    border-radius: 6px;
    font-family: var(--font-secondary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(139, 115, 85, 0.2);
    position: relative;
}

.submit-button:hover:not(:disabled) {
    background: var(--color-terracotta);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 115, 85, 0.3);
}

.submit-button:disabled {
    background: var(--color-slate);
    cursor: not-allowed;
    opacity: 0.6;
}

.button-loading {
    display: none;
}

.submit-button.sending .button-text {
    display: none;
}

.submit-button.sending .button-loading {
    display: inline;
}

.form-status {
    padding: var(--space-md);
    border-radius: 6px;
    font-size: 0.95rem;
    text-align: center;
    display: none;
}

.form-status.success {
    display: block;
    background: rgba(155, 165, 144, 0.2);
    color: var(--color-charcoal);
    border: 2px solid var(--color-sage);
}

.form-status.error {
    display: block;
    background: rgba(196, 144, 122, 0.2);
    color: var(--color-charcoal);
    border: 2px solid var(--color-terracotta);
}

/* Divider */
.divider {
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        var(--color-border) 20%,
        var(--color-border) 80%,
        transparent
    );
    margin: var(--space-xl) 0;
}

/* ===================================
   SECTIONS
   =================================== */

.section-inner {
    margin-bottom: var(--space-2xl);
}

.section-heading {
    font-size: 2rem;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-charcoal);
    font-weight: 500;
    letter-spacing: -0.01em;
}

/* About Section */
.about-content {
    max-width: 700px;
}

.lead-paragraph {
    font-size: 1.35rem;
    line-height: 1.7;
    color: var(--color-charcoal);
    margin-bottom: var(--space-lg);
    font-style: italic;
    font-weight: 400;
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-slate);
}

/* Education Section - Compact */
.education-section {
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
}

.education-compact {
    max-width: 800px;
    margin: 0 auto;
}

.education-compact .education-item {
    margin-bottom: var(--space-lg);
}

.education-compact h3 {
    font-size: 1.35rem;
    margin-bottom: var(--space-xs);
    font-weight: 600;
    color: var(--color-charcoal);
}

.education-compact .institution {
    font-family: var(--font-secondary);
    font-size: 1rem;
    color: var(--color-accent);
    margin-bottom: var(--space-xs);
    font-weight: 600;
}

.education-compact .detail {
    font-size: 0.95rem;
    color: var(--color-slate);
    font-style: italic;
}

.awards-compact {
    margin-top: var(--space-md);
    margin-bottom: var(--space-lg);
}

.award-item {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-slate);
    margin-bottom: var(--space-sm);
}

.award-item strong {
    color: var(--color-charcoal);
    font-weight: 600;
}

.award-item a {
    color: var(--color-accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: all 0.3s ease;
}

.award-item a:hover {
    color: var(--color-terracotta);
    text-decoration-thickness: 2px;
}

.additional-qualifications {
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
}

.additional-qualifications p {
    font-size: 0.95rem;
    color: var(--color-slate);
    margin-bottom: var(--space-xs);
}

.additional-qualifications strong {
    color: var(--color-charcoal);
    font-weight: 600;
}

/* Portfolio Section */
.portfolio-intro {
    font-size: 0.95rem;
    color: var(--color-slate);
    margin-bottom: var(--space-lg);
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-style: italic;
}

.portfolio-container-scroll {
    position: relative;
    margin-bottom: var(--space-lg);
}

.portfolio-scroll {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: var(--space-sm) 0;
    margin: 0 3rem;
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar but keep functionality */
.portfolio-scroll::-webkit-scrollbar {
    display: none;
}

.portfolio-scroll {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.portfolio-card {
    flex: 0 0 380px;
    scroll-snap-align: center;
    transition: transform 0.3s ease;
}

.portfolio-card:hover {
    transform: translateY(-8px);
}

.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--color-warm-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
    height: 100%;
}

.card-link:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.card-image {
    width: 100%;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-link:hover .card-overlay {
    opacity: 1;
}

.view-article {
    color: white;
    font-family: var(--font-secondary);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.card-content {
    padding: var(--space-lg);
}

.card-title {
    font-size: 1.35rem;
    margin-bottom: var(--space-sm);
    line-height: 1.4;
    color: var(--color-charcoal);
    font-weight: 600;
}

.card-meta {
    font-family: var(--font-secondary);
    font-size: 0.85rem;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-sm);
    font-weight: 600;
}

.card-description {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-slate);
    margin-bottom: 0;
}

/* Navigation Arrows */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-warm-white);
    border: 2px solid var(--color-border);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    color: var(--color-charcoal);
}

.nav-arrow:hover {
    background: var(--color-charcoal);
    border-color: var(--color-charcoal);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.nav-arrow-left {
    left: 0;
}

.nav-arrow-right {
    right: 0;
}

/* Scroll Indicators */
.scroll-indicators {
    display: flex;
    justify-content: center;
    gap: var(--space-xs);
    margin-top: var(--space-lg);
}

.scroll-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-border);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.scroll-indicator:hover {
    background: var(--color-sage);
    transform: scale(1.2);
}

.scroll-indicator.active {
    background: var(--color-accent);
    width: 24px;
    border-radius: 4px;
}

/* ===================================
   FEATURED PUBLICATIONS SECTION
   =================================== */

.featured-publication-section {
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
}

.magazines-container-scroll {
    position: relative;
    margin-bottom: var(--space-lg);
}

.magazines-scroll {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: var(--space-sm) 0;
    margin: 0 3rem;
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar but keep functionality */
.magazines-scroll::-webkit-scrollbar {
    display: none;
}

.magazines-scroll {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.magazine-card {
    flex: 0 0 600px;
    scroll-snap-align: center;
    background: var(--color-warm-white);
    border-radius: 8px;
    padding: var(--space-lg);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.magazine-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.magazine-info {
    margin-bottom: var(--space-md);
    text-align: center;
}

.magazine-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-xs);
    color: var(--color-charcoal);
    font-weight: 600;
}

.magazine-meta {
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.issuu-embed-container {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.issuu-embed-container iframe {
    display: block;
}

/* ===================================
   ADVOCACY SECTION
   =================================== */

.advocacy-section {
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
}

.advocacy-intro {
    font-size: 0.95rem;
    color: var(--color-slate);
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-xl);
    font-style: italic;
}

/* Featured Podcast */
.advocacy-featured {
    max-width: 700px;
    margin: 0 auto var(--space-2xl);
    text-align: center;
}

.feature-label {
    font-family: var(--font-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.podcast-embed {
    background: var(--color-warm-white);
    padding: var(--space-lg);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--color-border);
}

.podcast-embed iframe {
    margin: 0 auto;
    display: block;
}

/* Articles Grid */
.advocacy-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    max-width: 1100px;
    margin: 0 auto;
}

/* Make the third card (if it exists and is the only one in its row) span full width */
.advocacy-card:nth-child(3):last-child {
    grid-column: 1 / -1;
    max-width: 100%;
}

/* When there's a third card spanning full width, make its layout horizontal */
.advocacy-card:nth-child(3):last-child .advocacy-link {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.advocacy-card:nth-child(3):last-child .advocacy-image {
    height: 100%;
    min-height: 400px;
}

.advocacy-card:nth-child(3):last-child .advocacy-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-xl);
}

.advocacy-card {
    background: var(--color-warm-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.advocacy-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.advocacy-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.advocacy-image {
    width: 100%;
    height: 240px;
    position: relative;
    overflow: hidden;
    background: var(--color-border);
}

.advocacy-image-portrait {
    height: 320px;
}

.advocacy-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

/* Anchor portrait images at the top */
.advocacy-image-portrait .advocacy-img {
    object-position: top center;
}

/* Anchor specific landscape images at the top */
.advocacy-image-top .advocacy-img {
    object-position: top center;
}

.advocacy-link:hover .advocacy-img {
    transform: scale(1.05);
}

.advocacy-overlay {
    position: absolute;
    inset: 0;
    background: rgba(43, 43, 43, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.advocacy-link:hover .advocacy-overlay {
    opacity: 1;
}

.read-article {
    color: white;
    font-family: var(--font-secondary);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.advocacy-content {
    padding: var(--space-lg);
}

.advocacy-meta {
    font-family: var(--font-secondary);
    font-size: 0.8rem;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-sm);
    font-weight: 600;
}

.advocacy-title {
    font-size: 1.35rem;
    line-height: 1.4;
    margin-bottom: var(--space-sm);
    color: var(--color-charcoal);
    font-weight: 600;
}

.advocacy-description {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-slate);
    margin: 0;
}

/* ===================================
   FOOTER
   =================================== */

.portfolio-footer {
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
}

.footer-content {
    text-align: center;
}

.footer-text {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--color-charcoal);
    margin-bottom: var(--space-sm);
    font-style: italic;
}

.footer-copyright {
    font-family: var(--font-secondary);
    font-size: 0.85rem;
    color: var(--color-slate);
    letter-spacing: 0.05em;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 768px) {
    :root {
        --space-xl: 3rem;
        --space-2xl: 4rem;
    }

    .portfolio-container {
        padding: var(--space-xl) var(--space-md);
    }

    .header-content {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .photo-section {
        max-width: 300px;
        margin: 0 auto;
    }

    .name {
        font-size: 2.5rem;
    }

    .section-heading {
        font-size: 1.75rem;
    }

    .lead-paragraph {
        font-size: 1.2rem;
    }

    /* Portfolio mobile styles */
    .portfolio-scroll {
        margin: 0 2rem;
    }

    .portfolio-card {
        flex: 0 0 300px;
    }

    .nav-arrow {
        width: 40px;
        height: 40px;
    }

    .card-title {
        font-size: 1.2rem;
    }

    /* Education compact mobile */
    .award-item {
        font-size: 0.9rem;
    }

    /* Advocacy mobile */
    .advocacy-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .advocacy-card:nth-child(3):last-child {
        grid-column: 1;
    }
    
    .advocacy-card:nth-child(3):last-child .advocacy-link {
        display: block;
    }
    
    .advocacy-card:nth-child(3):last-child .advocacy-image {
        height: 250px;
        min-height: 250px;
    }
    
    .advocacy-card:nth-child(3):last-child .advocacy-content {
        padding: var(--space-lg);
    }

    .podcast-embed {
        padding: var(--space-md);
    }

    .advocacy-image-portrait {
        height: 280px;
    }

    .advocacy-title {
        font-size: 1.2rem;
    }

    /* Featured Publications mobile */
    .magazines-scroll {
        margin: 0 2rem;
    }

    .magazine-card {
        flex: 0 0 500px;
    }

    .magazine-title {
        font-size: 1.3rem;
    }

    /* Contact form mobile */
    .contact-form-container {
        padding: var(--space-lg);
        margin: var(--space-sm);
    }

    .form-heading {
        font-size: 1.75rem;
    }

    .linkedin-button,
    .contact-form-toggle {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }

    .name {
        font-size: 2rem;
    }

    .title {
        font-size: 1rem;
    }

    .contact-value {
        font-size: 1rem;
    }

    .lead-paragraph {
        font-size: 1.1rem;
    }

    body {
        font-size: 16px;
    }

    /* Portfolio extra small styles */
    .portfolio-scroll {
        margin: 0 1rem;
        gap: 1.5rem;
    }

    .portfolio-card {
        flex: 0 0 280px;
    }

    .nav-arrow {
        width: 36px;
        height: 36px;
    }

    .card-image {
        height: 200px;
    }

    .card-content {
        padding: var(--space-md);
    }

    .card-title {
        font-size: 1.1rem;
    }

    .card-description {
        font-size: 0.95rem;
    }

    /* Advocacy extra small */
    .podcast-embed {
        padding: var(--space-sm);
    }

    .advocacy-content {
        padding: var(--space-md);
    }

    .advocacy-image {
        height: 200px;
    }

    .advocacy-image-portrait {
        height: 240px;
    }

    .advocacy-title {
        font-size: 1.1rem;
    }

    .advocacy-description {
        font-size: 0.95rem;
    }

    /* Featured Publications extra small */
    .magazines-scroll {
        margin: 0 1rem;
        gap: 1.5rem;
    }

    .magazine-card {
        flex: 0 0 90vw;
        padding: var(--space-md);
    }

    .magazine-title {
        font-size: 1.2rem;
    }

    .magazine-meta {
        font-size: 0.85rem;
    }

    /* Contact form extra small */
    .contact-form-modal {
        padding: var(--space-md);
    }

    .contact-form-container {
        padding: var(--space-md);
    }

    .form-heading {
        font-size: 1.5rem;
    }

    .close-form {
        top: var(--space-sm);
        right: var(--space-sm);
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --color-cream: #FFFFFF;
        --color-charcoal: #000000;
        --color-slate: #333333;
    }

    .divider,
    .contact-item {
        border-color: #000000;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
        color: black;
    }

    .grain-overlay {
        display: none;
    }

    .portfolio-container {
        max-width: 100%;
        padding: 0;
    }

    .photo-frame {
        box-shadow: none;
    }

    a {
        color: black;
        text-decoration: underline;
    }

    .contact-item:hover {
        padding-left: 0;
    }
   DESIGN IMPROVEMENTS - CSS UPDATES
   Add this to the bottom of your CSS file
   =================================== */

/* 1. VISUAL IMBALANCE FIX - Option B: Three Column Layout */
/* Header-content defined at line 152 - do not duplicate */

.photo-section {
    grid-column: 1;
    grid-row: 1;
}

.contact-section {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    max-width: 480px;
}

/* New: Contact Details Column */
.contact-details-column {
    grid-column: 3;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: rgba(155, 165, 144, 0.08);
    border-radius: 8px;
    border: 1px solid var(--color-border);
    align-self: start;
    position: sticky;
    top: 2rem;
}

.contact-details-column h3 {
    font-family: var(--font-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-slate);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.contact-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border);
}

.contact-info-item:last-of-type {
    border-bottom: none;
}

.contact-info-label {
    font-family: var(--font-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-slate);
    font-weight: 600;
}

.contact-info-value {
    font-size: 0.95rem;
    color: var(--color-charcoal);
    word-break: break-word;
}

.contact-info-value a {
    color: var(--color-charcoal);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* 2. ICON BUTTON ACCESSIBILITY - Option B: Text with small icons */
.linkedin-button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.625rem 1.25rem;
    background: transparent;
    color: var(--color-charcoal);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.linkedin-button:hover {
    background: #0077B5;
    color: white;
    border-color: #0077B5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 119, 181, 0.2);
}

.linkedin-button svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.linkedin-button span {
    position: static;
    opacity: 1;
    pointer-events: auto;
    background: none;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
    font-family: inherit;
    white-space: nowrap;
    transform: none;
}

.linkedin-button span::before {
    display: none;
}

.contact-form-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.625rem 1.25rem;
    background: transparent;
    color: var(--color-charcoal);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-form-toggle:hover {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 115, 85, 0.2);
}

.contact-form-toggle svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.contact-form-toggle span {
    position: static;
    opacity: 1;
    pointer-events: auto;
    background: none;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
    font-family: inherit;
    white-space: nowrap;
    transform: none;
}

.contact-form-toggle span::before {
    display: none;
}

/* 4. TYPOGRAPHY - Option B: Add tagline under JOURNALIST */
.specialisation-tagline {
    font-family: var(--font-secondary);
    font-size: 0.875rem;
    color: var(--color-slate);
    line-height: 1.6;
    margin-top: 0.25rem;
    font-weight: 400;
}

/* 5. BUTTON STYLING - Option A: Outlined style (already implemented above in #2) */

/* 6. PHOTO TREATMENT - Option A: Subtle shadow */
.photo-frame {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(43, 43, 43, 0.12);
    transition: all 0.3s ease;
    border: none;
}

.photo-frame:hover {
    box-shadow: 0 12px 32px rgba(43, 43, 43, 0.16);
    transform: translateY(-2px);
}

/* 8. SPECIALISATION - Tagline already styled above in #4 */

/* 10. MOBILE OPTIMISATIONS */
@media (max-width: 968px) {
    /* Stack to two columns on tablet */
    .header-content {
        grid-template-columns: 300px 1fr;
        gap: var(--space-lg);
    }
    
    .contact-details-column {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

@media (max-width: 768px) {
    /* Single column on mobile */
    .header-content {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .photo-section {
        max-width: 300px;
        margin: 0 auto;
    }
    
    .contact-details-column {
        grid-column: 1;
        grid-row: auto;
    }
    
    /* Stack buttons vertically on small screens if needed */
    .contact-buttons-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .linkedin-button,
    .contact-form-toggle {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .contact-details-column {
        padding: var(--space-md);
    }
    
    .specialisation-tagline {
        font-size: 0.8rem;
    }
}

/* Ensure buttons are always touch-friendly */
.linkedin-button,
.contact-form-toggle {
    min-height: 44px;
    min-width: 44px;
}
/* ===================================
   QUICK FIX - Add to bottom of CSS
   =================================== */

/* Make contact sidebar sticky and better positioned */
.contact-details-column {
    position: sticky;
    top: 2rem;
    align-self: start;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

/* Better spacing - already defined at line 152 */

/* Ensure content section doesn't get too wide */
.contact-section {
    max-width: 600px;
}

/* Better button styling */
.contact-buttons-row {
    display: flex;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.linkedin-button,
.contact-form-toggle {
    flex: 1;
    max-width: 200px;
}

/* Hide any duplicate contact sections that might appear at bottom */
.portfolio-footer ~ section,
section:last-of-type:has(h2:contains("Contact")) {
    display: none;
}

/* Better mobile stacking */
@media (max-width: 968px) {
    .header-content {
        grid-template-columns: 280px 1fr !important;
        max-width: 100%;
    }
    
    .contact-details-column {
        grid-column: 1 / -1;
        grid-row: 2;
        position: relative;
        top: 0;
        max-height: none;
    }
    
    .contact-section {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .header-content {
        grid-template-columns: 1fr !important;
    }
    
    .linkedin-button,
    .contact-form-toggle {
        max-width: 100%;
    }
}

/* Final polish - better responsive behavior */
@media (max-width: 1200px) {
    .header-content {
        grid-template-columns: 280px 1fr 260px;
        gap: 2rem;
        max-width: 100%;
    }
    
    .contact-section {
        max-width: 100%;
    }
}
