/* Reset and Variables */
:root {
    --primary-yellow: #ffe81f;
    --primary-blue: #00d8ff;
    --dark-bg: #0a0a0a;
    --medium-bg: #1a1a1a;
    --light-text: #E0E0E0;
    --dark-text: #000;
    --success: #4CAF50;
    --error: #ff6b6b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Visible focus for keyboard users */
:focus-visible {
    outline: 3px solid var(--primary-yellow);
    outline-offset: 3px;
}

body {
    font-family: 'Space Grotesk', 'Orbitron', sans-serif;
    background-color: var(--dark-bg);
    color: var(--light-text);
    line-height: 1.6;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* Navigation */
.nav {
    background-color: rgba(10, 10, 10, 0.95);
    height: 80px;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #333;
    backdrop-filter: blur(10px);
}

.nav-list {
    display: flex;
    list-style: none;
    margin-right: 30px;
    gap: 20px;
}

.nav-list a {
    text-decoration: none;
    color: var(--primary-blue);
    padding: 15px 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.nav-list a.active {
    color: var(--primary-yellow);
    text-shadow: 0 0 10px var(--primary-yellow);
    background-color: rgba(255, 232, 31, 0.1);
}

/* Hover only on devices with a mouse: on touch screens the hover
   "sticks" after a tap and two links look active at once */
@media (hover: hover) {
    .nav-list a:hover {
        color: var(--primary-yellow);
        text-shadow: 0 0 10px var(--primary-yellow);
        background-color: rgba(255, 232, 31, 0.1);
    }
}

/* Hero Section */
.main {
    width: 100%;
    height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.9)), 
                url('https://images.unsplash.com/photo-1462331940025-496dfbfc7564?ixlib=rb-4.0.3&auto=format&fit=crop&w=1000&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
}

.main > div {
    max-width: 800px;
}

.main h1 {
    font-size: 3.5rem;
    color: var(--primary-yellow);
    line-height: 1.2;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 232, 31, 0.5);
}

.main p {
    font-size: 1.5rem;
    color: var(--primary-blue);
    margin-bottom: 40px;
    font-style: italic;
}

/* Buttons */
.call-to-action,
.action {
    cursor: pointer;
    background-color: var(--primary-yellow);
    border: 2px solid var(--primary-yellow);
    padding: 16px 32px;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--dark-text);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 20px rgba(255, 232, 31, 0.4);
    display: inline-block;
    text-decoration: none;
}

.call-to-action:hover,
.action:hover {
    transform: translateY(-2px);
    background-color: transparent;
    color: var(--primary-yellow);
    box-shadow: 0 0 30px rgba(255, 232, 31, 0.6);
}

/* About Section */
.about {
    background-color: var(--medium-bg);
    padding: 100px 10%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    border-bottom: 1px solid #333;
}

.about div {
    flex: 1;
}

.about img {
    width: 100%;
    max-width: 400px;
    border-radius: 12px;
    border: 3px solid var(--primary-blue);
    box-shadow: 0 0 30px rgba(30, 150, 252, 0.3);
    transition: transform 0.3s ease;
}

.about img:hover {
    transform: scale(1.02);
}

.about h2 {
    font-size: 2.5rem;
    margin-bottom: 24px;
    color: var(--primary-yellow);
    text-shadow: 0 0 10px rgba(255, 232, 31, 0.3);
}

.about p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
}

.skills-title {
    font-size: 1rem;
    color: var(--primary-blue);
    margin: 28px 0 12px;
    font-weight: 600;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-tag {
    background-color: var(--primary-blue);
    color: var(--dark-text);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.skill-tag.learning {
    background-color: transparent;
    color: var(--primary-blue);
    border: 2px dashed var(--primary-blue);
    padding: 6px 14px;
}

.skill-tag:hover {
    background-color: var(--primary-yellow);
    transform: translateY(-2px);
}

/* Projects Section */
.projects {
    background-color: var(--dark-bg);
    padding: 100px 5%;
    text-align: center;
    border-bottom: 1px solid #333;
}

.projects h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: var(--primary-yellow);
    text-shadow: 0 0 10px rgba(255, 232, 31, 0.3);
}

.projects > p {
    font-size: 1.2rem;
    color: var(--primary-blue);
    margin-bottom: 60px;
    font-style: italic;
}

.project-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.project-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-blue);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 0 30px rgba(30, 150, 252, 0.4);
    border-color: var(--primary-yellow);
}

.project-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.3s ease;
}

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

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.85) 35%, rgba(0,0,0,0.95));
    padding-top: 40px;
    padding: 20px;
    color: white;
    text-align: left;
}

.project-card:focus-visible {
    border-color: var(--primary-yellow);
}

/* Contact Section */
.contact {
    background-color: var(--medium-bg);
    padding: 100px 10%;
    text-align: center;
    border-bottom: 1px solid #333;
}

.contact h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: var(--primary-yellow);
    text-shadow: 0 0 10px rgba(255, 232, 31, 0.3);
}

.contact > p {
    font-size: 1.2rem;
    color: var(--primary-blue);
    margin-bottom: 50px;
    font-style: italic;
}

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

.contact-links a {
    text-decoration: none;
    display: inline-block;
}

.contact-email {
    margin-top: 30px;
    color: var(--light-text);
    font-size: 1rem;
}

.call-to-action.outline {
    background-color: transparent;
    color: var(--primary-yellow);
}

.call-to-action.outline:hover {
    background-color: var(--primary-yellow);
    color: var(--dark-text);
}

/* Footer */
footer {
    background-color: var(--dark-bg);
    padding: 60px 0;
    text-align: center;
    border-top: 1px solid #333;
}

footer .footer-brand a {
    text-decoration: none;
    color: var(--primary-yellow);
    font-size: 1.5rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

footer .footer-brand a:hover {
    color: white;
    text-shadow: 0 0 15px var(--primary-yellow);
}

footer p {
    margin: 16px 0;
    color: var(--light-text);
}

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

.social-link {
    color: var(--primary-blue);
    text-decoration: none;
    padding: 10px 20px;
    border: 2px solid var(--primary-blue);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--primary-blue);
    color: var(--dark-text);
    transform: translateY(-2px);
}

/* Modal */
.project-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow: auto;
}

.modal-content {
    background-color: var(--dark-bg);
    margin: 5% auto;
    padding: 30px;
    border: 3px solid var(--primary-blue);
    width: 90%;
    max-width: 800px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 0 40px rgba(30, 150, 252, 0.4);
    animation: modalFadeIn 0.4s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-60px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close-modal {
    background: none;
    border: none;
    line-height: 1;
    color: var(--primary-yellow);
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-modal:hover {
    color: white;
    text-shadow: 0 0 15px var(--primary-yellow);
    transform: rotate(90deg);
}

.modal-image {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    background-color: #000;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 2px solid #333;
}

.modal-title {
    color: var(--primary-yellow);
    font-size: 2rem;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(255, 232, 31, 0.3);
}

.modal-description {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 25px;
    color: var(--light-text);
}

.modal-tech {
    margin-bottom: 25px;
}

.tech-tag {
    display: inline-block;
    background-color: var(--primary-blue);
    color: var(--dark-text);
    padding: 8px 16px;
    border-radius: 20px;
    margin-right: 10px;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 0.9rem;
}

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

.modal-links a {
    flex: 1;
    padding: 12px 24px;
    background-color: var(--primary-blue);
    color: var(--dark-text);
    text-decoration: none;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-blue);
}

.modal-links a:hover {
    background-color: transparent;
    color: var(--primary-blue);
    transform: translateY(-2px);
}

.modal-links a:last-child {
    background-color: var(--primary-yellow);
    color: var(--dark-text);
    border-color: var(--primary-yellow);
}

.modal-links a:last-child:hover {
    background-color: transparent;
    color: var(--primary-yellow);
}

/* Animations */
.js section:not(.main) {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.js section.active {
    opacity: 1;
    transform: translateY(0);
}

.cursor {
    display: inline-block;
    width: 8px;
    height: 1em;
    background-color: var(--primary-yellow);
    margin-left: 4px;
    animation: blink 1s infinite;
    vertical-align: middle;
}

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

/* Responsiveness */
@media (max-width: 1024px) {
    .about {
        flex-direction: column;
        text-align: center;
        padding: 80px 5%;
    }
    
    .about img {
        max-width: 350px;
        margin-top: 40px;
    }
    
    .project-list {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-list {
        margin-right: 15px;
        gap: 10px;
    }
    
    .nav-list a {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .main h1 {
        font-size: 2.5rem;
    }
    
    .main p {
        font-size: 1.2rem;
    }
    
    .about h2,
    .projects h2,
    .contact h2 {
        font-size: 2rem;
    }
    
    .project-list {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        padding: 20px;
        margin: 10% auto;
    }
    
    .modal-links {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .nav {
        justify-content: center;
    }

    .nav-list {
        margin-right: 0;
        gap: 0;
    }

    .nav-list a {
        padding: 10px 7px;
        font-size: 0.72rem;
        letter-spacing: 0;
    }
    
    .main h1 {
        font-size: 2rem;
    }
    
    .call-to-action,
    .action {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    .skills {
        justify-content: center;
    }
    
    .social-links {
        flex-direction: column;
        align-items: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .js section:not(.main) {
        transition: none;
        transform: none;
    }
}

/* Badge for paid client work */
.client-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    background-color: var(--primary-yellow);
    color: var(--dark-text);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 20px;
    box-shadow: 0 0 12px rgba(255, 232, 31, 0.5);
}

.private-demo {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    border: 1px dashed var(--primary-blue);
    border-radius: 6px;
    color: var(--light-text);
    font-size: 0.85rem;
}
