:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #10b981;
    --text-dark: #1f2937;
    --text-medium: #111827;
    --text-light: #6b7280;
    --background: #ffffff;
    --background-alt: #f9fafb;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --primary-color: #2563eb;
    --secondary-color: #60a5fa;
    --accent-color: #34d399;
    --text-dark: #f9fafb;
    --text-medium: #e5e7eb;
    --text-light: #cbd5e1;
    --background: #111827;
    --background-alt: #1f2937;
    --border-color: #374151;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.5);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-dark);
}

h1 {
    font-family: 'Merriweather', serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

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

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

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    font-weight: 500;
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
}

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

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

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

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

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

/* Dark-mode navbar: keep it readable on dark backgrounds */
[data-theme="dark"] .navbar {
    background-color: rgba(17,24,39,0.85);
}

[data-theme="dark"] .nav-menu a,
[data-theme="dark"] .nav-brand {
    color: var(--text-dark);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
}
/* Prevent wrapping of header items (keeps brand + nav/button on single line) */
.navbar .container {
    flex-wrap: nowrap;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

/* Avoid nav items wrapping on tablet/portrait widths */
.nav-menu {
    flex-wrap: nowrap;
}

.nav-menu a,
.btn-contact {
    white-space: nowrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-menu a {
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
}

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

.btn-contact {
    padding: 0.5rem 1.25rem;
    background-color: var(--primary-color);
    color: white !important;
    border-radius: 0.375rem;
}

.btn-contact:hover {
    background-color: #1e40af;
    transform: translateY(-1px);
}

.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 2px;
}

.hero {
    position: relative;
    padding-top: 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-banner {
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    height: 400px;
    overflow: hidden;
    z-index: 0;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    z-index: 0;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(30, 58, 138, 0.6), rgba(255, 255, 255, 0.95));
    z-index: 1;
    pointer-events: none;
}

/* Dark overlay adjustment for better contrast */
[data-theme="dark"] .banner-overlay {
    background: linear-gradient(to bottom, rgba(2,6,23,0.6), rgba(17,24,39,0.95));
}
/* Removed stray closing brace above (fixed parsing issues) */

.hero-content {
    position: relative;
    text-align: center;
    padding: 2rem;
    margin-top: 200px;
    z-index: 5;
}

.profile-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid var(--background);
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 6;
}

.tagline {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--primary-color);
    font-weight: 600;
    margin: 1rem 0;
}

.subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-dark);
    max-width: 600px;
    margin: 1rem auto 2rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

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

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-text .lead {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.about-text p {
    margin-bottom: 1.25rem;
    color: var(--text-dark);
    line-height: 1.8;
}

.about-highlights {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.highlight-card {
    background-color: var(--background-alt);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border-left: 4px solid var(--accent-color);
    transition: var(--transition);
}

.highlight-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.highlight-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.highlight-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.highlight-card p {
    font-size: 0.875rem;
    color: var(--text-dark);
    line-height: 1.5;
}

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

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 3rem;
}

.timeline-marker {
    position: absolute;
    left: 11px;
    top: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 3px solid white;
    box-shadow: var(--shadow-md);
}

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

.timeline-content:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.company-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.company-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 0.375rem;
}

.company-name {
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 0.25rem;
}

.timeline-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.timeline-content .description {
    color: var(--text-dark);
    line-height: 1.7;
}

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

.experience-bullets li {
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 0.75rem;
    padding-left: 0;
}

.experience-bullets li:last-child {
    margin-bottom: 0;
}

.experience-summary {
    background-color: var(--background-alt);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 2px dashed var(--border-color);
}

.experience-summary p {
    color: var(--text-dark);
    line-height: 1.7;
}

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

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.expertise-category {
    background-color: white;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    border-top: 4px solid var(--primary-color);
    transition: var(--transition);
}

.expertise-category:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.expertise-category h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 1.25rem;
}

.expertise-list {
    list-style: none;
}

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

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

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

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

.education-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.education-card {
    background: white;
    padding: 1.5rem 1.25rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.education-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.school-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    display: block;
    border-radius: 0.5rem;
}

.education-left {
    flex: 0 0 100px;
}

.education-right {
    flex: 1 1 auto;
    text-align: left;
}

.education-card + .education-card {
    margin-top: 1rem;
}

.education-card h3 {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.school-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.education-details {
    color: var(--text-dark);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.education-date {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.testimonials-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: white;
}

.testimonials-section .section-title {
    color: white;
}

.testimonials-section .section-title::after {
    background: white;
}

.testimonials-carousel {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    padding: 0 3rem;
}

.testimonial-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.testimonial-card {
    min-width: 100%;
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.testimonial-content {
    margin-bottom: 1.5rem;
}

.testimonial-content p {
    font-size: 1.125rem;
    line-height: 1.8;
    font-style: italic;
    color: rgba(255, 255, 255, 0.95);
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.testimonial-author strong {
    font-size: 1rem;
    color: white;
}

.testimonial-author span {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.carousel-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.carousel-btn.prev {
    left: 0;
}

.carousel-btn.next {
    right: 0;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dot.active {
    background-color: white;
    width: 30px;
    border-radius: 5px;
}

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

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h2 {
    margin-bottom: 1rem;
}

.contact-lead {
    font-size: 1.125rem;
    color: var(--text-dark);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: start;
    gap: 1rem;
}

.contact-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contact-item > div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.contact-item strong {
    font-size: 0.875rem;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-item a,
.contact-item span {
    color: var(--text-dark);
    font-weight: 500;
}

.email-link {
    cursor: pointer;
}

.cta-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: white;
    padding: 2.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-xl);
}

.cta-card h3 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.opportunity-list {
    list-style: none;
    margin-bottom: 1.5rem;
}

.opportunity-list li {
    padding: 0.75rem 0;
    padding-left: 1.75rem;
    position: relative;
    font-size: 1.125rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

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

.opportunity-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    font-weight: bold;
}

.cta-note {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.footer {
    background-color: var(--text-dark);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0.25rem 0;
}

.banner-credit {
    font-size: 0.7rem !important;
    color: rgba(255, 255, 255, 0.5) !important;
    margin-top: 0.5rem !important;
}

.banner-credit a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
}

.banner-credit a:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Dark theme overrides for key content sections */
[data-theme="dark"] .timeline-content,
[data-theme="dark"] .expertise-section,
[data-theme="dark"] .expertise-section .expertise-category,
[data-theme="dark"] .education-card {
    background-color: var(--background-alt);
    color: var(--text-dark);
    border-color: var(--border-color);
}

[data-theme="dark"] .footer {
    background-color: var(--background-alt);
    color: var(--text-dark);
}

[data-theme="dark"] .footer p {
    color: var(--text-light);
}

.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 1101;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

.theme-icon {
    line-height: 1;
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        flex-direction: column;
        background-color: var(--background);
        width: 100%;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
        align-items: flex-start;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    /* Prevent brand and button from wrapping on narrow portrait/tablet views */
    .nav-brand {
        white-space: nowrap;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hamburger {
        flex: 0 0 auto;
    }

    .btn-contact {
        white-space: nowrap;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

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

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .hero-banner {
        height: 300px;
    }

    .hero-content {
        margin-top: 150px;
    }

    .profile-image {
        width: 150px;
        height: 150px;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    /* Keep highlights single-column on small screens */
    .about-highlights {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 10px;
    }

    .timeline-item {
        padding-left: 50px;
    }

    .timeline-marker {
        left: 1px;
    }

    .company-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .expertise-grid {
        grid-template-columns: 1fr;
    }

    .testimonials-carousel {
        padding: 0 2.5rem;
    }

    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 1.25rem;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Dark-mode overrides for mobile nav flyout (mobile-only) */
    [data-theme="dark"] .nav-menu {
        background-color: var(--background-alt);
    }

    [data-theme="dark"] .nav-menu a {
        color: var(--text-dark);
    }

    [data-theme="dark"] .nav-menu .btn-contact {
        background-color: var(--primary-color);
        color: white !important;
    }
}

/* Tablet / iPad specific adjustments to reduce perceived hero height and whitespace */
@media (min-width: 768px) and (max-width: 1200px) {
    .hero-banner {
        height: 300px;
    }

    .hero {
        padding-top: 60px;
        min-height: 70vh;
    }

    .hero-content {
        margin-top: 110px;
    }

    .section {
        padding: 3rem 0;
    }
}

/* (moved mobile-only dark-mode nav rules into the mobile @media block) */

@media (min-width: 769px) and (max-width: 1024px) {
    .expertise-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Reduce spacing slightly on tablet/iPad widths to avoid wrapping */
@media (min-width: 769px) and (max-width: 1200px) {
    .nav-menu {
        gap: 1rem;
    }

    .btn {
        padding: 0.65rem 1rem;
    }
}

/* On wider desktops, show the about highlights in two columns to reduce vertical length */
@media (min-width: 1024px) {
    .about-highlights {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem 2rem;
    }
}

/* Desktop hero tightening: reduce banner height and bring profile/name forward */
@media (min-width: 1024px) {
    .hero {
        padding-top: 60px;
        min-height: 80vh;
    }

    .hero-banner {
        height: 340px;
        top: 60px;
    }

    .hero-content {
        margin-top: 100px;
    }

    /* Make profile image impose on banner for reduced perceived space */
    .profile-image {
        transform: translateY(-40px);
        box-shadow: 0 14px 30px rgba(2,6,23,0.25);
    }

    .profile-wrapper {
        margin-bottom: 1rem;
    }
}

@media (min-width: 1921px) {
    .container {
        max-width: 1400px;
    }
}

/* Smaller, safer placement for theme toggle on narrow mobile screens (iOS/Android phones) */
@media (max-width: 480px) {
    .theme-toggle {
        width: 36px;
        height: 36px;
        bottom: calc(0.75rem + env(safe-area-inset-bottom));
        right: calc(0.75rem + env(safe-area-inset-right));
        font-size: 1rem;
        box-shadow: var(--shadow-md);
    }

    .theme-toggle:hover {
        transform: none;
        box-shadow: var(--shadow-lg);
    }
}

@media print {
    .navbar,
    .hero-banner,
    .carousel-btn,
    .carousel-dots,
    .footer {
        display: none;
    }

    .section {
        page-break-inside: avoid;
        padding: 2rem 0;
    }
}
