/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&family=Montserrat:wght@400;700&display=swap');

/* --- Branding Variables --- */
:root {
    --primary-color: #2E4053; /* Dark Slate Blue */
    --secondary-color: #4A6D7C; /* Teal Gray */
    --accent-color: #8DBC40; /* Vibrant Green */
    --neutral-bg-color: #F8F9FA; /* Off-White */
    --text-color: #343A40; /* Dark Gray */
    --light-text-color: #6c757d; /* Lighter Gray for subtle text */
    --white-color: #FFFFFF;
}

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

body {
    font-family: 'Lato', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--neutral-bg-color);
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.8rem; }

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

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

p {
    margin-bottom: 1rem;
}

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

.btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--white-color);
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background-color: #7BB038; /* Slightly darker accent */
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background-color: #3F5E6A; /* Slightly darker secondary */
}

/* --- Header --- */
header {
    background-color: var(--white-color);
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
}

.logo span {
    color: var(--accent-color); /* Optional: to highlight "SL" if using an initialism */
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 1.1rem;
    position: relative;
    padding-bottom: 5px;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

/* --- Sections --- */
section {
    padding: 80px 0;
    overflow: hidden; /* Clear floats */
}

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

/* --- Hero Section (Homepage) --- */
#hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white-color);
    padding: 100px 0;
    text-align: center;
    display: flex;
    align-items: center;
    min-height: 60vh;
}

#hero .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

#hero-content {
    text-align: center;
    max-width: 800px;
}

#hero-content h1 {
    font-size: 3.8rem;
    color: var(--white-color);
    margin-bottom: 15px;
    line-height: 1.1;
}

#hero-content .tagline {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6rem;
    margin-bottom: 25px;
    font-weight: 300;
    color: rgba(255,255,255,0.9);
}

#hero-content .intro-text {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 35px;
    line-height: 1.8;
    color: rgba(255,255,255,0.8);
}

.hero-buttons .btn {
    margin: 0 10px;
    min-width: 180px;
}

.hero-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid var(--accent-color);
    box-shadow: 0 0 0 5px rgba(255,255,255,0.2);
    flex-shrink: 0; /* Prevent shrinking on smaller screens */
}

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


/* Adjust hero section for side-by-side layout on larger screens */
@media (min-width: 992px) {
    #hero .container {
        flex-direction: row;
        justify-content: center;
        text-align: left;
        gap: 80px;
    }

    #hero-content {
        text-align: left;
    }

    #hero-content .intro-text {
        margin-left: 0;
    }

    .hero-image {
        order: 2; /* Image on right */
        flex-basis: 300px; /* Give image some fixed width */
        width: 300px;
        height: 300px;
    }

    #hero-content {
        order: 1; /* Content on left */
        flex-basis: 60%; /* Take up more space */
    }
}


/* --- About Page Specifics --- */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.about-card {
    background-color: var(--white-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.about-card:hover {
    transform: translateY(-5px);
}

.about-card h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.about-card h3 i {
    color: var(--accent-color);
    margin-right: 10px;
    font-size: 1.5rem;
}

.skills-list {
    list-style: none;
    columns: 2; /* Two columns for skills */
    -webkit-columns: 2;
    -moz-columns: 2;
    margin-top: 20px;
}

.skills-list li {
    background-color: var(--neutral-bg-color);
    padding: 8px 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    border-left: 4px solid var(--accent-color);
    font-size: 0.95rem;
}


/* --- Portfolio Page Specifics --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.portfolio-item {
    background-color: var(--white-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.portfolio-item:hover {
    transform: translateY(-5px);
}

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

.portfolio-content {
    padding: 25px;
    flex-grow: 1; /* Allows content to take up remaining space */
    display: flex;
    flex-direction: column;
}

.portfolio-content h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.portfolio-content p {
    font-size: 0.95rem;
    color: var(--light-text-color);
    flex-grow: 1;
}

.portfolio-content .btn {
    margin-top: 20px;
    align-self: flex-start; /* Align button to start of flex container */
    padding: 10px 20px;
    font-size: 0.9rem;
}


/* --- Resume Page Specifics --- */
.resume-section {
    background-color: var(--white-color);
    padding: 50px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    text-align: center;
    max-width: 800px;
    margin: 40px auto;
}

.resume-section h2 {
    color: var(--primary-color);
    margin-bottom: 25px;
}

.resume-section p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.7;
}

.resume-highlights {
    text-align: left;
    margin-top: 40px;
}

.resume-highlights h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.resume-highlights ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 20px;
}

.resume-highlights ul li {
    margin-bottom: 8px;
    font-size: 1rem;
}

/* --- Contact Page Specifics --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 40px;
}

.contact-form-card {
    background-color: var(--white-color);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.contact-form-card label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--primary-color);
}

.contact-form-card input[type="text"],
.contact-form-card input[type="email"],
.contact-form-card textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.contact-form-card input[type="text"]:focus,
.contact-form-card input[type="email"]:focus,
.contact-form-card textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

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

.contact-info-card {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-info-card h3 {
    color: var(--accent-color);
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.contact-info-card p {
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.contact-info-card p i {
    margin-right: 15px;
    font-size: 1.5rem;
    color: var(--accent-color);
}

.contact-info-card a {
    color: var(--white-color);
    text-decoration: underline;
}

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

@media (min-width: 768px) {
    .contact-grid {
        grid-template-columns: 2fr 1fr; /* Form takes more space */
    }
}


/* --- Footer --- */
footer {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 40px 0;
    text-align: center;
    font-size: 0.9rem;
    margin-top: 60px;
}

footer .social-links a {
    color: var(--white-color);
    font-size: 1.5rem;
    margin: 0 10px;
    transition: color 0.3s ease;
}

footer .social-links a:hover {
    color: var(--accent-color);
}

footer p {
    margin-top: 15px;
    margin-bottom: 0;
    color: rgba(255,255,255,0.8);
}


/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.5rem; }

    #hero {
        padding: 80px 0;
    }

    #hero .container {
        flex-direction: column;
        gap: 30px;
    }

    #hero-content h1 {
        font-size: 3rem;
    }

    #hero-content .tagline {
        font-size: 1.3rem;
    }

    .hero-buttons .btn {
        display: block;
        margin: 15px auto;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        margin-top: 20px;
    }

    nav ul li {
        margin: 10px 0;
    }

    header .container {
        flex-direction: column;
    }

    .skills-list {
        columns: 1; /* Single column for skills on small screens */
    }

    .resume-section, .contact-form-card, .contact-info-card {
        padding: 30px;
    }

    footer {
        padding: 30px 0;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.8rem; }
    #hero-content h1 {
        font-size: 2.5rem;
    }
    #hero-content .tagline {
        font-size: 1.1rem;
    }
    .container {
        padding: 15px;
    }
    .hero-image {
        width: 150px;
        height: 150px;
    }
}