/* CSS Custom Properties */
:root {
    /* Colors - Exact original colors */
    --color-primary: #000000;
    --color-secondary: #333333;
    --color-background: #ffffff;
    --color-text: #000000;
    --color-white: #ffffff;

    /* Typography - Original desktop sizes */
    --font-size-base: 16px;
    --font-size-h1: 5rem;
    --font-size-h2: 4rem;
    --font-size-h3: 2.5rem;
    --font-size-body: 1rem;

    /* Mobile typography */
    @media (max-width: 768px) {
        --font-size-h1: clamp(2.5rem, 8vw, 5rem);
        --font-size-h2: clamp(2rem, 6vw, 4rem);
        --font-size-h3: clamp(1.5rem, 4vw, 2.5rem);
    }
    /* Spacing - Match original desktop values */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;  /* For original desktop top padding */
    
    /* Layout - Keep original desktop dimensions */
    --container-padding: 2rem;          /* Desktop value */
    --container-padding-mobile: 1rem;   /* Mobile value */
    --max-width: 1400px;
    --header-height: 4rem;

    @media (max-width: 768px) {
        --container-padding: var(--container-padding-mobile);
        --space-xl: var(--space-lg);
    }
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Restore original header styles */
header {
    background-color: white;
    color: #333;
    padding-top: 20px;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 20px;
    text-align: center;
    font-weight: bold;
    height: 64px; /* Original header height */
    width: 100%;
    position: relative;
    z-index: 100;
}

/* Media query for mobile header */
@media (max-width: 768px) {
    header {
        height: var(--header-height);
        padding: var(--space-xs) var(--container-padding);
    }
}

/* Navigation Styles */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav-logo {
    display: inline-block;
    font-size: clamp(1.5rem, 4vw, 2rem);
    text-decoration: none;
    margin-right: var(--space-md);
}

.nav-links {
    display: flex;
    gap: var(--space-md);
}

.nav-links a {
    text-decoration: none;
    position: relative;
    padding: var(--space-xs);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--color-primary);
    transition: all 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
    left: 0;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--color-primary);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 44px;
        height: 44px;
        padding: 8px;
        border: none;
        background: transparent;
        cursor: pointer;
        z-index: 1000;
        transition: transform 0.3s var(--ease-spring);
    }

    .nav-toggle:hover {
        transform: scale(1.05);
    }

    .nav-toggle:active {
        transform: scale(0.95);
    }

    .nav-toggle span {
        display: block;
        width: 24px;
        height: 2px;
        margin: 2px 0;
        background-color: var(--color-primary);
        transform-origin: center;
        transition: transform 0.3s var(--ease-spring),
                    opacity 0.2s ease;
    }

    /* Premium hamburger animation */
    .nav-toggle.active span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
        transform: scale(0);
    }

    .nav-toggle.active span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .nav-logo {
        font-size: 2rem; /* Fixed size for consistency */
        transition: transform 0.3s var(--ease-spring);
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px; /* Match mobile nav height */
        height: 44px;
    }

    .nav-logo:hover {
        transform: scale(1.05);
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 0.5rem);
        right: var(--container-padding);
        width: 200px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-radius: 12px;
        padding: 0.5rem;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s var(--ease-spring);
        box-shadow:
            0 4px 20px rgba(0, 0, 0, 0.08),
            0 1px 2px rgba(0, 0, 0, 0.05),
            inset 0 0 0 1px rgba(255, 255, 255, 0.5);
        z-index: 1000;
        display: flex;
        flex-direction: column;
    }

    .nav-links a {
        display: block;
        width: 100%;
        padding: 0.8rem 1.2rem;
        margin: 0.25rem 0;
        font-size: 1rem;
        color: var(--color-primary);
        border-radius: 8px;
        transition: all 0.2s ease;
        opacity: 0;
        transform: translateY(-8px);
        text-align: left;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: all;
    }

    .nav-links.active a {
        opacity: 1;
        transform: translateY(0);
        pointer-events: all;
    }

    /* Staggered animation for menu items */
    .nav-links a:nth-child(1) { transition-delay: 0.05s; }
    .nav-links a:nth-child(2) { transition-delay: 0.1s; }
    .nav-links a:nth-child(3) { transition-delay: 0.15s; }
    .nav-links a:nth-child(4) { transition-delay: 0.2s; }

    .nav-links a:hover {
        background: rgba(0, 0, 0, 0.05);
        transform: scale(1.02) translateX(4px);
    }

    .nav-links a:active {
        transform: scale(0.98);
    }

    /* Override any conflicting styles */
    .nav-links a[href] {
        display: block !important;
        visibility: visible !important;
    }
}

/* Add spring easing for smoother animations */
:root {
    --ease-spring: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Restore original footer styles */
footer {
    background-color: white;
    color: #333;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    width: 100%;
    position: relative;
    z-index: 10;
}

/* Media query for mobile footer */
@media (max-width: 768px) {
    footer {
        padding: var(--space-sm);
    }
}

@font-face {
    font-family: 'Helvetica Now Pro Display Bold';
    src: url('/static/fonts/HelveticaNowDisplay-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap; /* Optimize font loading */
}

html {
    font-size: var(--font-size-base);
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Restore original body styles */
body {
    font-family: 'Helvetica Now Pro Display Bold', sans-serif;
    overflow: hidden;
    line-height: 1.5;
    color: #000000;
    background-color: white;
    min-height: 100vh;
    font-size: 16px;
    margin: 0;
    padding: 0;
}

/* Restore original link styles */
a {
    color: black;
    text-decoration: none;
}

a:hover {
    color: black;
}

/* Media queries for responsive adjustments */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        font-size: var(--font-size-body);
    }
    
    a {
        color: var(--color-primary);
        transition: color 0.3s ease;
    }
    
    a:hover {
        color: var(--color-secondary);
    }
}

/* Responsive Typography */
@media (max-width: 768px) {
    :root {
        --font-size-base: 14px;
    }
}

@media (min-width: 1200px) {
    :root {
        --font-size-base: 16px;
    }
}

@media (min-width: 1500px) {
    :root {
        --font-size-base: 18px;
    }
}

/* Restore original spline container styles */
.spline-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    height: 500px;
    position: relative;
    margin-top: -20px;
}

.spline-container spline-viewer {
    width: 100%;
    height: 500px;
    clip-path: inset(50px 300px 0px 0);
    position: absolute;
}

/* Works button styles */
.works-button-container {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.works-button {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 1.5rem;
    color: var(--color-primary);
    background-color: var(--color-white);
    border: 2px solid var(--color-primary);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.works-button:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* Media queries for responsive adjustments */
@media (max-width: 768px) {
    .spline-container {
        display: none;
    }

    .works-button-container {
        display: block;
    }
}

/* Responsive Spline Container */
@media (max-width: 768px) {
    .spline-container {
        height: min(70vh, 500px);
        margin-top: -1rem;
    }
    .spline-container spline-viewer {
        clip-path: inset(1rem 0.5rem 0 0);
    }
}

@media (min-width: 1500px) {
    .spline-container {
        margin-top: clamp(-1rem, -2vw, 6rem);
        height: min(90vh, 800px);
    }
}

/* Add initial state for fade-up elements */
.fade-up {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* Class to be added when animations should start */
.fade-up.visible {
    opacity: 1;
    visibility: visible;
}

/* Add initial state for fade-out elements */
.fade-out {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.5s ease;
}

.fade-out.fade-out-active {
    opacity: 0;
    pointer-events: none;
}

/* Restore original big header styles */
.big-header-bottomleft {
    position: fixed;
    bottom: 30px;
    left: 10px;
    font-size: 100px;
    font-weight: bold;
    font-family: 'Helvetica Now Pro Display Bold';
    line-height: 0.6;
    z-index: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .big-header-bottomleft {
        
        bottom: 15px;
        line-height: 0.75;
    }
}

/* About page 3D Carousel Slider */
.section-heading{
    font-size: 1.5rem;
    color: var(--primary);
    padding: 0rem 0;
}
#tech{
    padding: 0rem 0;

}
.tech-slider {
    height: 50vh;  /* Increased to show text properly */
    padding: 0rem 0;
    top: 15rem;
    position: relative;
    margin-bottom: 2rem;
}

.tech-slide {
    width: 8rem;
    height: 10rem;
    position: relative;
    margin: 0;
    transform-style: preserve-3d;
    perspective: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tech-slide-img a {
    width: 100%;
    display: flex;
    justify-content: center;
}

.language-name {
    position: relative;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    z-index: 10;
    white-space: nowrap;
    margin-top: 1rem;
    background: black;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: inline-block;
    max-width: 90%;
}

.tech-slide-img:hover {
    transform: scale(1.1);  /* Slightly larger scale effect */
    background: transparent;  /* Ensure background stays transparent on hover */
}
.tech-slide-img .tech-icon {
    width: 80%;
    height: 80%;
    padding: 1rem;
    pointer-events: none; /* Prevent interaction with SVG internals */
}

/* Ensure SVGs maintain black color */
.tech-slide-img svg path {
    fill: black !important;
}

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

/* Remove image overlay since we're using icons */
.tech-slide-img .image-overlay {
    display: none;
}

/* Removed duplicated hover effect */
.tech-slide-content{
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
}

.tech-slide-content-bottom {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    color: var(--white);
}


.tech-slide-img {
    position: relative;
    width: 100%;
    height: 80%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 1rem;
    transition: transform 0.3s ease;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    perspective: 1000px;
}
@media (max-width: 1500px) {
    .tech-slider {
        top: 30vh;
    }
}
/* Mobile responsiveness for tech slider */
@media (max-width: 768px) {
    .tech-slider {
        top: 13rem;
        height: 10rem;
    }
    .tech-slide {
        width: 6rem;
        height: 6rem;
    }
    .language-name {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
}
.text-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50vw;
    max-width: 800px;
    text-align: center;
    padding: 1rem;
    z-index: 1000;
}

.slider-container {
    position: fixed;
    bottom: 2vh;
    right: 20vw;
    border: 0px solid black;
    padding: 2vh;
    background: transparent;
    z-index: 1000;
    width: 50vw;
    height: 15vh;
    max-width: 800px;
    max-height: 500px;
    overflow: hidden;
}

.tech-slider-control {
    position: relative;
    bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* About page split layout styles */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;                
    height: 100vh;            
    padding: 2rem;            
    max-width: 1400px;       
    margin: 0 auto;
}

.left-panel {
    display: flex;
    flex-direction: column;
    padding: 2rem;            /* Restore original padding */
    padding-top: 8rem;        /* Restore original top padding */
    justify-content: flex-start;
    height: 100%;
}

.content-box {
    background: white;        /* Restore original color */
    padding: 2rem 2rem 0.75rem 2rem; /* Restore original padding */
    border-radius: 0.5rem;    /* Restore original border radius */
    margin-top:-2rem;
}

.content-box h2 {
    margin-bottom: 1rem;      
}

.content-box p {
    line-height: 1.6;
}

/* Mobile styles maintain responsiveness without affecting desktop */
@media (max-width: 768px) {
    .split-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
        height: auto;
        min-height: 100vh;
    }

    .left-panel {
        padding: 1rem;
        padding-top: 1rem;
        order: 2;
        height: auto;
        margin-top: -5rem;
    }

    .content-box {
        padding: 1rem;
        margin-top: -2rem;
    }
}

.education-box {
    background: white;        /* Restore original color */
    padding-left: 2rem;
    padding-top: 1rem;           /* Restore original padding */
    border-radius: 0.5rem;   /* Restore original border radius */
}

.education-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;            
    margin-bottom: 0.75rem; 
}

.education-header ion-icon {
    font-size: 1.5rem;      /* Restore original size */
}

.education-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;             /* Restore original gap */
}

.education-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;          /* Restore original gap */
}

.year {
    font-weight: bold;
    color: #666;           /* Restore original color */
}

.right-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;           /* Keep original height for desktop */
    position: relative;
}

.about-photo {
    width: min(125%, 62.5vh);
    height: min(125%, 62.5vh);
    object-fit: cover;
    position: absolute;
    top: 47%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* This solution lowkey sucks but its easier than recoding the about page layout for now */
@media (min-width: 2000px) {
    .content-box {
        font-size: larger;
    }
    .education-item {
        font-size: larger;
    }
    .education-header {
        font-size: larger;
    }
    .year {
        font-size: larger;
    }
}
@media (max-width: 1800px) {
    .content-box {
        font-size: smaller;
        margin-right: -1rem;
    }
    .education-item {
        font-size: smaller;
    }
    .education-header {
        font-size: smaller;
    }
    .year {
        font-size: smaller;
    }
    .about-photo {
        width: min(130%, 62.5vh);
        height: min(130%, 62.5vh);
    }
}
@media (max-width: 1600px) {
    .content-box {
        font-size:smaller;
        margin-top:-3rem;
        margin-right:-3rem;
    }
    .education-item {
        font-size: x-small;
    }
    .education-header {
        font-size: x-small;
    }
    .year {
        font-size: x-small;
    }
    .about-photo {
        width: min(140%, 62.5vh);
        height: min(140%, 62.5vh);
    }
}
@media (max-width: 1500px) {
    .content-box {
        font-size: x-small;
        margin-top: -6rem;
        margin-right: -0rem;
        width: auto;
    }
    .education-item {
        font-size: x-small;
    }
    .education-header {
        font-size: x-small;
    }
    .year {
        font-size: x-small;
    }
}

@media (max-width: 768px) {
    .education-box,
    .content-separator {
        display: none;
    }

    .content-box {
        margin-top: 0;
        font-size: medium;
    }
}

/* Mobile responsive styles for right panel */
@media (max-width: 768px) {
    .right-panel {
        height: auto;
        min-height: 50vh;
        padding: var(--space-sm);
        order: 1;
        margin-top: -2rem;
    }

    .about-photo {
        width: min(90%, 40vh);
        height: min(90%, 40vh);
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        margin: var(--space-sm) auto var(--space-xs);
    }
}

/* Tech buttons */
.tech-buttons {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 1rem;
    z-index: 1000;
}

.tech-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--color-primary);
    border-radius: 25px;
    background-color: transparent;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.tech-button img {
    width: 20px;
    height: 20px;
    filter: brightness(0);
}

.tech-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .tech-buttons {
        position: fixed;
        bottom: 50%;
        left: 50%;
        transform: translate(-50%, 90%);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2rem;
        z-index: 1000;
    }
    
    .tech-button {
        padding: 1rem 2rem;
        font-size: 1.8rem;
        width: 250px;
    }
    
    .tech-button img {
        width: 32px;
        height: 32px;
    }
}

.content-separator {
    margin: 20px 2rem;
    padding: 0 2rem;
    border: 0;
    border-top: 1px solid #ccc;
    width: 80%;
    max-width: 600px;
}