/* Global Styles */
:root {
    /* Color Palette */
    --primary-color: #121c2e; /* Deep navy blue */
    --secondary-color: #1c2b45; /* Slightly lighter navy */
    --accent-color: #b8a369; /* Muted gold accent */
    --text-color: #e6e6e6; /* Light gray for text */
    --dark-text: #1a1a1a; /* Darker text for certain elements */
    --background-color: #0a0f1a; /* Very dark blue/black background */
    
    /* Typography */
    --heading-font: 'Montserrat', sans-serif;
    --body-font: 'Open Sans', sans-serif;
    
    /* Spacing */
    --section-padding: 100px 0;
    --container-padding: 0 20px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    opacity: 0.8;
}

/* Section Styles */
section {
    padding: var(--section-padding);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.separator {
    width: 50px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 20px auto;
}

/* Navigation */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    background-color: transparent;
    transition: all 0.4s ease;
    z-index: 1000;
}

#navbar.scrolled {
    background-color: rgba(10, 15, 26, 0.95);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

#navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--text-color);
    letter-spacing: 1px;
}

.logo span {
    font-weight: 300;
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-link {
    color: var(--text-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease, box-shadow 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-color);
}

.nav-link:hover::after {
    width: 100%;
    box-shadow: 0 0 8px rgba(184, 163, 105, 0.7);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

/* Hero Section */
#hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    background-color: var(--primary-color);
    overflow: hidden;
}

.hero-bg-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/pattern.svg');
    background-size: 150px 150px;
    background-repeat: repeat;
    opacity: 0.15;
    animation: subtleFloat 120s infinite linear;
}

.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/hero-bg.svg');
    background-size: cover;
    background-position: center;
    z-index: 1;
    opacity: 0.8;
}

.hero-bg-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, 
                rgba(0, 204, 255, 0.03) 0%, 
                transparent 50%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 0 20px;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--text-color);
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--text-color);
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.2s forwards;
    opacity: 0;
}

.hero-accent {
    width: 100px;
    height: 4px;
    background-color: var(--accent-color);
    margin: 0 auto;
    position: relative;
    animation: fadeInUp 1s ease-out 0.4s forwards;
    opacity: 0;
}

.hero-accent:before,
.hero-accent:after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--accent-color);
    top: -1px;
}

.hero-accent:before {
    left: -3px;
}

.hero-accent:after {
    right: -3px;
}

/* About Section */
#about {
    background-color: var(--secondary-color);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    margin-bottom: 1.5rem;
}

/* Portfolio Section */
#portfolio {
    background-color: var(--primary-color);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.portfolio-item {
    background-color: var(--secondary-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.4s ease, 
                background-color 0.3s ease;
    height: 100%;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.portfolio-item:before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background-color: var(--accent-color);
    transition: width 0.4s ease;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    background-color: rgba(28, 43, 69, 1);
}

.portfolio-item:hover:before {
    width: 100%;
}

.portfolio-content {
    padding: 30px;
}

.portfolio-logo {
    margin-bottom: 20px;
    text-align: center;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.portfolio-logo img {
    max-height: 80px;
    width: auto;
    transition: transform 0.4s ease, filter 0.4s ease;
    object-fit: contain;
}

.portfolio-item:hover .portfolio-logo img {
    animation: pulse 2.5s infinite ease-in-out;
}

/* Logo-specific styling using the actual images you provided */
.cheery-logo img {
    max-height: 40px;
    filter: brightness(1);
    background-color: transparent;
}

.brq-logo img {
    max-height: 100px;
    filter: drop-shadow(0 0 8px rgba(0, 204, 255, 0.4));
}

.siyadh-logo img {
    max-height: 100px;
    filter: drop-shadow(0 0 5px rgba(184, 163, 105, 0.3));
    background-color: transparent;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        filter: saturate(1);
    }
    50% {
        transform: scale(1.03);
        filter: saturate(1.1);
    }
    100% {
        transform: scale(1);
        filter: saturate(1);
    }
}

/* We're using the pulse animation instead of this direct transform */

.portfolio-description {
    margin-bottom: 20px;
}

.portfolio-link {
    display: inline-block;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* Contact Section */
#contact {
    background-color: var(--secondary-color);
}

.contact-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background-color: rgba(10, 15, 26, 0.3);
    padding: 25px;
    border-radius: 8px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    width: 100%;
    max-width: 500px;
    border-left: 3px solid transparent;
}

.contact-item:hover {
    transform: translateX(5px);
    background-color: rgba(10, 15, 26, 0.5);
    border-left: 3px solid var(--accent-color);
}

.contact-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(184, 163, 105, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-icon i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.contact-details h4 {
    margin-bottom: 5px;
    color: var(--accent-color);
    font-size: 1rem;
    letter-spacing: 1px;
}

.contact-details p {
    margin: 0;
}

/* Footer */
footer {
    background-color: var(--background-color);
    padding: 40px 0 30px;
    text-align: center;
    position: relative;
}

.footer-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--accent-color) 20%, 
        var(--accent-color) 80%, 
        transparent 100%);
    opacity: 0.3;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-logo h3 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--text-color);
    letter-spacing: 1px;
}

.footer-logo span {
    font-weight: 300;
    color: var(--accent-color);
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.7;
}

.footer-legal {
    font-size: 0.8rem;
    opacity: 0.5;
}

/* Scroll to Top Button */
#scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: var(--primary-color);
    color: var(--accent-color);
    border: 1px solid rgba(184, 163, 105, 0.3);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
    z-index: 99;
}

#scroll-top.visible {
    opacity: 1;
    transform: translateY(0);
}

#scroll-top:hover {
    background-color: var(--secondary-color);
}

#scroll-top i {
    font-size: 1rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes subtleFloat {
    0% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(5px, 5px);
    }
    50% {
        transform: translate(0, 10px);
    }
    75% {
        transform: translate(-5px, 5px);
    }
    100% {
        transform: translate(0, 0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Media Queries */
@media (max-width: 991px) {
    .hero-title {
        font-size: 2.8rem;
    }
    .section-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(10, 15, 26, 0.95);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        padding: 20px 0;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 15px 0;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    section {
        padding: 70px 0;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
}
