:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #121212;
    --bg-card: #1a1a1a;
    --text-primary: #e8e8e8;
    --text-secondary: #a0a0a0;
    --accent-green: #00ff88;
    --accent-blue: #00d4ff;
    --accent-purple: #b084ff;
    --border-subtle: #2a2a2a;
    --accent-red: #ff4d4d;

    /* Technology Colors */
    --laravel: #FF2D20;
    --mysql: #4479A1;
    --mongodb: #47A248;
    --redis: #DC382D;
    --aws: #FF9900;
    --react: #61DAFB;
    --javascript: #F7DF1E;
    --html: #E34F26;
    --css: #1572B6;
    --php: #777BB4;
}

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

body {
    font-family: 'JetBrains Mono', monospace;
    background-color: var(--bg-primary);
    background-image: linear-gradient(rgba(0, 0, 0, 0.40), rgba(0, 0, 0, 0.40)), url("background.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    will-change: transform;
}

/* Grain texture overlay */
body::before {
    display: none;
    /* disabled: grain overlay caused visual darkening while scrolling */
}

/* Ensure main content sits above the subtle grain overlay */
nav,
section,
.hero,
.project-card,
.project-content,
.contact-content,
footer {
    position: relative;
    z-index: 1;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: linear-gradient(to bottom, var(--bg-primary) 0%, transparent 100%);
    animation: slideDown 0.8s ease-out;
}

.logo {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
    opacity: 0;
    animation: fadeIn 0.6s ease-out 0.3s forwards;
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 400;
    transition: color 0.3s ease;
    position: relative;
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

.nav-links li:nth-child(1) a {
    animation-delay: 0.4s;
}

.nav-links li:nth-child(2) a {
    animation-delay: 0.5s;
}

.nav-links li:nth-child(3) a {
    animation-delay: 0.6s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-green);
    transition: width 0.3s ease;
}

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

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 4rem;
    position: relative;
}

.hero-content {
    max-width: 900px;
    margin-left: 10%;
}

.availability-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.3s forwards;
}

.availability-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

h1 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.5s forwards;
}

.hero-subtitle {
    font-size: 1.3rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    font-weight: 400;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.7s forwards;
}

.hero-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 750px;
    line-height: 1.8;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.9s forwards;
}

.hero-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    font-size: 0.95rem;
    color: var(--text-secondary);
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 1.1s forwards;
}

.hero-contact a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.hero-contact a:hover {
    color: var(--accent-green);
}

.hero-contact strong {
    color: var(--text-primary);
    font-weight: 500;
}

.separator {
    color: var(--border-subtle);
}

/* Section Styling */
section {
    padding: 6rem 4rem;
    position: relative;
}

section>* {
    margin-left: 10%;
}

.section-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    margin-bottom: 4rem;
    letter-spacing: -0.02em;
    max-width: 1000px;
}

/* Experience Section */
.experience-container {
    max-width: 1000px;
}

.experience-item {
    padding: 2rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
}

.experience-item:last-child {
    border-bottom: none;
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.8rem;
}

.experience-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.experience-company {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.experience-period {
    color: var(--text-secondary);
    font-size: 0.85rem;
    white-space: nowrap;
}

.experience-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.experience-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.experience-tech-tag {
    padding: 0.25rem 0.7rem;
    background: transparent;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

/* Technology-specific colors */
.tech-laravel {
    color: var(--laravel);
    border-color: rgba(255, 45, 32, 0.3);
    background: rgba(255, 45, 32, 0.05);
}

.tech-mysql {
    color: var(--mysql);
    border-color: rgba(68, 121, 161, 0.3);
    background: rgba(68, 121, 161, 0.05);
}

.tech-mongodb {
    color: var(--mongodb);
    border-color: rgba(71, 162, 72, 0.3);
    background: rgba(71, 162, 72, 0.05);
}

.tech-redis {
    color: var(--redis);
    border-color: rgba(220, 56, 45, 0.3);
    background: rgba(220, 56, 45, 0.05);
}

.tech-aws {
    color: var(--aws);
    border-color: rgba(255, 153, 0, 0.3);
    background: rgba(255, 153, 0, 0.05);
}

.tech-react {
    color: var(--react);
    border-color: rgba(97, 218, 251, 0.3);
    background: rgba(97, 218, 251, 0.05);
}

.tech-javascript,
.tech-js {
    color: var(--javascript);
    border-color: rgba(247, 223, 30, 0.3);
    background: rgba(247, 223, 30, 0.05);
}

.tech-html {
    color: var(--html);
    border-color: rgba(227, 79, 38, 0.3);
    background: rgba(227, 79, 38, 0.05);
}

.tech-css {
    color: var(--css);
    border-color: rgba(21, 114, 182, 0.3);
    background: rgba(21, 114, 182, 0.05);
}

.tech-php {
    color: var(--php);
    border-color: rgba(119, 123, 180, 0.3);
    background: rgba(119, 123, 180, 0.05);
}

/* Projects Section */
.projects-container {
    max-width: 1000px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s ease;
}

.project-card:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 20px 60px rgba(0, 212, 255, 0.1);
    transform: translateY(-8px);
}

.project-video-container {
    position: relative;
    width: 100%;
    background: var(--bg-secondary);
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.project-video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.05), rgba(0, 212, 255, 0.05));
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.project-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-content {
    padding: 1.5rem;
}

.project-header {
    margin-bottom: 1rem;
}

.project-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.project-type {
    font-size: 0.7rem;
    color: var(--accent-purple);
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.project-links {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.project-link {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.project-link:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
    transform: translateY(-2px);
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
    font-size: 0.85rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.project-tech-tag {
    padding: 0.3rem 0.7rem;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--accent-green);
}

/* Apply technology colors to project tags too */
.project-tech .tech-laravel {
    background: rgba(255, 45, 32, 0.1);
    border-color: rgba(255, 45, 32, 0.3);
    color: var(--laravel);
}

.project-tech .tech-mysql {
    background: rgba(68, 121, 161, 0.1);
    border-color: rgba(68, 121, 161, 0.3);
    color: var(--mysql);
}

.project-tech .tech-mongodb {
    background: rgba(71, 162, 72, 0.1);
    border-color: rgba(71, 162, 72, 0.3);
    color: var(--mongodb);
}

.project-tech .tech-redis {
    background: rgba(220, 56, 45, 0.1);
    border-color: rgba(220, 56, 45, 0.3);
    color: var(--redis);
}

.project-tech .tech-aws {
    background: rgba(255, 153, 0, 0.1);
    border-color: rgba(255, 153, 0, 0.3);
    color: var(--aws);
}

.project-tech .tech-react {
    background: rgba(97, 218, 251, 0.1);
    border-color: rgba(97, 218, 251, 0.3);
    color: var(--react);
}

.project-tech .tech-javascript,
.project-tech .tech-js {
    background: rgba(247, 223, 30, 0.1);
    border-color: rgba(247, 223, 30, 0.3);
    color: var(--javascript);
}

.project-tech .tech-html {
    background: rgba(227, 79, 38, 0.1);
    border-color: rgba(227, 79, 38, 0.3);
    color: var(--html);
}

.project-tech .tech-css {
    background: rgba(21, 114, 182, 0.1);
    border-color: rgba(21, 114, 182, 0.3);
    color: var(--css);
}

.project-tech .tech-php {
    background: rgba(119, 123, 180, 0.1);
    border-color: rgba(119, 123, 180, 0.3);
    color: var(--php);
}

.project-tech-tag-red {
    padding: 0.3rem 0.7rem;
    /* background: rgba(0, 255, 136, 0.1); */
    /* border: 1px solid rgba(0, 255, 136, 0.3); */
    background: rgba(255, 77, 77, 0.1);
    border: 1px solid rgba(255, 77, 77, 0.3);
    border-radius: 20px;
    font-size: 0.7rem;
    color: var(--accent-red);
}

/* Contact Section */
.contact-content {
    max-width: 1000px;
}

.contact-content h2 {
    margin-bottom: 2rem;
}

.contact-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.contact-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a.contact-link:hover {
    color: var(--accent-green);
}

.contact-link strong {
    color: var(--text-primary);
    font-weight: 500;
}

/* Email copy functionality */
.email-copy {
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

.email-copy:hover {
    color: var(--accent-green);
}

.email-copy-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: var(--bg-card);
    border: 1px solid var(--accent-green);
    color: var(--accent-green);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.email-copy-tooltip.show {
    opacity: 1;
}

.email-copy-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--accent-green);
}

/* Footer */
footer {
    padding: 3rem 4rem;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

footer strong {
    color: var(--text-primary);
    font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

/* Scroll animations */
.fade-in-section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 1200px) {
    .hero-content {
        margin-left: 5%;
    }

    section>* {
        margin-left: 5%;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 1.5rem 2rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .hero {
        padding: 0 2rem;
    }

    .hero-content {
        margin-left: 0;
    }

    section {
        padding: 4rem 2rem;
    }

    section>* {
        margin-left: 0;
    }

    .hero-contact {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .separator {
        display: none;
    }

    .projects-container {
        grid-template-columns: 1fr;
    }

    .experience-header {
        flex-direction: column;
    }

    .experience-period {
        margin-top: 0.5rem;
    }

    .project-header {
        flex-direction: column;
    }

    .project-links {
        margin-top: 1rem;
    }

    .contact-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    footer {
        padding: 2rem;
    }
}