:root {
    --primary-color: #000000; /* Black */
    --secondary-color: #333333; /* Dark Grey */
    --accent-color: #999999; /* Light Grey */
    --text-dark: #1a1a1a;
    --text-light: #ffffff;
    --bg-light: #ffffff;
    --bg-dark: #1a1a1a;
    --bg-secondary: #f5f5f5;
    --border-radius: 12px;
    --transition-speed: 0.3s ease;
}

.dark-mode {
    --text-dark: #ffffff;
    --text-light: #1a1a1a;
    --bg-light: #1a1a1a;
    --bg-dark: #ffffff;
    --bg-secondary: #2a2a2a;
}

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

html {
    scroll-behavior: smooth;
}

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

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-family: 'Roboto Mono', monospace;
    color: var(--primary-color);
}

h2 {
    font-size: 2.8em;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -10px;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1.1em;
    transition: all var(--transition-speed);
    cursor: pointer;
    text-align: center;
    border: none;
}

.primary-btn {
    background-color: var(--primary-color);
    color: var(--text-light);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.primary-btn:hover {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: translateY(-2px);
}

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

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

.tertiary-btn {
    background-color: var(--accent-color);
    color: var(--text-dark);
}

.tertiary-btn:hover {
    background-color: #666666;
}

/* Side Navigation */
.side-nav {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 80px;
    background-color: var(--bg-light);
    box-shadow: 3px 0 10px rgba(0, 0, 0, 0.05);
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    transition: width 0.3s ease, background-color var(--transition-speed);
    z-index: 1000;
}

.side-nav:hover {
    width: 220px;
}

.side-nav::after {
    content: '◀'; /* subtle hint indicator */
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(0, 0, 0, 0.3);
    font-size: 1.2em;
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.side-nav:hover::after {
    opacity: 0;
}
.side-nav img {
    width: 50px;              /* Scaled down for better fit */
    height: auto;
    border-radius: 50%;       /* Optional: makes it circular */
    margin-bottom: 25px;
    transition: all 0.3s ease;
    object-fit: cover;
}

/* Slightly enlarge and center when sidebar expands */
.side-nav:hover img {
    width: 80px;              /* expands with sidebar */
    margin-bottom: 35px;
    transform: scale(1.05);
}

/* Adjust sidebar layout to keep spacing clean */
.nav-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 10px 20px;
    height: 100%;
}


.logo a {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 40px;
    white-space: nowrap;
    opacity: 0; /* Changed from 0.4 to 0 to make it disappear */
    transition: opacity 0.3s ease;
}

.side-nav:hover .logo a {
    opacity: 1; /* Appears on hover */
}

.side-nav ul {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    list-style: none; /* remove bullets */
    padding: 0;
}

.side-nav ul li {
    margin: 15px 0;
    width: 100%;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    color: var(--text-dark);
    font-size: 1.1em;
    opacity: 0; /* hidden when collapsed */
    transition: opacity 0.2s ease, color var(--transition-speed), background-color var(--transition-speed);
}

.side-nav:hover .nav-link {
    opacity: 1; /* visible on hover */
}

.nav-link:hover {
    color: var(--primary-color);
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.theme-toggle {
    margin-top: auto;
}

.theme-toggle button {
    background: none;
    border: none;
    font-size: 1.5em;
    color: var(--text-dark);
    cursor: pointer;
    transition: color var(--transition-speed);
}

.theme-toggle button:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-left: 100px;
    background-color: var(--bg-light);
}

.hero-content {
    text-align: left;
    max-width: 600px;
    z-index: 1;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 1s ease-out forwards 0.5s;
}

.hero-content .name {
    font-size: 4.5em;
    font-weight: 700;
    position: relative;
    color: var(--primary-color);
}

.hero-content .name::before,
.hero-content .name::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.3;
}

.hero-content .name::before {
    color: var(--accent-color);
    animation: glitch-top 1.5s linear infinite;
}

.hero-content .name::after {
    color: var(--secondary-color);
    animation: glitch-bottom 1.5s linear infinite;
}

.hero-content .tagline {
 font-size: 1.5rem;
    font-weight: 500;
    color: #000;
    position: relative;
    min-height: 2rem;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: linear-gradient(135deg, #2b2b2b, #3c3c3c, #4a4a4a, #5a5a5a);
    background-size: 400% 400%;
    animation: gradientAnimation 20s ease infinite;
    clip-path: polygon(0 0, 100% 0, 100% 50%, 0 100%);
    overflow: hidden;
}

/* Animated gradient */
@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Snowflake dots */
.hero-background::before,
.hero-background::after {
    content: "";
    position: absolute;
    width: 200%;
    height: 200%;
    background-image:
        radial-gradient(white 1px, transparent 1px),
        radial-gradient(white 1px, transparent 1px),
        radial-gradient(white 1px, transparent 1px),
        radial-gradient(white 1px, transparent 1px),
        radial-gradient(white 1px, transparent 1px);
    background-repeat: no-repeat;
    background-size: 10px 10px, 15px 15px, 8px 8px, 12px 12px, 6px 6px;
    background-position:
        5% 10%, 20% 30%, 50% 60%, 70% 20%, 90% 50%;
    animation: snowMove 4s linear infinite;
    pointer-events: none;
    z-index: 1;
}

/* Slightly offset second layer for variation */
.hero-background::after {
    animation-delay: 2s;
}

/* Snow animation */
@keyframes snowMove {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(50px, 150px) rotate(360deg); }
}


/* About Section */
.about-section {
    padding: 80px 0;
    background-color: var(--bg-secondary);
}

.about-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

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

/* Skills Section (Languages & Tools) */
.skills-section {
    background: var(--bg-light);
    color: var(--text-dark);
    padding: 80px 0;
    text-align: center;
    border-top: 1px solid #e5e5e5;
}

.skills-section h3 {
    font-size: 1.8rem;
    font-weight: 500;
    letter-spacing: 1px;
    margin-bottom: 40px;
    color: var(--primary-color);
}

.skills-section p {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.skills-section img {
    width: 50px;
    height: 50px;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.skills-section img:hover {
    transform: translateY(-5px) scale(1.05);
    opacity: 1;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.skills-section a {
    text-decoration: none;
    display: inline-block;
}

/* Projects Section */
.projects-section {
    padding: 80px 0;
}

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

.project-card {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.project-image {
    position: relative;
}

.project-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 1.5em;
    font-family: 'Roboto Mono', monospace;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-info {
    padding: 15px;
}

.project-info h3 {
    font-size: 1.6em;
    margin-bottom: 10px;
}

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

.more-projects {
    text-align: center;
    margin-top: 3rem;
}

.more-projects-btn {
    display: inline-block;
    font-size: 1.25rem;
    color: var(--primary-color);
    text-decoration: none;
    border: 2px solid var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    transition: all 0.3s ease;
    background-color: transparent;
    font-weight: 500;
}

.more-projects-btn:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
}

/* Contact Section */
.contact-section {
    padding: 80px 20px;
    background: var(--bg-light);
    color: var(--text-dark);
    text-align: center;
    border-top: 1px solid #ddd;
}

.contact-section h2 {
    font-size: 2.2em;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--primary-color);
}

.contact-section p {
    font-size: 1em;
    color: var(--text-dark);
    margin-bottom: 40px;
    letter-spacing: 0.3px;
}

.contact-cards {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.contact-card {
    background: var(--bg-light);
    border: 1px solid var(--primary-color);
    border-radius: 12px;
    padding: 30px 20px;
    width: 180px;
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    background: var(--bg-secondary);
}

.contact-card img {
    width: 50px;
    height: 50px;
    filter: grayscale(100%);
    margin-bottom: 15px;
}

.contact-card h3 {
    font-size: 1.1em;
    margin-bottom: 5px;
    font-weight: 600;
}

.contact-card p {
    font-size: 0.9em;
    color: var(--text-dark);
}

.contact-info p {
    margin: 6px 0;
    font-size: 0.95em;
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.contact-info a:hover {
    border-color: var(--primary-color);
}

/* Footer */
.main-footer {
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding: 40px 0;
    text-align: center;
}

.main-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.main-footer p {
    font-size: 0.9em;
}

.social-links a {
    color: var(--text-light);
    font-size: 1.5em;
    margin-left: 20px;
    transition: color var(--transition-speed), transform var(--transition-speed);
}

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

/* Back to Top */
#back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #ff6b6b, #f06595);
    color: #000;
    border: none;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 100;
}

#back-to-top:hover {
    transform: translateY(-6px) scale(1.1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    background: linear-gradient(135deg, #f06595, #ff6b6b);
}

#back-to-top i {
    transition: transform 0.3s ease;
}

#back-to-top:hover i {
    transform: rotate(-15deg);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glitch-top {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-1px, 1px); }
    40% { transform: translate(1px, -1px); }
    60% { transform: translate(-0.5px, 0.5px); }
    80% { transform: translate(0.5px, -0.5px); }
}

@keyframes glitch-bottom {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(0.5px, -0.5px); }
    40% { transform: translate(-0.5px, 0.5px); }
    60% { transform: translate(1px, -1px); }
    80% { transform: translate(-1px, 1px); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .side-nav {
        display: none; /* Hide sidebar completely on mobile */
    }

    .hero-section {
        padding-left: 20px;
        padding-top: 80px;
    }

    .hero-content .name {
        font-size: 3em;
    }

    .hero-content .tagline {
        font-size: 1.4em;
    }

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

    .skills-section {
        padding: 60px 20px;
    }

    .skills-section h3 {
        font-size: 1.5rem;
    }

    .skills-section img {
        width: 40px;
        height: 40px;
    }

    .skills-section p {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .hero-content .name {
        font-size: 2.5em;
    }

    .hero-content .tagline {
        font-size: 1.2em;
    }

    .btn {
        padding: 10px 20px;
        font-size: 1em;
    }

    .skills-section img {
        width: 35px;
        height: 35px;
    }

    .skills-section h3 {
        font-size: 1.3rem;
    }
}
