@font-face {
    font-family: 'OffBit';
    src: url('./fonts/OffBit-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'OffBit-Bold';
    src: url('./fonts/OffBit-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'OffBit-Dot';
    src: url('./fonts/OffBit-Dot.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0%;
    padding: 0%;
    box-sizing: border-box;
    font-family: gilroy;
}

html,
body {
    height: 100%;
    width: 100%;
    background-color: black;
    color: white;
}

#main {
    position: relative;
    overflow: hidden;
}

#page {
    position: relative;
    height: 100vh;
    width: 100vw;
    background-color: transparent; /* Allow content to show through */
    pointer-events: none; /* Don't block clicks to sections below/above */
}

#page1 {
    position: relative;
    height: 100vh;
    width: 100vw;
    background-color: transparent;
    font-family: 'OffBit';
    z-index: 10;
}

#page2 {
    position: relative;
    height: 100vh;
    width: 100vw;
    background-color: transparent;
    font-family: 'OffBit';
    z-index: 10;
}

#page3 {
    position: relative;
    height: 100vh;
    width: 100vw;
    background-color: transparent;
    font-family: 'OffBit';
    z-index: 10;
}

canvas {
    position: relative;
    z-index: 9;
    max-width: 100vw;
    max-height: 100vh;
    pointer-events: none; /* Ensure text and cards are clickable */
}

#loop {
    display: flex;
    position: absolute;
    top: 30%;
    height: 25%;
    width: 100%;
    font-size: clamp(40px, 8vw, 100px);
    white-space: nowrap;
    font-family: gilroy;
}

#loop>h1 {
    font-weight: 400;
    animation-name: anim;
    animation-duration: 15s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

#loop>h1>span {
    -webkit-text-stroke: 1.2px #fff;
    color: transparent;
    font-weight: 500;
}

@keyframes anim {
    0% {
        transform: translateX(0%);
    }

    100% {
        transform: translateX(-100%);
    }
}

#nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 7%;
    width: 100%;
    position: fixed;
    z-index: 99;
    padding: 0px 30px;
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

#nav>h3 {
    font-family: gilroy;
    font-weight: 400;
    font-size: 22px;
}

#nav>button {
    padding: 10px 20px;
    border-radius: 50px;
    background-color: #fff;
    color: #000;
    border: 1px solid #fff;
    font-weight: 600;
    font-family: 'OffBit';
    cursor: pointer;
}

#page>h3 {
    position: absolute;
    top: 55%;
    font-family: gilroy;
    font-weight: 400;
    color: #a0a0a0;
    left: 5%;
}

#page>h4 {
    position: absolute;
    top: 62%;
    left: 25%;
    font-family: gilroy;
    font-weight: 500;
}

#page1>#right-text {
    position: absolute;
    top: 30%;
    left: 10%;
    z-index: 10;
    pointer-events: all;
}

#page1>#right-text>h3 {
    font-weight: 400;
    color: #7c7c7c;
}

#page1>#right-text>h1 {
    line-height: 1.5;
    font-size: clamp(28px, 5vw, 50px);
    font-family: 'OffBit-Bold';
}

#page1>#left-text {
    position: absolute;
    top: 50%;
    right: 10%;
    text-align: end;
    z-index: 10;
    pointer-events: all;
}

#page1>#left-text>h1 {
    font-size: clamp(28px, 5vw, 50px);
    line-height: 1.5;
    font-family: 'OffBit-Bold';
}

#page1>#left-text>h3 {
    color: #a0a0a0;
    font-weight: 400;
}

#page2>#text1 {
    position: absolute;
    top: 30%;
    left: 10%;
}

#page2>#text1>h3 {
    color: #a0a0a0;
    font-weight: 400;
}

#page2>#text1>h1 {
    font-size: 60px;
    line-height: 1.5;
    font-family: 'OffBit-Bold';
}

#page2>#text2 {
    position: absolute;
    top: 55%;
    right: 10%;
    text-align: end;
}

#page2>#text2>p {
    color: #a0a0a0;
    font-weight: 400;
}

#page3>#text3 {
    position: absolute;
    top: 40%;
    right: 10%;
    text-align: end;
}

#page3>#text3>h3 {
    color: #a0a0a0;
    font-weight: 400;
}

#page3>#text3>h1 {
    font-size: 70px;
    font-family: 'OffBit-Dot';
}

/* Mobile Responsive Styles */

/* NEW SECTIONS STYLING */

.experience-section, .project-section, .impact-section, .achievements-section {
    position: relative;
    height: 100vh;
    width: 100vw;
    background-color: transparent; /* Essential for 3D model visibility */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10% 5%;
}

#page4, #page5 {
    font-family: 'OffBit';
}

/* Stunning Glassmorphism Experience Cards */
.exp-card, .project-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.01));
    backdrop-filter: blur(20px); /* Increased blur for better glass effect */
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    border-radius: 20px; /* Slightly more rounded */
    padding: 35px;
    margin: 15px 0;
    width: 80%;
    max-width: 800px;
    display: flex;
    align-items: center;
    gap: 30px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100; /* Ensure high priority for interactions */
    pointer-events: all;
}

.exp-card:hover, .project-card:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 15px 45px 0 rgba(0, 0, 0, 0.5);
    transform: translateY(-10px) scale(1.02);
}

.exp-card img {
    height: 80px;
    width: 80px;
    object-fit: contain;
    filter: brightness(1.2);
}

#exp-asianpaints img {
    filter: brightness(1.2);
    border-radius: 0;
    background: none;
    padding: 0;
}

.exp-content h3, .project-card h3 {
    font-family: 'OffBit-Bold';
    font-size: 24px;
    margin-bottom: 10px;
    letter-spacing: 0.03em;
}

.exp-content p {
    color: #a0a0a0;
    font-size: 16px;
    line-height: 1.6;
    font-family: 'OffBit';
}

.project-card p {
    color: #a0a0a0;
    font-size: 16px;
    line-height: 1.6;
    font-family: 'OffBit';
}

.exp-content .company-name {
    font-family: 'OffBit-Bold';
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 18px rgba(255, 255, 255, 0.14);
}

.project-name {
    font-family: 'OffBit-Bold';
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 18px rgba(255, 255, 255, 0.14);
}

.exp-content ul {
    color: #a0a0a0;
    font-size: 15px;
    line-height: 1.6;
    margin-top: 10px;
    padding-left: 20px;
}

.exp-content ul li {
    margin-bottom: 8px;
}

.exp-content ul li strong {
    color: #fff;
}

.metric {
    display: inline-block;
    margin-top: 15px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    font-family: 'OffBit-Dot';
    color: #fff;
    font-size: 14px;
}

/* Project Specifics */
.project-card {
    flex-direction: column;
    align-items: flex-start;
}

.project-card h2 {
    font-family: 'OffBit';
    font-size: 14px;
    text-transform: uppercase;
    color: #7c7c7c;
    margin-bottom: 5px;
    letter-spacing: 0.08em;
}

.project-links a {
    display: inline-block;
    margin-top: 20px;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid #fff;
    padding-bottom: 2px;
    font-size: 14px;
    transition: opacity 0.3s;
}

.project-links a:hover {
    opacity: 0.7;
}

/* Impact & Achievement Text */
.impact-content h3, .achievement-text h3 {
    color: #7c7c7c;
    font-size: 18px;
    margin-bottom: 20px;
}

.impact-content h1, .achievement-text h1 {
    font-family: 'OffBit-Bold';
    font-size: 60px;
    margin-bottom: 20px;
}

.publication {
    margin-top: 40px;
    padding-left: 20px;
    border-left: 2px solid rgba(255, 255, 255, 0.2);
}

.publication h4 {
    font-size: 20px;
    margin-bottom: 5px;
}

.publication span {
    color: #7c7c7c;
    font-size: 14px;
}

/* Fix Nav Buttons */
#nav div button {
    padding: 10px 20px;
    border-radius: 50px;
    background-color: #fff;
    color: #000;
    border: 1px solid #fff;
    font-weight: 600;
    font-family: 'OffBit';
    cursor: pointer;
    transition: all 0.3s;
}

#nav div button:hover {
    background-color: #000;
    color: #fff;
}

/* FOOTER STYLING */
#footer {
    position: relative;
    height: 100vh;
    width: 100vw;
    background-color: black;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center the main content vertically */
    align-items: center;
    padding: 10% 5% 5% 5%;
    text-align: center;
}

#footer-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    width: 100%;
}

.typing-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
    margin-bottom: 30px;
    min-height: 120px;
}

.bracket {
    font-family: 'OffBit';
    font-size: 80px;
    color: rgba(255, 255, 255, 0.3);
}

.left-bracket {
    position: absolute;
    left: 5%;
    top: 50%;
    transform: translateY(-50%);
}

.right-bracket {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
}

#footer-text h3 {
    color: #7c7c7c;
    font-size: 20px;
    margin-bottom: 10px;
    font-family: 'OffBit';
}

#typing-target {
    font-size: 80px;
    font-family: 'OffBit-Bold';
    line-height: 1.1;
    display: block;
    width: 100%;
    text-align: center;
    color: #fff;
    margin: 0;
    padding: 0 15%;
}

#typing-target::after {
    content: "|";
    margin-left: 5px;
    animation: blink 0.8s infinite;
    color: #fff;
}

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

.cta-link {
    display: inline-block;
    padding: 15px 40px;
    background-color: #fff;
    color: #000;
    text-decoration: none;
    font-family: 'OffBit-Bold';
    font-size: 20px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.cta-link:hover {
    background-color: #000;
    color: #fff;
    border: 1px solid #fff;
    transform: scale(1.1);
}

#socials {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    margin-top: auto; /* Push socials to bottom */
}

#socials a {
    color: #7c7c7c;
    text-decoration: none;
    font-family: 'OffBit';
    font-size: 14px;
    transition: color 0.3s;
}

#socials a:hover {
    color: #fff;
}

/* SPLIT LAYOUT FOR EXPERIENCE & PROJECTS */
.experience-section, .project-section {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0 8vw;
}

.left-cards, .right-cards {
    width: 32vw;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.center-dummy {
    width: 20vw; /* Space for the 3D model */
    pointer-events: none;
}

/* Adjust card sizing for split layout */
.exp-card, .project-card {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

/* SECTION HEADINGS (To match Page 1 aesthetic) */
.experience-section h3, .project-section h3 {
    font-family: 'OffBit';
    font-weight: 400;
    color: #7c7c7c;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

/* Align right-side headers to the end */
.right-cards h3 {
    text-align: end;
    width: 100%;
}

/* --- NEW FULL SCREEN MENU STYLES --- */

#menu-toggle {
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

#menu-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: rotate(270deg);
}

#menu-toggle:hover {
    transform: scale(1.1);
}

#full-menu {
    position: fixed;
    top: -100%; /* Start off-screen for animation */
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    visibility: hidden;
}

#menu-close {
    position: absolute;
    top: 5%;
    right: 5%;
    font-family: 'OffBit';
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    letter-spacing: 2px;
}

#menu-links {
    display: flex;
    flex-direction: column;
    gap: 40px;
    text-align: center;
}

#menu-links a, #menu-links div {
    font-family: 'OffBit-Bold';
    font-size: 80px;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.4s ease;
}

#menu-links a:hover, #menu-links div:hover {
    -webkit-text-stroke: 1px #fff;
    color: transparent;
    transform: scale(1.1);
}

/* ===== EXPLORE MORE BUTTON ===== */

#explore-btn {
    font-family: 'OffBit-Bold';
    font-size: 14px;
    color: #fff;
    padding: 12px 30px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s ease;
    letter-spacing: 1.5px;
    position: relative;
    overflow: hidden;
    display: inline-block;
    white-space: nowrap;
}

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

#explore-btn:hover {
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

#explore-btn:hover::before {
    left: 100%;
}

/* ===== PROJECTS OVERLAY ===== */
#projects-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    overflow-y: auto;
    padding: 40px 80px;
}

#projects-overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#projects-overlay-header h2 {
    font-family: 'OffBit-Bold';
    font-size: 36px;
    color: #fff;
}

#projects-close {
    font-family: 'OffBit';
    font-size: 18px;
    color: #7c7c7c;
    cursor: pointer;
    transition: color 0.3s ease;
    letter-spacing: 2px;
}

#projects-close:hover {
    color: #fff;
}

/* ===== TIMELINE ===== */
#projects-timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding-left: 60px;
}

.timeline-line {
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.05), rgba(255,255,255,0.3), rgba(255,255,255,0.05));
}

.timeline-item {
    position: relative;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(40px);
}

.timeline-dot {
    position: absolute;
    left: -48px;
    top: 20px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.5);
    transform: scale(1.3);
}

.timeline-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px 35px;
    transition: all 0.4s ease;
    cursor: default;
}

.timeline-card:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-5px) translateX(5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.timeline-year {
    font-family: 'OffBit-Dot';
    font-size: 13px;
    color: #7c7c7c;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.timeline-card h3 {
    font-family: 'OffBit-Bold';
    font-size: 28px;
    color: #fff;
    margin: 8px 0 4px;
}

.timeline-card h4 {
    font-family: 'OffBit';
    font-size: 14px;
    color: #a0a0a0;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.timeline-card p {
    color: #999;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 15px;
    font-family: 'OffBit';
}

.timeline-tech {
    font-family: 'OffBit-Dot';
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
    margin-bottom: 15px;
    padding: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.timeline-link {
    font-family: 'OffBit';
    font-size: 14px;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 2px;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.timeline-link:hover {
    border-color: #fff;
    padding-left: 10px;
}
