/* --- CSS Variables (Your Color Palette) --- */
:root {
    --primary-gold: #D4AF37;
    --primary-gold-faded: rgba(212, 175, 55, 0.1);
    --dark-bg: #121212;
    --card-bg: #1e1e1e;
    --light-text: #f4f4f4;
    --gray-text: #aaaaaa;
    --main-font: 'Poppins', sans-serif;
    --border-radius-main: 10px; /* Rounded corners variable */
}

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

html {
    scroll-behavior: smooth; /* Smooth scrolling */
}

body {
    font-family: var(--main-font);
    background-color: var(--dark-bg);
    color: var(--light-text);
    line-height: 1.6;
}

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

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

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

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

img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-main); /* Rounded corners for images */
}

/* --- Header & Navigation --- */
header {
    background: var(--card-bg);
    padding: 1.2rem 0;
    border-bottom: 2px solid var(--primary-gold);
    position: sticky; /* Sticky header for a modern feel */
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary-gold);
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05); /* Sleek hover effect */
}

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

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

nav ul li a {
    font-weight: 300;
    position: relative; /* For the sleek underline effect */
    padding-bottom: 5px;
}

/* Sleek underline hover effect */
nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gold);
    transition: width 0.3s ease;
}

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

nav ul li a:hover {
    color: var(--light-text); /* Keep text light, let underline show */
}

nav ul li a.active {
    color: var(--primary-gold);
    font-weight: 600;
}

/* --- Hero Section (Homepage) --- */
.hero {
    text-align: center;
    padding: 5rem 0;
    background: linear-gradient(rgba(18, 18, 18, 0.8), rgba(18, 18, 18, 0.8)), url('img/hero-bg.jpg'); /* Add a bg image later */
    background-size: cover;
    background-position: center;
}

.hero h1 {
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.2rem;
    color: var(--gray-text);
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    background: var(--primary-gold);
    color: var(--dark-bg);
    padding: 12px 25px;
    font-weight: 600;
    border-radius: var(--border-radius-main); /* Rounded corners */
    transition: all 0.3s ease;
    border: 2px solid var(--primary-gold);
    cursor: pointer; /* Ensure it looks clickable */
}

.cta-button:hover {
    background: transparent;
    color: var(--primary-gold);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.cta-button:disabled {
    background: var(--gray-text);
    border-color: var(--gray-text);
    color: var(--dark-bg);
    cursor: not-allowed;
}

/* --- Content Preview Section (Homepage) --- */
.content-preview {
    padding: 4rem 0;
}

.content-preview h2 {
    text-align: center;
    margin-bottom: 2rem;
}

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

.card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius-main);
    border: 1px solid #333;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3), 0 0 15px var(--primary-gold-faded);
    border-left: 4px solid var(--primary-gold);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--primary-gold);
    margin-bottom: 1rem;
}

.card h3 {
    color: var(--light-text);
    margin-bottom: 0.5rem;
}

.card p {
    color: var(--gray-text);
    flex-grow: 1; /* Makes card heights equal */
    margin-bottom: 1rem;
}

.card-link {
    font-weight: 600;
    color: var(--primary-gold);
}

.card-link:hover {
    text-decoration: underline;
}

/* --- Generic Page Header (for About, Services, Contact) --- */
.page-header {
    text-align: center;
    padding: 3rem 0;
    background: var(--card-bg);
}

/* --- About Page --- */
.about-content {
    padding: 4rem 0;
}

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

.about-image {
    font-style: italic;
    color: var(--gray-text);
    background: #222;
    height: 100%;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-main);
}

.about-image img {
    border-radius: var(--border-radius-main);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.about-text h2 {
    color: var(--primary-gold);
    margin-bottom: 1rem;
}

.about-text p {
    margin-bottom: 1rem;
    color: var(--gray-text);
}

.about-text p strong {
    color: var(--light-text);
    font-weight: 600;
}

.skills-list {
    list-style: none;
    margin: 1.5rem 0;
}

.skills-list li {
    color: var(--light-text);
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
}

.skills-list i {
    color: var(--primary-gold);
    margin-right: 10px;
    width: 20px; /* Aligns icons nicely */
}

/* --- Services Page --- */
.services-grid {
    padding: 4rem 0;
}

.services-grid .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.service-card {
    background: var(--card-bg);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius-main);
    text-align: center;
    border: 1px solid #333;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3), 0 0 15px var(--primary-gold-faded);
}

.service-icon {
    font-size: 3.5rem;
    color: var(--primary-gold);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    margin-bottom: 1rem;
}

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

/* --- Contact Page --- */
.contact-form-section {
    padding: 4rem 0;
}

#contact-form {
    max-width: 700px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--border-radius-main);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--gray-text);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px;
    border-radius: var(--border-radius-main); /* Rounded corners! */
    border: 1px solid #444;
    background: var(--dark-bg);
    color: var(--light-text);
    font-family: var(--main-font);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 10px var(--primary-gold-faded);
}

.form-group textarea {
    resize: vertical;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2.5rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--card-bg);
    color: var(--gray-text);
}

/* --- Interaction Styles --- */
.fade-in {
    opacity: 0;
    transform: translateY(20px); 
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Mobile Navigation Styles --- */
.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger .line {
    width: 25px;
    height: 3px;
    background: var(--light-text);
    margin: 5px;
    transition: all 0.3s ease;
}

/* --- Project Page Styles --- */
.project-grid {
    padding: 4rem 0;
}

.project-grid .container {
    display: grid;
    grid-template-columns: 1fr; /* Stack projects by default */
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: var(--border-radius-main);
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Ensures image corners are rounded */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3), 0 0 15px var(--primary-gold-faded);
}

.project-image {
    height: 250px;
    background: #333; /* Placeholder color */
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
    color: var(--gray-text);
}

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

.project-content {
    padding: 1.5rem 2rem 2rem 2rem;
}

.project-content h3 {
    color: var(--primary-gold);
    margin-bottom: 1rem;
}

.project-content p {
    color: var(--gray-text);
    margin-bottom: 1.5rem;
}

.project-tags {
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tags span {
    background: var(--primary-gold-faded);
    color: var(--primary-gold);
    padding: 5px 12px;
    border-radius: 20px; /* Rounded pill shape */
    font-size: 0.8rem;
    font-weight: 600;
}

.cta-button.project-link {
    background: transparent;
    border: 2px solid var(--primary-gold);
    color: var(--primary-gold);
}

.cta-button.project-link:hover {
    background: var(--primary-gold);
    color: var(--dark-bg);
}

/* --- Social Icons (Footer) --- */
.social-icons {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-icons a {
    color: var(--gray-text);
    font-size: 1.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover {
    color: var(--primary-gold);
    transform: translateY(-3px);
}

/* --- Blog Page Styles --- */
.blog-list-section {
    padding: 4rem 0;
}

.blog-list-section .container {
    max-width: 800px; /* Blog list is narrower for readability */
}

.blog-post-preview {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius-main);
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary-gold);
}

.post-meta {
    font-size: 0.9rem;
    color: var(--gray-text);
    margin-bottom: 0.5rem;
}

.post-meta span {
    margin-right: 15px;
}

.post-meta i {
    color: var(--primary-gold);
    margin-right: 5px;
}

.blog-post-preview h2 {
    margin-bottom: 0.5rem;
}

.blog-post-preview h2 a {
    color: var(--light-text);
    transition: color 0.3s ease;
}

.blog-post-preview h2 a:hover {
    color: var(--primary-gold);
}

.blog-post-preview p {
    color: var(--gray-text);
    margin-bottom: 1.5rem;
}

/* --- Single Blog Post Styles --- */
.blog-post-content {
    padding: 4rem 0;
}

.blog-post-content .container {
    max-width: 800px; /* Article content is narrower */
}

.post-full-header {
    text-align: center;
    padding: 2rem 0;
    border-bottom: 1px solid var(--card-bg);
}

.post-full-header h1 {
    font-size: 2.8rem;
    color: var(--primary-gold);
    margin-bottom: 1rem;
}

.post-full-image {
    margin: 2rem 0;
    text-align: center;
    font-style: italic;
    color: var(--gray-text);
    background: #222;
    padding: 3rem;
    border-radius: var(--border-radius-main);
}

.post-full-image img {
    border-radius: var(--border-radius-main);
    max-width: 100%;
}

.post-full-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--gray-text);
}

.post-full-body h2,
.post-full-body h3 {
    color: var(--light-text);
    margin: 2.5rem 0 1rem 0;
}

.post-full-body p {
    margin-bottom: 1.5rem;
}

.post-full-body ul,
.post-full-body ol {
    margin: 0 0 1.5rem 1.5rem;
}

.post-full-body li {
    margin-bottom: 0.5rem;
}

.post-full-body a {
    color: var(--primary-gold);
    text-decoration: underline;
}

.post-full-body pre {
    background: var(--dark-bg);
    border: 1px solid #333;
    padding: 1rem;
    border-radius: var(--border-radius-main);
    overflow-x: auto;
    margin: 1.5rem 0;
}

.post-full-body code {
    font-family: 'Courier New', Courier, monospace;
    color: var(--light-text);
}


/* --- Download CV Button (About Page) --- */
.about-text .cta-button {
    margin-top: 1.5rem;
}

.about-text .cta-button i {
    margin-left: 8px;
}


/* --- Back to Top Button --- */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-gold);
    color: var(--dark-bg);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border-radius: var(--border-radius-main);
    z-index: 100;
    opacity: 0; /* Hidden by default */
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    transform: translateY(-5px);
}


/* --- Media Query for Mobile --- */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }

    /* Stack card grid on mobile */
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    /* Stack about grid on mobile */
    .about-grid {
        grid-template-columns: 1fr;
    }
    .about-image {
        grid-row: 1; /* Put image on top on mobile */
        margin-bottom: 2rem;
    }

    /* Hamburger Menu */
    .hamburger {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 75px; 
        left: 0;
        background: var(--card-bg);
        width: 100%;
        flex-direction: column;
        text-align: center;
        padding: 1rem 0;
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    }

    .nav-links.active {
        display: flex;
    }

    nav ul li {
        margin: 1rem 0;
        margin-left: 0;
    }

    /* Animate Hamburger */
    .hamburger.toggle .line:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    .hamburger.toggle .line:nth-child(2) {
        opacity: 0;
    }
    .hamburger.toggle .line:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
}

/* --- Media Query for bigger project cards --- */
@media (min-width: 768px) {
    .project-card {
        flex-direction: row; /* Side-by-side layout on desktop */
    }
    
    .project-image {
        height: auto;
        width: 40%;
    }
    
    .project-content {
        width: 60%;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

/* --- Loading Message --- */
.loading-message {
    font-size: 1.2rem;
    color: var(--gray-text);
    text-align: center;
    padding: 3rem 0;
}