/* ==========================================
   RESET & BASE STYLES
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', 'Arial', sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    overflow: hidden;
    cursor: none;
    height: 100vh;
}

/* ==========================================
   CUSTOM CURSOR
   ========================================== */
.cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.15s ease;
    mix-blend-mode: difference;
}

.cursor-dot {
    position: fixed;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
}

/* ==========================================
   PAGE LAYOUT
   ========================================== */
.page-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.page {
    position: fixed;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
}

/* ==========================================
   CANVAS LAYERS
   ========================================== */
canvas {
    position: absolute;
    top: 0;
    left: 0;
}

#canvas-background {
    z-index: 1;
}

#canvas-constellation {
    z-index: 2;
}

#canvas-particles {
    z-index: 3;
}

#canvas-trails {
    z-index: 4;
}

/* ==========================================
   HERO SECTION
   ========================================== */
#hero {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    z-index: 1;
}

.content {
    position: relative;
    z-index: 10;
    text-align: center;
    pointer-events: none;
    opacity: 0;
}

.subtitle {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 6px;
    text-transform: uppercase;
    font-weight: 300;
    margin-top: 250px;
}

.divider {
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    margin: 30px auto;
}

.tagline {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.4);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.8;
    font-weight: 300;
    letter-spacing: 1px;
}

.scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    z-index: 10;
}

.scroll-hint::after {
    content: '';
    display: block;
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.3);
    margin: 15px auto 0;
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0%, 100% {
        transform: translateY(0);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(10px);
    }
}

/* ==========================================
   ABOUT SECTION
   ========================================== */
#about {
    background: #0f0f0f;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px 40px 40px;
    overflow: hidden;
    z-index: 2;
    transform: translateY(100%);
    transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1);
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.8);
}

#about.active {
    transform: translateY(0);
}

#about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(180deg, #0a0a0a 0%, #0f0f0f 100%);
    z-index: 1;
}

.about-container {
    max-width: 100%;
    width: 100%;
    height: calc(50vh - 70px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    position: relative;
    z-index: 10;
    opacity: 0;
    transform: translateY(50px);
}

.about-text h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -2px;
}

.about-text p {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 15px;
}

.about-text .highlight {
    color: #667eea;
    font-weight: 600;
}

.about-visual {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    overflow: hidden;
}

#canvas-algorithmic-art {
    width: 100%;
    height: 100%;
    display: block;
}

/* ==========================================
   STATS SECTION
   ========================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 80px;
    max-width: 100%;
    width: 100%;
    opacity: 0;
    transform: translateY(30px);
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* ==========================================
   SCROLL PROGRESS INDICATOR
   ========================================== */
.scroll-progress {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.progress-dot:hover {
    border-color: rgba(102, 126, 234, 0.8);
    transform: scale(1.2);
}

.progress-dot.active {
    background: rgba(102, 126, 234, 0.8);
    border-color: rgba(102, 126, 234, 1);
    transform: scale(1.3);
}

/* ==========================================
   SCROLL PROGRESS BAR (DEPRECATED - Using Threshold Bar)
   ========================================== */
.scroll-progress-bar {
    display: none; /* Hidden in favor of threshold bar */
}

/* ==========================================
   TECH STACK SECTION
   ========================================== */
#tech-stack {
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 30px 40px 30px;
    overflow: hidden;
    z-index: 3;
    transform: translateY(100%);
    transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1);
}

#tech-stack.active {
    transform: translateY(0);
}

/* Curtain Panels Transition Effect */
.curtain-panels {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    pointer-events: none;
    z-index: 5;
}

.curtain-panel {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateY(-100%);
    opacity: 0;
}

/* Tech Container */
.tech-container {
    max-width: 100%;
    width: 100%;
    height: calc(100vh - 100px);
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
}

/* Tech Header */
.tech-header {
    text-align: center;
    margin-bottom: 0px;
    opacity: 0;
    transform: translateY(30px);
    flex-shrink: 0;
}

.tech-title {
    font-size: 0rem;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -2px;
    margin-bottom: 10px;
    overflow: hidden;
}

.tech-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
    letter-spacing: 1px;
    opacity: 0;
    transform: translateY(20px);
}

/* Tech Categories */
.tech-categories {
    display: flex;
    flex-direction: column;
    gap: 30px;
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 126, 234, 0.5) rgba(255, 255, 255, 0.1);
}

.tech-categories::-webkit-scrollbar {
    width: 6px;
}

.tech-categories::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.tech-categories::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 3px;
}

.tech-categories::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.7);
}

.tech-category {
    opacity: 0;
    transform: translateY(50px);
    flex-shrink: 0;
}

.category-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
    letter-spacing: -0.5px;
}

/* Tech Grid - Horizontal Scrolling */
.tech-grid {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 5px 0 15px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 126, 234, 0.3) transparent;
    scroll-behavior: smooth;
    border-radius: 10px;
    transition: background 0.3s ease;
}

.tech-grid:hover {
    background: rgba(102, 126, 234, 0.03);
}

.tech-grid::-webkit-scrollbar {
    height: 6px;
}

.tech-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.tech-grid::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.4);
    border-radius: 3px;
    transition: background 0.3s ease;
}

.tech-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.7);
}

.tech-grid:hover::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
}

/* Tech Card with 3D Flip Effect */
.tech-card {
    min-width: 220px;
    max-width: 220px;
    height: 140px;
    perspective: 1000px;
    cursor: pointer;
    flex-shrink: 0;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.tech-card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
}

.card-front {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.card-front h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
    line-height: 1.3;
}

.experience-level {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 6px 12px;
    border-radius: 15px;
    display: inline-block;
    align-self: flex-start;
}

.experience-level:contains("Expert"),
.tech-card:has(.experience-level:first-child) .experience-level {
    background: linear-gradient(135deg, rgba(102, 234, 147, 0.2), rgba(102, 234, 147, 0.1));
    color: #66ea93;
    border: 1px solid rgba(102, 234, 147, 0.3);
}

.card-back {
    background: linear-gradient(135deg, rgba(118, 75, 162, 0.2) 0%, rgba(102, 126, 234, 0.2) 100%);
    border: 1px solid rgba(118, 75, 162, 0.3);
    transform: rotateY(180deg);
}

.card-back p {
    font-size: 0.85rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
}

/* Experience Level Colors */
.tech-card:nth-child(1) .experience-level,
.tech-card:nth-child(2) .experience-level {
    background: linear-gradient(135deg, rgba(102, 234, 147, 0.2), rgba(102, 234, 147, 0.1));
    color: #66ea93;
    border: 1px solid rgba(102, 234, 147, 0.3);
}

.tech-card:nth-child(3) .experience-level,
.tech-card:nth-child(4) .experience-level {
    background: linear-gradient(135deg, rgba(102, 175, 234, 0.2), rgba(102, 175, 234, 0.1));
    color: #66afea;
    border: 1px solid rgba(102, 175, 234, 0.3);
}

/* ==========================================
   SCROLL THRESHOLD INDICATOR
   ========================================== */
.scroll-threshold-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    z-index: 1001;
    overflow: hidden;
}

.scroll-threshold-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
    transition: width 0.1s ease-out;
    position: relative;
}

.scroll-threshold-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5));
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 1;
    }
}

.threshold-label {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    z-index: 1002;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.threshold-label.visible {
    opacity: 1;
}

/* ==========================================
   CONTACT SECTION - SPLIT LAYOUT
   ========================================== */
#contact {
    background: #0a0a0a;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    z-index: 4;
    transform: translateY(100%);
    transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1);
    position: relative;
}

#contact.active {
    transform: translateY(0);
}

/* Left Side: Contact Info */
.contact-left {
    width: 60%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 60px;
    position: relative;
    z-index: 10;
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.95) 0%, rgba(20, 20, 30, 0.98) 100%);
}

.contact-content {
    width: 100%;
    max-width: 500px;
}

/* Contact Header */
.contact-header {
    margin-bottom: 50px;
    opacity: 0;
    transform: translateY(30px);
}

.contact-title {
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -2px;
    margin-bottom: 15px;
    line-height: 1.1;
}

.contact-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
    letter-spacing: 0.5px;
    line-height: 1.6;
}

/* Contact List */
.contact-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Contact Cards */
.contact-card {
    display: flex;
    align-items: center;
    padding: 25px 30px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: translateX(-30px);
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.contact-card:hover {
    transform: translateX(10px);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.2);
}

.contact-card:hover::before {
    opacity: 1;
}

/* Contact Icon */
.contact-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    color: #667eea;
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

.contact-card:hover .contact-icon {
    transform: scale(1.1) rotateY(360deg);
}

.contact-icon svg {
    width: 100%;
    height: 100%;
}

/* Contact Info */
.contact-info {
    flex: 1;
    position: relative;
    z-index: 1;
}

.contact-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 5px;
    letter-spacing: -0.5px;
}

.contact-card-text {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.4;
}

/* Contact Arrow */
.contact-arrow {
    font-size: 1.5rem;
    color: #667eea;
    margin-left: 15px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.contact-card:hover .contact-arrow {
    transform: translateX(5px);
}

/* Card Type Specific Styles */
.contact-card[data-type="email"]:hover {
    border-color: rgba(102, 234, 147, 0.5);
    box-shadow: 0 10px 40px rgba(102, 234, 147, 0.2);
}

.contact-card[data-type="email"]:hover .contact-icon {
    color: #66ea93;
}

.contact-card[data-type="email"]:hover .contact-arrow {
    color: #66ea93;
}

.contact-card[data-type="github"]:hover {
    border-color: rgba(147, 102, 234, 0.5);
    box-shadow: 0 10px 40px rgba(147, 102, 234, 0.2);
}

.contact-card[data-type="github"]:hover .contact-icon {
    color: #9366ea;
}

.contact-card[data-type="github"]:hover .contact-arrow {
    color: #9366ea;
}

.contact-card[data-type="linkedin"]:hover {
    border-color: rgba(102, 175, 234, 0.5);
    box-shadow: 0 10px 40px rgba(102, 175, 234, 0.2);
}

.contact-card[data-type="linkedin"]:hover .contact-icon {
    color: #66afea;
}

.contact-card[data-type="linkedin"]:hover .contact-arrow {
    color: #66afea;
}

.contact-card[data-type="cv"]:hover {
    border-color: rgba(240, 147, 251, 0.5);
    box-shadow: 0 10px 40px rgba(240, 147, 251, 0.2);
}

.contact-card[data-type="cv"]:hover .contact-icon {
    color: #f093fb;
}

.contact-card[data-type="cv"]:hover .contact-arrow {
    color: #f093fb;
}

/* Right Side: 3D Scene */
.contact-right {
    width: 40%;
    height: 100%;
    position: relative;
    background: #0a0a0a;
}

#contact-3d-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 768px) {
    /* General */
    body {
        cursor: auto;
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }

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

    /* Smooth scrolling on mobile */
    * {
        -webkit-overflow-scrolling: touch;
    }

    /* Prevent text selection on interactive elements */
    .page {
        -webkit-user-select: none;
        user-select: none;
    }

    /* Allow text selection in content areas */
    .about-text,
    .contact-card-text {
        -webkit-user-select: text;
        user-select: text;
    }

    /* Hero Page Mobile */
    .content {
        padding: 0 20px;
        text-align: center;
    }

    .subtitle {
        font-size: 1rem;
        letter-spacing: 2px;
    }

    .divider {
        width: 60px;
        margin: 15px auto;
    }

    .tagline {
        font-size: 1rem;
        max-width: 90%;
        margin: 0 auto;
    }

    .scroll-hint {
        font-size: 0.8rem;
        bottom: 30px;
    }

    /* About Page Mobile - Scrollable like Tech Stack */
    #about {
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        padding: 0;
    }

    .about-container {
        grid-template-columns: 1fr;
        gap: 30px;
        height: auto;
        max-height: none;
        padding: 80px 20px 20px;
        margin-top: 0;
    }

    .about-text h2 {
        font-size: 2rem;
    }

    .about-text p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .about-visual {
        height: 250px;
        min-height: 250px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 30px 20px 40px;
        margin-bottom: 20px;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .stat-label {
        font-size: 0.85rem;
    }

    /* Tech Stack Mobile */
    .scroll-progress {
        display: none;
    }

    .tech-container {
        height: calc(100vh - 80px);
        padding: 60px 20px 20px;
    }

    .tech-header {
        margin-bottom: 30px;
    }

    .tech-title {
        font-size: 2.2rem;
    }

    .tech-subtitle {
        font-size: 0.95rem;
    }

    .tech-categories {
        gap: 30px;
    }

    .tech-category {
        padding: 0;
    }

    .category-title {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    .tech-grid {
        /* Grid layout: 3 rows, auto columns, horizontal scroll */
        display: grid;
        grid-template-rows: repeat(3, 1fr);
        grid-auto-flow: column;
        grid-auto-columns: auto;
        gap: 10px;
        padding: 10px 0;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: thin;
        scrollbar-color: rgba(102, 126, 234, 0.3) rgba(255, 255, 255, 0.05);
        padding-bottom: 15px;
    }

    .tech-grid::-webkit-scrollbar {
        height: 6px;
    }

    .tech-grid::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 10px;
    }

    .tech-grid::-webkit-scrollbar-thumb {
        background: linear-gradient(90deg, rgba(102, 126, 234, 0.4), rgba(118, 75, 162, 0.4));
        border-radius: 10px;
        transition: background 0.3s ease;
    }

    .tech-grid::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(90deg, rgba(102, 126, 234, 0.6), rgba(118, 75, 162, 0.6));
    }

    .tech-card {
        /* Slim rectangular cards - enhanced styling */
        min-width: auto;
        max-width: none;
        width: auto;
        height: auto;
        padding: 12px 18px;
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.06) 100%);
        border: 1px solid rgba(102, 126, 234, 0.2);
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        perspective: none;
        transform-style: flat;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1),
                    0 1px 3px rgba(102, 126, 234, 0.1),
                    inset 0 1px 0 rgba(255, 255, 255, 0.05);
        position: relative;
        overflow: hidden;
    }

    .tech-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, transparent 50%);
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
    }

    .tech-card:active {
        transform: scale(0.97);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15),
                    0 0 2px rgba(102, 126, 234, 0.2),
                    inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }

    .tech-card:active::before {
        opacity: 1;
    }

    /* Hide card flip structure on mobile */
    .card-inner {
        position: static;
        width: 100%;
        height: 100%;
        transform-style: flat;
        transition: none;
    }

    .tech-card:hover .card-inner {
        transform: none;
    }

    .card-front {
        position: static;
        width: 100%;
        height: 100%;
        padding: 0;
        backface-visibility: visible;
        transform: none;
        background: transparent;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .card-back {
        display: none;
    }

    .card-front h4 {
        font-size: 0.85rem;
        margin: 0;
        white-space: nowrap;
        color: rgba(255, 255, 255, 0.95);
        font-weight: 600;
        letter-spacing: 0.3px;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
        position: relative;
        z-index: 1;
    }

    .card-front .experience-level {
        display: none;
    }

    .threshold-label {
        font-size: 0.65rem;
        bottom: 10px;
        padding: 6px 12px;
    }

    /* Contact Page Mobile - Stack Vertically */
    #contact {
        flex-direction: column;
    }

    .contact-left {
        width: 100%;
        height: auto;
        min-height: 50vh;
        padding: 60px 30px;
    }

    .contact-right {
        width: 100%;
        height: 50vh;
        min-height: 300px;
    }

    .contact-content {
        max-width: 100%;
    }

    .contact-header {
        margin-bottom: 30px;
    }

    .contact-title {
        font-size: 2.5rem;
        letter-spacing: -1px;
    }

    .contact-subtitle {
        font-size: 0.95rem;
    }

    .contact-list {
        gap: 15px;
    }

    .contact-card {
        padding: 20px;
        flex-direction: row;
        align-items: center;
    }

    .contact-icon {
        width: 50px;
        height: 50px;
        margin-right: 15px;
    }

    .contact-card-title {
        font-size: 1.2rem;
    }

    .contact-card-text {
        font-size: 0.85rem;
    }

    .contact-arrow {
        font-size: 1.2rem;
    }

    /* 3D Canvas on Mobile */
    #contact-3d-canvas {
        touch-action: pan-y;
    }

    /* Progress Dots - Larger touch targets */
    .progress-dots {
        right: 15px;
    }

    .progress-dot {
        width: 12px;
        height: 12px;
        margin: 12px 0;
    }

    .progress-dot::before {
        width: 8px;
        height: 8px;
    }
}

/* Extra Small Devices (phones < 480px) */
@media (max-width: 480px) {
    /* Hero Page */
    .subtitle {
        font-size: 0.9rem;
        letter-spacing: 1px;
    }

    .tagline {
        font-size: 0.9rem;
    }

    /* About Page */
    #about {
        overflow-y: auto;
        justify-content: flex-start;
        padding: 0;
    }

    .about-container {
        padding: 70px 15px 20px;
    }

    .about-text h2 {
        font-size: 1.75rem;
    }

    .about-text p {
        font-size: 0.9rem;
    }

    .about-visual {
        height: 200px;
        min-height: 200px;
    }

    .stats-grid {
        padding: 20px 15px 30px;
        margin-bottom: 15px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    /* Tech Stack */
    .tech-container {
        padding: 40px 15px 15px;
    }

    .tech-title {
        font-size: 1.8rem;
    }

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

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

    .tech-card {
        padding: 10px 15px;
        box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1),
                    0 1px 2px rgba(102, 126, 234, 0.1),
                    inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }

    .card-front h4 {
        font-size: 0.8rem;
        letter-spacing: 0.2px;
    }

    /* Contact Page */
    .contact-left {
        padding: 40px 20px;
        min-height: 60vh;
    }

    .contact-right {
        height: 40vh;
        min-height: 250px;
    }

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

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

    .contact-card {
        padding: 18px;
    }

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

    .contact-card-title {
        font-size: 1.1rem;
    }

    .contact-card-text {
        font-size: 0.8rem;
    }

    /* Progress Dots */
    .progress-dots {
        right: 10px;
    }

    .progress-dot {
        width: 10px;
        height: 10px;
        margin: 10px 0;
    }
}

/* Landscape Mobile Orientation */
@media (max-height: 600px) and (orientation: landscape) {
    /* Adjust for landscape mode */
    .content {
        padding-top: 40px;
    }

    .about-container {
        padding: 30px 40px;
    }

    .contact-left {
        min-height: 100vh;
    }

    .contact-right {
        height: 100vh;
        min-height: 400px;
    }

    .scroll-hint {
        display: none;
    }
}
