/*
* Ferid - Personal Portfolio Website
* Author: Ferid
* Version: 1.0
*/

/* ===== Global Styles ===== */
:root {
    --primary-color: #6C63FF;
    --secondary-color: #FF6584;
    --dark-color: #0F1624;
    --darker-color: #080F1E;
    --light-color: #FFFFFF;
    --grey-color: #ABB2BF;
    --success-color: #4CAF50;
    --warning-color: #FFC107;
    --danger-color: #F44336;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    background-color: var(--dark-color);
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--dark-color);
    color: var(--light-color);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    margin-bottom: 15px;
}

p {
    margin-bottom: 15px;
    color: var(--grey-color);
}

a {
    text-decoration: none;
    color: var(--light-color);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.section-padding {
    padding: 100px 0;
}

.container {
    max-width: 1170px;
    padding: 0 15px;
    margin: 0 auto;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-align: center;
    cursor: pointer;
    border: none;
}

.primary-btn {
    background: var(--primary-color);
    color: var(--light-color);
}

.primary-btn:hover {
    background: transparent;
    color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-color);
}

.secondary-btn {
    background: transparent;
    color: var(--light-color);
    box-shadow: 0 0 0 2px var(--light-color);
}

.secondary-btn:hover {
    background: var(--light-color);
    color: var(--dark-color);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 36px;
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.section-title h2 span {
    color: var(--primary-color);
}

.section-title .line {
    width: 80px;
    height: 3px;
    background: var(--primary-color);
    margin: 0 auto;
}

/* ===== Preloader ===== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--darker-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== Navbar ===== */
.navbar {
    padding: 20px 0;
    background-color: transparent;
    transition: all 0.3s ease;
}

.navbar.sticky {
    background-color: var(--darker-color);
    padding: 15px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Mobile navbar always has background */
@media (max-width: 991px) {
    .navbar {
        background-color: var(--darker-color);
        padding: 15px 0;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
}

.navbar-brand {
    font-size: 28px;
    font-weight: 700;
    color: var(--light-color);
}

.navbar-brand span {
    color: var(--primary-color);
}

.navbar-toggler {
    border: none;
    background: transparent;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.nav-item {
    margin: 0 10px;
}

.nav-link {
    color: var(--light-color);
    font-weight: 500;
    padding: 8px 15px !important;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 70%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--light-color) !important;
}

/* Adding an additional style for the active nav item to ensure it applies */
.navbar-nav .nav-item .nav-link.active {
    color: var(--light-color) !important;
}

/* ===== Hero Section ===== */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    background: var(--darker-color);
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 10px;
    animation: fadeInUp 1s ease;
}

.hero-content h1 span {
    color: var(--primary-color);
}

.text-animation {
    margin-bottom: 20px;
    height: 30px;
    overflow: hidden;
    animation: fadeInUp 1s ease 0.2s forwards;
    opacity: 0;
}

.text-animation .text {
    font-size: 24px;
    font-weight: 500;
}

.text-animation .first-text {
    color: var(--grey-color);
}

.text-animation .sec-text {
    color: var(--primary-color);
    position: relative;
}

.text-animation .sec-text:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: var(--darker-color);
    border-left: 2px solid var(--primary-color);
    animation: typing 4s steps(16) infinite;
}

@keyframes typing {
    40%, 60% {
        left: calc(100% + 10px);
    }
    100% {
        left: 0;
    }
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 30px;
    max-width: 500px;
    animation: fadeInUp 1s ease 0.4s forwards;
    opacity: 0;
}

.hero-btns {
    animation: fadeInUp 1s ease 0.6s forwards;
    opacity: 0;
}

.hero-btns .btn {
    margin-right: 15px;
    margin-bottom: 15px;
}

.social-icons {
    margin-top: 30px;
    animation: fadeInUp 1s ease 0.8s forwards;
    opacity: 0;
}

.social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: var(--primary-color);
    color: var(--light-color);
    transform: translateY(-3px);
}

.hero-image {
    position: relative;
    animation: fadeInRight 1s ease;
}

.hero-image:after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 70%;
    height: 70%;
    background: rgba(108, 99, 255, 0.2);
    filter: blur(50px);
    z-index: -1;
}

.scroll-down {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-down a {
    display: block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--light-color);
}

.scroll-down a:hover {
    background: var(--primary-color);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== About Section ===== */
.about-img {
    position: relative;
}

.about-img:before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 80%;
    height: 80%;
    border: 5px solid var(--primary-color);
    z-index: -1;
}

.about-content h3 {
    font-size: 28px;
    margin-bottom: 20px;
}

.personal-info {
    margin-top: 30px;
    margin-bottom: 30px;
}

.personal-info ul li {
    margin-bottom: 15px;
}

.personal-info ul li span {
    font-weight: 600;
    color: var(--primary-color);
    margin-right: 10px;
}

/* ===== Resume Section ===== */
.resume-title h3 {
    display: inline-block;
    font-size: 24px;
    margin-bottom: 30px;
    background: rgba(108, 99, 255, 0.1);
    padding: 10px 20px;
    border-radius: 50px;
}

.resume-title h3 i {
    margin-right: 10px;
    color: var(--primary-color);
}

.resume-box {
    padding: 20px;
    margin-bottom: 20px;
}

.resume-item {
    position: relative;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.resume-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.resume-item:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 5px;
    background: var(--primary-color);
    border-radius: 10px 0 0 10px;
}

.resume-item h4 {
    color: var(--light-color);
    font-size: 20px;
}

.resume-item h5 {
    font-size: 16px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.resume-item p em {
    color: var(--grey-color);
    font-style: normal;
}

.resume-item ul {
    margin-top: 15px;
}

.resume-item ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
}

.resume-item ul li:before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.download-btn {
    padding: 15px 30px;
}

.download-btn i {
    margin-right: 10px;
}

/* ===== Services Section ===== */
.service-box {
    text-align: center;
    padding: 40px 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.service-box:hover {
    transform: translateY(-10px);
    background: rgba(108, 99, 255, 0.1);
}

.icon-box {
    width: 70px;
    height: 70px;
    line-height: 70px;
    text-align: center;
    background: rgba(108, 99, 255, 0.1);
    border-radius: 50%;
    margin: 0 auto 25px;
    transition: all 0.3s ease;
}

.service-box:hover .icon-box {
    background: var(--primary-color);
}

.icon-box i {
    font-size: 30px;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.service-box:hover .icon-box i {
    color: var(--light-color);
}

.service-box h3 {
    font-size: 22px;
    margin-bottom: 15px;
}

/* ===== Skills Section ===== */
.skill-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 40px 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.skill-box h3 {
    font-size: 24px;
    margin-bottom: 30px;
}

.skill-item {
    margin-bottom: 30px;
}

.skill-item h4 {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    margin-bottom: 10px;
}

.progress {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    overflow: visible;
}

.progress-bar {
    background: var(--primary-color);
    border-radius: 50px;
    position: relative;
    transition: width 1s ease;
}

.progress-bar::after {
    content: '';
    position: absolute;
    right: -4px;
    top: -4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
}

/* ===== Projects Section ===== */
.project-filters {
    text-align: center;
    margin-bottom: 40px;
}

.filters {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.filters li {
    font-size: 16px;
    font-weight: 500;
    padding: 8px 20px;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
}

.filters li.active,
.filters li:hover {
    background: var(--primary-color);
    color: var(--light-color);
}

.project-container {
    margin-top: 50px;
}

.project-box {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 30px;
}

.project-img {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.project-img img {
    transition: all 0.5s ease;
}

.project-box:hover .project-img img {
    transform: scale(1.1);
}

.project-content {
    position: absolute;
    bottom: -100px;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(15, 22, 36, 0.9), transparent);
    transition: all 0.5s ease;
}

.project-box:hover .project-content {
    bottom: 0;
}

.project-content h4 {
    font-size: 20px;
    margin-bottom: 5px;
}

.project-content p {
    font-size: 14px;
    margin-bottom: 0;
}

.project-link {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background: var(--primary-color);
    color: var(--light-color);
    border-radius: 50%;
    transform: translateY(-60px);
    opacity: 0;
    transition: all 0.5s ease;
}

.project-box:hover .project-link {
    transform: translateY(0);
    opacity: 1;
}

/* ===== Blog Section ===== */
.blog-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-10px);
}

.blog-img {
    position: relative;
    overflow: hidden;
}

.blog-img img {
    transition: all 0.5s ease;
}

.blog-card:hover .blog-img img {
    transform: scale(1.1);
}

.blog-date {
    position: absolute;
    bottom: 15px;
    left: 15px;
    width: 60px;
    height: 70px;
    background: var(--primary-color);
    color: var(--light-color);
    text-align: center;
    padding: 10px 0;
    border-radius: 5px;
}

.blog-date span {
    display: block;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.blog-date p {
    font-size: 14px;
    margin-bottom: 0;
    color: var(--light-color);
}

.blog-content {
    padding: 25px;
}

.blog-info {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.blog-info span {
    font-size: 14px;
    color: var(--grey-color);
}

.blog-info span i {
    margin-right: 5px;
    color: var(--primary-color);
}

.blog-content h3 {
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 15px;
}

.blog-content h3 a {
    color: var(--light-color);
}

.blog-content h3 a:hover {
    color: var(--primary-color);
}

.read-more {
    font-size: 16px;
    font-weight: 500;
    color: var(--primary-color);
}

.read-more i {
    margin-left: 5px;
    transition: all 0.3s ease;
}

.read-more:hover i {
    margin-left: 10px;
}

/* ===== Contact Section ===== */
.contact-info {
    background: rgba(255, 255, 255, 0.05);
    padding: 40px 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.contact-info h3 {
    font-size: 24px;
    margin-bottom: 20px;
}

.contact-item {
    display: flex;
    margin-bottom: 25px;
}

.contact-item .icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(108, 99, 255, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    margin-right: 15px;
    font-size: 20px;
}

.contact-item .text h4 {
    font-size: 18px;
    margin-bottom: 5px;
}

.contact-item .text p {
    margin-bottom: 0;
}

.social-links {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: var(--grey-color);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    color: var(--light-color);
    transform: translateY(-3px);
}

.contact-form {
    background: rgba(255, 255, 255, 0.05);
    padding: 40px 30px;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    color: var(--light-color);
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: none;
    color: var(--light-color);
}

textarea.form-control {
    height: auto;
}

.form-control::placeholder {
    color: var(--grey-color);
}

/* ===== Footer ===== */
.footer {
    background: var(--darker-color);
    padding: 30px 0;
    text-align: center;
}

.footer-logo {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    display: inline-block;
}

.footer-logo span {
    color: var(--primary-color);
}

.footer p {
    margin-bottom: 0;
    font-size: 14px;
}

.go-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.go-top.active {
    opacity: 1;
    visibility: visible;
}

.go-top a {
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background: var(--primary-color);
    color: var(--light-color);
    border-radius: 50%;
    display: block;
}

/* ===== Responsive ===== */
@media (max-width: 991px) {
    body {
        background-color: var(--dark-color);
    }
    
    .section-padding {
        padding: 80px 0;
        background-color: var(--dark-color);
    }
    
    /* Add dark background to sections that might need it */
    #projects, #skills, #about, #resume, #services, #contact {
        background-color: var(--dark-color);
    }
    
    /* Ensure project boxes have proper background */
    .project-box {
        background-color: rgba(255, 255, 255, 0.05);
    }
    
    .hero-section {
        height: auto;
        padding: 150px 0 100px;
        background-color: var(--darker-color);
    }
    
    .hero-content h1 {
        font-size: 40px;
    }
    
    .hero-image {
        margin-top: 50px;
    }
    
    .about-img {
        margin-bottom: 50px;
    }
    
    .skill-box {
        margin-bottom: 30px;
    }
    
    /* Improve animation performance on mobile */
    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

@media (max-width: 767px) {
    .section-padding {
        padding: 70px 0;
    }
    
    .section-title h2 {
        font-size: 30px;
    }
    
    .hero-content h1 {
        font-size: 34px;
    }
    
    .text-animation .text {
        font-size: 20px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .resume-title h3 {
        font-size: 20px;
    }
    
    .resume-item {
        padding: 20px;
    }
    
    .contact-info,
    .contact-form {
        padding: 30px 20px;
    }
    
    /* Optimize image loading for mobile */
    .project-img img {
        height: auto;
        max-height: 220px;
        object-fit: cover;
        width: 100%;
    }
    
    /* Optimize project content display */
    .project-content {
        bottom: 0;
        opacity: 1;
        background: rgba(15, 22, 36, 0.8);
    }
}

@media (max-width: 575px) {
    .hero-content h1 {
        font-size: 30px;
    }
    
    .section-title h2 {
        font-size: 26px;
    }
    
    .btn {
        padding: 10px 25px;
        font-size: 15px;
    }
    
    /* Simplify layout for very small screens */
    .project-item {
        width: 100%;
    }
    
    /* Fix hero section animation issues on mobile */
    .hero-content h1,
    .text-animation,
    .hero-content p,
    .hero-btns,
    .social-icons,
    .hero-image {
        opacity: 1 !important;
        animation: none !important;
    }
    
    .text-animation .sec-text:before {
        display: none;
    }
} 