/* Base Styles & Variables */
:root {
    --primary: #6c5ce7;
    --primary-dark: #5649c0;
    --secondary: #00cec9;
    --dark: #2d3436;
    --light: #f5f6fa;
    --gray: #636e72;
    --success: #00b894;
    --danger: #d63031;
    --warning: #fdcb6e;
    --info: #0984e3;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    text-decoration: none;
}

body {
    font-family: 'DM Sans', sans-serif;
    color: var(--dark);
    background-color: var(--light);
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 100px 0;
}

/* Utility Classes */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 16px;
}

.btn.primary {
    background-color: var(--primary);
    color: white;
}

.btn.primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(108, 92, 231, 0.3);
}

.btn.secondary {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn.secondary:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(108, 92, 231, 0.3);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-align: center;
}

.section-title span {
    color: var(--primary);
}

.section-subtitle {
    color: var(--gray);
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
    font-size: 1.1rem;
}

/* Navigation */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    background-color: rgba(245, 246, 250, 0.8);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.glass-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover:after {
    width: 100%;
}

.cta-nav {
    background-color: var(--primary);
    color: white !important;
    padding: 8px 20px;
    border-radius: 50px;
}

.cta-nav:hover {
    background-color: var(--primary-dark);
    color: white;
}

.cta-nav:after {
    display: none;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--dark);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.hero-content {
    flex: 1;
    padding-right: 50px;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.glitch {
    position: relative;
}

.glitch:before, .glitch:after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch:before {
    left: 2px;
    text-shadow: -2px 0 #ff00c1;
    animation: glitch-effect 3s infinite linear alternate-reverse;
}

.glitch:after {
    left: -2px;
    text-shadow: -2px 0 #00fff9;
    animation: glitch-effect 2s infinite linear alternate-reverse;
}

@keyframes glitch-effect {
    0% { clip: rect(24px, 9999px, 90px, 0) }
    20% { clip: rect(85px, 9999px, 140px, 0) }
    40% { clip: rect(25px, 9999px, 95px, 0) }
    60% { clip: rect(95px, 9999px, 55px, 0) }
    80% { clip: rect(15px, 9999px, 95px, 0) }
    100% { clip: rect(95px, 9999px, 5px, 0) }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--gray);
    margin-bottom: 20px;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--gray);
}

.typing {
    color: var(--primary);
    font-weight: 500;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.hero-illustration {
    flex: 1;
    position: relative;
}

.code-window {
    background-color: #1e1e1e;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    transform: perspective(1000px) rotateY(-10deg);
    transition: all 0.5s ease;
}

.code-window:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.window-header {
    padding: 10px 15px;
    background-color: #2d2d2d;
    display: flex;
    align-items: center;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.dot.red {
    background-color: #ff5f56;
}

.dot.yellow {
    background-color: #ffbd2e;
}

.dot.green {
    background-color: #27c93f;
}

.window-content {
    padding: 20px;
}

.window-content pre {
    margin: 0;
    overflow-x: auto;
}

.window-content code {
    font-family: 'Courier New', monospace;
    color: #d4d4d4;
    font-size: 14px;
    line-height: 1.5;
}

.language-php {
    color: #569cd6;
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-down span {
    display: block;
    width: 20px;
    height: 20px;
    border-bottom: 2px solid var(--primary);
    border-right: 2px solid var(--primary);
    transform: rotate(45deg);
    margin: -10px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-20px) translateX(-50%); }
    60% { transform: translateY(-10px) translateX(-50%); }
}

/* Skills Section */
.skills {
    background-color: white;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.skill-card {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(108, 92, 231, 0.1);
    border-color: var(--primary);
}

.skill-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(108, 92, 231, 0.1);
    border-radius: 50%;
}

.skill-icon i {
    color: var(--primary);
    font-size: 2rem;
    transition: transform 0.3s ease;
}

.skill-card h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.skill-card p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Portfolio Section */
.portfolio {
    background-color: var(--light);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.portfolio-item {
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.portfolio-item-inner {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.portfolio-image {
    position: relative;
    padding-top: 75%;
    overflow: hidden;
}

.portfolio-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(108, 92, 231, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
    text-align: center;
    color: white;
}

.portfolio-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.portfolio-overlay p {
    margin-bottom: 20px;
    transform: translateY(20px);
    transition: transform 0.3s ease 0.1s;
}

.portfolio-link {
    padding: 8px 20px;
    background-color: white;
    color: var(--primary);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transform: translateY(20px);
    transition: all 0.3s ease 0.2s;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover .portfolio-overlay h3,
.portfolio-item:hover .portfolio-overlay p,
.portfolio-item:hover .portfolio-overlay .portfolio-link {
    transform: translateY(0);
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
}

/* Testimonials Section */
.testimonials {
    background-color: white;
    padding: 100px 0;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.testimonial-card {
    background-color: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

.testimonial-rating {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 20px;
}

.testimonial-text {
    font-size: 16px;
    line-height: 1.7;
    color: var(--gray);
    margin-bottom: 24px;
    font-style: italic;
}

.testimonial-author h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
}

.testimonial-author p {
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--gray);
}

/* Contact Section */
.contact {
    background-color: var(--light);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #ddd;
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.social-profiles {
    text-align: center;
    margin-top: 50px;
}

.social-profiles h3 {
    margin-bottom: 20px;
    color: var(--gray);
}

.social-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.social-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--dark);
    color: white;
    transition: all 0.3s ease;
}

.social-badge:hover {
    background-color: var(--primary);
    transform: translateY(-5px);
}

.social-badge i {
    font-size: 1.5rem;
}

/* Footer */
.footer {
    background-color: var(--dark);
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-logo a {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    margin-bottom: 15px;
    display: inline-block;
}

.footer-logo p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
        padding-top: 100px;
        padding-bottom: 50px;
    }
    
    .hero-content {
        padding-right: 0;
        margin-bottom: 50px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .code-window {
        max-width: 100%;
    }
    
    section {
        padding: 70px 0;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: white;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: all 0.5s ease;
        z-index: 999;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        margin: 15px 0;
    }
    
    .hamburger {
        display: block;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    bottom: 30px; 
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: none;
    transition: all 0.3s ease;
}

.dark-mode-toggle:hover {
    background-color: var(--primary-dark);
    transform: scale(1.1);
}

.dark-mode-toggle i {
    font-size: 1.2rem;
}

/* Dark Mode Styles */
body.dark-mode {
    --light: #2d3436;
    --dark: #f5f6fa;
    --gray: #b2bec3;
    background-color: #1e272e;
}

body.dark-mode .hamburger{
    --light: #a7a7a7;
    --dark: #f5f6fa;
    --gray: #b2bec3;
    background-color: #1e272e;
}

body.dark-mode .glass-nav {
    background-color: rgba(30, 39, 46, 0.8);
}

body.dark-mode .glass-nav.scrolled {
    background-color: rgba(30, 39, 46, 0.95);
}

body.dark-mode .nav-links a {
    color: var(--light);
    color: #6C5CE7;
}

body.dark-mode .hamburger span {
    background-color: var(--light);
}

body.dark-mode .hero {
    background: linear-gradient(135deg, #2d3436 0%, #1e272e 100%);
}

body.dark-mode .code-window {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

body.dark-mode .skills,
body.dark-mode .testimonials {
    background-color: #1e272e;
}

body.dark-mode .skill-card {
    background-color: #1e272e;
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .portfolio {
    background-color: #2d3436;
}

body.dark-mode .portfolio-item-inner {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode .contact {
    background-color: #2d3436;
}

body.dark-mode .form-group input,
body.dark-mode .form-group textarea {
    background-color: #2d3436;
    border-color: #636e72;
    color: #f2f2f2;
}

body.dark-mode .footer {
    background-color: #1a2026;
}

body.dark-mode .social-badge {
    background-color: var(--light);
    color: var(--dark);
}

body.dark-mode .testimonial-card {
    background-color: #2d3436;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

body.dark-mode .testimonial-text {
    color: #b2bec3;
}

body.dark-mode .testimonial-author h4 {
    color: var(--primary);
}

body.dark-mode .testimonial-author p {
    color: #b2bec3;
}

body.dark-mode .testimonial-rating {
    color: var(--primary);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 90px; /* Positioned above dark mode button */
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: none;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: scale(1.1);
}

.back-to-top i {
    font-size: 1.2rem;
}

#form-message {
  padding: 10px;
  border: 1px solid #c4ffc4;
  background-color: #e6ffe6;
  border-radius: 4px;
}

.success-message {
  padding: 12px;
  color: #1c2a72;
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 4px;
}

.error-message {
  padding: 12px;
  color: #1c2a72;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
}

/*img {*/
/*  -webkit-user-drag: none;*/
/*  user-drag: none;*/
/*  pointer-events: none;  Optional: prevents right-click too */
/*}*/
