
/* Path: style.css */


/* ---------------------- */
/*       FONTS            */
/* ---------------------- */

/* style.css */

@font-face {
    font-family: 'Caster';           /* the name you’ll use in font-family */
    src: url('fonts/Caster.ttf')      /* path to your TTF file */
         format('truetype');                /* tells the browser it’s a TrueType font */
    font-weight: normal;                    /* optional: normal | bold | numeric */
    font-style: normal;                     /* optional: normal | italic | oblique */
    font-display: swap;                     /* ensures text remains visible while loading */
  }
  

/* ---------------------- */
/*       KEYFRAMES        */
/* ---------------------- */
@keyframes color {
    0%{
        background-position: 0 100%;
    }
    50%{
        background-position: 100% 100%;
    }
    100%{
        background-position: 0 100%;
    }
}

@keyframes cursor{
    50%{
        border-color: transparent;
    }
}

@keyframes typing{
    from{
        width: 0;
    }
}


@keyframes sequential {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------------------- */
/*       BASE STYLES      */
/* ---------------------- */

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Source Code Pro', monospace;
    color: antiquewhite;
    background: linear-gradient(45deg,#030001, #010002);
    padding: 0;
    margin: 0;
    cursor: url('cursors/cursor.cur') 0 0, auto;
}


a{
    color: aqua;
    background-color: transparent;
    text-decoration: none;
    cursor: url('cursors/cursor_link.cur') 0 0, pointer;
}

section {
    display: grid;
    place-items: center;
    align-content: center;
    min-height: 100vh;
    /* margin-left: 15%;
    margin-right: 15%; */
    padding: 0 15%;


    padding-top: 10%;
    padding-bottom: 5%;
}

.sec_border{
    padding: 0 15%;
    /* border-bottom: antiquewhite 3px dashed; */
}

header{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-items: space-between;
    align-items: center;
    transition: 0.6s;
    padding: 1% 1%;
    z-index: 9999;
    background-color: #010002;
}

header ul{
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

header ul li{
    position: relative;
    list-style: none;
    width: auto;
    flex: 0 1 auto;        /* allow shrinking/growing only as needed */
}

header ul li a{
    position: relative;
    margin: 0 10%;
    text-decoration: none;
    color: antiquewhite;
}

footer{
    display: grid;
    height: auto;
    row-gap: 0.5rem;
    padding-top: 1.5rem;
    bottom: 0;
    left: 0;
    width: 100%;
    justify-items: center;
    align-items: center;
    text-align: center;
    transition: 0.6s;
    z-index: 9999;
    background-color: #010002;
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
    font-size: 0.75rem;
}

#board {
    background-color: black;
}

/* ---------------------- */
/*       NAVIGATION       */
/* ---------------------- */
.nav_text{
    position: relative;
}

.nav_text_current{
    position: relative;
}

.nav_text::after{
    content: '';
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 100%;
    height: 2px;
    background: red;

    transform: scaleX(0);
    transform-origin: right;
    transition: transform 250ms ease-in, background 400ms ease-in;
}

.nav_text_current::after{
    content: '';
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 100%;
    height: 2px;
    background: antiquewhite;

}

.nav_text:hover::after{
    transform: scaleX(1);
    transform-origin: left;
    background: antiquewhite;
}

/* ---------------------- */
/*    TYPOGRAPHY & ANIM   */
/* ---------------------- */
.acad_titles{
    font-family: 'Times New Roman';
    font-size: 45px;
 
}

.mario{

    font-family: 'Press Start 2P', system-ui;
    font-size: 25px;
    border-right: 4px solid;
    white-space: nowrap;
    width: 100%;
    overflow: hidden;
    animation:
        /* typing 2s steps(17), */
        cursor .4s step-end infinite alternate;
}

.MNIST{
    
    font-family: 'Boldonse', system-ui;
    font-size: 25px;
    border-right: 4px solid;
    white-space: nowrap;
    width: 100%;
    overflow: hidden;
    animation:
        /* typing 2s steps(17), */
        cursor .4s step-end infinite alternate;
}


.selfdriving{
    font-family: 'Bruno Ace', sans-serif;
    font-size: 36px;
    border-right: 4px solid;
    white-space: nowrap;
    width: 100%;
    overflow: hidden;
    animation:
        /* typing 2s steps(17), */
        cursor .4s step-end infinite alternate;
}

.bat{
    font-family: 'Bangers', cursive;
    font-size: 50px;
    white-space: nowrap;
    overflow: hidden;
    border-right: 4px solid;
    width: 100%;
    animation:
        typing 1.5s steps(11),
        cursor .4s step-end infinite alternate;
}

img {
    max-width: 100% !important;
    height: auto;
    display: block;
}


.ihear{
    font-family: 'Cairo Play', sans-serif;
    font-size: 50px;
    white-space: nowrap;
    overflow: hidden;
    border-right: 4px solid;
    width: 100%;
    animation:
        typing 1.5s steps(11),
        cursor .4s step-end infinite alternate;
}

.chess{
    font-family: 'Arvo', serif;
    font-size: 36px;
    border-right: 4px solid;
    white-space: nowrap;
    width: 100%;
    overflow: hidden;
    animation:
        /* typing 2s steps(17), */
        cursor .4s step-end infinite alternate;
}

.sign{
    font-family: 'Nanum Pen Script', cursive;
    font-size: 100px;
    white-space: nowrap;
    overflow: hidden;
    border-right: 4px solid;
    width: 100%;
    animation:
        typing 1.5s steps(11),
        cursor .4s step-end infinite alternate;
        
}

.sign_header{
    position: relative;
    margin-left: 3%;
    font-family: 'Nanum Pen Script', cursive;
    font-size: 50px;
    white-space: nowrap;
    overflow: hidden;
    width: 100%;
    color: antiquewhite;
}

.pieces{
    font-size: 50px;
}

/* ---------------------- */
/*        UTILITIES       */
/* ---------------------- */
.hidden{
    opacity: 0.1;
    filter: blur(10px);
    /* transform: translateX(-100%); */
    transition: all 1s ;
    transition-delay: 0.1s;

}

/* ---------------------- */
/*     PROJECT CARDS      */
/* ---------------------- */
/* Every project on Home and Academic Projects uses the same card:
   label, display title, media, description, links, tags. */
section.project{
    min-height: auto;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.project-card{
    box-sizing: border-box;
    width: min(100%, 60rem);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    row-gap: 1.25rem;
    padding: clamp(1.25rem, 3vw, 2.5rem);
}

.project-card > *{
    margin: 0;
}

.project-label{
    font-size: 1.5rem;
    font-weight: 700;
}

.project-label + .project-title-wrap{
    margin-top: -0.5rem;
}

.project-title-wrap{
    max-width: 100%;
    text-align: center;
}

.project-title-wrap > .project-title{
    margin: 0;
}

.project-media{
    justify-self: stretch;
    width: 100%;
}

.project-media > video,
.project-media > img{
    display: block;
    width: 100%;
    height: auto;
}

/* MNIST demo: video and drawing pad side by side, filling the card */
.project-media .MNIST_Container{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.project-media .MNIST_vid{
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
    height: auto;
}

.project-media .MNIST_Container .card{
    flex: 0 0 auto;
}

.project-card .desc{
    max-width: 70ch;
    justify-self: stretch;
    margin-inline: auto;
}

.project-tags{
    font-size: 0.875rem;
    letter-spacing: 0.02em;
    color: rgba(250, 235, 215, 0.75);
    text-align: center;
}

/* ---------------------- */
/*   PROFILE LINKS        */
/* ---------------------- */
.social-links{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 1.5rem;
}

.social-links a{
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0 0.25rem;
    font-size: 0.75rem;
}

/* ---------------------- */
/*     CONTACT PAGE       */
/* ---------------------- */
/* breathing room between the cave-painting caption and the contact details */
#contact.project{
    padding-top: clamp(5rem, 12vh, 8rem);
}

.contact-title{
    font-family: 'Nanum Pen Script', cursive;
    font-size: clamp(3rem, 8vw, 4.5rem);
    line-height: 1;
}

.project-card .contact-intro{
    text-align: center;
}

.contact-list{
    justify-self: stretch;
    display: grid;
    row-gap: 0.25rem;
    max-width: 40rem;
    width: 100%;
    margin-inline: auto;
}

.contact-list > div{
    display: grid;
    grid-template-columns: 10rem minmax(0, 1fr);
    align-items: center;
    column-gap: 1.5rem;
    padding: 0.5rem 0;
}

.contact-list dt{
    color: rgba(250, 235, 215, 0.75);
    font-size: 0.875rem;
    letter-spacing: 0.02em;
}

.contact-list dd{
    margin: 0;
    overflow-wrap: anywhere;
}

.contact-list a{
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
}

@media (max-width: 600px){
    .contact-list > div{
        grid-template-columns: minmax(0, 1fr);
        row-gap: 0;
    }
}

/* Headings that keep the look of the paragraph they replaced (zero specificity, so classes still win) */
:where(.plain_heading){
    font-size: 1em;
    font-weight: normal;
    margin: 1em 0;
}

.desc_pic{
    
}

.mario_none{
    display: none;

}

.show{
    opacity: 1;
    filter: blur(0);
    transform: translateX(0);
}

.sequential{
    opacity: 0;
    animation:
        sequential 1s ease-in-out forwards;  
}


/* ---------------------- */
/*        MNIST QUERY     */
/* ---------------------- */

.elevation {
    box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14),
      0 1px 5px 0 rgba(0, 0, 0, 0.12);
  }
  
  .card {
    background: #f6cfcf;
    display: inline-block;
    vertical-align: top;
    border-radius: 4px;
    padding: 16px;
    margin: 16px;
    margin-top: 10%;

  }
  
  .canvas {
    background: #fff3f3;
    border-radius: 4px;
    height: 140px;
    width: 140px;
    
  }
  
  .button {
    background-color: #6d0000;
    border-radius: 4px;
    box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14),
      0 1px 5px 0 rgba(0, 0, 0, 0.12), inset 0 0 0 rgba(0, 0, 0, 0.3);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1.25px;
    line-height: 36px;
    margin: 16px 0;
    text-align: center;
    transition: box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    width: 140px;
  }
  
  .button:hover {
    background: #c60000;
  }
  
  .button:active {
    box-shadow: 0 0 rgba(0, 0, 0, 0.2), 0 0 rgba(0, 0, 0, 0.14),
      0 0 rgba(0, 0, 0, 0.12), inset 0 0 2px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.05s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .predictions {
    display: flex;
  }
  
  .prediction-col {
    padding: 0 2px;
  }
  
  .prediction-bar-container {
    background: #f5f5f5;
    height: 140px;
    width: 10px;
    position: relative;
  }
  
  .prediction-bar {
    background: #e0e0e0;
    bottom: 0;
    position: absolute;
    width: 100%;
  }
  
  .prediction-number {
    color: #bdbdbd;
    font-size: 14px;
    text-align: center;
  }
  
  .top-prediction .prediction-bar {
    background: #05005f;
  }
  
  .top-prediction .prediction-number {
    color: #00c94a;
    font-weight: bold;
  }

  /* Base style for hamburger icon - hidden on desktop */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    margin-right: 5%; /* moved from inline style */
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: antiquewhite;
}

/* Adjust the navigation menu styling */
#nav-menu {
    display: flex;               
    justify-content: flex-end;   
    gap: 20px;                   
    padding-right: 20px;         
}

#nav-menu li{
    flex: 0 0 auto;
}

#nav-menu li a {
    display: inline-block;     /* allow padding to expand width */
    white-space: nowrap;       /* prevent wrapping */
    padding: 0.2em 0.4em;        /* adjust horizontal padding to taste */
    text-align: center;
  }

  .acad_titles,
  .paper_title {
    display: block;       /* <p> is already block, but safe if you ever change it */
    text-align: center;   /* center-align wrapped lines */
  }

    /* ---------------------- */
    /*     PAPER GALLEY       */
    /* ---------------------- */

    .paper_title{
        display: inline-block;
        font-family: 'Caster', system-ui;
        font-size: 36px;
        white-space: nowrap;
        width: auto;
        overflow: hidden;
        z-index: 1;
        background-color: #010002;
        margin-bottom: 10%;
    }
    
    .paper_year{
        display: inline-block;
        font-family: 'Caster', system-ui;
        font-size: 72px;
        text-align: center;
        white-space: nowrap;
        width: auto;
        padding-left: 1%;
        padding-right: 1%;
        overflow: hidden;
        margin-bottom: 1%;
        position: relative;  /* establish positioning context */
        z-index: 1;
        background-color: #010002;
    }

  .timeline-wrapper::before {
    content: "";
    position: absolute;
    top: 4.5em;            /* vertically center the 2px line on the number */
    left: 0;
    right: 0;
    height: 2px;         /* thickness of the timeline line */
    background: white;   /* line color */
    z-index: 0;          /* behind the .paper_year text */
  }

      /* ---------------------- */
    /*    GRADCAM LOGIC        */
    /* ---------------------- */

    /* Container for the 2×3 Grad-CAM grid */
.gradcam-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    width: 75%;
    margin: 1.5rem auto;
  }
  
  /* Each cell holds the base image + overlay */
  .gradcam-cell {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }
  
  /* Base image sits below */
  .gradcam-cell .base-img {
    display: block;
    width: 100%;
    height: auto;
  }
  
  /* Heatmap overlay hidden by default with circular clip */
  .gradcam-cell {
    /* make sure the cell itself provides the CSS vars */
    --mouse-x: 50% ;
    --mouse-y: 50% ;
    position: relative;
    overflow: hidden;
  }
  
  .gradcam-cell .heatmap-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  
    /* use a radial-gradient mask instead of clip-path */
    -webkit-mask-image: radial-gradient(
      circle 200px at var(--mouse-x) var(--mouse-y),
      rgba(0,0,0,1) 20%,
      rgba(0,0,0,0) 100%
    );
    mask-image: radial-gradient(
      circle 200px at var(--mouse-x) var(--mouse-y),
      rgba(0,0,0,1) 20%,
      rgba(0,0,0,0) 100%
    );
  
    /* ensure the overlay itself doesn’t block mouse events */
    pointer-events: none;
  }

  .img-container {
    position: relative;
    width: 100%;
    /* height is determined by the base image */
  }
  
  .img-container .base-img,
  .img-container .heatmap-img {
    display: block;
    width: 100%;
    height: auto;          /* preserve aspect ratio */
  }
  
  .img-container .heatmap-img {
    position: absolute;
    top: 0; left: 0;
    pointer-events: none;  /* so your mousemove still hits the container */
    /* mask / clip-path rules go here */
  }
  
  

  /* ── Model showcase 2-col ── */
/* ── Model showcase 2-col ── */
.model-showcase {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    width: 75%;
    margin: 2rem auto;
}

.model-text {
    flex: 1 1 300px;
    color: #ddd;
    line-height: 1.5;
}

.model-text h4 {
    font-family: 'Arvo', serif;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.model-diagram {
    /* NEW: switch from block to flex so children sit on one row */
    display: flex;
    flex-wrap: wrap;        /* allow wrapping on narrow screens */
    justify-content: center;
    gap: 1rem;              /* space between the two halves */
    flex: 1 1 400px;        /* share row evenly with the text */
}

.model-diagram img {
    /* NEW: let each diagram take ~45% of the row, preserving aspect ratio */
    flex: 1 1 45%;
    max-width: 20em;
    height: auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    border-radius: 0.5rem;
}

  /* ── Grad-CAM intro styling ── */
  .gradcam-intro {
    width: 75%;
    margin: 1rem auto 0;
    text-align: center;
    color: #ccc;
  }
  .gradcam-intro h4 {
    font-family: 'Arvo', serif;
    font-size: 1.4rem;
    margin-bottom: 0.2rem;
  }
  .gradcam-intro p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
  }
  
  /* ── Cursor-following clip ── */
  /* override the fixed-center version */
  .gradcam-cell .heatmap-img {
    clip-path: circle(0 at 0 0);
    transition: clip-path 0s;
  }
  /* disable the hover:center rule */
  .gradcam-cell:hover .heatmap-img { clip-path: none; }
  
  
  

      

    /* ---------------------- */
    /*     PAPER TIMELINE     */
    /* ---------------------- */

/* TIMELINE LAYOUT */
.timeline-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 2rem auto;
  }
  
  /* The “track” */
  .timeline {
    display: flex;
    transition: transform 0.4s ease;
  }
  
  /* Each paper takes full viewport width */
  .timeline-item {
    flex: 0 0 100%;
    box-sizing: border-box;
    padding: 0 15%;
    position: relative;
  }
  /* NAV BUTTONS */
  .timeline-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,1);
    color: antiquewhite;
    border: none;
    font-size: 2rem;
    width: 2.5em;
    height: 2.5em;
    cursor: url('cursors/cursor_link.cur'),pointer;
    z-index: 2;
  }
  .timeline-btn.prev { left: 2.5%; }
  .timeline-btn.next { right: 2.5%; }
  .timeline-btn:disabled {
    opacity: 0;
    cursor: default;
  }

/*———————————————————————————————*/
/*  Top-align timeline cards (beat the global section rule) */
/*———————————————————————————————*/

/* Select the <section class="timeline-item"> inside your .timeline */
.timeline-wrapper .timeline .timeline-item {
    display: flex    !important;  /* kill the grid */
    flex-direction: column !important;  /* stack from top */
    justify-content: flex-start !important; /* push contents to the top */
    align-items: center    !important; /* still center horizontally */
    min-height: 0    !important;  /* undo the 100vh */
    padding-top: 2rem !important; /* whatever top spacing you like */
  }

  
  

/* ------------------------------------------------------------------------------------------------ 
   *  Mobile Styles
   *  This section contains styles that are applied when the viewport width is 900px or less.
   *  It includes adjustments for text alignment, font sizes, and layout changes for smaller screens.
   * ------------------------------------------------------------------------------------------------ */

/* Mobile-specific styles */
@media (max-width: 900px) {

    .mario,
    .MNIST,
    .chess,
    .selfdriving,
    .bat,
    .ihear,
    .sign {
        white-space: normal;
        overflow-wrap: break-word;
        text-align: center;        /* Centre the text */
        border-right: none;
        transition: opacity 1s ease-in;
    }

    .sign {
        
        animation: none;
        border-right: none;
        font-size: calc(5vw + 1rem);
    }

    .card {
        display:none;
    }

    .MNIST_vid{
        width: 100%;
    }

    section.project{
        padding-left: 4vw;
        padding-right: 4vw;
    }

    .project-card{
        padding: 1.25rem 1rem;
    }

    footer{
        font-size: x-small !important;
        background-color: #6d0000;
        padding-top: 1.5rem;
        padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
    }
    /* Slide-in Navigation Menu */
    #nav-menu {
        flex-direction: column;
        justify-content: center; /* Centers items vertically */
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 50vw;
        background-color: #010002;
        transform: translateX(120%);  /* Start off-screen */
        transition: transform 0.3s ease-out;
        z-index: 1000;
    }
    #nav-menu.active {
        transform: translateX(0);  /* Slide into view */
    }
    header ul li {
        display: flex;
        align-items: center;
        justify-content: center;
        /* existing properties */
        width: 100% !important;
        margin: 0 !important;
        height: 10vh;
        padding: 10px;
        white-space: normal;
        text-align: center;
    }
    

    
    
    /* Overlay Styling */
    #overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);  /* Semi-transparent */
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease;
        z-index: 900;  /* Below the menu */
    }
    #overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Ensure the hamburger stays visible */
    .hamburger {
        display: flex;
        cursor: url('cursors/cursor_link.cur'),pointer;
    }
    
    /* Optionally adjust the header layout */
    header {
        justify-content: space-between;
    }
}

.model-diagram {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .model-diagram img {
    width: 100%;
    height: auto;
  }
  