/* ==================== styles.css (Navy & Crimson Theme) ==================== */
  /*!
 * PRODUCT: Premium Freelancer Portfolio v1.0
 * AUTHOR: rexdarnelco-eng
 * LICENSE: Commercial - Authorized for use by the purchaser only.
 * BUILD: 2026-04-09
 * ----------------------------------------------------------------
 * This code is protected by copyright law. Unauthorized copying 
 * or distribution is strictly prohibited.
 */

:root {
    /* New Color Palette */
    --primary-color: #C50337;   /* Crimson */
    --secondary-color: #021C4F; /* Deep Navy */
    
    /* Hero Gradient */
    --gradient-start: #021C4F;
    --gradient-end: #C50337;

    /* UI Colors */
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f3f4f6;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 0 10px 30px rgba(2, 28, 79, 0.15);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
}

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

/* ==================== NAVBAR ==================== */
.navbar {
    background: var(--bg-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 5px 0;
    transition: var(--transition);
}

/* ==================== HERO SECTION ==================== */
.hero {
    min-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 80px 20px;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: white;
    position: relative;
    overflow: hidden;
    gap: 60px;
}

.hero::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.hero::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    bottom: -50px;
    left: -50px;
}

.hero-content {
    flex: 1;
    z-index: 1;
    max-width: 600px;
    min-width: 300px;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 20px;
    font-weight: 300;
    margin-bottom: 15px;
    opacity: 0.9;
}

.hero-description {
    font-size: 18px;
    margin-bottom: 40px;
    opacity: 0.85;
}

.hero-text {
    animation: fadeInUp 1s ease forwards;
}

.hero-animation {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    width: 100%; /* Ensures it takes up proper space */
}

.animated-box {
    width: 100%;
    max-width: 350px; /* Adjust this to change the overall size */
    aspect-ratio: 1 / 1; /* Forces a perfect square */
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px; /* Slightly smoother corners */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: float 6s ease-in-out infinite;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image fills the square without stretching */
    opacity: 0.8;
    display: block;
}

.glass-overlay {
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: linear-gradient(45deg, rgba(2, 28, 79, 0.3), rgba(197, 3, 55, 0.3)); 
    pointer-events: none;
}

/* Mobile Tweak */
@media (max-width: 480px) {
    .animated-box {
        max-width: 280px; /* Smaller square for mobile screens */
    }
}


@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-30px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== ENHANCED BUTTON STYLES ==================== */
.btn {
    display: inline-block;
    padding: 14px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 16px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: #ffffff;
    color: var(--secondary-color);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-primary:hover {
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(197, 3, 55, 0.4);
}

.btn-primary:hover::before {
    left: 0;
}

.btn-primary:active {
    transform: translateY(-1px);
}

.contact-form .btn-primary {
    width: 100%;
    padding: 16px 40px;
    font-size: 16px;
    letter-spacing: 1px;
}

/* ==================== ABOUT SECTION ==================== */
.about {
    padding: 100px 20px;
    background: var(--bg-light);
}

.section-title {
    font-size: 42px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    color: var(--text-dark);
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.stat {
    text-align: center;
}

.stat h3 {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat p {
    color: var(--text-light);
    margin: 0 !important;
}

.about-image {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: var(--shadow);
    margin: 0 auto;
}

.profile-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    border-radius: 20px;
    box-shadow: var(--shadow);
}

/* ==================== SKILLS SECTION ==================== */
.skills {
    padding: 100px 20px;
    background: var(--bg-white);
}

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

.skill-card {
    background: var(--bg-light);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
}

.skill-card:hover {
    background: var(--bg-white);
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
    transform: translateY(-10px);
}

.skill-icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.skill-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.skill-card p {
    color: var(--text-light);
    font-size: 14px;
}

/* ==================== PORTFOLIO SECTION ==================== */
.portfolio {
    padding: 100px 20px;
    background: var(--bg-light);
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 25px;
    border: 2px solid var(--border-color);
    background: var(--bg-white);
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    color: var(--text-dark);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.portfolio-item {
    overflow: hidden;
    border-radius: 15px;
    box-shadow: var(--shadow);
    opacity: 1;
    transition: var(--transition);
}

.portfolio-item.hidden {
    display: none;
}

.portfolio-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(197, 3, 55, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.portfolio-overlay p {
    font-size: 14px;
    opacity: 0.9;
}

/* ==================== CONTACT SECTION ==================== */
.contact {
    padding: 100px 20px;
    background: var(--bg-white);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info {
    display: grid;
    gap: 40px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.contact-item i {
    font-size: 32px;
    color: var(--primary-color);
    margin-top: 5px;
}

.contact-item h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.contact-item p {
    color: var(--text-light);
}

.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.contact-item a:hover {
    text-decoration: underline;
}

.contact-form {
    display: grid;
    gap: 20px;
}

.form-group {
    display: flex;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(197, 3, 55, 0.1);
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 40px 20px;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: var(--transition);
    font-size: 20px;
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-5px);
}

.footer p {
    color: rgba(255, 255, 255, 0.7);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-animation {
        min-width: auto;
    }

    .animated-box {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        gap: 20px;
        padding: 30px 0;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 20px;
    }

    .hero-description {
        font-size: 16px;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 32px;
    }

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

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

    .portfolio-filters {
        gap: 10px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 14px;
    }

    .btn {
        padding: 12px 30px;
        font-size: 14px;
    }

    .contact-form .btn-primary {
        padding: 14px 20px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .hero-description {
        font-size: 14px;
    }

    .section-title {
        font-size: 26px;
    }

    .btn {
        padding: 12px 30px;
        font-size: 14px;
    }

    .animated-box {
        width: 150px;
        height: 150px;
    }
}