/* ===== VARIABLES ===== */
:root {
    --primary-color: #0066ff;
    --secondary-color: #00d9ff;
    --dark-bg: #0a0a1a;
    --darker-bg: #050510;
    --light-text: #ffffff;
    --gray-text: #a0a0b0;
    --card-bg: #10101e;
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--dark-bg);
    color: var(--light-text);
    line-height: 1.6;
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}

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

ul {
    list-style: none;
}

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

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

section {
    padding: 100px 0;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-align: center;
}

.primary-btn {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--light-text);
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 102, 255, 0.4);
}

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

.secondary-btn:hover {
    background: var(--primary-color);
    color: var(--light-text);
    transform: translateY(-3px);
}

.small-btn {
    padding: 8px 18px;
    font-size: 0.9rem;
}

.outline-btn {
    background: transparent;
    border: 1px solid var(--gray-text);
    color: var(--gray-text);
}

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

/* ===== SECTION HEADERS ===== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    margin: 0 auto;
    border-radius: 2px;
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(5, 5, 16, 0.9);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    transition: var(--transition);
}

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

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: var(--transition);
    background-color: var(--light-text);
}

/* ===== HERO SECTION ===== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(to bottom, var(--darker-bg), var(--dark-bg));
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

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

.tagline {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 30px;
    color: var(--gray-text);
}

.intro {
    font-size: 1.1rem;
    margin-bottom: 40px;
    max-width: 600px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 60px;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: bounce 2s infinite;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--gray-text);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 6px;
    height: 6px;
    background: var(--gray-text);
    border-radius: 50%;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

.scroll-arrow {
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--gray-text);
    border-bottom: 2px solid var(--gray-text);
    transform: rotate(45deg);
    margin-top: 10px;
}

@keyframes scroll {
    0% {
        opacity: 1;
        top: 10px;
    }
    100% {
        opacity: 0;
        top: 30px;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-10px) translateX(-50%);
    }
    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

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

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
    align-items: start;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.fun-facts {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.fun-facts h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    position: relative;
    padding-bottom: 10px;
}

.fun-facts h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
}

.fun-facts ul li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.fun-facts ul li i {
    margin-right: 15px;
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* ===== SKILLS SECTION ===== */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.skill-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

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

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

.skill-level {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.skill-bar {
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    width: 0;
    transition: width 1.5s ease-in-out;
}

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

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
}

.project-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.project-img {
    height: 200px;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-img img {
    transform: scale(1.1);
}

.project-info {
    padding: 25px;
}

.project-info h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.project-info p {
    color: var(--gray-text);
    margin-bottom: 20px;
}

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

.project-tech span {
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.project-links {
    display: flex;
    gap: 15px;
}

/* ===== CONTACT SECTION ===== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.contact-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.contact-text p {
    color: var(--gray-text);
    margin-bottom: 30px;
}

.contact-info {
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.contact-item i {
    margin-right: 15px;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

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

.contact-form {
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    color: var(--light-text);
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.2);
}

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

/* ===== FOOTER ===== */
.footer {
    background-color: var(--darker-bg);
    padding: 40px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.footer-copyright {
    text-align: left;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-color);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

.footer-contact {
    text-align: right;
}

.footer-credit {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer a {
    color: var(--accent-color);
    transition: var(--transition);
}

.footer a:hover {
    color: var(--accent-hover);
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-copyright,
    .footer-contact {
        text-align: center;
    }
    
    .footer-links {
        order: 3;
        margin: 15px 0;
    }
}

/* ===== RESPONSIVE DESIGN ===== */
/* Large devices (desktops, less than 1200px) */
@media (max-width: 1200px) {
    .hero h1 {
        font-size: 3.2rem;
    }
    
    .section-header h2 {
        font-size: 2.3rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 30px;
    }
}

/* Medium devices (tablets, less than 992px) */
@media (max-width: 992px) {
    section {
        padding: 80px 0;
    }
    
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .tagline {
        font-size: 1.3rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }
    
    .skill-card {
        transform: none !important;
    }
    
    .skill-card:hover {
        transform: translateY(-5px) !important;
    }
    
    .project-card:hover {
        transform: translateY(-5px);
    }
    
    .social-icon:hover {
        transform: translateY(-3px);
    }
}

/* Small devices (landscape phones, less than 768px) */
@media (max-width: 768px) {
    section {
        padding: 60px 0;
    }
    
    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--darker-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
        padding: 20px 0;
        gap: 20px;
        z-index: 999;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .hamburger {
        display: block;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero {
        height: auto;
        min-height: 100vh;
        padding-top: 100px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .tagline {
        font-size: 1.1rem;
    }
    
    .intro {
        font-size: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .cta-buttons .btn {
        width: 100%;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .skills-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .scroll-indicator {
        display: none;
    }
}

/* Extra small devices (phones, less than 576px) */
@media (max-width: 576px) {
    section {
        padding: 50px 0;
    }
    
    .container {
        width: 95%;
        padding: 0 10px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-card {
        margin-bottom: 20px;
    }
    
    .contact-form {
        padding: 25px 15px;
    }
    
    .skill-card {
        padding: 20px 15px;
    }
    
    .about-text p {
        font-size: 0.95rem;
    }
    
    .fun-facts {
        padding: 20px 15px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 12px;
    }
    
    .btn {
        padding: 10px 24px;
    }
    
    .small-btn {
        padding: 6px 14px;
        font-size: 0.85rem;
    }
}

/* Very small devices (small phones, less than 400px) */
@media (max-width: 400px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .project-tech {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .project-tech span {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    
    .project-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .project-links a {
        width: 100%;
        text-align: center;
    }
    
    .contact-item {
        font-size: 0.9rem;
    }
    
    .contact-text h3 {
        font-size: 1.5rem;
    }
}