/* Custom Reset & Variables */
:root {
    --bg-gradient-start: #e0f2f1; /* Soft pastel mint/teal tint */
    --bg-gradient-end: #f5f5f7;   /* Sleek soft off-white/gray */
    
    --primary-color: #2e6f40;     /* Mint forest green */
    --text-main: #2b3a42;         /* Charcoal/slate text */
    --text-muted: #5e6f7a;        /* Soft gray-blue text */
    
    /* Pastel Card Palettes */
    --card-bg-welcome: rgba(255, 255, 255, 0.7);
    --card-bg-skills: rgba(230, 245, 235, 0.75);
    --card-bg-experience: rgba(240, 240, 250, 0.75);
    --card-bg-projects: rgba(253, 243, 235, 0.75);
    --card-bg-contact: rgba(250, 238, 245, 0.75);
    
    --card-border-color: rgba(255, 255, 255, 0.5);
    --card-shadow: 0 20px 50px rgba(43, 58, 66, 0.08), 0 2px 10px rgba(0, 0, 0, 0.02);
    
    /* Fonts */
    --font-head: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: var(--font-body);
    background: radial-gradient(circle at top left, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    color: var(--text-main);
}

/* 3D Canvas Layout */
#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* UI Overlay Overlay Container */
#ui-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none; /* Let clicks pass to 3D Canvas */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem;
}

/* Enable pointer events only for interactive components */
.app-header, .content-wrapper, .app-footer, .card {
    pointer-events: auto;
}

/* App Header styling */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    align-self: stretch;
    margin-bottom: auto;
    z-index: 12;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.6);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    backdrop-filter: blur(10px);
}

.logo-dot {
    width: 10px;
    height: 10px;
    background-color: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(46, 111, 64, 0.4);
}

.logo-text {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    color: var(--text-main);
}

.header-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.6);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.status-icon {
    width: 14px;
    height: 14px;
    color: var(--primary-color);
}

.pulse {
    animation: statusPulse 2s infinite ease-in-out;
}

@keyframes statusPulse {
    0%, 100% { opacity: 0.4; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* App Footer styling */
.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    align-self: stretch;
    margin-top: auto;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    z-index: 12;
}

.footer-help {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.4);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

.footer-help i {
    width: 12px;
    height: 12px;
}

/* Content Layout (Cards Wrapper) */
.content-wrapper {
    position: absolute;
    top: 50%;
    left: 2.5rem;
    transform: translateY(-50%);
    width: 480px;
    max-height: 80vh;
    display: flex;
    z-index: 11;
}

/* Card Styling - Premium Glassmorphism */
.card {
    display: none; /* Hidden by default */
    flex-direction: column;
    width: 100%;
    max-height: 80vh;
    border-radius: 28px;
    padding: 2.5rem;
    border: 1px solid var(--card-border-color);
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1), transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    opacity: 0;
    transform: translateX(-30px);
}

/* Card Active State */
.card.active {
    display: flex;
    opacity: 1;
    transform: translateX(0);
}

/* Color thematic cards */
#card-welcome { background: var(--card-bg-welcome); }
#card-skills { background: var(--card-bg-skills); }
#card-experience { background: var(--card-bg-experience); }
#card-projects { background: var(--card-bg-projects); }
#card-contact { background: var(--card-bg-contact); }

/* Common Card elements */
.card-badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.welcome-badge { background-color: rgba(224, 242, 241, 0.7); color: #00796b; }
.skills-badge { background-color: rgba(200, 230, 201, 0.7); color: #2e7d32; }
.experience-badge { background-color: rgba(227, 242, 253, 0.7); color: #1565c0; }
.projects-badge { background-color: rgba(255, 243, 224, 0.7); color: #e65100; }
.contact-badge { background-color: rgba(243, 229, 245, 0.7); color: #7b1fa2; }

.card-badge i {
    width: 14px;
    height: 14px;
}

.close-btn {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: var(--text-main);
    color: white;
    transform: translateX(-4px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.close-btn i {
    width: 14px;
    height: 14px;
}

.card-headline {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 0.6rem;
    color: var(--text-main);
}

.card-intro {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.scroll-content {
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 0.5rem;
    margin-right: -0.5rem;
}

/* Custom Scrollbar for scrollable content */
.scroll-content::-webkit-scrollbar {
    width: 6px;
}

.scroll-content::-webkit-scrollbar-track {
    background: transparent;
}

.scroll-content::-webkit-scrollbar-thumb {
    background: rgba(43, 58, 66, 0.15);
    border-radius: 10px;
}

.scroll-content::-webkit-scrollbar-thumb:hover {
    background: rgba(43, 58, 66, 0.3);
}

/* Welcome Card specifics */
.user-name {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 2.6rem;
    line-height: 1.1;
    margin-bottom: 0.4rem;
    background: linear-gradient(135deg, #1b4d3e 0%, #3e8e75 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.user-title {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.4;
    color: #4a6b5c;
    margin-bottom: 1.5rem;
}

.user-tagline {
    font-size: 0.98rem;
    line-height: 1.6;
    color: var(--text-main);
    margin-bottom: 1.8rem;
}

.navigation-tips {
    display: flex;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.5);
    border: 1px dashed rgba(46, 111, 64, 0.3);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1.8rem;
}

.tip-icon {
    font-size: 1.3rem;
}

.tip-text {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #3e5a4d;
}

.welcome-hotspots h3 {
    font-family: var(--font-head);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.8rem;
    color: var(--text-muted);
}

.hotspot-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
}

.hotspot-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.hotspot-btn:hover {
    background: #eef7f2;
    border-color: rgba(46, 111, 64, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 111, 64, 0.06);
}

.hotspot-btn i {
    width: 14px;
    height: 14px;
    color: var(--primary-color);
}

/* Skills Content Styling */
.section-block {
    margin-bottom: 1.8rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-head);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--text-main);
}

.section-title i {
    width: 16px;
    height: 16px;
    color: var(--primary-color);
}

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

.skill-tag {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.45rem 0.9rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.01);
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.skill-tag.core {
    background-color: #e2f0d9;
    border-color: #c5dfb5;
    color: #2b5118;
}

.skill-tag.os-arch {
    background-color: #e1f5fe;
    border-color: #b3e5fc;
    color: #0277bd;
}

.skill-tag.os-win {
    background-color: #ede7f6;
    border-color: #d1c4e9;
    color: #512da8;
}

.skill-tag.infra {
    background-color: #fff3e0;
    border-color: #ffe0b2;
    color: #e65100;
}

.skill-tag.dev {
    background-color: #fce4ec;
    border-color: #f8bbd0;
    color: #c2185b;
}

.skill-tag.flutter {
    background-color: #e0f7fa;
    border-color: #b2ebf2;
    color: #00838f;
}

.os-icon {
    font-style: normal;
    font-weight: 800;
    font-size: 0.7rem;
    padding: 1px 4px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.05);
}

/* Experience / Timeline styling */
.experience-timeline {
    position: relative;
    padding-left: 1.5rem;
    border-left: 2px dashed rgba(43, 58, 66, 0.15);
    margin-top: 0.8rem;
    margin-left: 0.5rem;
}

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

.timeline-item:last-child {
    margin-bottom: 0.5rem;
}

.timeline-dot {
    position: absolute;
    left: calc(-1.5rem - 6px);
    top: 5px;
    width: 10px;
    height: 10px;
    background: #c3cfd9;
    border-radius: 50%;
}

.timeline-dot-active {
    position: absolute;
    left: calc(-1.5rem - 8px);
    top: 3px;
    width: 14px;
    height: 14px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(46, 111, 64, 0.2);
}

.timeline-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.4rem;
}

.time-period {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.time-period-active {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
}

.inst-name {
    font-family: var(--font-head);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
}

.timeline-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.timeline-details {
    font-size: 0.88rem;
    line-height: 1.5;
    background: rgba(255, 255, 255, 0.4);
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Projects Styling */
.project-card {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    padding: 1.4rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.project-card:hover {
    background: rgba(255, 255, 255, 0.75);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.02);
}

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

.project-title {
    font-family: var(--font-head);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
}

.proj-category {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    background: #ffe8d6;
    color: #a05010;
    white-space: nowrap;
}

.project-desc {
    font-size: 0.86rem;
    line-height: 1.5;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.project-tech span {
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(43, 58, 66, 0.05);
    color: var(--text-main);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
}

/* Contact Links */
.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1rem;
}

.contact-link-item {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 18px;
    padding: 1.1rem;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.contact-link-item:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.02);
    border-color: rgba(43, 58, 66, 0.15);
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    margin-right: 1rem;
}

.email-icon {
    background-color: #e0f2f1;
    color: #00796b;
}

.linkedin-icon {
    background-color: #e3f2fd;
    color: #1565c0;
}

.contact-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.contact-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.contact-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    word-break: break-all;
}

.link-arrow {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    opacity: 0.6;
    transition: transform 0.3s ease;
}

.contact-link-item:hover .link-arrow {
    transform: translate(2px, -2px);
    opacity: 1;
    color: var(--text-main);
}

/* Loader Screen */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top left, #e0f2f1 0%, #f5f5f7 100%);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease;
}

.loader-content {
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(46, 111, 64, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    margin: 0 auto 1.5rem;
    animation: spin 1s infinite linear;
}

.loader-content h2 {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 2rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.loader-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Styles */
@media (max-width: 1024px) {
    #ui-container {
        padding: 1.5rem;
    }
    
    .content-wrapper {
        left: 1.5rem;
        width: 420px;
    }
}

@media (max-width: 768px) {
    body {
        overflow-y: hidden;
    }

    #ui-container {
        padding: 1rem;
        justify-content: space-between;
    }

    .content-wrapper {
        left: 5%;
        right: 5%;
        width: 90%;
        top: auto;
        bottom: 4.5rem;
        transform: none;
        max-height: 50vh;
    }

    .card {
        padding: 1.5rem;
        max-height: 50vh;
        border-radius: 20px;
    }

    .card-headline {
        font-size: 1.5rem;
    }

    .user-name {
        font-size: 2rem;
    }

    .app-header {
        margin-bottom: auto;
    }

    .logo {
        padding: 0.4rem 0.8rem;
    }
    
    .logo-text {
        font-size: 0.95rem;
    }

    .header-status {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }

    .app-footer {
        margin-top: auto;
        padding-top: 0.5rem;
    }

    .footer-help {
        display: none; /* Hide helper text on mobile */
    }

    .hotspot-grid {
        grid-template-columns: 1fr;
    }
}
