/* ============================================
   SHOYA KAJITA INSPIRED PORTFOLIO STYLE
   Minimalist, Grid-based, Monospaced
   Updated: Tuned Sizes (Image+, Heading-2px, Content-1.5px)
============================================ */

@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:wght@400;700&family=Inter:wght@300;400;500;700&display=swap');

:root {
    --bg-dark: #050505;
    --text: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.7);
    --primary: #00ff88;
    --accent: #00ddff;
    --grid-line: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text);
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    font-size: 16.5px;
    /* Base size reduced */
    height: 100%;
    width: 100%;
}

/* ============================================
   WEBGL CANVAS
============================================ */
#webgl-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* ============================================
   LOADING SCREEN
============================================ */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    font-family: 'Courier Prime', monospace;
    transition: opacity 0.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-header {
    font-size: 16px;
    /* -2px (18->16) */
    letter-spacing: 2px;
    margin-bottom: 30px;
    color: var(--primary);
}

.loading-separator {
    width: 400px;
    height: 1px;
    background: var(--primary);
    opacity: 0.4;
    margin-bottom: 30px;
}

.loading-messages {
    font-size: 14.5px;
    /* -1.5px (16->14.5) */
    color: var(--text-dim);
    line-height: 2;
    text-align: left;
    min-height: 120px;
}

.loading-progress {
    margin-top: 30px;
    font-size: 13.5px;
    /* -1.5px */
    color: var(--text-dim);
    letter-spacing: 1px;
}

.loading-cursor {
    display: inline-block;
    width: 8px;
    height: 14px;
    background: var(--primary);
    margin-left: 5px;
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    49% {
        opacity: 1;
    }

    50%,
    100% {
        opacity: 0;
    }
}

/* ============================================
   WELCOME SCREEN
============================================ */
.welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    font-family: 'Courier Prime', monospace;
    transition: opacity 0.5s ease;
    cursor: pointer;
}

.click-to-start {
    font-size: 16px;
    color: var(--primary);
    animation: pulse 2s infinite;
    letter-spacing: 2px;
    font-weight: bold;
    margin-top: 10px;
}

@keyframes pulse {
    0% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.4;
    }
}

.welcome-screen.active {
    display: flex;
}

.welcome-content {
    font-size: 15.5px;
    /* -1.5px (17->15.5) */
    color: var(--text-dim);
    line-height: 2.2;
    text-align: left;
    margin: 30px 0;
}

.welcome-content strong {
    color: var(--primary);
    margin-right: 10px;
}

/* ============================================
   CUSTOM CURSOR
============================================ */
.custom-cursor {
    position: fixed;
    width: 12px;
    height: 12px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10001;
    mix-blend-mode: difference;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease, background 0.1s ease;
}

.custom-cursor.clicking {
    transform: translate(-50%, -50%) scale(1.5);
    background: var(--primary);
}

/* ============================================
   HAND POINTER
============================================ */
.hand-pointer {
    position: fixed;
    width: 30px;
    height: 30px;
    border: 3px solid var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10002;
    display: none;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 20px var(--accent);
    transition: transform 0.1s ease, background 0.1s ease;
}

.hand-pointer.active {
    display: block;
}

.hand-pointer.pinching {
    transform: translate(-50%, -50%) scale(0.7);
    background: rgba(0, 221, 255, 0.3);
}

/* ============================================
   LOGO
============================================ */
.logo {
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    font-family: 'Courier Prime', monospace;
    font-size: 16px;
    /* -2px */
    letter-spacing: 3px;
    color: var(--text);
    font-weight: 700;
    cursor: none;
    user-select: none;
}

.logo:hover {
    color: var(--primary);
}

/* ============================================
   SIDE MENU
============================================ */
.side-menu {
    position: fixed;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
}

.menu-list {
    list-style: none;
}

.menu-item {
    margin: 25px 0;
}

.menu-link {
    display: inline-block;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 15.5px;
    /* -1.5px */
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    cursor: none;
}

.menu-link::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.menu-link.active {
    color: var(--primary);
}

.menu-link.active::before {
    width: 10px;
}

.menu-link:hover {
    color: var(--primary);
}

.menu-link:hover::before {
    width: 10px;
}

/* ============================================
   CONTROLS (Bottom Left)
============================================ */
.controls {
    position: fixed;
    bottom: 40px;
    left: 40px;
    z-index: 100;
    display: flex;
    gap: 20px;
}

.control-btn {
    background: transparent;
    border: 1px solid var(--text-dim);
    color: var(--text-dim);
    padding: 8px 16px;
    font-family: 'Courier Prime', monospace;
    font-size: 13.5px;
    /* -1.5px */
    letter-spacing: 1px;
    cursor: none;
    transition: all 0.3s ease;
}

.control-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.control-btn.active {
    border-color: var(--primary);
    color: var(--primary);
}

/* ============================================
   MAIN CONTENT AREA (All Pages)
============================================ */
.page {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -45%);
    z-index: 10;
    max-width: 800px;
    width: 90%;
    display: none;
    max-height: 85vh;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
    text-align: center;
}

.page.active {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%);
}

/* Custom scrollbar for page content - HIDDEN as per user request */
.page {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.page::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

/* ============================================
   HOME PAGE
============================================ */
.home-content {
    text-align: center;
}

.home-content .main-title {
    font-family: 'Courier Prime', monospace;
    font-size: 34px;
    /* -2px (36->34) */
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.1);
    min-height: 40px;
    white-space: nowrap;
}

/* Scramble effect characters */
.dud {
    color: var(--text-dim);
    opacity: 0.5;
}

.home-content .main-subtitle {
    font-size: 16px;
    /* -2px */
    color: var(--text-dim);
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.home-content .main-subtitle-hindi {
    font-size: 16px;
    /* -2px */
    color: var(--text-dim);
    margin-bottom: 40px;
    opacity: 0.7;
}

/* Typewriter CSS */
.intro-typewriter {
    font-family: 'Courier Prime', monospace;
    font-size: 25px;
    /* +5px */
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.cursor {
    display: inline-block;
    width: 12px;
    height: 30px;
    background-color: var(--primary);
    animation: blink 1s infinite;
    margin-left: 6px;
}

.barcode {
    width: 240px;
    height: 70px;
    margin-top: 40px;
    opacity: 0.5;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

/* ============================================
   GLOBAL TEXT OVERRIDES (User Request)
============================================ */
body,
p,
div,
span,
h1,
h2,
h3,
h4,
h5,
h6,
a {
    color: #ffffff !important;
    /* Force white text */
}

.text-dim {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* ============================================
   ABOUT PAGE (2-Column Layout like Reference)
============================================ */
.profile-header {
    display: flex;
    justify-content: center;
    /* Centered */
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.about-section {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    margin-bottom: 60px;
    text-align: left;
}

.section-title {
    font-family: 'Courier Prime', monospace;
    font-size: 16px;
    /* -2px */
    margin-bottom: 0;
    letter-spacing: 2px;
    border-bottom: none;
    padding-bottom: 0;
    display: block;
}

.section-text {
    font-size: 15.5px;
    /* -1.5px */
    line-height: 2.2;
    max-width: 100%;
    margin: 0;
    opacity: 0.9;
}

.profile-picture {
    width: 180px;
    /* INCREASED to 180px (+25%) */
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--primary);
    opacity: 0.9;
}

.profile-name {
    font-family: 'Courier Prime', monospace;
    font-size: 18px;
    /* -2px */
    font-weight: 700;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.profile-role {
    font-size: 15.5px;
    /* -1.5px */
    color: var(--text-dim);
}

/* Profile Grid in 2nd column */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    font-size: 15.5px;
    /* -1.5px */
    max-width: 100%;
    margin: 0;
    text-align: left;
}

.profile-grid .label {
    color: var(--text);
    font-family: 'Courier Prime', monospace;
    font-size: 14px;
    /* -2px */
    letter-spacing: 1px;
    margin-right: 8px;
    font-weight: bold;
    opacity: 0.7;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
    justify-content: flex-start;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.skill-tag {
    font-family: 'Courier Prime', monospace;
    font-size: 13.5px;
    /* -1.5px */
    color: var(--primary);
    border: 1px solid rgba(0, 255, 136, 0.3);
    padding: 4px 10px;
    letter-spacing: 1px;
}

.links-list {
    display: flex;
    gap: 30px;
    justify-content: flex-start;
}

.text-link {
    color: var(--text);
    text-decoration: none;
    font-size: 16px;
    /* -2px (Heading-like) */
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    cursor: none;
}

.text-link:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}


/* ============================================
   WORKS PAGE (Refined List Style)
============================================ */
.works-content h2 {
    font-family: 'Courier Prime', monospace;
    font-size: 30px;
    /* -2px */
    letter-spacing: 4px;
    margin-bottom: 40px;
    color: var(--primary);
}

.works-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 700px;
    margin: 0 auto;
}

.work-row {
    display: flex;
    gap: 30px;
    transition: transform 0.3s ease;
    cursor: none;
    text-align: left;
}

.work-row:hover {
    transform: translateX(5px);
}

.work-year {
    font-family: 'Courier Prime', monospace;
    font-size: 14px;
    /* -2px */
    color: var(--primary);
    width: 60px;
    padding-top: 5px;
    flex-shrink: 0;
    text-align: right;
}

.work-details {
    flex-grow: 1;
}

.work-title {
    font-size: 20px;
    /* -2px */
    font-weight: 500;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.work-role {
    font-size: 13.5px;
    /* -1.5px */
    font-family: 'Courier Prime', monospace;
    color: var(--text-dim);
    margin-bottom: 10px;
    opacity: 0.8;
}

.work-desc {
    font-size: 15.5px;
    /* -1.5px */
    color: var(--text-dim);
    line-height: 1.6;
}


/* ============================================
   CONTACT PAGE
============================================ */
.contact-content h2 {
    font-family: 'Courier Prime', monospace;
    font-size: 30px;
    /* -2px */
    letter-spacing: 4px;
    margin-bottom: 30px;
    color: var(--primary);
}

.contact-intro {
    font-size: 16px;
    /* -2px */
    color: var(--text-dim);
    margin-bottom: 40px;
}

.contact-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 50px;
    justify-content: center;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.contact-label {
    font-family: 'Courier Prime', monospace;
    font-size: 13.5px;
    /* -1.5px */
    color: var(--primary);
}

.contact-value,
.contact-value a {
    font-size: 17.5px;
    /* -1.5px (19->17.5) */
    color: var(--text);
    text-decoration: none;
    cursor: none;
}

.contact-value a:hover {
    color: var(--primary);
}

.cert-list {
    list-style: none;
}

.cert-list li {
    font-size: 15.5px;
    /* -1.5px */
    color: var(--text-dim);
    margin-bottom: 10px;
    padding-left: 15px;
    position: relative;
    line-height: 1.6;
}

.cert-list li::before {
    content: '-';
    position: absolute;
    left: 0;
    color: var(--primary);
}


/* ============================================
   CUSTOM SCROLLBAR (Right side)
============================================ */
.custom-scrollbar {
    display: block;
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 100;
}

.scroll-indicator {
    position: absolute;
    width: 100%;
    height: 20%;
    background: var(--primary);
    top: 0;
    transition: top 0.1s ease;
}

/* ============================================
   COPYRIGHT
============================================ */
.copyright {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 100;
    font-size: 12px;
    /* -2px */
    color: var(--text-dim);
    letter-spacing: 1px;
}

/* ============================================
   CAMERA PERMISSION PROMPT
============================================ */
.camera-prompt {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-dark);
    border: 1px solid var(--accent);
    padding: 40px;
    z-index: 9999;
    display: none;
    text-align: center;
    max-width: 400px;
}

.camera-prompt.active {
    display: block;
}

.camera-prompt h3 {
    font-family: 'Courier Prime', monospace;
    color: var(--accent);
    margin-bottom: 20px;
    font-size: 16px;
    /* -2px */
}

.camera-prompt p {
    color: var(--text-dim);
    font-size: 15.5px;
    /* -1.5px */
    line-height: 1.8;
    margin-bottom: 30px;
}

.camera-prompt button {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 10px 25px;
    font-family: 'Courier Prime', monospace;
    font-size: 14px;
    /* -2px */
    cursor: none;
    margin: 0 10px;
    transition: all 0.3s ease;
}

.camera-prompt button:hover {
    background: var(--accent);
    color: var(--bg-dark);
}

/* ============================================
   HIDDEN VIDEO ELEMENT (for hand tracking)
============================================ */
#webcam {
    position: fixed;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* Mobile Nav default hidden */
.mobile-nav {
    display: none;
}

/* ============================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   Keeps desktop identical, adapts for smaller screens
   ============================================ */

/* TABLET (1024px and below) */
@media screen and (max-width: 1024px) {
    .page {
        width: 85%;
        max-height: 80vh;
    }

    .home-content .main-title {
        font-size: 28px;
    }

    .about-section {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-grid {
        text-align: center;
        justify-content: center;
    }

    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* MOBILE (768px and below) */
@media screen and (max-width: 768px) {

    /* Layout Adjustments */
    body {
        font-size: 15px;
    }

    .logo {
        top: 20px;
        font-size: 14px;
        width: 100%;
        text-align: center;
        left: 0;
        transform: none;
    }

    /* Hide Desktop Side Menu & Controls */
    .side-menu {
        display: none;
    }

    .controls {
        bottom: 80px;
        /* Move up for bottom nav */
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        justify-content: center;
        gap: 10px;
    }

    .control-btn {
        padding: 6px 12px;
        font-size: 12px;
        background: rgba(0, 0, 0, 0.5);
        /* Better visibility */
    }

    /* Mobile Bottom Navigation */
    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 60px;
        background: rgba(5, 5, 5, 0.95);
        border-top: 1px solid var(--grid-line);
        z-index: 1000;
        justify-content: space-around;
        align-items: center;
        backdrop-filter: blur(10px);
    }

    .mobile-nav-item {
        color: var(--text-dim);
        font-family: 'Courier Prime', monospace;
        font-size: 11px;
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        letter-spacing: 1px;
        padding: 10px;
    }

    .mobile-nav-item.active {
        color: var(--primary);
    }

    .mobile-nav-icon {
        font-size: 18px;
        margin-bottom: 2px;
    }

    /* Page Content Adjustments */
    .page {
        width: 90%;
        max-height: 70vh;
        /* More space for keyboard/nav */
        transform: translate(-50%, -55%);
        /* Adjust vertical center */
    }

    .home-content .main-title {
        font-size: 24px;
        /* Smaller title */
        white-space: normal;
        /* Allow wrap */
        line-height: 1.4;
    }

    .intro-typewriter {
        font-size: 18px;
        height: 30px;
    }

    .barcode {
        width: 180px;
        height: 50px;
    }

    .custom-scrollbar {
        display: none;
        /* Hide custom scrollbar on mobile */
    }

    /* About Page Mobile */
    .about-section {
        margin-bottom: 40px;
    }

    .section-title {
        font-size: 14px;
        margin-bottom: 10px;
        color: var(--primary);
        border-bottom: 1px solid rgba(0, 255, 136, 0.2);
        padding-bottom: 5px;
        display: inline-block;
    }

    .profile-picture {
        width: 90px;
        height: 90px;
    }

    /* Works Page Mobile */
    .work-row {
        flex-direction: column;
        gap: 5px;
        border-left: 2px solid var(--grid-line);
        padding-left: 15px;
        margin-left: 10px;
    }

    .work-row:hover {
        transform: none;
        /* Disable hover shift on touch */
    }

    .work-year {
        text-align: left;
        width: auto;
        font-size: 12px;
        opacity: 0.7;
    }

    .work-title {
        font-size: 18px;
    }

    /* Contact Page Mobile */
    .contact-grid {
        grid-template-columns: 1fr;
        /* Single column */
        gap: 30px;
    }

    .contact-value {
        font-size: 16px;
        word-break: break-all;
    }

    /* Adjust cursor for touch */
    .custom-cursor {
        display: none !important;
    }

    .camera-prompt {
        width: 90%;
        padding: 20px;
    }
}