/* ===================================
   PROFESSIONAL PORTFOLIO STYLESHEET
   Conservative Color Scheme: Navy, Charcoal, White
   =================================== */

/* === ROOT VARIABLES === */
:root {
    /* Color Palette - Conservative Professional */
    --primary-color: #1e3a5f;        /* Navy Blue */
    --primary-dark: #152a45;         /* Darker Navy */
    --secondary-color: #2c3e50;      /* Charcoal */
    --accent-color: #3498db;         /* Professional Blue */
    --text-dark: #2c3e50;            /* Dark Gray */
    --text-light: #6c757d;           /* Medium Gray */
    --background-white: #ffffff;     /* White */
    --background-light: #f8f9fa;     /* Light Gray */
    --border-color: #dee2e6;         /* Border Gray */

    /* Typography */
    --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;

    /* Other */
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* === RESET & BASE STYLES === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #ffffff;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    min-height: 100vh;
    min-height: -webkit-fill-available;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: var(--spacing-sm);
}

a {
    text-decoration: none;
    color: var(--accent-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    -webkit-transform: translateZ(0);
}

/* Safari-specific fixes */
@supports (-webkit-touch-callout: none) {
    body {
        min-height: -webkit-fill-available;
    }
    
    img {
        -webkit-backface-visibility: hidden;
    }
}

ul {
    list-style-position: inside;
}

/* === LAYOUT === */
.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    box-sizing: border-box;
}

.section {
    padding: var(--spacing-xl) 0;
}

.section-alt {
    background-color: var(--background-light);
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    font-size: 2.5rem;
    color: var(--primary-color);
    position: relative;
    padding-bottom: var(--spacing-sm);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
}

/* === NAVIGATION === */
#navbar {
    background-color: var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--box-shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    color: var(--background-white);
    font-size: 1.3rem;
    font-weight: 600;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
}

.nav-link {
    color: var(--background-white);
    font-weight: 500;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.nav-link:hover {
    background-color: var(--primary-dark);
    color: var(--background-white);
}

/* === HERO SECTION === */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--background-white);
    padding: var(--spacing-xl) 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xl);
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.hero-image-large {
    flex-shrink: 0;
}

.headshot-large {
    width: 320px;
    height: 400px;
    object-fit: cover;
    object-position: top center;
    border-radius: 16px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.hero-text {
    max-width: 550px;
}

.hero-title {
    color: var(--background-white);
    font-size: 3.2rem;
    margin-bottom: var(--spacing-xs);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 1.15rem;
    margin-bottom: var(--spacing-md);
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-lg);
    line-height: 1.7;
    color: var(--background-light);
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

/* Legacy support for old headshot class */
.hero-image {
    margin-bottom: var(--spacing-md);
}

.headshot {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--background-white);
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 12px 30px;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--background-white);
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
    color: var(--background-white);
}

.btn-secondary {
    background-color: transparent;
    color: var(--background-white);
    border-color: var(--background-white);
}

.btn-secondary:hover {
    background-color: var(--background-white);
    color: var(--primary-color);
}

.github-icon {
    display: inline-block;
    vertical-align: middle;
}

/* === ABOUT SECTION === */
.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    max-width: 900px;
    margin: 0 auto;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-md);
}

.quote-box {
    background-color: var(--background-light);
    padding: var(--spacing-md);
    border-left: 4px solid var(--accent-color);
    border-radius: var(--border-radius);
}

.quote-box blockquote {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-light);
    margin: 0;
}

.quote-box footer {
    margin-top: var(--spacing-sm);
    font-size: 1rem;
    color: var(--text-dark);
    font-style: normal;
}

/* === THESIS SECTION === */
.thesis-content {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    background-color: #ffffff;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    -webkit-overflow-scrolling: touch;
}

.thesis-content h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: var(--spacing-xs);
}

.thesis-institution {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
}

.thesis-description {
    margin-bottom: var(--spacing-md);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.thesis-description h4 {
    margin-top: var(--spacing-md);
    color: var(--secondary-color);
}

.thesis-description ul {
    margin-left: var(--spacing-md);
    color: var(--text-dark);
}

.thesis-links {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    margin-top: var(--spacing-md);
}

/* === MILITARY SECTION === */
.military-content {
    max-width: 900px;
    margin: 0 auto;
}

.timeline {
    position: relative;
    padding-left: var(--spacing-lg);
}

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

.timeline-item {
    position: relative;
    margin-bottom: var(--spacing-lg);
}

.timeline-marker {
    position: absolute;
    left: -43px;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--accent-color);
    border: 3px solid var(--background-white);
    box-shadow: 0 0 0 3px var(--accent-color);
}

.timeline-content {
    background-color: var(--background-white);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
}

.timeline-date {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-sm);
}

.timeline-content ul {
    margin-left: var(--spacing-md);
    margin-top: var(--spacing-sm);
}

/* === PROJECTS SECTION === */
.coming-soon-banner {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    color: var(--background-white);
    text-align: center;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--box-shadow);
}

.banner-text {
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.projects-placeholder {
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-md);
    background-color: var(--background-white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.projects-placeholder p {
    font-size: 1.1rem;
    color: var(--text-dark);
    max-width: 600px;
    margin: 0 auto;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.project-card {
    background-color: var(--background-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.project-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: var(--background-light);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-content {
    padding: var(--spacing-md);
}

.project-content h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.project-description {
    color: var(--text-dark);
    margin-bottom: var(--spacing-md);
}

.project-tags {
    display: flex;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-md);
}

.tag {
    background-color: var(--accent-color);
    color: var(--background-white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.project-links {
    display: flex;
    gap: var(--spacing-sm);
}

.project-link {
    color: var(--accent-color);
    font-weight: 600;
    transition: var(--transition);
}

.project-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* === CONTACT SECTION === */
.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-content p {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-lg);
    color: var(--text-dark);
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.contact-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--primary-color);
    color: var(--background-white);
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 600;
}

.contact-link:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
    color: var(--background-white);
}

/* === FOOTER === */
.footer {
    background-color: var(--secondary-color);
    color: var(--background-light);
    text-align: center;
    padding: var(--spacing-lg) 0;
}

.footer p {
    margin-bottom: var(--spacing-xs);
}

/* === MULTI-PAGE STYLES === */
.page-section {
    padding-top: calc(4rem + 70px);
    padding-top: -webkit-calc(4rem + 70px);
    min-height: calc(100vh - 150px);
    min-height: -webkit-calc(100vh - 150px);
}

.section-intro {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto var(--spacing-lg);
}

/* Nav Logo as Link */
.nav-logo {
    color: var(--background-white);
    font-size: 1.3rem;
    font-weight: 600;
    text-decoration: none;
}

.nav-logo:hover {
    color: var(--background-light);
}

/* Active Nav Link */
.nav-link.active {
    background-color: var(--primary-dark);
}

/* === ABOUT PAGE STYLES === */
.education-section,
.skills-section {
    margin-top: var(--spacing-xl);
}

.education-section h2,
.skills-section h2 {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    color: var(--primary-color);
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.education-card {
    background-color: var(--background-light);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--accent-color);
}

.education-card h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
}

.education-card .degree {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--spacing-xs);
}

.education-card .certificate {
    color: var(--text-light);
    font-size: 0.95rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.skill-category {
    background-color: var(--background-light);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
}

.skill-category h4 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
    padding-bottom: var(--spacing-xs);
    border-bottom: 2px solid var(--accent-color);
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    padding: var(--spacing-xs) 0;
    color: var(--text-dark);
    position: relative;
    padding-left: 1.2rem;
}

.skill-category li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* === THESIS PAGE STYLES === */
.thesis-main-title {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: var(--spacing-sm);
    text-align: center;
}

.thesis-advisors {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: var(--spacing-lg);
}

.thesis-institution.centered,
.thesis-advisors.centered {
    text-align: center;
}

.thesis-description h3 {
    color: var(--primary-color);
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
}

.findings-grid {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 3rem 0;
}

.finding-card {
    -webkit-box-flex: 1;
    -ms-flex: 1 1 250px;
    flex: 1 1 250px;
    min-width: 200px;
    max-width: 100%;
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    border-top: 4px solid #3498db;
    box-sizing: border-box;
}

.finding-stat {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

.finding-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--spacing-sm);
}

.finding-card p {
    font-size: 0.95rem;
    color: var(--text-dark);
}

/* Limitation Callout Box */
.limitation-callout {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
    border: 1px solid #ffc107;
    border-left: 4px solid #ffc107;
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    margin: var(--spacing-md) 0;
}

.limitation-callout h4 {
    color: #856404;
    margin-bottom: var(--spacing-sm);
    font-size: 1.1rem;
}

.limitation-callout p {
    color: #856404;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Thesis Figures */
.thesis-figures {
    margin: var(--spacing-lg) 0;
}

.thesis-figure {
    margin-bottom: var(--spacing-lg);
    background-color: var(--background-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.thesis-figure img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: var(--transition);
}

.thesis-figure img:hover {
    opacity: 0.95;
}

.thesis-figure figcaption {
    padding: var(--spacing-md);
    font-size: 0.95rem;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--background-white);
    border-top: 1px solid var(--border-color);
}

.thesis-figure figcaption strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: var(--spacing-xs);
    font-size: 1rem;
}

/* === MILITARY PAGE STYLES === */

/* Military Hero Banner */
.military-hero {
    position: relative;
    height: 50vh;
    min-height: 350px;
    overflow: hidden;
    margin-top: 70px;
}

.military-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.military-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.85) 0%, rgba(44, 62, 80, 0.75) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--background-white);
    padding: var(--spacing-md);
}

.military-hero-overlay h1 {
    font-size: 3.5rem;
    color: var(--background-white);
    margin-bottom: var(--spacing-sm);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.military-hero-overlay p {
    font-size: 1.4rem;
    color: var(--background-light);
    margin: 0;
}

/* Photo Gallery - New Symmetrical Layout */
.photo-gallery-section {
    background-color: var(--secondary-color);
    padding: var(--spacing-lg) 0;
}

.photo-gallery-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    max-width: 900px;
    margin: 0 auto;
}

.gallery-row {
    display: flex;
    gap: var(--spacing-xs);
}

.gallery-row-centered {
    justify-content: center;
}

.gallery-row-centered .gallery-item {
    flex: 0 1 calc(50% - var(--spacing-xs) / 2);
    max-width: 300px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    cursor: pointer;
    flex: 1;
}

.gallery-item.gallery-full {
    flex: 1;
}

.gallery-row-portraits {
    justify-content: center;
    gap: var(--spacing-md);
}

.gallery-item.gallery-portrait {
    flex: 0 1 auto;
    max-width: 280px;
}

.gallery-item.gallery-portrait img {
    height: 350px;
    object-fit: contain;
    background-color: var(--primary-dark);
}

.gallery-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item.gallery-full img {
    height: 280px;
    object-position: center;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    color: var(--background-white);
    padding: var(--spacing-lg) var(--spacing-sm) var(--spacing-sm);
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
}

/* Highlights Section */
.highlights-section {
    background-color: var(--background-light);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-xl);
    border-left: 4px solid var(--accent-color);
}

.highlights-section h2 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

.highlights-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.highlights-list li {
    padding: var(--spacing-sm) 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-dark);
    line-height: 1.6;
    border-bottom: 1px solid var(--border-color);
}

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

.highlights-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

.qualifications-section {
    margin-bottom: var(--spacing-xl);
}

.qualifications-section h2 {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    color: var(--primary-color);
}

.quals-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-sm);
}

.qual-badge {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--background-white);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 180px;
}

.qual-title {
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
}

.qual-year {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 4px;
}

.military-content h2 {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    color: var(--primary-color);
}

/* === PROJECTS PAGE STYLES === */
.future-vision {
    margin-top: var(--spacing-xl);
}

.future-vision h2 {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    color: var(--primary-color);
}

.vision-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.vision-card {
    background-color: var(--background-white);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

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

.vision-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.vision-card h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.vision-card p {
    color: var(--text-dark);
    font-size: 0.95rem;
}

.projects-cta {
    margin-top: var(--spacing-xl);
    text-align: center;
    background-color: var(--background-white);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.projects-cta h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.projects-cta p {
    color: var(--text-dark);
    margin-bottom: var(--spacing-md);
}

/* === CONTACT PAGE STYLES === */
.contact-intro {
    font-size: 1.2rem;
    text-align: center;
    max-width: 600px;
    margin: 0 auto var(--spacing-xl);
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.contact-card {
    background-color: var(--background-light);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    text-align: center;
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid transparent;
}

.contact-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
}

.contact-icon {
    color: var(--accent-color);
    margin-bottom: var(--spacing-sm);
}

.contact-card h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
}

.contact-card p {
    color: var(--text-dark);
    margin: 0;
}

.contact-location {
    text-align: center;
    padding: var(--spacing-lg);
    background-color: var(--background-light);
    border-radius: var(--border-radius);
}

.contact-location h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.availability-note {
    color: var(--accent-color);
    font-weight: 600;
    margin-top: var(--spacing-sm);
}

/* === CONTACT FORM STYLES === */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: var(--spacing-lg);
    align-items: start;
}

.contact-form-wrapper {
    background-color: var(--background-white);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.contact-form-wrapper h2 {
    margin-bottom: var(--spacing-xs);
}

.form-intro {
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
}

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

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

.form-group label {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: var(--spacing-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

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

.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    width: 100%;
}

.form-note {
    font-size: 0.85rem;
    color: var(--text-light);
    text-align: center;
    margin: 0;
}

.form-success {
    text-align: center;
    padding: var(--spacing-lg);
}

.success-icon {
    width: 60px;
    height: 60px;
    background-color: #28a745;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto var(--spacing-md);
}

/* Contact Sidebar */
.contact-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.sidebar-card {
    background-color: var(--background-light);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--accent-color);
}

.sidebar-card h3 {
    margin-bottom: var(--spacing-sm);
    font-size: 1.1rem;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.social-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    background-color: var(--background-white);
    border-radius: var(--border-radius);
    color: var(--text-dark);
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--primary-color);
    color: white;
}

.social-link svg {
    flex-shrink: 0;
}

.location-card {
    text-align: center;
    border-left: none;
    border-top: 4px solid var(--accent-color);
}

.location-icon {
    color: var(--accent-color);
    margin-bottom: var(--spacing-sm);
}

.location-detail {
    color: var(--text-light);
    font-size: 0.9rem;
}

.availability-card {
    border-left: none;
    border-top: 4px solid #28a745;
}

.availability-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    background-color: rgba(40, 167, 69, 0.1);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 20px;
    margin-bottom: var(--spacing-sm);
    color: #28a745;
    font-weight: 600;
    font-size: 0.9rem;
}

.pulse {
    width: 8px;
    height: 8px;
    background-color: #28a745;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

.availability-card p {
    font-size: 0.9rem;
    color: var(--text-dark);
    margin: 0;
}

/* === MOBILE HAMBURGER MENU === */
.nav-toggle {
    display: none;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-justify-content: space-between;
    -ms-flex-pack: justify;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
    -webkit-transform: rotate(45deg) translate(5px, 5px);
    -ms-transform: rotate(45deg) translate(5px, 5px);
    transform: rotate(45deg) translate(5px, 5px);
}

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

.nav-toggle.active span:nth-child(3) {
    -webkit-transform: rotate(-45deg) translate(7px, -6px);
    -ms-transform: rotate(-45deg) translate(7px, -6px);
    transform: rotate(-45deg) translate(7px, -6px);
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    /* Navigation - Mobile Hamburger */
    .nav-toggle {
        display: -webkit-flex;
        display: flex;
    }

    .nav-container {
        position: relative;
    }

    .nav-menu {
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background-color: #1e3a5f;
        -webkit-flex-direction: column;
        -ms-flex-direction: column;
        flex-direction: column;
        -webkit-align-items: center;
        -ms-flex-align: center;
        align-items: center;
        gap: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        -webkit-transition: max-height 0.3s ease, padding 0.3s ease;
        transition: max-height 0.3s ease, padding 0.3s ease;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        z-index: 1000;
    }

    .nav-menu.active {
        max-height: 400px;
        padding: 1rem 0;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
    }

    .nav-link {
        display: block;
        padding: 1rem 2rem;
        border-radius: 0;
    }

    .nav-link:hover,
    .nav-link.active {
        background-color: #152a45;
    }

    /* Hero */
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-lg);
    }

    .hero-text {
        max-width: 100%;
    }

    .headshot-large {
        width: 240px;
        height: 300px;
    }

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

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

    .hero-description {
        font-size: 1rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .headshot {
        width: 150px;
        height: 150px;
    }

    /* Sections */
    .section {
        padding: 2rem 0;
    }

    .page-section {
        padding-top: calc(2rem + 70px);
        padding-top: -webkit-calc(2rem + 70px);
    }

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

    .section-intro {
        font-size: 1rem;
        text-align: left;
        padding: 0 1rem;
    }

    /* Container padding on mobile */
    .container {
        padding: 0 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    /* Timeline */
    .timeline {
        padding-left: var(--spacing-md);
    }

    .timeline-marker {
        left: -27px;
        width: 12px;
        height: 12px;
    }

    .timeline-content {
        padding: var(--spacing-sm);
    }

    .timeline-content h3 {
        font-size: 1.1rem;
    }

    /* Projects */
    .projects-grid {
        grid-template-columns: 1fr;
    }

    /* Grids */
    .education-grid,
    .skills-grid,
    .findings-grid,
    .vision-grid,
    .contact-cards,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-form-wrapper {
        padding: var(--spacing-md);
    }

    .sidebar-card {
        padding: var(--spacing-sm);
    }

    .quals-grid {
        flex-direction: column;
        align-items: center;
    }

    .qual-badge {
        width: 100%;
        max-width: 300px;
    }

    /* Military Hero */
    .military-hero {
        height: 40vh;
        min-height: 250px;
        margin-top: 70px;
    }

    .military-hero-overlay h1 {
        font-size: 2rem;
    }

    .military-hero-overlay p {
        font-size: 1rem;
    }

    /* Photo Gallery - Mobile */
    .photo-gallery-grid {
        gap: var(--spacing-xs);
    }

    .gallery-row {
        flex-direction: column;
        gap: var(--spacing-xs);
    }

    .gallery-row-portraits {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--spacing-sm);
    }

    .gallery-item.gallery-portrait {
        max-width: 45%;
        flex: 0 1 45%;
    }

    .gallery-item.gallery-portrait img {
        height: 280px;
    }

    .gallery-row-centered {
        align-items: center;
    }

    .gallery-row-centered .gallery-item {
        flex: none;
        width: 100%;
        max-width: none;
    }

    .gallery-item img {
        height: auto;
        max-height: 200px;
        object-fit: contain;
        background-color: var(--primary-dark);
    }

    .gallery-item.gallery-full img {
        max-height: 240px;
        object-fit: contain;
    }

    .gallery-caption {
        opacity: 1;
        position: relative;
        background: rgba(0, 0, 0, 0.8);
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.8rem;
    }

    /* Highlights section on mobile */
    .highlights-section {
        padding: var(--spacing-md);
    }

    .highlights-list li {
        font-size: 0.95rem;
    }

    /* Thesis content on mobile */
    .thesis-content {
        padding: 1rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .thesis-main-title {
        font-size: 1.3rem;
        line-height: 1.3;
        word-wrap: break-word;
    }

    .thesis-institution,
    .thesis-advisors {
        font-size: 0.9rem;
    }

    .thesis-content h3 {
        font-size: 1.2rem;
        margin-top: 2rem;
    }

    .thesis-description {
        padding: 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    .thesis-description p {
        font-size: 0.95rem;
        word-wrap: break-word;
    }

    .thesis-description ul {
        font-size: 0.95rem;
        padding-left: 1rem;
    }

    .thesis-description ul li {
        margin-bottom: 0.5rem;
    }

    /* Limitation callout mobile */
    .limitation-callout {
        padding: 1rem;
        margin: 1rem 0;
        width: 100%;
        box-sizing: border-box;
    }

    .limitation-callout h4 {
        font-size: 1rem;
    }

    .limitation-callout p {
        font-size: 0.85rem;
    }

    /* Findings grid mobile */
    .findings-grid {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-flex-direction: column;
        -ms-flex-direction: column;
        flex-direction: column;
        gap: 1rem;
    }

    .finding-card {
        padding: 1rem;
        width: 100%;
        min-width: auto;
        box-sizing: border-box;
    }

    .finding-stat {
        font-size: 1.8rem;
    }

    .finding-label {
        font-size: 0.8rem;
    }

    .finding-card p {
        font-size: 0.85rem;
    }

    /* Thesis figures mobile */
    .thesis-figures {
        margin: 2rem 0;
        width: 100%;
    }

    .thesis-figure {
        margin-bottom: 2rem;
        width: 100%;
        box-sizing: border-box;
    }

    .thesis-figure img {
        max-width: 100%;
        width: 100%;
        height: auto;
        display: block;
    }

    .thesis-figure figcaption {
        padding: 1rem;
        font-size: 0.85rem;
    }

    .thesis-figure figcaption strong {
        font-size: 0.9rem;
    }

    /* Thesis links button */
    .thesis-links {
        padding: var(--spacing-sm) 0;
    }

    .thesis-links .btn {
        width: 100%;
        justify-content: center;
        font-size: 0.95rem;
    }

    /* About text */
    .about-text p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
        width: 100%;
        box-sizing: border-box;
    }

    .hero-section {
        padding: 3rem 0;
        min-height: auto;
    }

    .headshot-large {
        width: 200px;
        height: 250px;
    }

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

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

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

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    /* Photo Gallery on small phones */
    .gallery-row-portraits {
        flex-direction: column;
        align-items: center;
    }

    .gallery-item.gallery-portrait {
        max-width: 200px;
        flex: 0 1 auto;
    }

    .gallery-item.gallery-portrait img {
        height: 260px;
    }

    .gallery-item img {
        max-height: 180px;
    }

    .gallery-item.gallery-full img {
        max-height: 200px;
    }

    /* Smaller section titles */
    .section-title {
        font-size: 1.5rem;
    }

    .military-hero-overlay h1 {
        font-size: 1.6rem;
    }

    .military-hero-overlay p {
        font-size: 0.9rem;
    }

    /* Thesis on extra small phones */
    .thesis-main-title {
        font-size: 1.1rem;
    }

    .thesis-content h3 {
        font-size: 1.1rem;
    }

    .finding-stat {
        font-size: 1.5rem;
    }

    .thesis-figure figcaption {
        font-size: 0.8rem;
        line-height: 1.5;
    }

    .limitation-callout p {
        font-size: 0.8rem;
    }

    /* Thesis on extra small phones - additional */
    .thesis-content {
        padding: 0.75rem;
    }

    .thesis-description {
        padding: 0.5rem;
    }

    .limitation-callout {
        padding: 0.75rem;
    }

    .finding-card {
        padding: 0.75rem;
    }

    /* Contact form on small phones */
    .contact-form-wrapper {
        padding: 1rem;
    }

    .contact-form {
        gap: 1rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
}
