:root {
    --bg-color: #0b0b0b;
    --card-bg: #141414;
    --text-primary: #f0f0f0;
    --text-secondary: #888888;
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.3);
    --border-color: #2a2a2a;
    --font-main: 'Outfit', sans-serif;
    --sidebar-width: 300px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--text-primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s;
    mix-blend-mode: difference;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: all 0.1s ease-out;
}

.main-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: var(--bg-color);
    border-right: 1px solid var(--border-color);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 100;
}

.profile-thumb img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    filter: grayscale(100%);
    transition: filter 0.3s;
}

.profile-thumb img:hover {
    filter: grayscale(0%);
}

.sidebar-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0.25rem;
}

.sidebar-header h2 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 1rem;
}

.sidebar-header p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    opacity: 0.4;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.contact-socials {
    margin-top: 2rem;
}

.social-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.5rem;
    transition: all 0.3s;
    line-height: 1;
}

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

.nav-menu ul {
    list-style: none;
}

.nav-menu li {
    margin-bottom: 0.5rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: all 0.3s;
    display: block;
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--text-primary);
    padding-left: 10px;
}

.nav-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}

.nav-menu a:hover::before,
.nav-menu a.active::before {
    width: 6px;
}

.lang-switch {
    margin-top: 1.5rem;
}

.btn-lang {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    font-family: inherit;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.btn-lang:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.lang-text.active {
    color: var(--accent);
    font-weight: 700;
}

.sidebar-footer {
    font-size: 0.75rem;
    color: #444;
}

.content-area {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 0;
    position: relative;
}

.section {
    min-height: 100vh;
    padding: 6rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--accent);
}

.hero-section {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 2rem;
}

.glitch-text {
    font-size: 4.5rem;
    line-height: 1;
    font-weight: 700;
    position: relative;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin: 2rem 0;
    max-width: 500px;
}

.cta-group {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn.primary {
    background: var(--text-primary);
    color: var(--bg-color);
}

.btn.primary:hover {
    background: var(--accent);
    color: #fff;
}

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

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

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-img {
    width: 350px;
    height: 350px;
    object-fit: cover;
    border-radius: 20px;
    z-index: 1;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Removed box-shadow as per request for transparent PNG */
}

.hero-img:hover {
    transform: scale(1.05) rotate(2deg);
    filter: brightness(1.1);
}

.abstract-shape {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    filter: blur(60px);
    z-index: 0;
    animation: float 10s infinite ease-in-out;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-30px, 40px);
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.stat-card {
    background: var(--card-bg);
    padding: 2rem;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.count {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
}

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

.tech-stack .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.tags span {
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.tags span:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.timeline {
    position: relative;
    border-left: 2px solid var(--border-color);
    margin-left: 1rem;
    padding-left: 2rem;
}

.timeline-item {
    margin-bottom: 3rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.6rem;
    top: 5px;
    width: 12px;
    height: 12px;
    background: var(--bg-color);
    border: 2px solid var(--accent);
    border-radius: 50%;
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.timeline-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.timeline-content h4 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 400;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

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

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

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

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

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

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.project-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.project-tags span {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s;
}

.form-group label {
    position: absolute;
    left: 0;
    top: 1rem;
    color: var(--text-secondary);
    transition: all 0.3s;
    pointer-events: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group input:not(:placeholder-shown),
.form-group textarea:not(:placeholder-shown) {
    border-bottom-color: var(--accent);
}

.form-group input:focus~label,
.form-group textarea:focus~label,
.form-group input:not(:placeholder-shown)~label,
.form-group textarea:not(:placeholder-shown)~label {
    top: -10px;
    font-size: 0.75rem;
    color: var(--accent);
}

.contact-info {
    border-left: 1px solid var(--border-color);
    padding-left: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.email-link {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin-top: 1rem;
    text-decoration: none;
    border-bottom: 1px solid var(--accent);
    display: inline-block;
}

/* Mobile Header Styles */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    background: rgba(11, 11, 11, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.mobile-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-main);
}

.menu-toggle {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 1024px) {
    :root {
        --sidebar-width: 250px;
    }

    .mobile-header {
        display: flex;
    }

    .sidebar {
        position: fixed;
        width: 100%;
        height: 100vh;
        background: var(--bg-color);
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.4s ease-in-out;
        padding-top: 6rem;
        /* Space for mobile header */
        border-right: none;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .content-area {
        margin-left: 0;
        padding-top: 60px;
        /* Offset for header */
    }

    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 4rem;
        min-height: 90vh;
        /* Adjust for mobile */
    }

    .hero-content {
        order: 2;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-visual {
        order: 1;
        margin-bottom: 2rem;
        position: relative;
        right: auto;
        top: auto;
    }

    .hero-img {
        width: 250px;
        height: 320px;
    }

    .glitch-text {
        font-size: 3.5rem;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-info {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid var(--border-color);
        padding-top: 2rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        /* Sidebar styles are now handled in the 1024px query for tablet/mobile unity */
    }

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

    .nav-menu {
        display: block;
        /* Show menu inside the slide-out sidebar */
    }

    .section {
        padding: 4rem 1.5rem;
        min-height: auto;
    }

    .glitch-text {
        font-size: 2.5rem;
    }

    .cursor-outline,
    .cursor-dot {
        display: none;
        /* Hide custom cursor on mobile */
    }
}