/* Custom Properties (Color Theme) */
:root {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2c2c2c;
    --bg-card: #333333;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --accent-color: #007bff; /* Professional blue */
    --accent-darker: #004a99; /* Darker blue for 3D depth */
    --border-color: #444444;
}

/* Reset & Globals */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

h1, h2, h3 {
    font-weight: 600;
}

h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

section {
    padding: 5rem 1.5rem;
}

/* Navigation Bar */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.nav-logo {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    z-index: 1001;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

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

/* Hamburger Menu Button */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
}

/* Hero Section */
.hero {
    padding: 0;
    height: 70vh;
    display: flex;
    flex-direction: column;
    perspective: 1000px;
}

.hero-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* --- 3D Text Styles --- */
.hero-title {
    display: flex;
    transform-style: preserve-3d;
    font-size: clamp(2.5rem, 10vw, 5rem);
    font-weight: 700;
    margin: 0;
}

.letter-container {
    position: relative;
    display: inline-block;
    transform-style: preserve-3d;
}

.letter-container.space {
    width: 0.5em;
}

/* NEW: This invisible layer gives the container its width and height */
.base-layer {
    visibility: hidden;
}

.layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
/* --- End 3D Text Styles --- */

.hero-subtitle {
    font-size: clamp(1rem, 4vw, 1.5rem);
    color: var(--text-secondary);
    margin-top: 1rem;
}

/* About Section */
#about {
    text-align: center;
}
#about p {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Services Section */
#services {
    background-color: var(--bg-secondary);
}

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

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

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.card-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Portfolio Section */
.portfolio-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.portfolio-card {
    background-color: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.3s;
}

.portfolio-card:hover {
    transform: scale(1.05);
}

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

.portfolio-info {
    padding: 1.5rem;
}

.portfolio-info h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

/* Contact Section */
#contact {
    text-align: center;
}
.contact-links {
    display: flex;
    flex-wrap: wrap; /* Allow items to wrap on small screens */
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.contact-button {
    background-color: var(--accent-color);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s;
}

.contact-button:hover {
    background-color: var(--accent-darker);
}

.social-link {
    color: var(--text-secondary);
    font-size: 1.75rem;
    transition: color 0.3s;
}

.social-link:hover {
    color: var(--accent-color);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive (Mobile) */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--bg-primary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    .hero {
        height: 60vh;
    }

    h2 {
        font-size: 2rem;
    }

    section {
        padding: 4rem 1.5rem;
    }
}
