:root {
    --primary: #e74c3c;
    --primary-dark: #c0392b;
    --secondary: #3498db;
    --dark: #121212;
    --dark-light: #1e1e1e;
    --light: #f8f9fa;
    --light-dark: #e9ecef;
    --text-dark: #e0e0e0;
    --text-light: #333;
    --text-secondary-dark: #b0b0b0;
    --text-secondary-light: #666;
    --card-dark: rgba(30, 30, 30, 0.5);
    --card-light: rgba(255, 255, 255, 0.6);
    --glass-dark: rgba(30, 30, 30, 0.3);
    --glass-light: rgba(255, 255, 255, 0.3);
    --success: #2ecc71;
    --warning: #f39c12;
}

* {
    margin: 100;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.5s ease, color 0.3s ease;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: var(--text-dark);
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
    min-height: 100vh;
    perspective: 1000px;
}


.container {
    text-align: center;
}

/* Theme Toggle */
.theme-toggle {
    background: rgba(231, 76, 60, 0.2);
    border: none;
    width: 50px;
    height: 25px;
    border-radius: 20px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 21px;
    height: 21px;
    background: var(--primary);
    border-radius: 50%;
    transition: transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

body.light-mode .theme-toggle::before {
    transform: translateX(25px);
    background: #fff;
}

/* Icons */
.theme-toggle .icon {
    position: absolute;
    width: 15px;
    height: 15px;
    transition: opacity 0.3s;
    z-index: 1;
}

.sun {
    left: 5px;
    fill: #f39c12;
}

.moon {
    right: 5px;
    fill: #bdc3c7;
}

body.light-mode .sun {
    fill: #e74c3c;
}

body.light-mode .moon {
    fill: #95a5a6;
}


body.light-mode {
    background: linear-gradient(135deg, #c9d6ff 0%, #e2e2e2 100%);
    color: var(--text-light);
}

.code-font {
    font-family: 'Roboto Mono', monospace;
}

/* Glass container style */
.glass {
    background: var(--glass-dark);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

body.light-mode .glass {
    background: var(--glass-light);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header.glass {
    background: rgba(18, 18, 18, 0.2);
    border-bottom: 1px solid rgba(231, 76, 60, 0.2);
}

body.light-mode header.glass {
    background: rgba(248, 249, 250, 0.2);
    border-bottom: 1px solid rgba(231, 76, 60, 0.2);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    z-index: 1001;
}

.logo i {
    margin-right: 0.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: color 0.3s;
    position: relative;
}

body.light-mode .nav-links a {
    color: var(--text-light);
}

.nav-links a:hover {
    color: var(--primary);
}

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

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

/* Mobile menu */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-dark);
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1001;
}

body.light-mode .mobile-menu-btn {
    color: var(--text-light);
}

/* Theme Toggle */
.theme-toggle {
    background: rgba(231, 76, 60, 0.2);
    border: none;
    width: 50px;
    height: 25px;
    border-radius: 20px;
    cursor: pointer;
    position: relative;
    margin-left: 20px;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 21px;
    height: 21px;
    background: var(--primary);
    border-radius: 50%;
    transition: transform 0.3s;
}

body.light-mode .theme-toggle::before {
    transform: translateX(25px);
    background: #fff;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 5% 5% 10%;
    position: relative;
    overflow: hidden;
}

.hero-content {
    margin-top: 80px;
    max-width: 650px;
    z-index: 10;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
    line-height: 1.2;
}

body.light-mode .hero h1 {
    color: var(--text-light);
}

.hero h1 span {
    color: var(--primary);
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--text-secondary-dark);
    margin-bottom: 2rem;
}

body.light-mode .hero p {
    color: var(--text-secondary-light);
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--primary);
    color: white;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.6);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    margin-left: 1rem;
}

.btn-outline:hover {
    background: rgba(231, 76, 60, 0.1);
    color: var(--text-dark);
}

body.light-mode .btn-outline:hover {
    color: var(--text-light);
}

.hero-phone {
    position: absolute;
    right: 10%;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    height: 600px;
    perspective: 1500px;
    z-index: 5;
    cursor: grab;
}

.hero-phone:active {
    cursor: grabbing;
}

.phone-container {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transform: rotateY(-15deg) rotateX(10deg);
    transition: transform 0.1s ease-out;
}

.phone-frame {
    position: absolute;
    width: 100%;
    height: 100%;
    /* background: linear-gradient(45deg, #1a1a1a, #2a2a2a); */
    border-radius: 40px;
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.5); 
    transform: translateZ(0);
    /* border: 1px solid rgba(100, 100, 100, 0.3); */
    overflow: hidden;

}

/* body.light-mode .phone-frame {
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
    box-shadow: 
        0 0 0 8px rgba(200,200,200,0.2),
        0 0 0 10px rgba(150,150,150,0.3),
        0 0 0 12px rgba(200,200,200,0.2);
} */

/* Dynamic Island */
.dynamic-island {
    position: absolute;
    width: 100px;
    height: 30px;
    background: #1a1a1a;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 20px;
    z-index: 1;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}


/* Phone Screens */
.phone-screen {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    transform: translateZ(20px);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    text-align: center;
    padding: 5px;
    box-sizing: border-box;
}

/* Sections */
.section {
    padding: 100px 5%;
    position: relative;
}

.section-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 60px;
    position: relative;
}

body.light-mode .section-title {
    color: var(--text-light);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

/* About Section */
.about-content {
    display: flex;
    gap: 50px;
    align-items: center;
}

.about-text {
    flex: 1;
    padding-left: 100px;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.about-text p{
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--text-secondary-dark);
}

.about-text li{
    margin-left: 4%;
}

body.light-mode .about-text p {
    color: var(--text-secondary-light);
}

.cube-container {
    flex: 1;
    height: 340px;
    position: relative;
    perspective: 1000px;
}

.cube {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-style: preserve-3d;
    transform: translate(-50%, -50%) rotateX(-20deg) rotateY(-20deg);
    width: 200px;
    height: 200px;
    animation: rotate 15s infinite linear;
}

.cube-face {
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(231, 76, 60, 0.1);
    border: 2px solid var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: var(--primary);
    opacity: 0.8;
}

body.light-mode .cube-face {
    background: rgba(231, 76, 60, 0.05);
}

.cube-face:nth-child(1) { transform: translateZ(100px); }
.cube-face:nth-child(2) { transform: rotateY(180deg) translateZ(100px); }
.cube-face:nth-child(3) { transform: rotateY(90deg) translateZ(100px); }
.cube-face:nth-child(4) { transform: rotateY(-90deg) translateZ(100px); }
.cube-face:nth-child(5) { transform: rotateX(90deg) translateZ(100px); }
.cube-face:nth-child(6) { transform: rotateX(-90deg) translateZ(100px); }

/* Skills Section */
.skills {
    background: rgba(30, 30, 30, 0.2);
}

body.light-mode .skills {
    background: rgba(233, 236, 239, 0.2);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.skill-card {
    background: var(--card-dark);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

body.light-mode .skill-card {
    background: var(--card-light);
    border: 1px solid rgba(231, 76, 60, 0.2);
    color: var(--text-light);
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
}

.skill-card i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.skill-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.skill-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-top: 15px;
    overflow: hidden;
}

body.light-mode .skill-bar {
    background: rgba(0, 0, 0, 0.1);
}

.skill-progress {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    position: relative;
    width: 0;
    transition: width 1.5s ease-out;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--card-dark);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s;
    position: relative;
    border: 1px solid rgba(231, 76, 60, 0.2);
    transform-style: preserve-3d;
    transform: perspective(1000px) rotateY(0deg);
    transition: transform 0.5s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

body.light-mode .project-card {
    background: var(--card-light);
}

.project-card:hover {
    transform: perspective(1000px) rotateY(10deg);
}

.project-img {
    height: 800px;
    background: linear-gradient(45deg, var(--primary-dark), var(--secondary));
    position: relative;
    overflow: hidden;
}

.project-content {
    padding: 25px;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

body.light-mode .project-content h3 {
    color: var(--text-light);
}

.project-content p {
    color: var(--text-secondary-dark);
    margin-bottom: 20px;
}

body.light-mode .project-content p {
    color: var(--text-secondary-light);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tech-tag {
    background: rgba(231, 76, 60, 0.2);
    color: var(--primary);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* Floating hint */
.floating-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(231, 76, 60, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    animation: floatHint 4s infinite;
    z-index: 10;
    white-space: nowrap;
}

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

/* Contact Section */
.contact {
    background: rgba(30, 30, 30, 0.2);
    text-align: center;
}

body.light-mode .contact {
    background: rgba(233, 236, 239, 0.2);
}

.contact-content {
    max-width: 700px;
    margin: 0 auto;
}

.contact-form {
    display: grid;
    gap: 20px;
    margin-top: 40px;
}

.form-group {
    position: relative;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    background: rgba(30, 30, 30, 0.5);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 8px;
    color: var(--text-dark);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s;
}

body.light-mode .form-group input,
body.light-mode .form-group textarea {
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-light);
    border: 1px solid rgba(231, 76, 60, 0.3);
}

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

.form-group label {
    position: absolute;
    top: 15px;
    left: 20px;
    color: var(--text-secondary-dark);
    transition: all 0.3s;
    pointer-events: none;
}

body.light-mode .form-group label {
    color: var(--text-secondary-light);
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -10px;
    left: 10px;
    background: var(--dark-light);
    padding: 0 5px;
    font-size: 0.8rem;
    color: var(--primary);
}

body.light-mode .form-group input:focus + label,
body.light-mode .form-group input:not(:placeholder-shown) + label,
body.light-mode .form-group textarea:focus + label,
body.light-mode .form-group textarea:not(:placeholder-shown) + label {
    background: var(--light-dark);
}

textarea {
    resize: vertical;
    min-height: 150px;
}

/* Footer */
footer {
    background: rgba(18, 18, 18, 0.2);
    padding: 40px 5%;
    text-align: center;
    border-top: 1px solid rgba(231, 76, 60, 0.3);
}

body.light-mode footer {
    background: rgba(248, 249, 250, 0.2);
    border-top: 1px solid rgba(231, 76, 60, 0.3);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.social-links a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(231, 76, 60, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    font-size: 1.3rem;
    transition: all 0.3s;
}

body.light-mode .social-links a {
    color: var(--text-light);
}

.social-links a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-5px);
}

.copyright {
    color: var(--text-secondary-dark);
    font-size: 0.9rem;
    margin-top: 20px;
}

body.light-mode .copyright {
    color: var(--text-secondary-light);
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes rotate {
    0% { transform: translate(-50%, -50%) rotateX(-20deg) rotateY(0deg); }
    100% { transform: translate(-50%, -50%) rotateX(-20deg) rotateY(360deg); }
}

@keyframes headMove {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    25% { transform: translateX(-50%) rotate(5deg); }
    50% { transform: translateX(-50%) rotate(0deg); }
    75% { transform: translateX(-50%) rotate(-5deg); }
}

/* Device Responsiveness */
/* Large TVs (1920px and up) */
@media screen and (min-width: 1920px) {
    .hero-content, .section {
        max-width: 1800px;
        margin: 0 auto;
    }
    
    .projects-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Laptops (992px to 1440px) */
@media screen and (min-width: 992px) and (max-width: 1440px) {
    .hero-phone {
        width: 250px;
        height: 500px;
    }
}

/* Tablets (768px to 991px) */
@media screen and (min-width: 768px) and (max-width: 991px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 120px;
    }
    
    .hero-phone {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        margin: 40px auto;
        width: 250px;
        height: 500px;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .cube-container {
        height: 250px;
        margin-top: 120px;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 250px;
        background: rgba(30, 30, 30, 0.95);
        flex-direction: column;
        align-items: center;
        padding-top: 100px;
        transition: right 0.3s ease;
    }
    
    body.light-mode .nav-links {
        background: rgba(248, 249, 250, 0.95);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        margin: 20px 0;
    }
}

/* Large phones (576px to 767px) */
@media screen and (min-width: 576px) and (max-width: 767px) {
    .hero-phone {
        display: none;
    }
    
    .skills-grid, .projects-grid {
        grid-template-columns: 1fr;
    }

    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 250px;
        background: rgba(30, 30, 30, 0.95);
        flex-direction: column;
        align-items: center;
        padding-top: 100px;
        transition: right 0.3s ease;
    }
    
    body.light-mode .nav-links {
        background: rgba(248, 249, 250, 0.95);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        margin: 20px 0;
    }
}

/* Mobile phones (up to 575px) */
@media screen and (max-width: 575px) {
    .hero {
        padding-top: 100px;
        text-align: center;
    }
    
    .hero-phone {
        display: none;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .cube-container {
        height: 00px;
        margin-top: 120px;
    }
    
    .skills-grid, .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .human-container {
        height: 350px;
    }
    
    .btn {
        display: block;
        margin: 10px auto;
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .btn-outline {
        margin-left: 0;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 250px;
        background: rgba(30, 30, 30, 0.95);
        flex-direction: column;
        align-items: center;
        padding-top: 100px;
        transition: right 0.3s ease;
    }
    
    body.light-mode .nav-links {
        background: rgba(248, 249, 250, 0.95);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        margin: 20px 0;
    }
    
    .theme-toggle {
        margin-left: 0;
    }
}

/* Foldable devices (280px to 320px) */
@media screen and (min-width: 280px) and (max-width: 320px) {
    .logo {
        font-size: 1.5rem;
    }
}


