/* Basic CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    overflow: hidden; /* Clear floats */
    padding: 20px 0; /* Vertical padding for sections */
}

/* Typography */
h1 {
    font-size: 2.8em;
    margin-bottom: 10px;
    color: #004d99; /* Deep blue */
}

h2 {
    font-size: 2.2em;
    margin-bottom: 20px;
    color: #004d99;
    text-align: center;
}

h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #0066cc; /* Medium blue */
}

p {
    margin-bottom: 15px;
}

a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Top Navigation / Site Identity */
#main-nav {
    background-color: #004d99;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 1.8em;
    font-weight: bold;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-title:hover {
    color: #e0f2f7;
    text-decoration: none;
}

/* Sections */
.section {
    padding: 60px 0;
}

/* Updated Hero Styling for Better Balance */
.hero-section {
    background-color: #e0f2f7;
    color: #333;
    padding: 60px 0;
    text-align: left;
}

.hero-content {
    display: flex;
    flex-direction: row; /* Side-by-side */
    align-items: center; /* Vertically center */
    justify-content: space-between;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
}

.hero-text {
    flex: 1;
    min-width: 300px;
}

/* The "Principal" Kicker */
.hero-text h3 {
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #555;
    margin-bottom: 10px;
    margin-top: 0;
    font-weight: 600;
}

.hero-text h3 a {
    color: #0066cc;
    border-bottom: 2px solid rgba(0, 102, 204, 0.2);
}

/* Tighter Main Headline */
.hero-text h1 {
    font-size: 2.8em;
    line-height: 1.2;
    color: #004d99;
    margin-bottom: 15px;
}

/* The "Ride the Wave" Sub-headline */
.hero-text h2 {
    font-size: 1.5em;
    font-weight: 500;
    color: #0066cc;
    margin-bottom: 20px;
    margin-top: 0;
    text-align: left; /* Ensure it doesn't center align like standard h2 */
}

.hero-text p {
    font-size: 1.15em;
    color: #444;
    max-width: 600px;
    line-height: 1.6;
}

.hero-image {
    flex: 0 0 280px;
    display: flex;
    justify-content: center;
}

.hero-image img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 50%;
    border: 6px solid #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.dark-section {
    background-color: #333;
    color: #f4f4f4;
}

.dark-section h2, .dark-section h3 {
    color: #ffffff;
}

/* Expertise Grid */
.expertise-grid .container {
    text-align: center;
}

.grid-3, .grid-4 {
    display: grid;
    gap: 30px;
    margin-top: 40px;
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.expertise-item {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.expertise-item h3 {
    margin-bottom: 15px;
}

.expertise-item p {
    font-size: 0.95em;
}

/* Projects Section */
.project-details {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
    text-align: left;
    max-width: 800px;
    margin: 20px auto;
}

.project-details li {
    margin-bottom: 8px;
    font-size: 1.05em;
}

.project-details li strong {
    color: #004d99;
}

/* Video Styles for Personal Section */
.video-wrapper {
    width: 100%;
    max-width: 600px;
    margin: 2rem auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.video-square {
    width: 100%;
    height: auto;
    display: block;
}

/* Buttons & CTA */
.cta-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.button {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Primary: Solid Blue */
.primary-button {
    background-color: #0066cc;
    color: #fff;
    border: 2px solid #0066cc;
}

.primary-button:hover {
    background-color: #004d99;
    border-color: #004d99;
    color: #fff;
    text-decoration: none;
}

/* Secondary: Outline Blue */
.secondary-button {
    background-color: transparent;
    color: #0066cc; 
    border: 2px solid #0066cc;
}

/* Dark Section Button Override */
.footer-section .secondary-button {
    color: #66b2ff;
    border-color: #66b2ff;
}

.secondary-button:hover, .footer-section .secondary-button:hover {
    background-color: #0066cc;
    border-color: #0066cc;
    color: #fff;
    text-decoration: none;
}

/* Footer */
.footer-section {
    background-color: #222;
    color: #eee;
    text-align: center;
    padding: 40px 0;
}

.footer-section p {
    margin-bottom: 10px;
    font-size: 0.9em;
}

.footer-section .copyright {
    margin-top: 30px;
    font-size: 0.8em;
    color: #bbb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content {
        flex-direction: column-reverse; /* Puts image on top */
        text-align: center;
        gap: 30px;
    }

    .hero-text {
        text-align: center;
        flex: 1;
    }
    
    /* Ensure left alignment overrides are reset for mobile center */
    .hero-text h2 {
        text-align: center;
    }

    .hero-image {
        flex: 0 0 auto;
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 2.2em;
    }

    .hero-text h2 {
        font-size: 1.5em;
    }
    
    .grid-3 {
        grid-template-columns: repeat(1, 1fr);
    }
    .grid-4 {
        grid-template-columns: repeat(1, 1fr);
    }
    
    .button {
        width: 100%; /* Stack buttons on small screens */
        text-align: center;
    }
}