/* ===== VARIABLES ===== */
:root {
    /* Light mode colors */
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #fff;
    --bg-secondary: #f8f9fa;
    --border-color: #e9ecef;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --card-bg: #fff;
    --navbar-bg: rgba(255, 255, 255, 0.95);

    /* Typography */
    --font-family: 'Poppins', sans-serif;
    
    /* Transitions */
    --transition: all 0.3s ease;
}

/* Dark mode colors */
.dark-mode {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --text-color: #e6e6e6;
    --text-light: #b3b3b3;
    --bg-color: #121212;
    --bg-secondary: #1e1e1e;
    --border-color: #2a2a2a;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --card-bg: #1e1e1e;
    --navbar-bg: rgba(18, 18, 18, 0.95);
}

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 62.5%; /* 1rem = 10px */
}

body {
    font-family: var(--font-family);
    font-size: 1.6rem;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: var(--transition);
}

.container {
    width: 100%;
    max-width: 120rem;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 8rem 0;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

h1 {
    font-size: 4rem;
}

h2 {
    font-size: 3.2rem;
}

h3 {
    font-size: 2.4rem;
}

p {
    margin-bottom: 1.5rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.highlight {
    color: var(--primary-color);
}

.section-header {
    text-align: center;
    margin-bottom: 6rem;
}

.section-header h2 {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 5rem;
    height: 0.3rem;
    background-color: var(--primary-color);
}

.section-header p {
    color: var(--text-light);
    font-size: 1.8rem;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 1.2rem 2.4rem;
    border-radius: 5rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1.6rem;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
}

.primary-btn:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1.5rem var(--shadow-color);
}

.secondary-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.secondary-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1.5rem var(--shadow-color);
}

.small-btn {
    padding: 0.8rem 1.6rem;
    font-size: 1.4rem;
}

/* ===== NAVBAR ===== */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    z-index: 100;
    background-color: var(--navbar-bg);
    box-shadow: 0 0.2rem 1rem var(--shadow-color);
    transition: var(--transition);
}

.logo h1 {
    font-size: 2.4rem;
    font-weight: 700;
    margin: 0;
}

.nav-links ul {
    display: flex;
    gap: 2rem;
}

.nav-links ul li a {
    color: var(--text-color);
    font-weight: 500;
    position: relative;
    padding: 0.5rem;
}

.nav-links ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links ul li a:hover::after,
.nav-links ul li a.active::after {
    width: 100%;
}

.theme-toggle button {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle button:hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 2.5rem;
    height: 0.3rem;
    margin-bottom: 0.5rem;
    background-color: var(--text-color);
    transition: var(--transition);
}

.hamburger span:last-child {
    margin-bottom: 0;
}

/* ===== HERO SECTION ===== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background-color: var(--bg-secondary);
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 4.8rem;
    margin-bottom: 1rem;
}

.typing-container {
    font-size: 2.4rem;
    font-weight: 500;
    margin-bottom: 2rem;
    display: flex;
}

#typing-text {
    color: var(--primary-color);
    font-weight: 600;
    position: relative;
}

.cursor {
    margin-left: 3px;
    animation: blink 1s infinite;
}

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

.hero-text p {
    font-size: 1.8rem;
    margin-bottom: 3rem;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
}

.hero-image {
    flex: 1;
    max-width: 40rem;
}

.hero-image img {
    border-radius: 1rem;
    box-shadow: 0 1rem 2rem var(--shadow-color);
    transition: var(--transition);
}

.hero-image img:hover {
    transform: scale(1.03);
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    animation: bounce 2s infinite;
}

.scroll-indicator p {
    margin-bottom: 1rem;
    font-size: 1.4rem;
    opacity: 0.8;
}

.scroll-arrow i {
    font-size: 2rem;
    color: var(--primary-color);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-1rem); }
    60% { transform: translateY(-0.5rem); }
}

/* ===== SKILLS SECTION ===== */
.skills {
    background-color: var(--bg-color);
    position: relative;
    overflow: hidden;
}

.carousel-container {
    width: 100%;
    overflow: hidden;
    margin-bottom: 4rem;
}

.skill-carousel {
    width: 100%;
    margin-bottom: 3rem;
}

.carousel-track {
    display: flex;
    animation-duration: 30s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.left-to-right .carousel-track {
    animation-name: scroll-left;
}

.right-to-left .carousel-track {
    animation-name: scroll-right;
}

@keyframes scroll-left {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

@keyframes scroll-right {
    0% { transform: translate3d(-50%, 0, 0); }
    100% { transform: translate3d(0, 0, 0); }
}

.skill-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    margin: 0 1rem;
    min-width: 12rem;
    background-color: var(--card-bg);
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1.5rem var(--shadow-color);
    transition: var(--transition);
}

.skill-item:hover {
    transform: translateY(-0.5rem);
    box-shadow: 0 1rem 2rem var(--shadow-color);
}

.skill-item i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.skill-item span {
    font-size: 1.4rem;
    font-weight: 500;
}

/* ===== PROJECTS SECTION ===== */
.projects {
    background-color: var(--bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(28rem, 1fr));
    gap: 3rem;
}

.flip-card {
    background-color: transparent;
    perspective: 100rem;
    height: 35rem;
    width: 100%;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    box-shadow: 0 0.5rem 1.5rem var(--shadow-color);
    border-radius: 1rem;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 1rem;
    overflow: hidden;
}

.flip-card-front {
    background-color: var(--card-bg);
    display: flex;
    flex-direction: column;
}

.flip-card-front img {
    width: 100%;
    height: 70%;
    object-fit: cover;
}

.flip-card-front h3 {
    margin: auto 0;
    padding: 2rem;
}

.flip-card-back {
    background-color: var(--primary-color);
    color: white;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
}

.flip-card-back h3 {
    margin-bottom: 1rem;
}

.flip-card-back p {
    margin-bottom: 2rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tech-stack span {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 1.2rem;
}

.project-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.project-links .btn {
    background-color: white;
    color: var(--primary-color);
}

.project-links .btn:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.project-links .secondary-btn {
    background-color: transparent;
    border-color: white;
    color: white;
}

.project-links .secondary-btn:hover {
    background-color: white;
    color: var(--primary-color);
}

/* ===== ABOUT SECTION ===== */
.about {
    background-color: var(--bg-color);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 5rem;
}

.about-text p {
    margin-bottom: 2rem;
}

.about-cta {
    margin-top: 3rem;
}

.tools-container h3 {
    margin-bottom: 2rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.tool-item {
    background-color: var(--card-bg);
    border-radius: 1rem;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 0.5rem 1rem var(--shadow-color);
    transition: var(--transition);
}

.tool-item:hover {
    transform: translateY(-0.5rem);
    box-shadow: 0 0.8rem 1.5rem var(--shadow-color);
}

.tool-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.tool-item span {
    font-weight: 500;
}

/* Education Timeline */
.education {
    margin-top: 5rem;
}

.education h3 {
    text-align: center;
    margin-bottom: 4rem;
}

.timeline {
    position: relative;
    max-width: 80rem;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 0.4rem;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.timeline-item {
    padding: 1rem 4rem;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item:nth-child(odd) .timeline-content {
    text-align: right;
    padding-right: 3rem;
}

.timeline-item:nth-child(even) .timeline-content {
    text-align: left;
    padding-left: 3rem;
}

.timeline-dot {
    position: absolute;
    width: 2.5rem;
    height: 2.5rem;
    right: -1.25rem;
    background-color: var(--primary-color);
    border: 0.4rem solid var(--bg-color);
    top: 1.5rem;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -1.25rem;
}

.timeline-content {
    padding: 2rem;
    background-color: var(--card-bg);
    box-shadow: 0 0.5rem 1rem var(--shadow-color);
    border-radius: 1rem;
    transition: var(--transition);
}

.timeline-content:hover {
    transform: translateY(-0.5rem);
    box-shadow: 0 1rem 2rem var(--shadow-color);
}

.timeline-content h4 {
    margin-bottom: 0.5rem;
}

.timeline-content p {
    margin-bottom: 0.5rem;
}

.timeline-content .date {
    font-size: 1.4rem;
    color: var(--text-light);
    font-style: italic;
}

/* ===== CONTACT SECTION ===== */
.contact {
    background-color: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.section-header p {
    color: var(--text-light);
    font-size: 1.6rem;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 3rem;
}

.contact-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-right: 1.5rem;
}

.contact-item h4 {
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: var(--text-light);
    margin-bottom: 0;
}

.schedule-meeting {
    margin: 2rem 0;
}

.schedule-btn {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 2.4rem;
    background-color: goldenrod;
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 1.6rem;
    
}


.schedule-btn i {
    font-size: 1.6rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    font-size: 2rem;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-0.5rem);
}

.contact-form {
    background-color: var(--card-bg);
    border-radius: 1rem;
    padding: 3rem;
    box-shadow: 0 0.5rem 1.5rem var(--shadow-color);
}

.form-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.form-header h3 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--text-color);
}

.form-header p {
    font-size: 1.4rem;
    color: var(--text-light);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: 1.6rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

.btn.primary-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.2rem 2.4rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 1.6rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn.primary-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-0.2rem);
}

.btn.primary-btn i {
    font-size: 1.4rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .contact-form {
        padding: 2rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .schedule-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== FOOTER ===== */
footer {
    background-color: var(--bg-color);
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

footer p {
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

/* ===== BACK TO TOP BUTTON ===== */
#back-to-top {
    position: fixed;
    bottom: 3rem;
    right: 3rem;
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 99;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-0.5rem);
}

/* ===== ANIMATIONS ===== */
[data-animation] {
    opacity: 0;
    transform: translateY(3rem);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animation].animate {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE DESIGN ===== */
@media screen and (max-width: 1024px) {
    html {
        font-size: 58%;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        order: 2;
        margin-top: 4rem;
    }
    
    .social-links {
        justify-content: center;
        margin-top: 2rem;
    }
    
    .timeline::after {
        left: 3.1rem;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 7rem;
        padding-right: 1rem;
    }
    
    .timeline-item:nth-child(odd) {
        left: 0;
    }
    
    .timeline-item:nth-child(even) {
        left: 0;
    }
    
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        text-align: left;
        padding-left: 0;
        padding-right: 0;
    }
    
    .timeline-dot {
        left: 1.5rem;
    }
    
    .timeline-item:nth-child(even) .timeline-dot {
        left: 1.5rem;
    }
}

@media screen and (max-width: 768px) {
    html {
        font-size: 55%;
    }
    
    .nav-links {
        position: fixed;
        top: 8rem;
        left: 0;
        width: 100%;
        background-color: var(--navbar-bg);
        box-shadow: 0 0.5rem 1rem var(--shadow-color);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: var(--transition);
    }
    
    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    
    .nav-links ul {
        flex-direction: column;
        align-items: center;
        padding: 3rem 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(25rem, 1fr));
    }
    
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 576px) {
    html {
        font-size: 50%;
    }
    
    section {
        padding: 6rem 0;
    }
    
    .hero {
        padding-top: 6rem;
    }
    
    .hero-text h1 {
        font-size: 3.6rem;
    }
    
    .typing-container {
        font-size: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== SERVICES SECTION ===== */
.services {
    background-color: var(--bg-secondary);
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(30rem, 1fr));
    gap: 3rem;
}

.service-card {
    background-color: var(--card-bg);
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 0.5rem 1.5rem var(--shadow-color);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.service-card:hover {
    transform: translateY(-0.8rem);
    box-shadow: 0 1rem 2rem var(--shadow-color);
}

.service-icon {
    width: 8rem;
    height: 8rem;
    background-color: rgba(67, 97, 238, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background-color: var(--primary-color);
}

.service-icon i {
    font-size: 3.2rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.service-card:hover .service-icon i {
    color: white;
}

.service-card h3 {
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.service-card p {
    color: var(--text-light);
    font-size: 1.5rem;
    margin-bottom: 0;
}

/* Media Queries for Services Section */
@media screen and (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(25rem, 1fr));
    }
}

@media screen and (max-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(25rem, 1fr));
    }
}

@media screen and (max-width: 576px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}