/* CSS VARIABLES FOR THEME */
:root {
    --color-primary: #2B2D42;
    --color-secondary: #8D99AE;
    --accent: #EF233C;
    --background: #EDF2F4;
}

/* NAVIGATION BAR */
.navbar {
    background: var(--background); /* light gray */
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(43, 45, 66, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    color: var(--accent) !important; /* red */
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 1.25rem;
}

.nav-link {
    color: var(--color-primary) !important; /* dark blue */
    font-weight: 600;
    margin-left: 1.5rem;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent); /* red */
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link:focus::after {
    width: 100%;
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler-icon {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24' fill='%238D99AE'%3E%3Cpath d='M18.031 16.617l4.283 4.282-1.415 1.415-4.282-4.283A8.96 8.96 0 0 1 11 20c-4.968 0-9-4.032-9-9s4.032-9 9-9 9 4.032 9 9a8.96 8.96 0 0 1-1.969 5.617zm-2.006-.742A6.977 6.977 0 0 0 18 11c0-3.868-3.133-7-7-7-3.868 0-7 3.132-7 7 0 3.867 3.132 7 7 7a6.977 6.977 0 0 0 4.875-1.975l.15-.15z'/%3E%3C/svg%3E") no-repeat 1rem center;
}

#nav-toggle:checked ~ .navbar-collapse {
    display: block !important;
}

@media (max-width: 991px) {
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--background);
        padding: 1rem;
        display: none;
    }

    .nav-link {
        margin-left: 0;
        padding: 0.75rem 0;
    }
}

/* Search Icon Styles */
.search-icon {
    margin-left: 1.5rem;
    display: flex !important;
    align-items: center;
    font-size: 1.1rem;
}

.search-icon:hover {
    color: var(--accent) !important;
}

@media (max-width: 991px) {
    .search-icon {
        margin-left: 0;
        padding: 0.75rem 0;
        justify-content: center;
    }

    .search-icon i {
        font-size: 1.2rem;
    }
}

/* BASE LAYOUT AND TYPOGRAPHY */
body {
    font-family: 'Inter', sans-serif;
    background: var(--background);
    color: var(--color-primary);
    line-height: 1.6;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* HEADER SECTION */
header {
    text-align: center;
    padding: 4rem 0;
    position: relative;
    background: var(--color-primary);
    color: white;
    margin: -2rem -2rem 2rem;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}

.profile-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

h1, h2, h3 {
    font-family: 'Space Mono', monospace;
}

h1 {
    font-size: 2.5rem;
    margin: 1rem 0;
}

h2 {
    color: var(--accent);
    margin: 2rem 0;
    text-align: center;
}

/* BUTTON STYLES */
.cta-button, button, .search-button {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: var(--accent);
    color: white !important;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(239, 35, 60, 0.3);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
}

.cta-button:hover, button:hover, .search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 35, 60, 0.4);
}

/* BIO SECTION */
#bio h3.subheading {
    font-family: 'Space Mono', monospace;
    text-align: center;
    color: var(--color-primary);
    margin-bottom: 2rem;
    font-size: 1.4rem;
}

/* SKILLS GRID */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.skill-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
}

/* TIMELINE STYLES */
.timeline {
    position: relative;
    padding-left: 2rem;
    margin: 3rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--color-secondary);
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
    padding-left: 2rem;
}

.timeline-item::before {
    content: '▹';
    position: absolute;
    left: -1.3rem;
    color: var(--accent);
    font-size: 1.5rem;
}

/* PROJECTS GRID */
.projects-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    justify-items: center;
}

.project-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 400px;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

/* CONTACT FORM */
#contact-form form {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 600px;
}

.form-group {
    margin-bottom: 1rem;
}

input,
textarea {
    padding: 0.6rem;
    margin: 0.3rem 0;
    border: 1px solid var(--color-secondary);
    border-radius: 4px;
    font-family: inherit;
    max-width: 100%;
    box-sizing: border-box;
    font-size: 0.95rem;
}

/* SEARCH BAR */
.search-container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.search-form {
    display: flex;
    gap: 1rem;
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid var(--color-secondary);
    border-radius: 30px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24' fill='%238D99AE'%3E%3Cpath d='M18.031 16.617l4.283 4.282-1.415 1.415-4.282-4.283A8.96 8.96 0 0 1 11 20c-4.968 0-9-4.032-9-9s4.032-9 9-9 9 4.032 9 9a8.96 8.96 0 0 1-1.969 5.617zm-2.006-.742A6.977 6.977 0 0 0 18 11c0-3.868-3.133-7-7-7-3.868 0-7 3.132-7 7 0 3.867 3.132 7 7 7a6.977 6.977 0 0 0 4.875-1.975l.15-.15z'/%3E%3C/svg%3E") no-repeat 1rem center;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(239, 35, 60, 0.2);
}

.icon {
    margin-right: 0.8rem;
    font-size: 1.2em;
    color: var(--accent);
}

.http-example {
    background: var(--color-primary);
    color: white;
    padding: 1rem;
    border-radius: 4px;
    font-family: 'Space Mono', monospace;
    overflow-x: auto;
    margin: 1rem 0;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    body { padding: 1rem; }
    header { margin: -1rem -1rem 2rem; }
    h1 { font-size: 2rem; }
    .cta-button, button, .search-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    #contact-form form {
        padding: 1.5rem;
    }
    .search-form {
        flex-direction: column;
    }
    .search-button {
        width: 100%;
    }
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--accent);
    color: white !important;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(239, 35, 60, 0.3);
    z-index: 999;
    text-decoration: none;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: no-preference) {
    .back-to-top {
        visibility: visible;
        opacity: 0.3;
    }

    .back-to-top:hover {
        opacity: 1;
    }
}
