:root {
    --bg-color: #0a0a0a;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --accent: #7c3aed;
    /* Violet */
    --accent-glow: rgba(124, 58, 237, 0.5);
    --card-bg: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.1);
    --font-heading: 'Syne', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
    /* Custom cursor */
}

html {
    scroll-behavior: smooth;
}

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

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--text-primary);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid var(--text-primary);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

body:hover .cursor-outline {
    opacity: 1;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

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

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

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

.menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 600px;
    z-index: 2;
}

.greeting {
    color: var(--accent);
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 10px;
    display: block;
}

.name {
    font-family: var(--font-heading);
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, #a1a1aa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.typing-container {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--text-secondary);
    height: 40px;
}

.highlight {
    color: var(--accent);
}

.description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 40px;
    max-width: 450px;
}

.hero-btns {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.primary-btn {
    background: var(--accent);
    color: white;
    border: 1px solid var(--accent);
}

.primary-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: white;
    z-index: -1;
    transition: width 0.3s;
}

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

.primary-btn:hover::before {
    width: 100%;
}

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

.secondary-btn:hover {
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Hero Visual (Blobs & Glass Card) */
.hero-visual {
    position: relative;
    width: 500px;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.blob-cont {
    position: absolute;
    width: 100%;
    height: 100%;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.6;
    animation: float 8s infinite ease-in-out;
}

.blob-1 {
    width: 300px;
    height: 300px;
    background: #7c3aed;
    top: 0;
    left: 0;
}

.blob-2 {
    width: 250px;
    height: 250px;
    background: #2563eb;
    bottom: 0;
    right: 0;
    animation-delay: -2s;
}

.glass-card {
    width: 350px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 16px;
    z-index: 2;
    transform: rotate(-5deg);
    transition: transform 0.3s;
}

.glass-card:hover {
    transform: rotate(0deg) scale(1.02);
}

.dot-container {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.red {
    background: #ef4444;
}

.yellow {
    background: #eab308;
}

.green {
    background: #22c55e;
}

code {
    font-family: 'Consolas', monospace;
    color: #a1a1aa;
    font-size: 0.9rem;
}

/* Sections General */
section {
    padding: 100px 10%;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin-bottom: 60px;
    text-align: center;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60%;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

/* About Section */
.about-container {
    display: flex;
    justify-content: center;
}

.about-text {
    max-width: 800px;
    text-align: left;
    /* ALIGNMENT FIX */
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin: 0 auto;
    /* ALIGNMENT FIX */
}

.skills-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 120px;
    transition: transform 0.3s, border-color 0.3s;
}

.skill-item:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
}

.skill-item i {
    font-size: 2rem;
    color: var(--accent);
}


.express-fix {
    padding-top: 10px;
    width: 70px;
    height: 70px;
}

.github-fix {
    padding-top: 10px;
    width: 70px;
    height: 70px;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    /* ALIGNMENT FIX */
    margin: 0 auto;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s;
    position: relative;
}

.project-card:hover {
    transform: translateY(-10px);
}

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

.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: 25px;
}

.project-info h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.tags {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.tags span {
    font-size: 0.8rem;
    padding: 5px 12px;
    background: rgba(124, 58, 237, 0.1);
    color: var(--accent);
    border-radius: 20px;
}

.project-link {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    color: black;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s;
}

.project-card:hover .project-link {
    opacity: 1;
    transform: translateY(0);
}

/* Contact Section */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid var(--border);
}

.input-group {
    position: relative;
    margin-bottom: 30px;
}

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

.input-group textarea {
    resize: vertical;
    min-height: 100px;
}

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

.input-group input:focus,
.input-group input:valid,
.input-group textarea:focus,
.input-group textarea:valid {
    border-color: var(--accent);
}

.input-group input:focus~label,
.input-group input:valid~label,
.input-group textarea:focus~label,
.input-group textarea:valid~label {
    top: -20px;
    font-size: 0.8rem;
    color: var(--accent);
}

/* Footer */
footer {
    padding: 40px 10%;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    max-width: 1200px;
    /* ALIGNMENT FIX */
    margin: 0 auto;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--accent);
}

/* Animations */
@keyframes float {

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

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

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 20px;
    }

    .nav-links {
        display: none;
    }

    .menu-btn {
        display: block;
    }

    .hero {
        flex-direction: column;
        padding-top: 120px;
        text-align: center;
    }

    .hero-content {
        margin-bottom: 50px;
    }

    .hero-btns {
        justify-content: center;
    }

    .hero-visual {
        width: 100%;
        height: 300px;
    }

    .glass-card {
        width: 280px;
    }

    .name {
        font-size: 3.5rem;
    }

    footer {
        flex-direction: column;
        gap: 20px;
    }
}

/* Social Buttons in Contact Section - Neo-Brutalist Cards */
.contact-container {
    max-width: 1200px;
    /* Increased to fit cards */
    background: transparent;
    border: none;
    padding: 0;
}

.social-links-large {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 50px;
    width: 100%;
    perspective: 1000px;
}

.profile-card {
    width: 300px;
    background: var(--bg-color);
    border: 3px solid var(--text-primary);
    box-shadow: 8px 8px 0 var(--accent);
    position: relative;
    transition: all 0.3s ease;
    overflow: visible;
}

.profile-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: 12px 12px 0 var(--accent);
}

.upper-container {
    height: 100px;
    border-bottom: 3px solid var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    position: relative;
}

/* Platform Colors for Banners */
.linkedin-bg {
    background: #0077b5;
}

.github-bg {
    background: #333;
}

.leetcode-bg {
    background: #ffa116;
}

.image-container {
    width: 90px;
    height: 90px;
    background: var(--bg-color);
    border: 3px solid var(--text-primary);
    transform: translateY(50%);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 0;
    /* Square for brutalism */
}

.image-container i {
    font-size: 3rem;
}

.linkedin-bg+.image-container i {
    color: #0077b5;
}

.github-bg+.image-container i {
    color: #ffffff;
}

.leetcode-bg+.image-container i {
    color: #ffa116;
}

.lower-container {
    padding: 60px 20px 30px;
    text-align: center;
}

.lower-container h3 {
    margin: 0 0 20px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-btn {
    display: inline-block;
    padding: 10px 25px;
    background: transparent;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: bold;
    font-family: var(--font-body);
    border: 3px solid var(--text-primary);
    box-shadow: 4px 4px 0 var(--text-primary);
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.profile-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    box-shadow: none;
    transform: translate(2px, 2px);
}

/* Hide original social-btn styles if not needed or override */
.social-btn {
    display: none;
}

/* Education Section */
.education {
    padding: 100px 10%;
    position: relative;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--border);
    top: 0;
    bottom: 0;
    left: 20px;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 100%;
    margin-bottom: 30px;
}

.timeline-dot {
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    position: absolute;
    left: 11px;
    top: 15px;
    z-index: 1;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.2);
}

.timeline-date {
    font-family: var(--font-heading);
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 10px;
    display: inline-block;
    padding: 5px 15px;
    background: rgba(124, 58, 237, 0.1);
    border-radius: 20px;
    font-size: 0.9rem;
}

.timeline-content {
    padding: 20px 30px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    position: relative;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateX(10px);
    border-color: var(--accent);
}

.timeline-content h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.timeline-content .institution {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 10px;
    font-size: 1rem;
}

.timeline-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Certifications Section - "Latest Drop" Style */
.certifications {
    padding: 100px 10%;
    overflow: hidden;
    /* Prevent scrollbar issues from animations */
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 60px;
    justify-items: center;
}

.cert-card {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    transform: none;
    padding: 1rem 2rem 0 2rem;
    max-height: 600px;
    text-align: center;
    position: relative;
    width: 100%;
    max-width: 22rem;
    display: block;
    transition: transform 0.3s ease;
}

.cert-card:hover {
    transform: translateY(-5px);
    box-shadow: none;
    border: none;
}

/* SVG Lines */
.cert-svg {
    stroke-width: 2;
    transition: opacity 0.3s ease;
    color: var(--border);
    opacity: 0.5;
    position: absolute;
    pointer-events: none;
}

.cert-svg.horizontal-line {
    left: -2.5rem;
    /* Extends beyond padding */
    width: calc(100% + 5rem);
    height: 8px;
}

.cert-svg.top {
    top: 0;
}

.cert-svg.bottom {
    bottom: 50px;
    /* Adjust based on title height */
}

.cert-svg.vertical-line {
    top: 0;
    height: 100%;
    width: 8px;
    z-index: 0;
}

.cert-svg.left {
    left: 1rem;
}

.cert-svg.right {
    right: 1rem;
}

.cert-card:hover .cert-svg {
    opacity: 1;
    color: var(--accent);
}

/* Top Details (Issuer / Date) */
.cert-details-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-weight: 500;
}

.cert-issuer {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Image Wrapper & Scribble */
.cert-image-wrapper {
    position: relative;
    margin-bottom: -0.25rem;
    padding-inline: 1rem;
    z-index: 1;
}

.scribble-svg {
    position: absolute;
    inset: 0;
    height: 100%;
    width: 100%;
    animation: squiggle 0.5s infinite;
    pointer-events: none;
    z-index: -1;
}

.scribble-path {
    transform-origin: center;
    opacity: 0.6;
    transition: stroke-dashoffset 500ms ease-in;
    stroke-dasharray: 1700;
    stroke-dashoffset: 1700;
    stroke: var(--accent);
    stroke-width: 12;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cert-card:hover .scribble-path {
    stroke-dashoffset: 0;
}

.cert-image-wrapper img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 16px;
    width: 80%;
    /* Adjusted width */
    border-radius: 8px;
    transform-origin: top center;
    transition: transform 500ms ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.cert-card:hover .cert-image-wrapper img {
    transform: scale(1.1) rotate(2deg);
}

/* Title & Button */
.cert-title-wrapper {
    position: relative;
    height: 60px;
    /* Space for title */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

.cert-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    line-height: 1.2;
}

.cert-button-wrapper {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 200ms;
    background: var(--bg-color);
    /* Cover title on hover */
    z-index: 2;
}

.cert-card:hover .cert-button-wrapper,
.cert-card:focus-within .cert-button-wrapper {
    opacity: 1;
}

/* Button Custom Style */
.button-outer {
    filter: drop-shadow(0 1px 0 var(--accent)) drop-shadow(-1px 0 0 var(--accent)) drop-shadow(1px 0 0 var(--accent)) drop-shadow(0 -1px 0 var(--accent)) drop-shadow(4px 4px 0 var(--accent));
    transition: filter 0.3s ease-in-out;
}

.button-outer:hover {
    filter: drop-shadow(0 1px 0 var(--accent)) drop-shadow(-1px 0 0 var(--accent)) drop-shadow(1px 0 0 var(--accent)) drop-shadow(0 -1px 0 var(--accent)) drop-shadow(0px 0px 0 var(--accent));
}

.button-middle {
    text-decoration: none;
    transition: transform 0.3s ease-in-out;
    cursor: pointer;
    position: relative;
    border: none;
    padding: 0;
    background: transparent;
    display: inline-block;
}

.button-outer:hover .button-middle {
    transform: translate(4px, 4px);
}

.button-inner {
    background: var(--text-primary);
    color: #000;
    padding: 0.8rem 1.5rem;
    position: relative;
    font-family: var(--font-body);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    display: block;
    clip-path: polygon(100% 0, 90% 50%, 100% 100%, 0 100%, 10% 50%, 0 0);
    /* Rough shape */
}

/* Scribble Animation Keyframes */
@keyframes squiggle {
    0% {
        filter: url("#squiggle-0");
    }

    25% {
        filter: url("#squiggle-1");
    }

    50% {
        filter: url("#squiggle-2");
    }

    75% {
        filter: url("#squiggle-3");
    }

    100% {
        filter: url("#squiggle-4");
    }
}

/* Responsive Timeline */
@media (max-width: 768px) {
    .timeline::after {
        left: 20px;
    }

    .timeline-item {
        padding-left: 50px;
        padding-right: 0;
    }

    .timeline-dot {
        left: 11px;
    }
}

/* Fanning Hand Card Styles */
.hand-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 0;
    min-height: 400px;
    width: 100%;
    overflow: hidden;
}

.hand {
    display: grid;
    /* Initial 'collapsed' state: cards overlap significantly */
    grid-template-columns: repeat(3, 40px);
    gap: 0;
    transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* Center the grid items */
    justify-content: center;
}

/* Expand the grid on hover */
.hand-container:hover .hand {
    /* Expanded state: full card width + gap */
    grid-template-columns: repeat(3, 160px);
    gap: 40px;
}

.hand-card {
    position: relative;
    width: 180px;
    height: 240px;
    background-color: #1a1a2e;
    /* Dark card background */
    border: 1px solid var(--accent);
    border-radius: 12px;

    /* Fan Rotation Logic */
    /* Origin at bottom center for fanning effect */
    transform-origin: 50% 100%;

    /* 
       Formula: (i * 15deg) - 15deg
       i=0 -> -15deg
       i=1 -> 0deg
       i=2 -> +15deg
    */
    transform: translateX(-30px) rotate(calc((var(--i) * 15deg) - 15deg));

    transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: -10px 0 20px rgba(0, 0, 0, 0.5);
    /* Depth shadow */
    z-index: 1;
    cursor: pointer;
}

/* Reset rotation and position on container hover (Spread cards out) */
.hand-container:hover .hand-card {
    transform: translateX(0) rotate(0deg);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Lift individual card on direct hover */
.hand-container:hover .hand-card:hover {
    transform: translateY(-20px) scale(1.05);
    background-color: var(--accent);
    border-color: white;
    z-index: 10;
}

.hand-card a {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
    height: 100%;
    justify-content: center;
    color: white;
    transition: color 0.3s;
}

.hand-card a i {
    font-size: 3.5rem;
    color: var(--accent);
    transition: color 0.3s;
}

.hand-card a span {
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hover Content Styles */
.hand-container:hover .hand-card:hover i {
    color: white;
}