/* Design Tokens - Mobile-First Breakpoints & Sizing */
@import url('./design-tokens.css');

/* Tech Stack Icons */
@import url('https://cdn.jsdelivr.net/gh/devicons/devicon@latest/devicon.min.css');

/* Reset and Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Custom Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: transparent;
    /* Invisible track */
    border-left: none;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.8), rgba(99, 102, 241, 0.6));
    border-radius: 10px;
    border: 2px solid rgba(15, 23, 42, 0.5);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(139, 92, 246, 1), rgba(99, 102, 241, 0.8));
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.8) rgba(15, 23, 42, 0.5);
}

/* Tech Stack Section - Extraordinary 3D Cards */
.tech-stack {
    padding: 8rem 0;
    background: transparent;
    position: relative;
    z-index: 2;
}

.tech-stack .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.tech-stack .section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.tech-stack .section-title {
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 1rem;
    font-weight: 700;
}

.tech-stack .section-subtitle {
    color: #cbd5e1;
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Tech Grid */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

/* Tech Card Container - NO PILLS, just floating icons */
.tech-item {
    position: relative;
    cursor: pointer;
    /* NO background, border-radius, backdrop-filter, border, box-shadow */
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 0;
}

/* Remove all pseudo-element backgrounds */
.tech-item::before {
    display: none;
}

.tech-item:hover::before {
    display: none;
}

.tech-item:hover {
    transform: translateY(-5px);
}

/* Icon container */
.tech-icon {
    position: relative;
    z-index: 1;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.tech-item:hover .tech-icon {
    transform: scale(1.1);
}

.tech-icon i {
    font-size: 3.5rem;
    filter: drop-shadow(0 0 10px currentColor);
    transition: filter 0.3s ease;
}

.tech-item:hover .tech-icon i {
    filter: drop-shadow(0 0 20px currentColor);
}

/* Python specific fix for visibility */
.tech-icon i.devicon-python-original {
    color: #3776ab !important;
}

.tech-icon i.devicon-python-plain {
    color: #3776ab !important;
}

/* Text label */
.tech-item span {
    position: relative;
    z-index: 1;
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    transition: color 0.3s ease;
}

.tech-item:hover span {
    color: #c4b5fd;
}

/* NO floating animations */
@keyframes float {

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

    50% {
        transform: translateY(-10px);
    }
}

/* Remove floating animations */
.tech-item:nth-child(odd) {
    /* animation removed */
}

.tech-item:nth-child(even) {
    /* animation removed */
}

.tech-item:hover {
    /* NO animation-play-state */
}

/* Responsive */
@media (max-width: 768px) {
    .tech-stack {
        padding: 5rem 0;
    }

    .tech-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .tech-item {
        height: 150px;
    }

    .tech-icon {
        width: 60px;
        height: 60px;
    }

    .tech-icon i {
        font-size: 3rem;
    }

    .tech-item span {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .tech-item {
        height: 140px;
    }

    .tech-icon i {
        font-size: 2.5rem;
    }

    .tech-item span {
        font-size: 0.85rem;
    }
}

/* Hide cursor on touch devices */
@media (hover: none) {

    .cursor,
    .cursor-follower {
        display: none;
    }

    * {
        cursor: auto;
    }
}

html.has-scroll-smooth {
    overflow: hidden;
}

html.has-scroll-dragging {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.c-scrollbar {
    position: absolute;
    right: 0;
    top: 0;
    width: 11px;
    height: 100%;
    transform-origin: center right;
    transition: transform 0.3s, opacity 0.3s;
    opacity: 0;
}

.c-scrollbar:hover {
    transform: scaleX(1.45);
}

.c-scrollbar:hover,
.has-scroll-scrolling .c-scrollbar,
.has-scroll-dragging .c-scrollbar {
    opacity: 1;
}

.c-scrollbar_thumb {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #3b82f6;
    opacity: 0.5;
    width: 7px;
    border-radius: 10px;
    margin: 2px;
    cursor: -webkit-grab;
    cursor: grab;
}

.has-scroll-dragging .c-scrollbar_thumb {
    cursor: -webkit-grabbing;
    cursor: grabbing;
}

html {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    /* Account for fixed header */
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.5) transparent;
    /* indigo-500 with opacity */
}

body {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Duplicate scrollbar styles removed - using top of file definitions */

/* Main content container */
.content-wrapper {
    width: 100%;
    flex: 1 0 auto;
    position: relative;
    min-height: calc(100vh - 120px);
    padding-bottom: 120px;
    /* Add space for fixed navigation */
}

/* Navigation Text (for desktop) */
.nav-text {
    display: none;
}

/* Desktop Navigation Styles */
@media (min-width: 769px) {
    .nav-text {
        display: inline;
        margin-left: 0.5rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

    /* Show desktop links, hide mobile icons */
    .desktop-only {
        display: inline-flex !important;
    }

    .mobile-icon {
        display: none !important;
    }
}

/* Mobile Navigation Base Styles */
.desktop-only {
    display: none;
}

.mobile-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 44px;
    justify-content: center;
}

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
    /* Space for fixed header */
    overflow-x: hidden;
}

/* Projects Section */
#projects {
    padding: 16rem 0 8rem;
    position: relative;
    width: 100%;
    overflow: hidden;
    background: transparent;
}

#projects .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Projects Section */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    font-family: 'Special Gothic Expanded One', sans-serif;
    letter-spacing: 0.05em;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #60a5fa, #3b82f6);
    border-radius: 3px;
}

.section-subtitle {
    color: #94a3b8;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    font-family: 'Barlow', sans-serif;
    font-weight: 300;
}

/* Project cards - Galaxy Theme */
.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.project-card {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    display: flex;
    width: 100%;
    min-height: 400px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Starfield effect */
.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 60%, white, transparent),
        radial-gradient(1px 1px at 33% 80%, white, transparent),
        radial-gradient(1px 1px at 15% 90%, white, transparent);
    background-size: 200% 200%;
    background-position: 0% 0%;
    opacity: 0.4;
    animation: starfieldMove 60s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes starfieldMove {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 100% 100%;
    }
}

/* Nebula glow effect */
.project-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center,
            rgba(139, 92, 246, 0.15) 0%,
            rgba(99, 102, 241, 0.1) 25%,
            transparent 50%);
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
    z-index: 0;
}

.project-card:hover::after {
    opacity: 1;
    transform: rotate(30deg);
}

/* Cosmic border glow */
.project-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(139, 92, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-color: rgba(139, 92, 246, 0.5);
}

.project-image {
    position: relative;
    overflow: hidden;
    width: 50%;
    height: 100%;
    flex-shrink: 0;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 2;
}

.project-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(139, 92, 246, 0.1) 0%,
            rgba(59, 130, 246, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.project-card:hover .project-image::before {
    opacity: 1;
}

.project-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    filter: brightness(0.9) contrast(1.1);
}

.project-card:hover .project-preview {
    transform: scale(1.05);
    filter: brightness(1) contrast(1.15);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 27, 75, 0.9) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    text-align: center;
    z-index: 2;
}

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

.project-content {
    padding: 2.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    width: 50%;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
}

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

.project-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.3;
    font-family: 'Baumans', cursive;
    letter-spacing: 0.02em;
}

.project-description {
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

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

.tech-tag {
    background: rgba(139, 92, 246, 0.15);
    color: #c4b5fd;
    font-size: 0.75rem;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(139, 92, 246, 0.3);
    position: relative;
    overflow: hidden;
    font-family: 'Syne Mono', monospace;
}

.tech-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.tech-tag:hover {
    background: rgba(139, 92, 246, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.6);
}

.tech-tag:hover::before {
    left: 100%;
}

.project-links {
    display: flex;
    gap: 1.25rem;
    margin-top: 2rem;
    justify-content: center;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1) 0.1s;
}

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

.project-link {
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.project-link svg {
    position: relative;
    z-index: 1;
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}

.project-link:hover {
    background: rgba(139, 92, 246, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
    border-color: rgba(139, 92, 246, 0.6);
}

.project-link:hover svg {
    transform: scale(1.1);
}

/* Action buttons in header */
.project-actions {
    display: flex;
    gap: 0.5rem;
}

.project-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(99, 102, 241, 0.1));
    color: #a78bfa;
    transition: all 0.3s ease;
    border: 1px solid rgba(139, 92, 246, 0.2);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.project-action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.project-action-btn:hover::before {
    width: 100%;
    height: 100%;
}

.project-action-btn:hover {
    transform: translateY(-2px) rotate(5deg);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.4);
    border-color: rgba(139, 92, 246, 0.5);
    color: #ffffff;
}

.project-action-btn svg {
    position: relative;
    z-index: 1;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .project-card {
        flex-direction: column;
        min-height: auto;
    }

    .project-image,
    .project-content {
        width: 100%;
    }

    .project-image {
        height: 300px;
    }

    .project-overlay {
        background: linear-gradient(to bottom, rgba(15, 23, 42, 0.95) 0%, rgba(30, 27, 75, 0.9) 50%, transparent 100%);
        align-items: flex-end;
        justify-content: center;
    }

    .project-content {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .projects-grid {
        padding: 0 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }
}

/* Tooltip styles */
.project-link::after {
    content: attr(aria-label);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    margin-bottom: 10px;
}

.project-link:hover::after {
    opacity: 1;
    visibility: visible;
    margin-bottom: 15px;
}

.project-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-title {
    margin: 0 0 0.75rem;
    color: #f8fafc;
    font-size: 1.25rem;
    font-weight: 600;
}

.project-description {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

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

.tech-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(30, 41, 59, 0.7);
    color: #cbd5e1;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tech-tag svg {
    color: #60a5fa;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .projects {
        padding: 4rem 0;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }

    .project-card {
        flex-direction: column;
        max-width: 100%;
    }

    .project-image-container {
        width: 100%;
        height: 200px;
        border-radius: 16px 16px 0 0;
    }

    .project-preview {
        border-radius: 16px 16px 0 0;
    }

    .project-content {
        padding: 1.5rem;
    }

    .project-title {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }

    .project-description {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 1rem;
    }

    .project-tech {
        gap: 0.4rem;
        margin-top: 0.75rem;
    }

    .tech-tag {
        font-size: 0.75rem;
        padding: 0.25rem 0.65rem;
    }

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

    .project-link {
        width: 40px;
        height: 40px;
    }

    .project-link svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .projects {
        padding: 3rem 0;
    }

    .projects-grid {
        gap: 1.5rem;
        padding: 0 0.75rem;
    }

    .project-card {
        border-radius: 12px;
    }

    .project-image-container {
        height: 180px;
        border-radius: 12px 12px 0 0;
    }

    .project-preview {
        border-radius: 12px 12px 0 0;
    }

    .project-content {
        padding: 1.25rem;
    }

    .project-title {
        font-size: 1.1rem;
    }

    .project-description {
        font-size: 0.85rem;
    }

    .tech-tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }

    .project-link {
        width: 36px;
        height: 36px;
    }

    .project-link svg {
        width: 16px;
        height: 16px;
    }
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    position: relative;
}

:root {
    /* Modern color palette */
    --primary-color: #7c3aed;
    /* Purple */
    --primary-hover: #6d28d9;
    /* Darker purple */
    --bg-color: #0f172a;
    /* Dark blue-gray */
    --bg-secondary: #1e293b;
    /* Slightly lighter blue-gray */
    --text-color: #f8fafc;
    /* Off-white */
    --text-muted: #94a3b8;
    /* Muted blue-gray */
    --card-bg: rgba(30, 41, 59, 0.8);
    --card-border: rgba(148, 163, 184, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Gradients */
    --gradient-1: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
    --gradient-2: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

html {
    box-sizing: border-box;
    height: 100%;
    font-size: 100%;
}

*,
*:before,
*:after {
    box-sizing: inherit;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    background-color: var(--bg-color);
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
}

/* Ensure all media is responsive */
img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

/* Animated gradient background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 25%, #312e81 50%, #1e1b4b 75%, #0f172a 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes float {

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

    10% {
        opacity: 0.8;
    }

    50% {
        opacity: 0.8;
        transform: translate(100px, -100px) scale(1.2);
    }

    90% {
        opacity: 0.8;
    }
}

.wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Navigation */
/* Navigation */
/* Navigation */
.main-nav {
    position: fixed;
    bottom: 2rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    z-index: 999999;
    padding: 1rem 0;
    pointer-events: none;
    width: 100%;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
    /* Specific transitions */
    /* Gentle transition */
    /* Hide during loading */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    /* Slight slide up effect */
}

/* Show navbar after page loads */
body.nav-visible .main-nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Navigation Container */
.nav-container {
    display: flex;
    justify-content: center;
    width: auto;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navigation Links - Glass Morphism */
.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    pointer-events: auto;
    margin: 0 auto;
    width: auto;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 10px 40px -10px rgba(139, 92, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.nav-links:hover {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 15px 50px -10px rgba(139, 92, 246, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Optimized Navigation Icons */
.nav-icon {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
    flex-shrink: 0;
    backface-visibility: hidden;
}

/* Optimized Navigation Links */
/* Optimized Navigation Links */
.nav-link {
    color: #94a3b8;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 25px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    backface-visibility: hidden;
    background: transparent !important;
    /* FORCE TRANSPARENT */
}

/* Animated underline effect */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.8), rgba(99, 102, 241, 0.8));
    transition: width 0.3s ease;
}

.nav-link:focus-visible {
    box-shadow: none;
    outline: none;
}

.nav-link:hover,
.nav-link:focus {
    color: #ffffff;
    background: transparent !important;
    /* FORCE TRANSPARENT */
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.6);
}

.nav-link:hover .nav-icon {
    transform: translateY(-3px);
    filter: drop-shadow(0 0 5px rgba(139, 92, 246, 0.5));
}

.nav-link:hover::after,
.nav-link:focus::after {
    width: 60%;
}

.nav-link.active {
    color: #c4b5fd;
    background: transparent !important;
    /* FORCE TRANSPARENT */
}

.nav-link.active::after {
    width: 80%;
    background: linear-gradient(90deg, #a78bfa, #c4b5fd);
    height: 3px;
}

/* Optimized Navbar show/hide animation */
.main-nav {
    /* transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); - Removed */
    /* will-change: transform; - Removed */
    backface-visibility: hidden;
    /* transform: translateZ(0); - Removed */
    contain: layout style paint;
}

.main-nav.nav-hidden {
    /* transform: translate3d(0, 100%, 0); - Disabled hiding */
    transform: none !important;
}

/* Optimized Mobile Navigation */
@media (max-width: 768px) {
    .nav-links {
        width: 100%;
        max-width: 100%;
        justify-content: space-around;
        padding: 0.75rem 0.5rem;
        background: rgba(15, 23, 42, 0.98);
        border-radius: 24px;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
        backdrop-filter: none;
        /* Disable backdrop-filter for better performance */
        -webkit-backdrop-filter: none;
        border: 1px solid rgba(255, 255, 255, 0.05);
        /* will-change: transform, opacity; - Removed to prevent slippery effect */
        contain: content;
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    /* Use a pseudo-element for the blur effect */
    .nav-links::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(15, 23, 42, 0.98);
        border-radius: 24px;
        z-index: -1;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .nav-link {
        flex-direction: column;
        padding: 0.75rem 0.5rem;
        font-size: 0.75rem;
        border-radius: 12px;
    }

    .nav-icon {
        width: 20px;
        height: 20px;
    }

    .nav-text {
        font-size: 0.7rem;
        margin-top: 0.25rem;
    }

    .desktop-only {
        display: none;
    }

    /* Active state indicator for mobile */
    .nav-link.active {
        position: relative;
    }

    .nav-link.active::after {
        content: '';
        position: absolute;
        bottom: -8px;
        left: 50%;
        transform: translateX(-50%);
        width: 4px;
        height: 4px;
        background: #ffffff;
        border-radius: 50%;
    }
}

/* Ultra-small screens - hide text labels, reduce padding and icon size */
@media (max-width: 400px) {
    .main-nav {
        padding: 0 0.25rem;
    }

    .nav-container {
        max-width: 100vw;
        padding: 0;
    }

    .nav-links {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0.5rem 0.25rem;
        gap: 0.5rem;
        /* Prevent horizontal scrolling of the page */
        max-width: 100vw;
        box-sizing: border-box;
        /* Smooth scrolling for navigation */
        scroll-behavior: smooth;
        /* Hide scrollbar but keep functionality */
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-link {
        padding: 0.4rem;
        min-width: 44px;
        /* Maintain touch target size */
        flex-shrink: 0;
    }

    .nav-icon {
        width: 18px;
        height: 18px;
    }

    /* Hide all text labels on ultra-small screens */
    .nav-text {
        display: none;
    }

    /* Ensure desktop-only links are completely hidden */
    .desktop-only {
        display: none;
    }

    /* Show only mobile-icon versions with aria-labels */
    .mobile-icon {
        display: flex;
    }

    /* Reduce profile image size for ultra-small screens */
    .hero-image {
        width: clamp(100px, 30vw, 150px);
        height: auto;
    }

    .profile-img-container {
        width: clamp(100px, 30vw, 150px);
        height: auto;
        aspect-ratio: 1/1;
        border-radius: 15px;
        border: 2px solid #FFD700;
        box-shadow: 0 3px 15px rgba(255, 215, 0, 0.2);
    }

    /* Adjust hero content spacing for smaller image */
    .hero-content {
        gap: 1rem;
        max-width: 350px;
    }

    .hero-intro {
        margin-bottom: 1.5rem;
    }
}

/* Mobile Navigation Adjustments */
@media (max-width: 768px) {
    .main-nav {
        bottom: 1rem;
        padding: 0 0.5rem;
    }

    .nav-links {
        width: 100%;
        max-width: 100%;
        justify-content: space-around;
        padding: 0.5rem;
        border-radius: 20px;
    }

    .nav-link {
        flex: 1;
        min-height: 44px;
        justify-content: center;
        padding: 0.5rem 0.25rem;
    }

    .nav-icon {
        margin: 0 auto 0.25rem;
    }

    /* Hero Section Mobile Styles */
    .hero {
        padding: 1rem;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        align-items: center;
        box-sizing: border-box;
        justify-content: flex-start;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
        gap: 1.5rem;
        padding: 0 0.5rem;
    }

    .hero-image {
        order: 1;
        width: clamp(140px, 45vw, 240px);
        height: auto;
        margin: 0 auto;
        position: static;
        z-index: 1;
        -webkit-tap-highlight-color: transparent;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
    }

    .profile-img-container {
        width: clamp(140px, 45vw, 240px);
        height: auto;
        aspect-ratio: 1/1;
        border-radius: 20px;
        overflow: hidden;
        border: 4px solid #FFD700;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }

    .hero-text-content {
        order: 2;
        width: 100%;
        padding: 0;
        text-align: center;
    }

    .hero-intro {
        margin-bottom: 2rem;
    }

    .hero-intro h1 {
        font-size: clamp(1.35rem, 6vw + 0.5rem, 2.25rem);
        margin: 0 0 0.5rem 0;
        color: #ffffff;
        font-weight: 600;
    }

    .hero-intro h2 {
        font-size: clamp(1.8rem, 8vw + 0.5rem, 3rem);
        margin: 0 0 0.5rem 0;
        color: #FFD700;
        font-weight: 700;
    }

    .hero-intro p {
        font-size: clamp(0.9rem, 4vw + 0.3rem, 1.1rem);
        color: #e2e8f0;
        margin: 0 0 2rem 0;
        line-height: 1.6;
        opacity: 0.9;
    }

    .profile-img-container {
        border: 3px solid #FFD700;
        box-shadow: 0 5px 20px rgba(255, 215, 0, 0.2);
        border-radius: 20px;
        overflow: hidden;
    }

    .hero-intro h1 {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }

    .hero-intro h2 {
        font-size: 2.25rem;
        margin-bottom: 0.75rem;
    }

    .hero-intro p {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
        color: var(--text-muted);
    }

    .hero-actions {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        margin-top: 1.5rem;
        width: 100%;
    }

    .social-links {
        display: flex;
        justify-content: center;
        gap: 1.5rem;
        margin-bottom: 1rem;
    }

    .social-link {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.1);
        transition: all 0.3s ease;
    }

    .social-link:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-2px);
    }

    .btn-download {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.8rem 2rem;
        background: linear-gradient(135deg, #FFD700, #FFA500);
        color: #1a1a1a;
        border: none;
        border-radius: 30px;
        font-weight: 600;
        text-decoration: none;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    }

    .btn-download:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    }

    .social-links {
        justify-content: center;
        gap: 1.25rem;
    }

    .download-cv-container {
        width: 100%;
        max-width: 200px;
        margin-top: 0.5rem;
    }

    .btn-download {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* Desktop Navigation */
.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 0.5rem;
}

/* Desktop Navigation */
@media (min-width: 769px) {
    .mobile-icon {
        display: none;
    }
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }

    .nav-links {
        gap: 1rem;
    }
}

.main-nav.scrolled {
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
    max-width: 28rem;
    margin: 0 auto;
    padding: 0 1rem;
}

.nav-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    border-radius: 9999px;
    padding: 0.25rem;
    border: 1px solid rgba(254, 243, 199, 0.1);
    max-width: fit-content;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
}

.nav-link {
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(254, 243, 199, 0.9);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: #fef3c7;
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    color: #fef3c7;
    background: rgba(245, 158, 11, 0.1);
}

.nav-icon {
    width: 1.25rem;
    height: 1.25rem;
}

/* Mobile Navigation */
.mobile-icon {
    display: none;
}

.desktop-only {
    display: inline-flex;
}

/* Responsive Navigation */
@media (max-width: 768px) {
    .mobile-icon {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0.5rem;
    }

    .desktop-only {
        display: none !important;
    }

    .nav-links {
        width: 100%;
        justify-content: space-between;
        padding: 0 1rem;
    }

    .nav-link {
        padding: 0.5rem;
        flex-direction: column;
        font-size: 0.75rem;
    }

    .nav-icon {
        margin-bottom: 0.25rem;
    }

    .nav-link::after {
        display: none;
    }
}

/* Content Wrapper */
.content-wrapper {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    max-width: 100vw;
    overflow: hidden;
    padding: 2rem 1.5rem 6rem;
    background: transparent;
    pointer-events: none;
}

.content-wrapper>* {
    pointer-events: auto;
}

/* Ensure hero section doesn't cause overflow */
.hero {
    max-width: 100%;
    overflow: hidden;
}

/* Fix for any potential overflow in containers */
.container {
    max-width: 100%;
    overflow: hidden;
}

/* Utility Classes */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 3rem 0;
    position: relative;
}

/* Desktop styles first */
.hero-name {
    font-family: 'Special Gothic Expanded One', sans-serif !important;
    font-weight: 900 !important;
    font-size: 3.5rem !important;
    /* Larger size for desktop */
    letter-spacing: 0.3px !important;
    margin: 0.5rem 0 !important;
    padding: 0 5px !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
    line-height: 1.1 !important;
    display: inline-block !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    word-spacing: -2px !important;
    color: #7e22ce !important;
    background: none !important;
}

/* Tablet and below */
@media (max-width: 1024px) {
    .hero-name {
        font-size: 3rem !important;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .hero-name {
        font-size: 2.5rem !important;
        white-space: normal !important;
        line-height: 1.2 !important;
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 5rem 0 3rem;
    position: relative;
    z-index: 10;
    overflow: hidden;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    /* Align content to the right */
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    flex-wrap: wrap;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    /* Limit max width for better spacing */
    position: relative;
    flex-wrap: wrap;
    gap: 4rem;
    /* Increase gap between image and text */
    margin-left: auto;
    /* Push content to the right */
    padding-left: 2rem;
    /* Add some padding from the left */
}

.hero-image {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    /* Slightly larger max-width for the image */
    margin: 0;
    margin-right: 2rem;
    /* Add some margin to the right of the image */
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-text-content {
    flex: 1;
    min-width: 380px;
    /* Slightly larger min-width for better text alignment */
    padding-right: 4rem;
    /* More padding on the right */
}

.hero-intro {
    margin-bottom: 2.5rem;
}

.hero-intro h1 {
    font-size: clamp(1.75rem, 5vw + 0.5rem, 2.75rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    line-height: 1.2;
}

.hero-intro h2 {
    font-size: clamp(2.5rem, 8vw + 0.5rem, 4rem);
    font-weight: 800;
    margin: 0.5rem 0;
    line-height: 1.1;
}

.hero-intro p {
    font-size: 1.35rem;
    color: var(--text-muted);
    margin: 1.75rem 0 2.5rem;
    line-height: 1.7;
    max-width: 85%;
}

/* Profile Image Styles */
.profile-img-container {
    position: relative;
    width: clamp(140px, 45vw, 240px);
    height: auto;
    aspect-ratio: 1/1;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border: 5px solid rgba(79, 70, 229, 0.12);
    margin: 0 auto;
    background: rgba(30, 41, 59, 0.3);
    backdrop-filter: blur(6px);
    transition: all 0.3s ease;
}

.profile-img-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, var(--primary-color), #4f46e5);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    z-index: 2;
    opacity: 0.7;
    transition: all 0.6s ease;
}

.profile-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    filter: grayscale(20%) contrast(1.05);
    border-radius: 16px;
    /* Match the container's initial border radius */
}

.profile-img-container:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    border-radius: 25% 75% 75% 25% / 25% 25% 75% 75%;
}

.profile-img-container:hover::before {
    opacity: 0.9;
    transform: scale(0.98);
}

.profile-img-container:hover img {
    transform: scale(1.08);
    filter: grayscale(0%) contrast(1.1);
    border-radius: 25% 75% 75% 25% / 25% 25% 75% 75%;
    /* Match container's border radius on hover */
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }

    50% {
        transform: translateY(-15px) rotate(1deg);
        border-radius: 25% 75% 75% 25% / 25% 25% 75% 75%;
    }
}

/* Adjust layout for smaller screens */
@media (max-width: 1024px) {
    .hero .container {
        justify-content: center;
        padding: 0 1.5rem;
    }

    .hero-content {
        max-width: 100%;
        margin-left: 0;
        padding-left: 0;
        justify-content: center;
        text-align: center;
    }

    .hero-text-content {
        padding-right: 0;
        text-align: center;
    }

    .hero-intro p {
        margin-left: auto;
        margin-right: auto;
    }

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

    .profile-img-container {
        width: 340px;
        height: 340px;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 2rem 0;
    }

    .hero .container {
        flex-direction: column;
        text-align: center;
        padding: 0 1.5rem;
    }

    .hero-content {
        flex-direction: column;
        gap: 2rem;
    }

    .hero-text-content {
        max-width: 100%;
        padding-right: 0;
        text-align: center;
    }

    .hero-intro h1 {
        font-size: clamp(1.5rem, 6vw + 0.5rem, 2.25rem);
    }

    .hero-intro h2 {
        font-size: clamp(2rem, 8vw + 0.5rem, 2.75rem);
    }

    .hero-intro p {
        font-size: clamp(1rem, 4vw + 0.3rem, 1.1rem);
        max-width: 100%;
        margin: 1.5rem 0;
    }

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

    .profile-img-container {
        width: clamp(140px, 45vw, 240px);
        height: auto;
        margin: 0 auto 2rem;
    }
}

/* Media queries for mobile breakpoints */

/* 414px breakpoint */
@media (max-width: 414px) {
    .container {
        padding: 0 1rem;
    }

    .hero {
        padding: 1.5rem 0 2rem;
    }

    .hero .container {
        padding: 0 1rem;
    }

    .hero-content {
        gap: 1.5rem;
    }

    .profile-img-container {
        width: clamp(140px, 45vw, 240px);
        height: auto;
        position: static;
        transform: none;
    }

    .hero-intro h1 {
        font-size: clamp(1.35rem, 6vw + 0.5rem, 1.5rem);
    }

    .hero-intro h2 {
        font-size: clamp(1.8rem, 8vw + 0.5rem, 2rem);
        line-height: 1.2;
    }

    .hero-intro p {
        font-size: clamp(0.85rem, 4vw + 0.3rem, 0.95rem);
        line-height: 1.5;
    }

    .nav-links {
        padding: 0.5rem;
    }

    .nav-link {
        padding: 0.5rem 0.3rem;
        font-size: 0.7rem;
    }
}

/* 390px breakpoint */
@media (max-width: 390px) {
    .container {
        padding: 0 0.9rem;
    }

    .hero .container {
        padding: 0 0.9rem;
    }

    .hero-content {
        gap: 1.25rem;
    }

    .profile-img-container {
        width: clamp(140px, 45vw, 240px);
        height: auto;
        position: static;
        transform: none;
    }

    .hero-intro h1 {
        font-size: clamp(1.3rem, 6vw + 0.5rem, 1.4rem);
    }

    .hero-intro h2 {
        font-size: clamp(1.6rem, 8vw + 0.5rem, 1.8rem);
        line-height: 1.15;
    }

    .hero-intro p {
        font-size: clamp(0.8rem, 4vw + 0.3rem, 0.9rem);
        line-height: 1.45;
    }

    .social-links {
        gap: 0.7rem;
    }

    .social-link {
        width: 36px;
        height: 36px;
    }

    .social-icon svg {
        width: 16px;
        height: 16px;
    }
}

/* 360px breakpoint */
@media (max-width: 360px) {
    .container {
        padding: 0 0.8rem;
    }

    .hero .container {
        padding: 0 0.8rem;
    }

    .hero-content {
        gap: 1rem;
    }

    .profile-img-container {
        width: clamp(140px, 45vw, 240px);
        height: auto;
        position: static;
        transform: none;
    }

    .hero-intro h1 {
        font-size: clamp(1.25rem, 6vw + 0.5rem, 1.3rem);
    }

    .hero-intro h2 {
        font-size: clamp(1.5rem, 8vw + 0.5rem, 1.7rem);
        line-height: 1.1;
    }

    .hero-intro p {
        font-size: clamp(0.8rem, 4vw + 0.3rem, 0.87rem);
        line-height: 1.4;
    }

    .nav-links {
        padding: 0.45rem 0.3rem;
    }

    .nav-link {
        padding: 0.45rem 0.25rem;
        font-size: 0.65rem;
    }

    .nav-icon {
        width: 17px;
        height: 17px;
    }
}

/* 320px and below */
@media (max-width: 320px) {
    .container {
        padding: 0 0.75rem;
    }

    .hero {
        padding: 1rem 0 2rem !important;
        min-height: auto;
    }

    .hero .container {
        padding-top: 6rem;
        /* Reduced from 8rem */
    }

    .hero-content {
        gap: 1rem;
        margin-top: 1rem;
    }

    .hero-intro {
        margin-bottom: 1rem;
    }

    .hero-intro h1 {
        font-size: 1.25rem !important;
        margin-bottom: 0.25rem !important;
    }

    .hero-intro h2 {
        font-size: 1.6rem !important;
        line-height: 1.1 !important;
        margin: 0.25rem 0 0.5rem !important;
    }

    .hero-intro p {
        font-size: 0.85rem !important;
        margin: 0.5rem 0 1rem !important;
        line-height: 1.4 !important;
    }

    .profile-img-container {
        width: 140px !important;
        height: 140px !important;
        top: 0.25rem !important;
        transform: translateX(-50%) translateY(-25%) !important;
    }

    .social-links {
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }

    .social-link {
        width: 32px;
        height: 32px;
    }

    .social-icon svg {
        width: 14px;
        height: 14px;
    }

    .btn-download {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }

    .hero-actions {
        gap: 0.75rem;
        margin: 1rem 0 0.5rem;
    }

    .download-cv-container {
        margin-top: 0.5rem;
        padding-top: 0.75rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section-subtitle {
        font-size: 0.85rem;
    }

    .tech-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 0.75rem;
    }

    .tech-item {
        padding: 0.75rem 0.5rem;
    }

    .tech-icon {
        width: 35px;
        height: 35px;
    }

    .tech-icon i {
        font-size: 1.8rem;
    }

    .tech-item span {
        font-size: 0.7rem;
    }

    .nav-links {
        padding: 0.4rem 0.25rem;
        max-width: 100%;
        width: 100%;
    }

    .nav-link {
        padding: 0.4rem 0.2rem;
        font-size: 0.6rem;
        min-width: 0;
        flex: 1;
    }

    .nav-icon {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 1rem 0;
        min-height: auto;
        flex-direction: column;
        justify-content: flex-start;
    }

    .hero-intro h1 {
        font-size: 1.5rem;
    }

    .hero-intro h2 {
        font-size: 2rem;
    }

    .hero-intro p {
        font-size: 1rem;
    }

    .project-card {
        height: auto;
        margin-bottom: 1rem;
    }

    .project-content {
        padding: 1rem 0.5rem;
    }

    .profile-img-container {
        width: 260px;
        height: 260px;
        margin-bottom: 1.5rem;
    }

    /* Reduce animation intensity on mobile */
    @keyframes float {

        0%,
        100% {
            transform: translateY(0) rotate(0deg);
            border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
        }

        50% {
            transform: translateY(-8px) rotate(0.5deg);
            border-radius: 25% 75% 75% 25% / 25% 25% 75% 75%;
        }
    }

    /* Disable hover effects on touch devices */
    @media (hover: none) {
        .profile-img-container:hover {
            transform: none;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
            border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
        }

        .profile-img-container:hover::before {
            opacity: 0.7;
            transform: none;
        }

        .profile-img-container:hover img {
            transform: none;
            filter: grayscale(20%) contrast(1.05);
        }
    }
}

.profile-img-container {
    position: relative;
    width: 380px;
    height: 380px;
    min-width: 380px;
    min-height: 380px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 6px solid rgba(79, 70, 229, 0.15);
    background: rgba(30, 41, 59, 0.3);
    backdrop-filter: blur(8px);
    transition: all 0.4s ease-out;
}

/* Base styles for both images */
.profile-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backface-visibility: hidden;
    transform-origin: center;
}

/* Default state */
.profile-img-default {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.profile-img-hover {
    opacity: 0;
    transform: scale(0.95);
    z-index: 2;
    filter: brightness(1.05);
}

/* Hover state */
.profile-img-container:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
}

.profile-img-container:hover .profile-img-default {
    opacity: 0;
    transform: scale(1.1);
}

.profile-img-container:hover .profile-img-hover {
    opacity: 1;
    transform: scale(1.03);
}

/* Hero Actions */
.hero-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin: 1.5rem 0 3rem;
    flex-wrap: wrap;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 0.4rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Social Link Specific Colors */
.social-link.linkedin {
    background: #0a66c2;
}

.social-link.github {
    background: #24292e;
}

.social-link.email {
    background: linear-gradient(135deg, #ea4335 0%, #fbbc05 100%);
}

.social-icon {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.social-icon svg {
    width: 22px;
    height: 22px;
    transition: all 0.3s ease;
    stroke: #ffffff;
}

.social-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
    opacity: 0;
    transition: all 0.4s ease;
}

.social-link:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.social-link:hover .social-icon svg {
    transform: scale(1.1);
}

.social-link:hover .social-hover {
    opacity: 1;
}

.social-link:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Download CV Button */
.download-cv-container {
    display: flex;
    align-items: center;
    padding-left: 1.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    margin-left: 1rem;
    height: 3rem;
}

.btn-download {
    font-size: 0.95rem;
    padding: 0.75rem 1.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    color: #0a192f;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 20px rgba(0, 242, 254, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.download-icon {
    width: 18px;
    height: 18px;
}

.btn-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 1;
}

.btn-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: all 0.6s ease;
    z-index: 1;
}

.btn-download:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 242, 254, 0.4);
}

.btn-download:hover .btn-content {
    transform: translateY(-1px);
}

.btn-download:hover .btn-hover {
    opacity: 1;
}

.btn-download:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}

.btn-download:active .btn-ripple {
    transform: translate(-50%, -50%) scale(10);
    opacity: 0;
}

/* Download Button - Removed duplicate styles */

/* Responsive adjustments */
@media (max-width: 1200px) {
    .hero-content {
        gap: 3rem;
    }

    .hero-intro h2 {
        font-size: 3.25rem;
    }
}

@media (max-width: 1024px) {
    .hero-intro h2 {
        font-size: 2.75rem;
    }

    .hero-intro p {
        font-size: 1.1rem;
    }

    .hero-content {
        gap: 2.5rem;
    }

    .profile-img-container {
        width: 340px;
        height: 340px;
    }
}

@media (max-width: 900px) {
    .hero {
        padding: 6rem 0 4rem;
    }

    .hero-intro h2 {
        font-size: 2.5rem;
    }

    .hero-intro p {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 1rem 0 2rem !important;
        min-height: auto;
        display: flex;
        flex-direction: column;
        position: relative;
        overflow: hidden;
    }

    .hero .container {
        position: relative;
        padding-top: 6rem;
        /* Reduced from 8rem for better mobile spacing */
        z-index: 1;
    }

    .hero-content {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        position: relative;
        z-index: 1;
        margin-top: 1.5rem;
        /* Reduced margin */
    }

    .hero-text-content {
        text-align: center;
        align-items: center;
        max-width: 100%;
        margin-top: 0;
    }

    .hero-intro {
        margin-bottom: 1.25rem;
    }

    .hero-intro h1 {
        margin-top: 0;
        font-size: 1.75rem;
    }

    .hero-intro h2 {
        font-size: 2.25rem;
        margin: 0.25rem 0 0.5rem;
        line-height: 1.2;
    }

    .hero-intro p {
        font-size: 1.05rem;
        margin: 0.75rem auto 1.25rem;
        max-width: 90%;
        line-height: 1.5;
    }

    .hero-actions {
        justify-content: center;
        margin: 1.25rem 0 0.5rem;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .download-cv-container {
        border-left: none;
        margin: 0.75rem 0 0;
        padding: 1rem 0 0;
        justify-content: center;
        height: auto;
        width: 100%;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .btn-download {
        padding: 0.6rem 1.25rem;
        font-size: 0.85rem;
        border-radius: 8px;
    }

    .social-links {
        justify-content: center;
        width: 100%;
        gap: 1rem;
    }

    .profile-img-container {
        width: 160px;
        height: 160px;
        position: absolute;
        top: 0.25rem;
        /* Adjusted positioning */
        left: 50%;
        transform: translateX(-50%) translateY(-40%);
        /* Better centering */
        z-index: 20;
        margin: 0;
        pointer-events: none;
    }

    .profile-img-container * {
        pointer-events: auto;
    }

    .hero-image {
        position: relative;
        z-index: 1;
        margin: 0 auto;
        width: 160px;
    }

    .social-link {
        width: 40px;
        height: 40px;
    }

    .social-icon svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 0.5rem 0 2rem !important;
        /* Further reduced top padding */
    }

    .hero-intro h2 {
        font-size: 2.25rem;
    }

    .hero-intro p {
        font-size: 1.05rem;
        margin-bottom: 1.25rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .download-cv-container {
        padding-top: 1.5rem;
        margin-top: 1.5rem;
    }

    .btn-download {
        width: 100%;
        justify-content: center;
        padding: 0.9rem 1.5rem;
    }

    .profile-img-container {
        width: 240px;
        height: 240px;
        margin: 0 auto 0.5rem;
        /* Further reduced bottom margin */
    }

    /* Reduce animation intensity on mobile */
    @keyframes float {

        0%,
        100% {
            transform: translateY(0) rotate(0deg);
            border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
        }

        50% {
            transform: translateY(-8px) rotate(0.5deg);
            border-radius: 25% 75% 75% 25% / 25% 25% 75% 75%;
        }
    }

    /* Disable hover effects on touch devices */
    @media (hover: none) {
        .profile-img-container:hover {
            transform: none;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
            border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
        }

        .profile-img-container:hover::before {
            opacity: 0.7;
            transform: none;
        }

        .profile-img-container:hover img {
            transform: none;
            filter: grayscale(20%) contrast(1.05);
        }
    }
}

/* Hero Section */
.hero {
    min-height: auto;
    display: flex;
    align-items: flex-start;
    padding: 8rem 0 5rem !important;
    position: relative;
    z-index: 10;
    box-sizing: border-box;
    margin: 0;
    overflow: visible;
}

.hero-content {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 4rem;
    width: 100%;
    margin: 0;
    padding-top: 1rem;
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 0 1rem !important;
    }

    .profile-img-container {
        max-width: 200px;
        margin-bottom: 1.25rem;
        border-width: 4px;
    }
}

/* Mobile-first approach for profile image */
@media (max-width: 768px) {
    .hero {
        padding: 0.25rem 0 !important;
        min-height: auto;
    }

    .hero-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding-top: 0.5rem;
    }

    .hero-image {
        margin: 0 auto 0.25rem;
        order: -1;
        width: 50px !important;
        height: 50px !important;
    }

    .profile-img-container {
        width: 100% !important;
        height: 100% !important;
        min-width: 0 !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        border-radius: 50% !important;
        box-shadow: none !important;
    }

    .profile-img-container::before {
        display: none !important;
    }

    .profile-img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        border-radius: 50% !important;
    }

    .hero-text-content {
        padding: 0.25rem 0.25rem !important;
        min-width: auto !important;
        width: 100% !important;
    }

    .hero-content {
        gap: 1.2rem;
        text-align: center;
    }
}

/* Extra small devices (under 350px) */
@media (max-width: 350px) {
    .profile-img-container {
        width: 40px;
        height: 40px;
        margin: 0 auto 0.15rem;
    }

    .hero-intro h1 {
        font-size: 1.5rem;
        margin-bottom: 0.2rem;
    }

    .hero-intro h2 {
        font-size: 1.2rem;
        line-height: 1.2;
        word-spacing: 0;
        white-space: normal;
        margin: 0.2rem 0;
    }

    .hero-intro p {
        font-size: 0.9rem;
        margin: 0.5rem auto;
        max-width: 90%;
    }

    .hero-content {
        gap: 2rem;
        /* Reduce gap between image and text on mobile */
    }

    .hero-intro h1 {
        font-size: 2rem;
    }

    .hero-intro h2 {
        font-size: 2.25rem;
    }

    .hero-intro p {
        font-size: 1rem;
    }

    .profile-img-container {
        width: 240px;
        height: 240px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .social-links {
        justify-content: center;
    }

    .hero-intro h2 {
        font-size: 2rem;
    }

    .hero-intro p {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .download-cv-container {
        width: 100%;
        margin-top: 0.5rem;
    }

    .btn-download {
        width: 100%;
        justify-content: center;
    }
}

/* Contact Section */
.contact-section {
    padding: 8rem 0;
    background: transparent;
    position: relative;
    z-index: 2;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(30, 41, 59, 0.4);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-color: rgba(99, 102, 241, 0.3);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
    stroke: #ffffff;
}

.contact-details h3 {
    color: #f8fafc;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.contact-details p,
.contact-details a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-details a:hover {
    color: #60a5fa;
}

.social-connect {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
}

.social-connect h3 {
    color: #f8fafc;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.social-links-contact {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.social-link-contact {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(30, 41, 59, 0.4);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(99, 102, 241, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.social-link-contact:hover {
    transform: translateX(5px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.social-icon-contact {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.social-link-contact.linkedin .social-icon-contact {
    background: #0a66c2;
}

.social-link-contact.github .social-icon-contact {
    background: #24292e;
}

.social-link-contact.email .social-icon-contact {
    background: linear-gradient(135deg, #ea4335, #fbbc05);
}

.social-icon-contact svg {
    width: 20px;
    height: 20px;
    stroke: #ffffff;
}

.social-link-contact span {
    color: #f8fafc;
    font-weight: 500;
    font-size: 1rem;
}

.social-link-contact:hover span {
    color: #60a5fa;
}

.social-link-contact:hover .social-icon-contact {
    transform: scale(1.1);
}

/* Responsive Design for Contact Section */
@media (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-section {
        padding: 6rem 0;
    }

    .contact-item {
        padding: 1.25rem;
    }

    .contact-icon {
        width: 45px;
        height: 45px;
    }

    .social-connect {
        align-items: center;
        text-align: center;
    }

    .social-links-contact {
        max-width: 300px;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.hero-content {
    opacity: 1;
    animation: fadeIn 0.8s ease-out forwards;
    animation-delay: 0.2s;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.flex {
    display: flex;
}

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

.items-center {
    align-items: center;
}

.hidden {
    display: none;
}

@media (min-width: 769px) {
    .md-flex {
        display: flex !important;
    }
}