/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body Styling */
body {
    font-family: 'Segoe UI', sans-serif;
    scroll-behavior: smooth;
    color: white;
    overflow-x: hidden;
}

/* Header Styling */
header {
    background: #000000;
    text-align: center;
    padding: 5px 20px;
    position: sticky;
    top: 0;
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 255, 204, 0.2);
    transition: all 0.3s ease;
}

header:hover {
    background: #0a0a0a;
}

header h1 {
    font-size: 3em;
    margin-bottom: 10px;
}

header h2 {
    font-size: 1.5em;
    color: #aaa;
}

/* Navigation Styling */
nav ul {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 30px;
    list-style: none;
    margin-top: 20px;
    padding: 0;
}

.portfolio-link a {
    font-size: 1.4em;
    font-weight: bold;
    color: #00ffcc;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1em;
    transition: all 0.3s;
    position: relative;
    padding-bottom: 5px;
}

nav ul li a:hover {
    color: #00ffcc;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #00ffcc;
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

/* Landing Page Section (Home) */
.home-section {
    background: url('images/back.jpg') no-repeat center center;
    background-size: cover;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    color: white;
    position: relative;
}

.home-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.home-left {
    flex: 1;
    max-width: 40%;
    position: relative;
    z-index: 2;
    animation: fadeInLeft 1s ease forwards;
}

.home-left h1 {
    font-size: 4em;
    margin-bottom: 10px;
}

.home-left h2 {
    font-size: 2em;
    color: #00ffcc;
    animation: pulse 2s infinite;
}

.home-left .intro-text {
    font-size: 1.3em;
    margin-top: 15px;
    color: #ccc;
}

.home-right {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
    animation: fadeInRight 1s ease forwards;
}

.photo-box {
    width: 600px;
    height: 600px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 3px solid #000000;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.3);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.photo-box:hover {
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(0, 255, 204, 0.5);
}

.photo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
}

/* General Section Styling */
.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.content {
    position: relative;
    text-align: center;
    max-width: 800px;
    z-index: 2;
    padding: 30px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section.active .content {
    opacity: 1;
    transform: translateY(0);
}

.content h2 {
    font-size: 3em;
    margin-bottom: 20px;
    color: #00ffff;
}

.content p,
.content ul {
    font-size: 1.2em;
    line-height: 1.6;
    color: #ddd;
}

.content ul {
    list-style: none;
    padding: 0;
}

.content ul li::before {
    content: "✔ ";
    color: #00ffcc;
}

.social-icons {
    margin-top: 20px;
}

.icon {
    font-size: 2em;
    margin: 0 15px;
    color: #00ffcc;
    text-decoration: none;
    transition: color 0.3s, transform 0.3s;
}

.icon:hover {
    color: #ffffff;
    transform: translateY(-5px);
}

/* Projects Page Styling */
#projects {
    background: #111;
    min-height: 100vh;
    padding: 80px 20px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.project-card {
    background: rgba(20, 20, 20, 0.8);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    height: 100%;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: calc(var(--order) * 0.2s);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 255, 204, 0.2);
}

.project-img {
    height: 200px;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-img img {
    transform: scale(1.1);
}

.project-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    font-size: 1.4em;
    margin-bottom: 10px;
    color: #00ffcc;
}

.project-info p {
    color: #aaa;
    margin-bottom: 20px;
    flex-grow: 1;
}

.download-btn {
    background: #00ccaa;
    color: #000;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
    display: inline-block;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-top: auto;
}

.download-btn:hover {
    background: #00ffcc;
    transform: scale(1.05);
}

.download-btn i {
    margin-right: 5px;
}

/* CV Download Button */
.cv-download {
    background: #00ccaa;
    color: #000;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 5px;
    display: inline-block;
    font-weight: bold;
    margin-top: 25px;
    transition: all 0.3s ease;
}

.cv-download:hover {
    background: #00ffcc;
    transform: scale(1.05);
}

.cv-download i {
    margin-right: 8px;
}

/* Animations */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        text-shadow: 0 0 5px rgba(0, 255, 204, 0.3);
    }
    50% {
        text-shadow: 0 0 20px rgba(0, 255, 204, 0.7);
    }
    100% {
        text-shadow: 0 0 5px rgba(0, 255, 204, 0.3);
    }
}

/* Mobile Styles */
@media screen and (max-width: 768px) {
    /* Header: Only show "Portfolio" */
    header {
        padding: 10px 20px;
        justify-content: center;
    }

    header h1 {
        font-size: 2em;
        margin: 0;
    }

    header h2 {
        display: none;
    }

    /* Navigation links */
    nav ul {
        display: none;
    }

    .portfolio-link a {
        font-size: 1.4em;
        font-weight: bold;
        color: #00ffcc;
    }

    /* Home section */
    .home-section {
        flex-direction: column;
        text-align: center;
    }

    .home-left {
        max-width: 100%;
        margin-bottom: 20px;
    }

    .home-left h1 {
        font-size: 3em;
    }

    .home-left h2 {
        font-size: 1.8em;
    }

    .home-left .intro-text {
        font-size: 1.1em;
    }

    .home-right {
        max-width: 100%;
    }

    .photo-box {
        width: 300px;
        height: 300px;
    }

    .photo-box img {
        object-position: center 10%;
    }

    .section {
        height: auto;
        padding: 30px;
    }

    .content h2 {
        font-size: 2.5em;
    }

    .content p,
    .content ul {
        font-size: 1em;
    }

    .social-icons .icon {
        font-size: 1.5em;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}