/* ==========================================================================
   Elegant & Beautiful Portfolio Theme - Final Version
   ========================================================================== */

/* --- 1. Variables (Elegant Palette & Fonts) --- */
:root {
    --primary-color: #212529;   /* Deep Charcoal */
    --secondary-color: #495057; /* Muted Slate Gray */
    --accent-color: #D4A373;    /* Warm Golden Ochre */
    --light-bg-color: #F8F9FA;  /* Off-White/Light Cream */
    --white-color: #ffffff;
    --dark-text-color: #343A40;
    --light-text-color: #6c757d;
    --card-bg-color: #ffffff;
    
    /* Fonts */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
}

/* --- 2. Base & Reset Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.8;
    background-color: var(--light-bg-color);
    color: var(--dark-text-color);
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--accent-color);
    transition: all 0.3s ease-in-out;
}

a:hover {
    opacity: 0.8;
}

img {
    max-width: 100%;
    height: auto;
}

/* --- 3. Header --- */
header {
    background: var(--primary-color);
    color: var(--white-color);
    padding: 70px 0;
    text-align: center;
}

header h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

header p {
    font-size: 1.3rem;
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: 35px;
}

/* --- 3.5 Social Icons --- */
.social-links a {
    color: var(--white-color);
    font-size: 1.6rem;
    margin: 0 15px;
    transition: transform 0.3s ease, color 0.3s ease;
    display: inline-block;
}

.social-links a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

/* --- 4. Navigation --- */
nav {
    background-color: rgba(33, 37, 41, 0.95);
    backdrop-filter: blur(5px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--secondary-color);
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 10px 0;
}

nav ul li a {
    color: var(--white-color);
    font-weight: 400;
    padding: 15px 25px;
    font-size: 1rem;
    letter-spacing: 0.5px;
    position: relative;
}

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

nav ul li a:hover::after {
    width: 50%;
}

/* --- 5. Sections --- */
.section {
    padding: 100px 0;
}

.section h2 {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 70px;
    position: relative;
    color: var(--primary-color);
}

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

/* --- 5.1 About Section --- */
.about-content {
    display: flex;
    align-items: center;
    gap: 60px;
    max-width: 960px;
    margin: 0 auto;
    text-align: left;
}

.profile-photo {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    border: 7px solid var(--white-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-text {
    flex: 1;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 15px;
    line-height: 1.9;
}

/* --- 5.5 Project Cards --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 40px;
}

.project-card {
    background: var(--card-bg-color);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.project-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.project-card-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-card-content h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.project-card-content p {
    color: var(--light-text-color);
    margin-bottom: 30px;
    flex-grow: 1;
}

.project-buttons {
    display: flex;
    gap: 15px;
    margin-top: auto;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white-color);
    padding: 12px 20px;
    border-radius: 5px;
    font-weight: 700;
    text-align: center;
    transition: all 0.3s ease;
    flex: 1;
    letter-spacing: 0.5px;
    border: 2px solid transparent;
}

.btn:hover {
    background: var(--accent-color);
    color: var(--white-color);
    transform: translateY(-2px);
}

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

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

/* --- 6. Tabular Skills Section (NEW) --- */
#skills .container {
    max-width: 1100px;
}

.skills-table {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 50px;
    background-color: var(--card-bg-color);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.07);
}

.skill-column {
    padding: 0 20px;
}

.skill-column:not(:last-child) {
    border-right: 1px solid #e9ecef;
}

.skill-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.skill-header i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-right: 15px;
    width: 40px;
}

.skill-header h3 {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    color: var(--primary-color);
}

.skill-list {
    list-style: none;
    padding-left: 0;
}

.skill-list li {
    padding: 12px 0;
    font-size: 1.05rem;
    color: var(--dark-text-color);
    border-bottom: 1px solid #f1f3f5;
    position: relative;
    padding-left: 25px;
}

.skill-list li::before {
    content: '›';
    position: absolute;
    left: 0;
    top: 12px;
    color: var(--accent-color);
    font-weight: 700;
    font-size: 1.2rem;
}

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

/* --- 7. Contact Form --- */
#contact .container {
    max-width: 800px;
}

.contact-form {
    max-width: 700px;
    margin: 0 auto;
    background: var(--card-bg-color);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.07);
}

.form-group {
    margin-bottom: 25px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 1rem;
    color: var(--dark-text-color);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(212, 163, 115, 0.25);
}

.contact-form button.btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
}

/* --- 8. Footer --- */
footer {
    background: var(--primary-color);
    color: var(--white-color);
    text-align: center;
    padding: 40px 0;
    margin-top: 80px;
}

footer p {
    opacity: 0.7;
}

/* --- 9. Responsive Design --- */
@media (max-width: 992px) {
    .skills-table {
        grid-template-columns: 1fr 1fr;
    }
    .skill-column:nth-child(2) {
        border-right: none;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2.8rem;
    }
    
    .about-content {
        flex-direction: column;
        text-align: center;
    }

    /* 👇 THIS IS THE NEW RULE TO FIX THE MOBILE VIEW 👇 */
    #projects .container {
        padding: 0 5px; /* Adds a little space on the sides */
    }
    /* 👆 END OF NEW RULE 👆 */

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

    .skills-table {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 40px;
    }

    .skill-column:not(:last-child) {
        border-right: none;
        border-bottom: 1px solid #e9ecef;
        padding-bottom: 30px;
    }
}
