/* --- Global Variables --- */
:root {
    --bg-color: #0a0a0c;
    --bg-accent: #111114;
    --text-color: #e0e0e0;
    --text-muted: #a0a0a0;
    --accent-color: #00f2ff;
    --accent-gradient: linear-gradient(135deg, #00f2ff 0%, #0072ff 100%);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --section-padding: 100px 0;
    --container-width: 1200px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none; /* Hide default cursor for custom cursor */
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, .logo {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
}

/* --- Custom Cursor --- */
.cursor {
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease;
    display: none; /* Hidden by default, shown on desktop */
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    position: fixed;
    top: -16px;
    left: -16px;
    pointer-events: none;
    z-index: 9998;
    transition: transform 0.15s ease, width 0.3s ease, height 0.3s ease;
    opacity: 0.5;
    display: none; /* Hidden by default, shown on desktop */
}

@media (hover: hover) and (pointer: fine) {
    .cursor, .cursor-follower {
        display: block;
    }
    * {
        cursor: none !important;
    }
}

/* --- Loader --- */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-text {
    font-family: 'Syne', sans-serif;
    font-size: 2rem;
    letter-spacing: 5px;
    display: block;
    margin-bottom: 10px;
}

.loader-bar {
    width: 200px;
    height: 2px;
    background: var(--glass-border);
    position: relative;
    overflow: hidden;
}

.loader-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent-color);
    animation: loading 2s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    50% { left: 0; }
    100% { left: 100%; }
}

/* --- Background Particles --- */
#canvas-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* --- Navigation --- */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    transition: var(--transition);
}

.glass-nav.scrolled {
    padding: 10px 0;
    background: rgba(10, 10, 12, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    letter-spacing: 2px;
}

.logo span {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-color);
    transition: var(--transition);
}

/* --- Hero Section --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 5px 15px;
    background: var(--glass-bg);
    border: 1px solid var(--accent-color);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 10px;
}

.typing-container {
    font-size: 2.5rem;
    height: 3.5rem;
    color: var(--text-muted);
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    max-width: 600px;
}

.hero-btns {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.btn {
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    display: inline-block;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 242, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 242, 255, 0.5);
}

.btn-secondary {
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
}

.btn-secondary:hover {
    background: var(--glass-border);
    border-color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.social-links a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

.hero-image-container {
    position: relative;
}

.image-wrapper {
    position: relative;
    width: 400px;
    height: 500px;
    border-radius: 30px;
    overflow: visible;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30px;
    z-index: 2;
    position: relative;
    filter: grayscale(20%);
    transition: var(--transition);
}

.profile-img:hover {
    filter: grayscale(0%);
}

.image-backdrop {
    position: absolute;
    top: 20px;
    right: -20px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent-color);
    border-radius: 30px;
    z-index: 1;
}

.floating-badge {
    position: absolute;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 3;
    animation: floating 3s ease-in-out infinite;
}

.badge-1 { top: 10%; left: -15%; }
.badge-2 { bottom: 10%; right: -15%; animation-delay: 1.5s; }

@keyframes floating {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--text-muted);
}

.mouse {
    width: 25px;
    height: 40px;
    border: 2px solid var(--text-muted);
    border-radius: 15px;
    position: relative;
}

.mouse::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 2px;
    animation: mouse-scroll 1.5s infinite;
}

@keyframes mouse-scroll {
    0% { opacity: 1; top: 8px; }
    100% { opacity: 0; top: 25px; }
}

/* --- Section Headers --- */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 10px;
}

.section-title.small { font-size: 2rem; }

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    letter-spacing: 1px;
}

/* --- About Section --- */
.about-section { padding: var(--section-padding); }

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.about-stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
}

.stat-item { text-align: center; }

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-color);
    font-family: 'Syne', sans-serif;
}

.stat-item p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.detail-card {
    padding: 40px;
}

.detail-card h3 { margin-bottom: 20px; }

.detail-card ul li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-muted);
}

.detail-card ul li i { color: var(--accent-color); }

/* --- Skills Section --- */
.skills-section { padding: var(--section-padding); background: var(--bg-accent); }

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.skill-category { padding: 30px; }

.skill-category h3 {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
}

.skill-category i { color: var(--accent-color); }

.skill-item { margin-bottom: 20px; }

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.skill-bar {
    width: 100%;
    height: 6px;
    background: var(--glass-border);
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 10px;
    transition: width 1.5s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

/* --- Projects Section --- */
.projects-section { padding: var(--section-padding); }

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    border-radius: 25px;
    overflow: hidden;
    position: relative;
    height: 400px;
}

.project-image {
    width: 100%;
    height: 100%;
    background: var(--bg-accent);
    position: relative;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 4rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.05);
    font-family: 'Syne', sans-serif;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 12, 0.9);
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    z-index: 2;
}

.project-card:hover .project-overlay { opacity: 1; }

.project-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.project-tags span {
    font-size: 0.7rem;
    background: var(--glass-border);
    padding: 4px 10px;
    border-radius: 50px;
}

.project-overlay h3 { margin-bottom: 15px; font-size: 1.5rem; }

.project-overlay p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 25px;
}

.project-link {
    color: var(--accent-color);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- Experience & Education --- */
.experience-section { padding: var(--section-padding); background: var(--bg-accent); }

.experience-education-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.timeline {
    border-left: 2px solid var(--glass-border);
    padding-left: 30px;
    margin-top: 40px;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-dot {
    position: absolute;
    left: -41px;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    border: 4px solid var(--bg-accent);
    border-radius: 50%;
}

.timeline-content { padding: 30px; }

.timeline-content .date {
    display: block;
    color: var(--accent-color);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.timeline-content h4 { margin-bottom: 10px; font-size: 1.2rem; }

.timeline-content p { color: var(--text-muted); font-size: 0.95rem; }

/* --- Contact Section --- */
.contact-section { padding: var(--section-padding); }

.contact-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 60px;
}

.contact-item {
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--accent-color);
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--glass-border);
    border-radius: 15px;
}

.contact-item h4 { font-size: 1.1rem; }

.contact-item p { color: var(--text-muted); font-size: 0.9rem; }

.contact-form { padding: 40px; }

.form-group { margin-bottom: 20px; }

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-color);
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: var(--glass-border);
}

/* --- Footer --- */
.footer { padding: 40px 0; border-top: 1px solid var(--glass-border); }

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer p { color: var(--text-muted); font-size: 0.9rem; }

.footer-social { display: flex; gap: 20px; }

.footer-social a { color: var(--text-muted); font-size: 1.2rem; }

.footer-social a:hover { color: var(--accent-color); }

/* --- Back to Top --- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.visible { opacity: 1; visibility: visible; }

/* --- Reveal Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .hero-content { grid-template-columns: 1fr; text-align: center; }
    .hero-text { order: 2; }
    .hero-image-container { order: 1; margin: 0 auto; }
    .hero-title { font-size: 3rem; }
    .hero-btns { justify-content: center; }
    .social-links { justify-content: center; }
    .image-wrapper { width: 300px; height: 380px; }
    .about-grid, .contact-grid { grid-template-columns: 1fr; }
    .experience-education-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.5s;
    }
    .nav-links.active { right: 0; }
    .nav-toggle { display: flex; }
    .nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
    .nav-toggle.active span:nth-child(2) { opacity: 0; }
    .nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }
    .section-title { font-size: 2.5rem; }
}
