/* ===========================
   GLOBAL STYLES AND RESETS
   =========================== */
@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

*{
    margin: 0;
    padding: 0;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
    box-sizing: border-box;
}

body{
    width: 100%;
    height: auto;
    justify-content: center;
    align-items: center;
    background: linear-gradient(180deg, #29343a, #365563);
}

/* SECTIONS */
section{
    min-height: 100vh; /* Full viewport height */
    padding: 80px 0 40px; /* Top padding for fixed header */
    position: relative;
}

section .title {
    font-size: 2.5rem;     
    margin-bottom: 2rem;   
    color: #779eb2;     
    text-align: center;
    justify-content: center;
    position: relative;
}

section .title span {
    font-size: 2.5rem;
    font-weight: 600;
    color: #ffffff;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

/* Underline effect for section titles */
section .title span::before, 
section .title span::after {
    content: '';
    position: absolute;
    height: 3px;
    width: 100%;
    background: linear-gradient(180deg, #365563, #8eb1c2);
    left: 0;
    bottom: 0;
}

section .title span::after {
    bottom: -7px;
    width: 70%;
    left: 50%;
    transform: translateX(-50%);
}

section .topic {
    color: white;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

section .button {
    margin: 16px 0;
}

section .button button {
    padding: 8px 16px;
}

.container{
    max-width: 1500px; /* Don't let content get too wide on large screens */
    margin: 0 auto; /* Center the container horizontally */
    padding: 0 20px; /* Add some padding on the sides */
}

.content{
    width: 80%;
    margin: 0 auto;
    max-width: 1200px;
}

.content p{
    font-size: 1.1rem;
    margin: 10px 0;
}

/* ===========================
   BUTTON STYLES
   =========================== */
button {
    min-width: 200px;
    height: 60px;
    padding: 12px 24px;
    color: #ffffff;
    background: linear-gradient(135deg, #4d6b7a, #365563);
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Button hover effects */
button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

button:hover::before {
    left: 100%;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(119, 158, 178, 0.3);
    border: 2px solid #779eb2;
}

button:active {
    transform: translateY(0);
}

/* Button container centering */
.btn {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    animation: fadeInUp 1s ease 2s both;
}

.content .btn{
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 25px;
}

/* ===========================
   CUSTOM SCROLL BAR
   =========================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgb(85, 84, 84, 0.3); 
    border-radius: 4px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #4b6977, #8eb1c2); 
    border-radius: 12px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #4b6977, #8eb1c2);
}

/* ===========================
   HEADER AND NAVIGATION
   =========================== */
header{
    background-color: #37444b;
    position: fixed; /* Keeps header at top of screen when scrolling */
    top: 0; /* Position at top of screen */
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.5s ease;
}

nav{
    display: flex;
    justify-content: space-between; /* Logo left, links right */
    align-items: center;   
    padding: 1rem 0; /* Add vertical padding */
}

/* LOGO */
.logo{
    font-size: 2.5rem;
    font-weight: bold;
    color: #779eb2;
    text-shadow: 0 0 12px #8eb1c2;
    transition: all 0.3s ease;
}

/* NAVIGATION MENU */
.nav-links{
    display: flex;
    gap: 2.5rem; /* Space between links */
}

.nav-links a{
    color: #ffffff;
    font-weight: 550;
    font-size: 1.3rem;
    position: relative;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #779eb2;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

.nav-links a:hover {
    color: #779eb2;
    text-shadow: 0 0 8px rgba(135, 158, 178, 0.6);
}


/* ===========================
   HOME SECTION
   =========================== */
#home{
    display: flex;
    align-items: center;
    color: #ffffff;
    text-align: center;
}

.home-content{
    display: grid;
    grid-template-columns: 400px 1fr; /* Two columns, fixed width for image */
    gap: 4rem;
    align-items: center; 
    width: 100%;
}

/* HOME LEFT */
.home-content .home-left{
    width: 100%;              /* Full width of its container */
    max-width: 400px;         /* Don't get too large */
    height: 600px;            /* Fixed height for consistent appearance */
    border-radius: 50%;      
    object-fit: cover;        /* Crop image to fit circle without distortion */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3); /* Dramatic shadow */
    border: 5px solid rgba(255, 255, 255, 0.2); /* Semi-transparent border */
    overflow: hidden; /* Ensure image stays within circle */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.home-content .home-left img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top; /* Move image up */
    transform: scale(1.4);      /* Zoom in */
}

/* HOME RIGHT */
.home-content .home-right{
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

/* Home Title */
.home-content .home-right h1{
    font-size: 3.5rem;    
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); 
    animation: fadeInUp 1s ease 0.5s both;
}

.home-content .home-right h1 span{
    color: #779eb2;
    text-shadow: 0 0 15px #8eb1c2;
}

/* Home Paragraph */
.home-content .home-right p{
    font-size: 1.5rem;
    opacity: 0.9;
    margin: 10px 0; /* Need? */
    animation: fadeInUp 1s ease 1s both;
}

/* ===========================
   TYPEWRITER EFFECT
   =========================== */
.typewriter{
    font-size: clamp(1rem, 1rem + 5vw, 2.5rem);
    font-weight: 600;
    animation: fadeInUp 1s ease 0.5s both;
    margin: 1rem 0;
}

.typewriter-text{
    background: linear-gradient(90deg, #779eb2, #8eb1c2);
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #779eb2;
    text-shadow: 0 0 10px #8eb1c2;
}

.typewriter label{
    animation: blink 1s step-end infinite;
    color: white;
    font-weight: 300;
}

@keyframes blink{
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ===========================
   SOCIAL LINKS
   ===========================
   - Animated icon backgrounds and brand colors
*/
.social-links{
    display: flex;
    gap: 1.5rem; /* Space between icons */
    animation: fadeInUp 1s ease 1.5s both; 
}

.social-links ul{
    padding: 0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1rem;
}

.social-links ul li{
    list-style: none;
}

.social-links ul li a{
    width: 90px;
    height: 90px;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 3px solid white;
    transition: all 0.4s ease;
    z-index: 1;
}

.social-links ul li a .icon {
    position: relative;
    color: #262626;
    transition: .5s;
    font-size: 40px;
    z-index: 3;
}

/* Icon spin and color change on hover */
.social-links ul li a:hover .icon {
    color: white;
    transform:rotateY(360deg);
}

/* Animated background reveal for social icons */
.social-links ul li a:before {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: red;
    transition: all 0.5s;
    z-index: 2;
}

.social-links ul li a:hover:before {
    top: 0;
}

/* Brand-specific background colors for social icons */
.social-links .youtube::before { background: linear-gradient(180deg, #ff7a7a, #cc0000); }
.social-links .linkedin::before { background: linear-gradient(180deg, #7094a8, #005885); }
.social-links .github::before { background: linear-gradient(180deg, #505050, #111111); }
.social-links .artstation::before { background: linear-gradient(135deg, #13aff0, #0a7cb8); }

/* ===========================
   ABOUT SECTION
   =========================== */
.about .about-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
}

.about .about-details .left {
    width: 45%;
    flex-shrink: 0;
}

.about .left img {
    height: 400px;
    width: 400px;
    object-fit: cover;
    border-radius: 12px;
}

.about-details .right {
    width: 55%;
}

.about-details .right p {
    text-align: justify;
    color: white;
}

.about-details .right span{
    color: #779eb2;
    font-weight: 600;
    font-size: 1.2rem;
}

/* ===========================
   PROJECTS SECTION
   =========================== */
.card-container{
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.card{
    width: 350px;
    height: 725px;
    background: linear-gradient(180deg, #37444b 0%, #536269 100%);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0px 2px 4px rgba(0,0,0,0.2);
    margin: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 8px 32px #8eb1c2;
}

.card img{
    width: 100%;
    height: auto;
    transition: filter 0.3s;
    border: 2px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.card:hover img {
    filter: brightness(1.1) saturate(1.2);
}

.card .content{
    padding: 16px;
}

.card .content h3{
    font-size: 22px;
    margin-bottom: 8px;
    text-align: center;
    color: white;
    transition: color 0.3s;
}

.card:hover .content h3 {
    color: #779eb2;
}

.card-container .content p{
    color: white;
    font-size: 16px;
    line-height: 1.3;
}

.project-btn{
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.project-btn button {
    height: 40px;
    padding: 6px 16px;
    font-size: 1rem;
}

/* ===========================
   Skills Section
   =========================== */
.skills .content {
    padding: 40px 0;
}

.skills .boxes {
    display: grid;
    flex-wrap: wrap;
    align-items: flex-start;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 2rem;
}

.skills-details .box {
    background: linear-gradient(180deg, #37444b 0%, #536269 100%);
    padding: 2rem;
    border-radius: 15px;
    height: auto;
    color: white;
    text-align: center;
    transition: transform 0.3s ease;
}

.skills-details .box:hover{
    transform: translateY(-5px);
    transform: scale(1.05);
    box-shadow: 0px 6px 14px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.skills-details .boxes i {
    font-size: 60px;
    display: flex;
    justify-content: center;
    align-items: center;    
    padding-bottom: 10px; 
}

.skills-details h3{
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.skill-list{
    list-style: none;
}

.skill-list li{
    background: rgba(255, 255, 255, 0.2);
    margin: 0.5rem 0;
    padding: 0.5rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    min-height: auto;
}

.stars {
    color: #ececec;
    font-size: 1rem;
    letter-spacing: 2px;
}

/* ===========================
   Contact Section
   =========================== */
.contact .content {
    margin: 0 auto;
    padding: 30px 0;
    justify-content: center;
    align-items: center;
}

.contact .text {
    width: 80%;
    text-align: center;
    margin: auto;
}

.contact .button {
    text-align: center;
}

/* ===========================
   Footer
   =========================== */
footer {
    background: #365563;
    padding: 15px 0;
    text-align: center;
}

footer .text span {
    font-size: 17px;
    font-weight: 400;
    color: white;
}

footer .text span a {
    font-weight: 500;
    color: white;
}

/* Underline effect for footer links on hover */
footer .text span a:hover {
    text-decoration: underline;
}

/* FADE-IN ANIMATION */
@keyframes fadeInUp {
    from {
        opacity: 0;              /* Start invisible */
        transform: translateY(30px); /* Start below */
    }
    to {
        opacity: 1;              /* End fully visible */
        transform: translateY(0); /* End in position */
    }
}

@media screen and (max-width: 1200px) {
    /* Skills boxes stack at half-screen PC size */
    .skills .boxes {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media screen and (max-width: 900px) {
    /* Skills boxes single column at tablet size */
    .skills .boxes {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media screen and (max-width: 768px) {
    /* About Section - Stack vertically on mobile */
    .about .about-details {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .about .about-details .left,
    .about .about-details .right {
        width: 100%;
    }
    
    .about .left img {
        height: 300px;
        width: 300px;
        margin: 0 auto;
    }
    
    /* Skills Section - Smaller on mobile */
    .skill-list li {
        padding: 0.6rem;
        gap: 0.4rem;
    }
    
    .skill-list li .skill-name {
        font-size: 0.9rem;
        gap: 0.6rem;
    }
    
    .skill-list li i {
        font-size: 1.5rem;
    }
    
    .stars {
        font-size: 0.9rem;
        letter-spacing: 1px;
    }
    
    /* Home section - Stack vertically on mobile */
    .home-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        padding-top: 1rem;
    }
    
    .home-content .home-left {
        max-width: 300px;
        height: 300px;
        margin: 0 auto;
    }

    .home-content .home-left img {
        transform: scale(1.5) translateY(80px);
        object-position: center bottom;
    }
    
    /* Navigation - Improve mobile nav */
    nav .logo{
        font-size: 1.5rem;
    }

    .nav-links {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-links a {
        font-size: 0.8rem;
    }
    
    /* Typography adjustments for mobile */
    .home-content .home-right h1 {
        font-size: 2.5rem;
    }
    
    section .title span {
        font-size: 2rem;
    }
    
    .typewriter {
        font-size: 1.5rem;
    }
}

@media screen and (max-width: 480px) {
    /* Extra small screens */
    .skill-list li {
        padding: 0.5rem;
        gap: 0.3rem;
    }
    
    .skill-list li .skill-name {
        font-size: 0.85rem;
        gap: 0.5rem;
    }
    
    .skill-list li i {
        font-size: 1.3rem;
    }
    
    .stars {
        font-size: 0.8rem;
        letter-spacing: 1px;
    }
    
    .about .left img {
        height: 250px;
        width: 250px;
    }
    
    .home-content .home-left {
        max-width: 250px;
        height: 250px;
    }
    
    .home-content .home-right h1 {
        font-size: 2rem;
    }
    
    /* Container padding for very small screens */
    .container {
        padding: 0 10px;
    }
    
    .content {
        width: 95%;
    }
}