@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Roboto+Mono:wght@400;500&family=Roboto:wght@300;400;500;700&display=swap');

/* Loading Screen Styles */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader {
    position: relative;
    text-align: center;
}

.loader-circle {
    width: 120px;
    height: 120px;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loader-content {
    position: relative;
    z-index: 1;
}

.loader-name {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(120deg, var(--primary-color), #00f7ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    animation: pulse 1.5s ease-in-out infinite;
}

.loader-progress {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin: 15px auto;
    overflow: hidden;
}

.loader-bar {
    width: 0;
    height: 100%;
    background: var(--primary-color);
    animation: progress 2s ease-in-out forwards;
}

.loader-text {
    color: var(--text-color);
    font-size: 14px;
    letter-spacing: 2px;
    animation: blink 1s ease-in-out infinite;
}

/* Page Transition Animations */
#header, #about, #services, #portfolio, #contact {
    transition: opacity 0.5s ease, transform 0.5s ease;
    transform: translateY(20px);
}

/* Loading Animations */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(0.95);
    }
}

@keyframes progress {
    0% {
        width: 0;
    }
    100% {
        width: 100%;
    }
}

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

/* Dark Mode Adjustments for Loader */
.dark-mode .loader-wrapper {
    background: var(--background-color);
}

.dark-mode .loader-circle {
    border-color: var(--primary-color);
    border-top-color: transparent;
}

.dark-mode .loader-name {
    background: linear-gradient(120deg, var(--primary-color), #00f7ff);
    -webkit-background-clip: text;
    background-clip: text;
}

.dark-mode .loader-progress {
    background: rgba(230, 241, 255, 0.1);
}

.dark-mode .loader-text {
    color: var(--text-color);
}

/* ==========================================================================
   Base styles and variables
   ========================================================================== */
:root {
    /* Color scheme */
    --primary-color: #ff004f;
    --secondary-color: #555;
    --background-color: #f4f7f6;
    --surface-color: #ffffff;
    --text-color: #333;
    --text-light: #fff;
    --header-text-color: #fff;
    --header-overlay: rgba(0, 0, 0, 0.7);
    --header-bg-image: url(images/desk-back.png.jpg);
    
    /* Fonts */
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Roboto', sans-serif;
    --font-code: 'Roboto Mono', monospace;
    
    /* Transitions */
    --transition-speed: 0.3s;
    
    /* Breakpoints */
    --mobile: 480px;
    --tablet: 768px;
    --desktop: 1024px;
    --large-desktop: 1200px;
}

/* ==========================================================================
   Typography and Base Elements
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-primary);
}

body {
    background: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==========================================================================
   Navigation Styles
   ========================================================================== */
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 15px 5%;
    position: relative;
    z-index: 100;
}

/* Hamburger Menu */
.menu-btn {
    display: none;
    cursor: pointer;
    z-index: 101;
}

.menu-btn .bar {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    margin: 5px 0;
    transition: var(--transition-speed);
}

/* Navigation Links */
nav ul {
    display: flex;
    align-items: center;
    gap: 30px;
}

nav ul li {
    list-style: none;
}

nav ul li a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 16px;
    position: relative;
    transition: color var(--transition-speed);
}

/* Navigation Link Hover Effect */
nav ul li a::after {
    content: '';
    width: 0;
    height: 2px;
    background: var(--primary-color);
    position: absolute;
    left: 0;
    bottom: -6px;
    transition: width var(--transition-speed);
}

nav ul li a:hover::after {
    width: 100%;
}

/* ==========================================================================
   Responsive Navigation
   ========================================================================== */
@media (max-width: 768px) {
    .menu-btn {
        display: block;
        color: #ff004f;
    }

    nav ul {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--surface-color);
        flex-direction: column;
        padding: 80px 20px;
        transition: right var(--transition-speed);
    }

    nav ul.active {
        right: 0;
    }

    nav ul li {
        margin: 15px 0;
    }

    /* Hamburger Animation */
    .menu-btn.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .menu-btn.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-btn.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
}

/* ==========================================================================
   Header Section Responsive Styles
   ========================================================================== */
.header-text {
    padding: 0 5%;
    margin-top: clamp(60px, 15vh, 120px);
}

.header-text h1 {
    font-size: clamp(32px, 5vw, 60px);
    line-height: 1.2;
}

.role-description {
    margin-top: clamp(20px, 4vh, 40px);
}

/* Tech Stack Grid */
.tech-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

/* Stats Container */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

/* ==========================================================================
   Dark Mode Styles
   ========================================================================== */
.dark-mode {
    --background-color: #0a192f;
    --surface-color: #112240;
    --text-color: #e6f1ff;
    --primary-color: #00f7ff;
    --header-overlay: rgba(0, 0, 0, 0.85);
    --header-text-color: #fff;
}

/* ==========================================================================
   Responsive Utilities
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 1024px) {
    .container {
        padding: 0 40px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
}

/* ==========================================================================
   Animation Utilities
   ========================================================================== */
.fade-in {
    opacity: 0;
    animation: fadeIn var(--transition-speed) forwards;
}

.slide-up {
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp var(--transition-speed) forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ==========================================================================
   Helper Classes
   ========================================================================== */
.hidden-mobile {
    @media (max-width: 768px) {
        display: none;
    }
}

.hidden-desktop {
    @media (min-width: 769px) {
        display: none;
    }
}

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

/* Define dark mode colors */
body.dark-mode {
    --primary-color: #00f7ff;
    --secondary-color: #8892b0;
    --background-color: #0a192f;
    --surface-color: #112240;
    --text-color: #ccd6f6;
    --text-light: #0a192f;
    --header-text-color: #fff;
    --header-overlay: rgba(0, 0, 0, 0.75);
    --header-bg-image: url(images/de-background.png.jpg);
    --card-bg: #112240;
    --border-color: #233554;
    --link-color: #00f7ff;
    --link-hover-bg: #00f7ff;
    --link-hover-text: #1c6de6;
    --icon-color: #00f7ff;
    --code-bg: #1e2d4a;
    --code-text: #ccd6f6;
}

*{
    margin: 0;
    padding: 0;
    font-family: var(--font-primary);
    box-sizing: border-box;
}
html{
    scroll-behavior: smooth;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}
body{
    background: var(--background-color);
    color: var(--text-color);
    font-family: var(--font-secondary);
    line-height: 1.6;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}
#header{
    width: 100%;
    min-height: 100vh;
    background-image: linear-gradient(var(--header-overlay), var(--header-overlay)), var(--header-bg-image);
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 50px 0;
    position: relative;
    color: var(--header-text-color);
}

/* Remove the pseudo-element that was causing overlay issues */
#header::before {
    display: none;
}

/* Navigation styles with proper z-index */
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 15px 5%;
    position: relative;
    z-index: 100;
}

/* Header content styles */
.header-text {
    margin-top: 15%;
    font-size: 30px;
    position: relative;
    z-index: 2;
    color: var(--header-text-color);
}

.header-text h1 {
    font-size: clamp(40px, 8vw, 70px);
    font-weight: 800;
    line-height: 1.2;
    margin-top: 20px;
    color: var(--header-text-color);
    position: relative;
    z-index: 2;
}

.role-description {
    margin-top: 30px;
    position: relative;
    z-index: 2;
}

.role-description p {
    font-size: 24px;
    color: var(--header-text-color);
    margin-bottom: 25px;
    font-weight: 300;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
}

.tech-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: var(--header-text-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    cursor: default;
    position: relative;
    z-index: 2;
}

.stats-container {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    position: relative;
    z-index: 2;
}

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
    position: relative;
    z-index: 2;
}

/* Logo styles with proper z-index */
.logo {
    position: relative;
    cursor: pointer;
    z-index: 100;
}

.logo-text {
    position: relative;
    z-index: 100;
}

/* Navigation links with proper z-index */
nav ul li a {
    color: var(--header-text-color);
    text-decoration: none;
    font-size: 17px;
    position: relative;
    z-index: 100;
}

/* Dark mode specific adjustments */
.dark-mode .header-text,
.dark-mode .role-description p,
.dark-mode .tech-item,
.dark-mode .stat-item {
    color: var(--header-text-color);
}

/* Mobile adjustments */
@media only screen and (max-width: 768px) {
    .header-text {
        margin-top: 25%;
        padding: 0 20px;
    }

    nav {
        padding: 10px 5%;
    }

    .tech-stack {
        gap: 10px;
    }

    .stats-container {
        flex-direction: column;
        gap: 20px;
    }
}

/* ==========================================================================
   Helper Classes
   ========================================================================== */
.hidden-mobile {
    @media (max-width: 768px) {
        display: none;
    }
}

.hidden-desktop {
    @media (min-width: 769px) {
        display: none;
    }
}

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

/* Define dark mode colors */
body.dark-mode {
    --primary-color: #00f7ff;
    --secondary-color: #8892b0;
    --background-color: #0a192f;
    --surface-color: #112240;
    --text-color: #ccd6f6;
    --text-light: #0a192f;
    --header-text-color: #fff;
    --header-overlay: rgba(0, 0, 0, 0.75);
    --header-bg-image: url(images/de-background.png.jpg);
    --card-bg: #112240;
    --border-color: #233554;
    --link-color: #00f7ff;
    --link-hover-bg: #00f7ff;
    --link-hover-text: #1c6de6;
    --icon-color: #00f7ff;
    --code-bg: #1e2d4a;
    --code-text: #ccd6f6;
}

/* Logo styles */
.logo {
    position: relative;
    cursor: pointer;
    padding: 10px;
}

.logo-text {
    display: flex;
    align-items: center;
    position: relative;
}

.logo-letter {
    font-size: 32px;
    font-weight: 800;
    color: var(--header-text-color);
    margin: 0 2px;
    position: relative;
    display: inline-block;
    animation: float-letter 3s ease-in-out infinite;
}

.logo-letter:first-child {
    color: var(--primary-color);
    animation-delay: 0.2s;
}

.logo-letter:last-child {
    animation-delay: 0.4s;
}

.logo-subtitle {
    font-size: 14px;
    font-weight: 500;
    color: var(--header-text-color);
    opacity: 0;
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    transition: all 0.3s ease;
    letter-spacing: 2px;
}

.logo:hover .logo-letter {
    animation: bounce 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.logo:hover .logo-subtitle {
    opacity: 1;
    bottom: -20px;
}

.logo::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle,
        rgba(255, 0, 79, 0.1) 0%,
        transparent 70%
    );
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.logo:hover::after {
    opacity: 1;
}

@keyframes float-letter {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Dark mode adjustments for logo */
.dark-mode .logo-letter {
    color: #e6f1ff;
}

.dark-mode .logo-letter:first-child {
    color: var(--primary-color);
}

.dark-mode .logo-subtitle {
    color: #e6f1ff;
}

.dark-mode .logo::after {
    background: radial-gradient(
        circle,
        rgba(0, 247, 255, 0.1) 0%,
        transparent 70%
    );
}

/* Responsive adjustments */
@media only screen and (max-width: 768px) {
    .logo-letter {
        font-size: 28px;
    }
    
    .logo-subtitle {
        font-size: 12px;
        bottom: -12px;
    }
    
    .logo:hover .logo-subtitle {
        bottom: -16px;
    }
}

/* Add glowing effect on hover */
.logo-letter::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    filter: blur(15px);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    top: 0;
    left: 0;
}

.logo:hover .logo-letter::after {
    opacity: 0.3;
}

/* Add 3D effect */
.logo-letter {
    text-shadow: 
        2px 2px 0 rgba(0, 0, 0, 0.1),
        4px 4px 0 rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.logo:hover .logo-letter {
    transform: translateZ(20px);
}

nav ul li{
    display: inline-block;
    list-style: none;
    margin: 10px 20px;
}
nav ul li a::after{
    content: '';
    width: 0%;
    height: 3px;
    background: var(--primary-color);
    position: absolute;
    left: 0;
    bottom: -6px;
    transition: width var(--transition-speed) ease;
}
nav ul li a:hover::after{
    width: 100%;
}
.header-text .typing-text {
    font-family: var(--font-code);
    color: var(--primary-color);
    font-weight: 500;
    letter-spacing: 3px;
    font-size: 18px;
    margin-bottom: 20px;
    opacity: 0;
    animation: typing 3.5s steps(40, end), blink-caret .75s step-end infinite;
    border-right: .15em solid var(--primary-color);
    white-space: nowrap;
    overflow: hidden;
    width: 0;
    animation: typing 3.5s steps(40, end) forwards,
               blink-caret .75s step-end infinite;
}
.header-text h1 span {
    background: linear-gradient(120deg, #ff004f, #00f7ff, #ff004f);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 3s linear infinite,
               float 3s ease-in-out infinite;
    position: relative;
    display: inline-block;
}
.header-text h1 span::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    background: linear-gradient(120deg, #ff004f33, #00f7ff33, #ff004f33);
    background-size: 200% auto;
    filter: blur(8px);
    z-index: -1;
    animation: shine 3s linear infinite;
}
.header-text h1 span::before {
    content: 'Yogesh Rebari';
    position: absolute;
    width: 100%;
    height: 100%;
    left: 2px;
    top: 2px;
    background: linear-gradient(120deg, #ff004f, #00f7ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.3;
    filter: blur(1px);
}
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}
.tech-item:hover {
    background: var(--primary-color);
    color: #fff;
}
.stats-container {
    display: flex;
    gap: 40px;
    margin-top: 40px;
}
.stat-item:hover {
    transform: translateY(-5px);
}
.stat-number {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}
.stat-label {
    font-size: 14px;
    color: var(--header-text-color);
    opacity: 0.9;
}
/*-------------about------------*/
#about{
    padding: 80px 0;
    color: var(--secondary-color);
}
.row{
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}
.about-col-1{
    flex-basis: 35%;
}
.about-col-1 img{
    margin-top: 30px;
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
.about-col-2{
    flex-basis: 60%;
}
.tab-title{
    display: flex;
    margin: 20px 0 40px;
}
.tab-links{
    margin-right: 50px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
}
.tab-links::after{
    content: '';
    width: 0;
    height: 3px;
    background: var(--primary-color);
    position: absolute;
    left: 0;
    bottom: -8px;
    transition: 0.5s;
}
.tab-links.active-link::after{
    width: 50%;
}
.tab-contents ul li{
    list-style: none;
    margin: 12px 0;
    font-size: 15px;
}
.tab-contents ul li span{
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}
.tab-contents ul li br {
    display: none;
}
/* Apply code font to specific skills */
.tab-contents#skills ul li:nth-child(1) span::after { content: ' (Python, TensorFlow, Scikit-learn)'; font-family: var(--font-code); font-size: 13px; color: var(--secondary-color);}
.tab-contents#skills ul li:nth-child(2) span::after { content: ' (HTML, CSS, JS, React?)'; font-family: var(--font-code); font-size: 13px; color: var(--secondary-color);} /* Add frameworks if applicable */
.tab-contents#skills ul li:nth-child(3) span::after { content: ' (SQL, NoSQL?)'; font-family: var(--font-code); font-size: 13px; color: var(--secondary-color);} /* Specify DB types */
.tab-contents{
    display: none;
}
.tab-contents.active-tab{
    display: block;
}
/*-----------Services------------*/
#services{
    padding: 30px 0;
}
.services-list{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-gap: 40px;
    margin-top: 50px;
}
.services-list div{
    background: var(--surface-color);
    padding: 40px;
    font-size: 14px;
    font-weight: 300;
    border-radius: 8px;
    transition: background var(--transition-speed) ease, transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    border: 1px solid var(--border-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.07);
}
.services-list div i{
    font-size: 45px;
    margin-bottom: 30px;
    color: var(--icon-color);
}
.services-list div h2{
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
}
.services-list div a{
    text-decoration: none;
    color: var(--link-color);
    font-size: 12px;
    margin-top: 20px;
    display: inline-block;
}
.services-list div:hover{
    background: var(--surface-color);
    color: var(--text-color);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
    border-left: 4px solid var(--primary-color);
    padding-left: 36px;
}
.services-list div:hover i,
.services-list div:hover a,
.services-list div:hover h2 {
    color: var(--primary-color);
}
/*----------Portfolio----------*/
#portfolio{
    padding: 50px 0;
}
.work-list{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-gap: 40px;
    margin-top: 50px;
}
.work{
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}
.work img{
    width: 100%;
    border-radius: 10px;
    display: block;
    transition: transform 0.5s;
}
.layer{
    width: 100%;
    height: 0;
    background: linear-gradient(rgba(0,0,0,0.6), var(--primary-color));
    border-radius: 10px;
    position: absolute;
    left: 0;
    bottom: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    text-align: center;
    font-size: 14px;
    transition: height 0.5s;
}
.layer h3{
    font-weight: 500;
    margin-bottom: 20px;
    color: #fff;
}
.layer p{
    color: #fff;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
}
.layer a{
    margin-top: 20px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 18px;
    line-height: 60px;
    background: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-align: center;
    transition: transform 0.3s ease;
}
.layer a:hover {
    transform: translateY(-5px);
}
.work:hover img{
    transform: scale(1.1);
}
.work:hover .layer{
    height: 100%;
}
.work .Link {
    padding: 15px 20px;
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    text-align: center;
    position: relative;
    z-index: 2;
}
.work .Link a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 14px;
    transition: all var(--transition-speed) ease;
    padding: 8px 20px;
    border-radius: 4px;
    border: 1px solid var(--primary-color);
}
.work .Link a:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
}
.work .Link span {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 4px;
    background-color: var(--surface-color);
    border: 1px solid var(--secondary-color);
}
.btn{
    display: inline-block;
    margin: 25px 10px 25px 0;
    padding: 12px 35px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--link-color);
    background-color: transparent;
    font-weight: 500;
    transition: background var(--transition-speed) ease, color var(--transition-speed) ease;
}
.btn:hover{
    background: var(--link-hover-bg);
    color: var(--link-hover-text);
}

/*------------Contact----------*/
.contact-left{
    flex-basis: 35%;
}
.contact-right{
    flex-basis: 60%;
}
.contact-left p{
    margin-top: 30px;
}
.contact-left p i{
    color: var(--primary-color);
    margin-right: 15px;
    font-size: 22px;
}
.social-icons{
    margin-top: 30px;
}
.social-icons a i{
    text-decoration: none;
    font-size: 28px;
    margin-right: 15px;
    color: var(--secondary-color);
    display: inline-block;
    transition: transform var(--transition-speed) ease, color var(--transition-speed) ease;
}
.social-icons a i:hover{
    color: var(--primary-color);
    transform: translateY(-5px);
}
.btn.btn2{
    display: inline-block;
    background: var(--primary-color);
    color: var(--link-hover-text);
    border-color: var(--primary-color);
}
.btn.btn2:hover{
    background: var(--link-hover-bg);
    color: var(--link-hover-text);
    opacity: 0.85;
}
.contact-right form{
    width: 100%;
}
form input, form textarea{
    width: 100%;
    border: 1px solid var(--border-color);
    outline: none;
    background: var(--surface-color);
    padding: 15px;
    margin: 15px 0;
    color: var(--text-color);
    font-size: 16px;
    border-radius: 6px;
}
form .btn2{
    padding: 12px 45px;
    font-size: 16px;
    margin-top: 20px;
    cursor: pointer;
}
.copyright{
    width: 100%;
    text-align: center;
    padding: 25px;
    background: var(--surface-color);
    color: var(--secondary-color);
    font-weight: 400;
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
}
.copyright i{
    color: var(--primary-color);
}
/*---------CSS for small screen--------*/


nav .fa-solid{
    display: none;
    color: var(--text-light);
}


@media only screen and (max-width: 600px){
    #header{
        padding: 30px 0;
    }
    .header-text{
        margin: 30px auto;
        padding: 0 20px;
    }
    .header-text h1{
        font-size: 36px;
        text-shadow: 
            1px 1px 3px rgba(0, 0, 0, 0.5),
            0 0 15px rgba(0, 0, 0, 0.2);
    }
    nav .fa-solid{
        display: block;
        font-size: 25px;
        color: var(--text-light);
    }
    nav ul{
        background: var(--primary-color);
        position: fixed;
        top: 0;
        right: -200px;
        width: 200px;
        height: 100vh;
        padding-top: 50px;
        z-index: 2;
        transition: right 0.5s;
    }
    nav ul li{
        display: block;
        margin: 25px;
    }
    nav ul .fa-solid{
        position: absolute;
        top: 25px;
        left: 25px;
        cursor: pointer;
        color: var(--text-light);
    }
    .sub-title{
        font-size: 35px;
    }
    .about-col-1, .about-col-2{
        flex-basis: 100%;
    }
    .about-col-1{
        margin-bottom: 30px;
    }
    .about-col-2{
        font-size: 14px;
    }
    .tab-links{
        font-size: 16px;
        margin-right: 20px;
    }
    .contact-left, .contact-right{
        flex-basis: 100%;
    }
    .copyright{
        font-size: 13px;
    }

}
#msg{
    color: #61b752;
    margin-top: -40px;
    display: block;
}

/* Dark Mode Toggle Switch Styles */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}
.theme-switch-wrapper.page2-toggle,
.theme-switch-wrapper.page3-toggle {
    display: none;
}
.theme-switch {
    display: inline-block;
    height: 28px;
    position: relative;
    width: 55px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: transparent;
    border: 1px solid var(--secondary-color);
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s ease;
}

.slider:before {
    background-color: var(--secondary-color);
    bottom: 3px;
    content: "";
    height: 20px;
    left: 3px;
    position: absolute;
    transition: .4s ease;
    width: 20px;
    z-index: 5;
}

input:checked + .slider {
    background-color: transparent;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(27px);
    background-color: var(--primary-color);
    box-shadow: 0 0 8px var(--primary-color);
}

.slider.round {
    border-radius: 28px;
}

.slider.round:before {
    border-radius: 50%;
}

.theme-switch-wrapper span {
    display: none;
}

.theme-switch .icon-sun,
.theme-switch .icon-moon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--secondary-color);
    z-index: 1;
    transition: color var(--transition-speed) ease, opacity 0.3s ease;
}

.theme-switch .icon-sun {
    left: 6px;
    opacity: 1;
}

.theme-switch .icon-moon {
    right: 6px;
    opacity: 0.5;
}

.theme-switch input:checked ~ .icon-sun {
    opacity: 0.5;
}
.theme-switch input:checked ~ .icon-moon {
    opacity: 1;
    color: var(--primary-color);
}

/* Adjust toggle position for mobile */
@media only screen and (max-width: 600px) {
    .theme-switch-wrapper {
        /* No special positioning needed, handled by nav li */
    }
    .theme-switch-wrapper.page2-toggle,
    .theme-switch-wrapper.page3-toggle {
        display: none;
    }
    nav ul li.toggle-list-item {
        margin: 25px;
        display: flex;
        justify-content: center;
    }
    .header-text {
        margin-top: 40%;
    }
    .about-col-1 img {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    }
    .sub-title {
        font-size: 35px;
    }
    .contact-left, .contact-right {
        flex-basis: 100%;
    }
    .copyright {
        font-size: 13px;
    }
}

/* Dark mode adjustments */
.dark-mode nav ul li a {
    color: #e6f1ff;
    text-shadow: 0 0 10px rgba(230, 241, 255, 0.2);
    transition: color 0.3s ease;
}

.dark-mode nav ul li a:hover {
    color: var(--primary-color);
}

.dark-mode .header-text h1 {
    color: #e6f1ff;
}

.dark-mode .header-text h1 span {
    background: linear-gradient(120deg, #ff004f, #00f7ff, #ff004f);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 3s linear infinite,
               float 3s ease-in-out infinite;
}

.dark-mode .header-text h1 span::after {
    background: linear-gradient(120deg, #ff004f33, #00f7ff33, #ff004f33);
}

.dark-mode .header-text h1 span::before {
    background: linear-gradient(120deg, #ff004f, #00f7ff);
}

.dark-mode .role-description p {
    color: #e6f1ff;
}

.dark-mode .tech-item {
    background: rgba(230, 241, 255, 0.1);
    border-color: rgba(230, 241, 255, 0.2);
    color: #e6f1ff;
}

.dark-mode .tech-item:hover {
    background: var(--primary-color);
    color: #0a192f;
}

.dark-mode .stats-container .stat-item {
    background: rgba(230, 241, 255, 0.05);
    border-color: rgba(230, 241, 255, 0.1);
}

.dark-mode .stats-container .stat-number {
    color: var(--primary-color);
}

.dark-mode .stats-container .stat-label {
    color: #e6f1ff;
}

.dark-mode .typing-text {
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(255, 0, 79, 0.3);
}

/* Add glow effects for better visibility in dark mode */
.dark-mode .header-text h1 {
    text-shadow: 0 0 20px rgba(230, 241, 255, 0.2);
}

.dark-mode .role-description p {
    text-shadow: 0 0 15px rgba(230, 241, 255, 0.1);
}

.dark-mode .tech-item {
    box-shadow: 0 0 15px rgba(230, 241, 255, 0.05);
}

.dark-mode .stats-container .stat-item {
    box-shadow: 0 0 20px rgba(230, 241, 255, 0.05);
}

/* Ensure consistent hover effects */
.dark-mode .tech-item:hover,
.dark-mode .stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(230, 241, 255, 0.1);
}

/* Navigation underline effect in dark mode */
.dark-mode nav ul li a::after {
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

.resume-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: hidden;
}

.resume-modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    height: 90vh;
    background: white;
    border-radius: 8px;
}

.resume-modal-content embed {
    width: 100%;
    height: 100%;
    border: none;
}

.close-modal {
    position: absolute;
    right: 25px;
    top: 10px;
    color: var(--text-light);
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.close-modal:hover {
    color: var(--primary-color);
}

#about .row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

#about .row:last-child {
    margin-top: 20px;
    justify-content: flex-start;
    gap: 20px;
}

@media only screen and (max-width: 600px) {
    .resume-modal-content {
        width: 95%;
        height: 80vh;
        padding: 10px;
    }

    #about .row:last-child {
        justify-content: center;
    }

    #about .row:last-child .btn {
        margin: 10px;
    }
}

/* Responsive adjustments */
@media only screen and (max-width: 600px) {
    .work-list {
        grid-gap: 20px;
    }
    
    .layer {
        padding: 0 20px;
    }
    
    .layer h3 {
        margin-bottom: 15px;
        font-size: 18px;
    }
    
    .layer p {
        font-size: 13px;
        margin-bottom: 15px;
    }
    
    .layer a {
        width: 50px;
        height: 50px;
        line-height: 50px;
        font-size: 16px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glowText {
    0%, 100% {
        text-shadow: 0 0 10px rgba(255, 0, 79, 0.5),
                     0 0 20px rgba(255, 0, 79, 0.3),
                     0 0 30px rgba(255, 0, 79, 0.1);
    }
    50% {
        text-shadow: 0 0 20px rgba(255, 0, 79, 0.8),
                     0 0 30px rgba(255, 0, 79, 0.5),
                     0 0 40px rgba(255, 0, 79, 0.3);
    }
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--primary-color) }
}

/* Dark mode adjustments */
.dark-mode .tech-item {
    background: rgba(0, 247, 255, 0.1);
    border-color: rgba(0, 247, 255, 0.2);
}

.dark-mode .tech-item:hover {
    background: rgba(0, 247, 255, 0.2);
}

.dark-mode .stat-item {
    background: rgba(0, 247, 255, 0.05);
    border-color: rgba(0, 247, 255, 0.1);
}

.dark-mode .stat-number {
    color: #00f7ff;
}

/* Responsive adjustments */
@media only screen and (max-width: 768px) {
    .header-text {
        margin-top: 25%;
        padding: 0 20px;
    }

    .tech-stack {
        gap: 10px;
    }

    .tech-item {
        padding: 6px 12px;
        font-size: 12px;
    }

    .stats-container {
        flex-direction: column;
        gap: 20px;
    }

    .stat-item {
        padding: 15px;
    }

    .stat-number {
        font-size: 28px;
    }

    .role-description p {
        font-size: 20px;
    }
}

@keyframes shine {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Glitch effect on hover */
.header-text h1 span:hover {
    animation: glitch 0.5s cubic-bezier(.25, .46, .45, .94) both infinite;
}

@keyframes glitch {
    0% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
    100% {
        transform: translate(0);
    }
}

/* Responsive adjustments */
@media only screen and (max-width: 768px) {
    .header-text h1 span::before {
        left: 1px;
        top: 1px;
    }
    
    .header-text h1 span::after {
        filter: blur(4px);
    }
}

@media only screen and (max-width: 768px) {
    #header {
        background-attachment: scroll;
        background-position: center center;
    }
}

/* Header background adjustments for better visibility */
.header-content-wrapper {
    position: relative;
    z-index: 2;
}

/* Ensure background image is properly loaded */
@media (min-width: 769px) {
    #header {
        background-attachment: fixed;
        background-position: center center;
    }
}

@media only screen and (max-width: 768px) {
    #header {
        background-attachment: scroll;
        background-position: center center;
        background-image: linear-gradient(var(--header-overlay), var(--header-overlay)), var(--header-bg-image);
    }
    
    :root {
        --header-overlay: rgba(0, 0, 0, 0.75);
    }
}
