/*--------------------------------------------------------------
# Variables
--------------------------------------------------------------*/
:root {
    /* Blue Theme Colors */
    --primary-color: #3498db;
    --secondary-color: #2980b9;
    --accent-color: #5dade2;
    --text-color: #2c3e50;
    --text-light: #7f8c8d;
    --bg-color: #fff;
    --bg-light: #f5f9ff;
    --bg-blue-light: #e1f0fa;
    --border-color: #e6eef5;
    --dark-bg: #1e3a5f;
    --dark-blue: #0f2847;
    
    /* Typography */
    --font-primary: 'Poppins', sans-serif;
    
    /* Transitions */
    --transition: all 0.3s ease;
    
    /* Border radius */
    --border-radius: 8px;
    --border-radius-lg: 12px;
    
    /* Box shadows */
    --box-shadow: 0 5px 15px rgba(41, 128, 185, 0.08);
    --box-shadow-hover: 0 8px 20px rgba(41, 128, 185, 0.15);
}

/*--------------------------------------------------------------
# Global Styles
--------------------------------------------------------------*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--bg-color);
}

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

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
    position: relative;
}

.section {
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.section-line {
    width: 5rem;
    height: 0.188rem;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    margin: 0 auto;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: 3.125rem;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.063rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(52, 152, 219, 0.1);
}

.btn-primary {
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-0.188rem);
    box-shadow: 0 8px 15px rgba(52, 152, 219, 0.2);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 0.125rem solid var(--primary-color);
    margin-left: 0.938rem;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-0.188rem);
    box-shadow: 0 8px 15px rgba(52, 152, 219, 0.2);
}

.highlight {
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/*--------------------------------------------------------------
# Header
--------------------------------------------------------------*/
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0.125rem 0.625rem rgba(41, 128, 185, 0.1);
    padding: 1rem 0;
    transition: var(--transition);
}

.header.scrolled {
    padding: 0.75rem 0;
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 0.313rem 0.938rem rgba(41, 128, 185, 0.2);
}

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

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    position: relative;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.logo a:hover {
    color: var(--primary-color);
}

.code-badge {
    font-size: 1rem;
    color: var(--primary-color);
    margin-right: 0.5rem;
    display: inline-block;
}

.nav-menu {
    display: flex;
}

.nav-item {
    margin: 0 0.938rem;
}

.nav-link {
    font-weight: 500;
    color: var(--text-color);
    padding: 0.313rem;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -0.313rem;
    left: 0;
    width: 0;
    height: 0.125rem;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    transition: var(--transition);
}

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

.nav-link:hover,
.nav-link.active {
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 2rem;
    height: 2rem;
}

.bar {
    display: block;
    width: 1.563rem;
    height: 0.188rem;
    margin: 0.313rem auto;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

/*--------------------------------------------------------------
# Hero Section
--------------------------------------------------------------*/
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background-color: var(--bg-light);
    overflow: hidden;
    padding-top: 4.375rem; /* Account for fixed header */
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2.5rem;
    position: relative;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.938rem;
    color: var(--dark-blue);
}

.hero-text h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.563rem;
    color: var(--secondary-color);
}

.hero-text p {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 1.875rem;
}

.hero-buttons {
    margin-top: 1.875rem;
    display: flex;
    flex-wrap: wrap;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.hero-image img {
    max-width: 25rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    transition: transform 0.4s ease;
    border: 5px solid white;
}

.hero-image img:hover {
    transform: scale(1.02);
}

.scroll-down {
    position: absolute;
    bottom: 1.875rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-down a {
    color: var(--primary-color);
    font-size: 1.5rem;
    background-color: white;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--box-shadow);
}

.scroll-down a:hover {
    background-color: var(--primary-color);
    color: white;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-1rem) translateX(-50%);
    }
    60% {
        transform: translateY(-0.5rem) translateX(-50%);
    }
}

/*--------------------------------------------------------------
# About Section
--------------------------------------------------------------*/
.about {
    background-color: var(--bg-color);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    transition: transform 0.4s ease;
    border: 5px solid white;
}

.about-image img:hover {
    transform: scale(1.02);
    box-shadow: var(--box-shadow-hover);
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 0.938rem;
    position: relative;
    display: inline-block;
    color: var(--secondary-color);
}

.about-text h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.313rem;
    width: 3.125rem;
    height: 0.125rem;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
}

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

.about-highlights {
    margin: 1.875rem 0;
}

.highlight-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.938rem;
    background-color: var(--bg-light);
    padding: 0.8rem 1.2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.highlight-item:hover {
    transform: translateX(0.3rem);
}

.highlight-item i {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-right: 0.938rem;
}

.about-info {
    margin: 1.875rem 0;
}

.info-item {
    margin-bottom: 0.938rem;
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 0.5rem;
}

.info-title {
    min-width: 7.5rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.available {
    color: #2ecc71;
    font-weight: 600;
}

.social-links {
    margin-top: 1.875rem;
    display: flex;
    gap: 0.938rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 50%;
    background-color: var(--bg-light);
    color: var(--primary-color);
    transition: var(--transition);
    box-shadow: var(--box-shadow);
}

.social-links a:hover {
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    color: white;
    transform: translateY(-0.188rem);
}

/*--------------------------------------------------------------
# Skills Section
--------------------------------------------------------------*/
.skills {
    background-color: var(--bg-light);
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 1.875rem;
    margin-bottom: 3.125rem;
    justify-content: center;
}

.tech-category {
    flex: 1;
    min-width: 18.75rem;
    max-width: 28.125rem;
    background-color: var(--bg-color);
    padding: 1.875rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.tech-category:hover {
    transform: translateY(-0.325rem);
    box-shadow: var(--box-shadow-hover);
}

.tech-category h3 {
    font-size: 1.25rem;
    margin-bottom: 1.563rem;
    text-align: center;
    padding-bottom: 0.625rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    color: var(--secondary-color);
}

.tech-category h3::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -0.063rem;
    width: 3.125rem;
    height: 0.125rem;
    transform: translateX(-50%);
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
    gap: 1.25rem;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem 0.625rem;
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.tech-item:hover {
    transform: translateY(-0.313rem);
    box-shadow: var(--box-shadow);
}

.tech-item i {
    font-size: 2.5rem;
    margin-bottom: 0.938rem;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.tech-item h4 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
}

.skills-description {
    text-align: center;
    max-width: 43.75rem;
    margin: 0 auto;
    padding: 1.5rem;
    background-color: var(--bg-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    border-left: 4px solid var(--primary-color);
}

/*--------------------------------------------------------------
# Projects Section
--------------------------------------------------------------*/
.projects {
    background-color: var(--bg-color);
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(21.875rem, 1fr));
    gap: 1.875rem;
}

.project-item {
    background-color: var(--bg-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.project-item:hover {
    transform: translateY(-0.325rem);
    box-shadow: var(--box-shadow-hover);
}

.project-img {
    position: relative;
    overflow: hidden;
    height: 14.375rem;
}

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(41, 128, 185, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

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

.project-item:hover .project-img img {
    transform: scale(1.05);
}

.project-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background-color: white;
    border-radius: 50%;
    color: var(--secondary-color);
    margin: 0 0.313rem;
    transition: var(--transition);
}

.project-links a:hover {
    background: var(--secondary-color);
    color: white;
}

.project-info {
    padding: 1.563rem;
}

.project-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.625rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.project-info p {
    color: var(--text-light);
    margin-bottom: 1.25rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.project-tech span {
    font-size: 0.75rem;
    padding: 0.313rem 0.75rem;
    background-color: var(--bg-light);
    border-radius: 1.25rem;
    font-weight: 500;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

/*--------------------------------------------------------------
# Blog Section
--------------------------------------------------------------*/
.blog {
    background-color: var(--bg-blue-light);
}

.blog-intro {
    text-align: center;
    max-width: 43.75rem;
    margin: 0 auto 3.125rem;
    background-color: var(--bg-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.blog-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(21.875rem, 1fr));
    gap: 1.875rem;
    margin-bottom: 3.125rem;
}

.blog-item {
    background-color: var(--bg-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.blog-item:hover {
    transform: translateY(-0.325rem);
    box-shadow: var(--box-shadow-hover);
}

.blog-img {
    position: relative;
    overflow: hidden;
    height: 14.375rem;
}

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

.blog-item:hover .blog-img img {
    transform: scale(1.05);
}

.blog-date {
    position: absolute;
    bottom: 0;
    left: 0;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-top-right-radius: var(--border-radius);
}

.blog-content {
    padding: 1.563rem;
}

.blog-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.625rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.blog-content p {
    color: var(--text-light);
    margin-bottom: 1.25rem;
}

.blog-link {
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
}

.blog-link i {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.blog-link:hover i {
    transform: translateX(0.313rem);
}

.blog-cta {
    text-align: center;
}

/*--------------------------------------------------------------
# Contact Section
--------------------------------------------------------------*/
.contact {
    background-color: var(--bg-color);
}

.contact-content {
    display: flex;
    gap: 2.5rem;
}

.contact-info {
    flex: 1;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    color: white;
    box-shadow: var(--box-shadow);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.875rem;
}

.contact-icon {
    font-size: 1.5rem;
    margin-right: 1.25rem;
}

.contact-details h3 {
    font-size: 1.125rem;
    margin-bottom: 0.313rem;
}

.contact-details a {
    color: white;
}

.contact-info .social-links {
    margin-top: 2.5rem;
}

.contact-info .social-links a {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.contact-info .social-links a:hover {
    background-color: white;
    color: var(--primary-color);
}

.contact-form {
    flex: 1;
    background-color: white;
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    box-shadow: var(--box-shadow);
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1.1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--bg-light);
}

.form-group textarea {
    height: 9.375rem;
    resize: none;
}

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

.form-submit {
    text-align: right;
}

#formStatus {
    margin-top: 0.938rem;
    text-align: center;
}

.form-note {
    margin-top: 1.25rem;
    font-size: 0.75rem;
    color: var(--text-light);
    text-align: center;
}

/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
.footer {
    background-color: var(--dark-bg);
    color: white;
    padding: 3.75rem 0 1.25rem;
    position: relative;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2.5rem;
}

.footer-logo h3 {
    font-size: 1.5rem;
    margin-bottom: 0.313rem;
    display: flex;
    align-items: center;
}

.footer-logo .code-badge {
    margin-right: 0.5rem;
}

.footer-links ul {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
    opacity: 0.8;
}

/*--------------------------------------------------------------
# Back to Top Button
--------------------------------------------------------------*/
.back-to-top {
    position: fixed;
    right: 1.875rem;
    bottom: 1.875rem;
    width: 3.125rem;
    height: 3.125rem;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    cursor: pointer;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
}

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

.back-to-top:hover {
    transform: translateY(-0.313rem);
    box-shadow: 0 10px 25px rgba(52, 152, 219, 0.3);
}

/*--------------------------------------------------------------
# Responsive Design
--------------------------------------------------------------*/
@media (max-width: 1200px) {
    html {
        font-size: 15px;
    }
}

@media (max-width: 992px) {
    html {
        font-size: 14px;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .tech-category {
        min-width: 15rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .section {
        padding: 4rem 0;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 4.5rem;
        left: -100%;
        width: 80%;
        height: 100vh;
        background-color: var(--bg-color);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 3rem;
        transition: var(--transition);
        box-shadow: 0 0.625rem 0.938rem rgba(41, 128, 185, 0.1);
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        margin: 1rem 0;
    }
    
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
    }
    
    .hero-text {
        padding-right: 0;
        margin-top: 2.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .btn-secondary {
        margin-left: 0;
    }
    
    .about-content,
    .contact-content {
        flex-direction: column;
    }
    
    .about-image {
        margin-bottom: 1.875rem;
    }
    
    .contact-info {
        margin-bottom: 1.875rem;
    }
    
    .footer-content {
        flex-direction: column;
        align-items: center;
        gap: 1.25rem;
        text-align: center;
    }
    
    .footer-links ul {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        align-items: center;
        gap: 0.625rem;
        text-align: center;
    }
}

@media (max-width: 576px) {
    html {
        font-size: 13px;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-text h2 {
        font-size: 1.25rem;
    }
    
    .projects-container,
    .blog-container {
        grid-template-columns: 1fr;
    }
    
    .tech-category {
        min-width: 100%;
    }
    
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .about-info .info-item {
        flex-direction: column;
        margin-bottom: 1.25rem;
    }
    
    .info-title {
        margin-bottom: 0.325rem;
    }
    
    .form-submit {
        text-align: center;
    }
    
    .btn {
        padding: 0.625rem 1.5rem;
    }
    
    .social-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 375px) {
    html {
        font-size: 12px;
    }
    
    .hero-text h1 {
        font-size: 1.75rem;
    }
    
    .tech-grid {
        grid-template-columns: 1fr;
    }
}