/* ===========================
   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");

/* React.dev Color Variables */
:root {
    --dark: #23272f;
    --darker: #1a1e26;
    --light-bg: #ffffff;
    --cyan: #38738f;
    --blue: #2d5368;
    --dark-blue: #141d29;
    --gray: #6b7280;
    --light-gray: #9ca3af;
    --border: #374151;
    --text-primary: #ffffff;
    --text-secondary: #d1d5db;}
*{
    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, var(--darker), var(--dark));
}

/* SECTIONS */
section{
    min-height: 100vh;
    padding: 80px 0 40px;
    position: relative;
}

/* Alternating section background colors */
section:nth-child(even) {
    background: var(--darker);
}

section:nth-child(odd) {
    background: var(--dark);
}

section .title {
    font-size: 2.5rem;     
    margin-bottom: 2rem;   
    color: var(--blue);     
    text-align: center;
    justify-content: center;
    position: relative;
}

section .title span {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-primary);
    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(90deg, var(--blue), var(--cyan));
    left: 0;
    bottom: 0;
}

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

section .topic {
    color: var(--text-primary);
    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;
    margin: 0 auto;
    padding: 0 20px;
}

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

.content p{
    font-size: 1.1rem;
    margin: 10px 0;
    color: var(--text-secondary);
}

/* ===========================
   BUTTON STYLES
   =========================== */
button {
    min-width: 150px;
    height: 60px;
    padding: 12px 24px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--dark-blue));
    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: rgba(35, 39, 47, 0.3); 
    border-radius: 4px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--blue), var(--cyan)); 
    border-radius: 12px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--cyan), var(--blue));
}

/* ===========================
   HEADER AND NAVIGATION
   =========================== */
header{
    background-color: var(--darker);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.5s ease;
    border-bottom: 1px solid var(--border);
}

nav{
    display: flex;
    justify-content: center; 
    align-items: center;   
    padding: 1rem 0; 
}

/* NAVIGATION MENU */
.nav-links{
    display: flex;
    gap: 2.5rem;
    align-items: center;
    justify-content: center; 
    margin: 1rem auto;
}

.nav-links a{
    color: var(--text-secondary);
    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: linear-gradient(90deg, var(--blue), var(--cyan));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

.nav-links a:hover {
    color: var(--cyan);
    text-shadow: 0 0 8px rgba(97, 218, 251, 0.6);
}

/* ===========================
   HOME SECTION
   =========================== */
#home{
    display: flex;
    align-items: center;
    color: var(--text-primary);
    text-align: center;
}

.home-content{
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 4rem;
    align-items: center; 
    width: 100%;
}

/* HOME LEFT */
.home-content .home-left{
    width: 100%;
    max-width: 400px;
    height: 600px;
    border-radius: 50%;      
    object-fit: cover;
    box-shadow: 0 20px 40px rgba(8, 126, 164, 0.3);
    border: 2px solid var(--cyan);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    position: relative;
}

.home-content .home-left::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, var(--cyan), transparent);
    animation: rotate 4s linear infinite;
    z-index: -1;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.home-content .home-left img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transform: scale(1.4);
    border-radius: 50%;
}

/* 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;
    color: var(--text-primary);
}

.home-content .home-right h1 span{
    color: var(--cyan);
    text-shadow: 0 0 15px var(--cyan);
}

/* Home Paragraph */
.home-content .home-right p{
    font-size: 1.5rem;
    opacity: 0.9;
    margin: 10px 0;
    animation: fadeInUp 1s ease 1s both;
    color: var(--text-secondary);
}

/* ===========================
   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, var(--cyan), var(--blue));
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--cyan);
    text-shadow: 0 0 10px var(--cyan);
}

.typewriter label{
    animation: blink 1s step-end infinite;
    color: var(--cyan);
    font-weight: 300;
}

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

/* ===========================
   SOCIAL LINKS
   =========================== */
.social-links{
    display: flex;
    gap: 1.5rem;
    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: linear-gradient(135deg, var(--dark), var(--darker));
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(8, 126, 164, 0.2);
    border: 3px solid var(--border);
    transition: all 0.4s ease;
    z-index: 1;
}

.social-links ul li a .icon {
    position: relative;
    color: var(--text-secondary);
    transition: .5s;
    font-size: 40px;
    z-index: 3;
}

.social-links ul li a:hover .icon {
    color: var(--text-primary);
    transform: rotateY(360deg);
}

.social-links ul li a:before {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--blue);
    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 ul li a:hover {
    border-color: var(--gray);
    box-shadow: 0 8px 25px rgba(97, 218, 251, 0.3);
}

/* ===========================
   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;
    border: 2px solid var(--cyan);
    box-shadow: 0 10px 30px rgba(97, 218, 251, 0.2);
    transition: all 0.3s ease;
}

.about .left img:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(97, 218, 251, 0.3);
}

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

.about-details .right p {
    text-align: justify;
    color: var(--text-secondary);
}

.about-details .right span{
    color: var(--cyan);
    font-weight: 600;
    font-size: 1.2rem;
}

/* ===========================
   PROJECTS SECTION
   =========================== */
.card-container{
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0 2rem;
}

.card{
    width: 350px;
    background: linear-gradient(145deg, var(--dark) 0%, var(--darker) 100%);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0px 4px 20px rgba(0,0,0,0.3);
    transition: all 0.4s ease;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    transition: left 0.6s ease;
}

.card:hover::before {
    left: 100%;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(97, 218, 251, 0.3);
    border-color: var(--cyan);
}

.card img{
    width: 80%;
    height: auto;
    transition: filter 0.3s;
    border: 4px solid var(--blue);
    background: var(--darker);
    overflow: hidden;
    border-radius: 8px;
    margin: 20px auto 0 auto;
    position: relative;
    display: block;
}

.card-image img {
    object-fit: cover;
    transition: all 0.4s ease;
}

.card:hover .card-image img {
    transform: scale(1.05);
    filter: brightness(1.1) saturate(1.2);
}

.card .content{
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card .content h3{
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
    text-align: center;
    transition: color 0.3s ease;
}

.card:hover .content h3 {
    color: var(--cyan);
}

.card-container .content p{
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.3;
}

.card-buttons {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
    margin-top: 1.2rem;
}

.project-btn{
    display: flex;
    justify-content: center;
}

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

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.tech-tag {
    background: rgba(8, 126, 164, 0.15);
    color: var(--cyan);
    padding: 0.3rem 0.7rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(97, 218, 251, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tech-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(97, 218, 251, 0.1), transparent);
    transition: left 0.4s ease;
}

.tech-tag:hover::before {
    left: 100%;
}

.tech-tag:hover {
    background: rgba(97, 218, 251, 0.25);
    border-color: var(--cyan);
    color: var(--text-primary);
    transform: translateY(-1px) scale(1.05);
}

/* ===========================
   Skills Section
   =========================== */
.skills {
    padding: 4rem 0;
    color: var(--text-primary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.title span {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.title span::before, 
.title span::after {
    content: '';
    position: absolute;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    left: 0;
    bottom: 0;
}

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

/* Skills Grid Layout */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Category Cards */
.skill-category {
    background: linear-gradient(145deg, var(--dark) 0%, var(--darker) 100%);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    transition: left 0.5s ease;
}

.skill-category:hover::before {
    left: 100%;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(97, 218, 251, 0.2);
    border-color: var(--cyan);
}

.category-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--cyan);
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
}

/* Skills Tags Container */
.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
}

/* Individual Skill Tags */
.skill-tag {
    background: rgba(8, 126, 164, 0.08);
    border: 1px solid rgba(97, 218, 251, 0.15);
    border-radius: 25px;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.skill-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(97, 218, 251, 0.1), transparent);
    transition: left 0.6s ease;
}

.skill-tag:hover::before {
    left: 100%;
}

.skill-tag:hover {
    background: rgba(97, 218, 251, 0.15);
    border-color: var(--cyan);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 15px rgba(97, 218, 251, 0.1);
}

.skill-tag i {
    font-size: 1.2rem;
    color: var(--cyan);
}

.skill-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

.skill-level {
    color: var(--blue);
    font-size: 0.8rem;
    margin-left: 0.3rem;
}

/* Compact Skills */
.skills-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.skill-item {
    background: rgba(8, 126, 164, 0.05);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.skill-item:hover {
    background: rgba(97, 218, 251, 0.1);
    border-color: var(--cyan);
    transform: translateX(5px);
}

.skill-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.skill-info i {
    font-size: 1.5rem;
    color: var(--cyan);
}

.stars {
    color: var(--cyan);
    font-size: 1rem;
    letter-spacing: 1px;
}

/* Toggle Button */
.layout-toggle {
    text-align: center;
    margin-bottom: 2rem;
}

.toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(97, 218, 251, 0.3);
}

.hidden {
    display: none;
}

/* ===========================
   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: var(--darker);
    padding: 15px 0;
    text-align: center;
    border-top: 1px solid var(--border);
}

footer .text span {
    font-size: 17px;
    font-weight: 400;
    color: var(--text-secondary);
}

footer .text span a {
    font-weight: 500;
    color: var(--cyan);
    transition: color 0.3s ease;
}

footer .text span a:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

/* FADE-IN ANIMATION */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */
@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 */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .skill-category {
        padding: 1.2rem;
    }
    
    .skills-tags {
        gap: 0.6rem;
    }
    
    .skill-tag {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .title span {
        font-size: 2rem;
    }
    
    .skills-compact {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    /* 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 */
    .nav-links {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-links a {
        font-size: 0.8rem;
    }
}