/* @import url('https://fonts.googleapis.com/css2?family=Fira+Sans&family=Press+Start+2P&family=Rubik+Vinyl&display=swap'); */
@import url('https://fonts.googleapis.com/css2?family=Jersey+10&display=swap');
:root{
    --main: black;
    --fColor: #ECECDA;
    /* Brightened from the old dark green (#296B1C) / dark red (#882626),
       which were hard to read against the dark background. */
    --subMain1: #4ec938;
    --subMain2: #e05252;
    /* Translucent versions used by the background triangles so they read as
       color tints over the background video instead of solid fills. */
    --subMain1-tint: rgba(78, 201, 56, 0.55);
    --subMain2-tint: rgba(224, 82, 82, 0.55);
    --borderRad: 15px;
    --space: 150px;
    --pix: "Jersey 10", sans-serif;
}

/* Recruiter (standalone) view: swap the pixel font for a clean sans-serif.
   Higher specificity than :root so it overrides --pix for all var(--pix) text. */
html.recruiter-view {
    --pix: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
/* The layout is tuned around the pixel font at 1.5em; a normal sans-serif at
   that size overflows the fixed header. Tighten it so the recruiter view reads
   clean and professional. */
html.recruiter-view body { font-size: 1.15em; line-height: 1.7em; }

/* Exit button shown only on the standalone recruiter view */
#recruiter-exit {
    position: fixed;
    bottom: 18px;
    right: 18px;
    z-index: 2000;
    padding: 10px 20px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--fColor);
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid var(--fColor);
    border-radius: 8px;
    cursor: pointer;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background 0.2s, color 0.2s;
}
#recruiter-exit:hover {
    background: var(--subMain2);
    color: var(--fColor);
}

header{
    z-index: 1000;
    --space: 20px;
    width: 100vw;
    padding-top: var(--space);
    padding-bottom: var(--space);
    border-bottom: 2px solid var(--fColor);
    position: fixed;
    display: flex;
    height: 40px;
    flex-flow: row nowrap;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-color: rgba(0, 0, 0, 0.7);
}

#nav-menu {
    display: flex;
    gap: 25px;
    align-items: center;
    margin: 0 30px;
}

.nav-link {
    color: var(--fColor);
    text-decoration: none;
    font-size: 0.9em;
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background-color: rgba(236, 236, 218, 0.1);
    color: var(--subMain1);
}

.nav-link.resume-link {
    background-color: var(--subMain2);
    color: var(--fColor);
    font-weight: bold;
}

.nav-link.resume-link:hover {
    background-color: var(--subMain1);
    color: var(--fColor);
}

body{
    background-color: var(--main);
    color: var(--fColor);
    padding: 0px;
    margin: 0px;
    overflow-x: hidden;
    line-height: 2em;
    font-family: var(--pix);
    font-size: 1.9em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

@keyframes fB1 {
    from{
        left: -100vw;
    }
    to{
        left: 0vw;
    }
}

@keyframes fB2 {
    from{
        left: 150vw;
    }
    to{
        left: -50vw;
    }
}

/* iframe{
    border: 2px solid var(--fColor);
} */

/* The triangles sit OVER the goop cover as translucent color tints — where a
   goop drip has punched through to the video, the triangle tints the video
   green/red; everywhere else the cover is opaque black under them. */
body::before{
    content: " ";
    background-color: var(--subMain1-tint);
    position: fixed;
    z-index: -98;
    clip-path: polygon(50% 50%, 0 0%, 0 100%);
    height: 100vh;
    width: 100vw;
    animation: fB1 2s;
    margin: 0px;
    padding: 0px;
}

#background{
    content: " ";
    background-color: var(--subMain2-tint);
    position: fixed;
    z-index: -97;
    left: 150vw;
    clip-path: polygon(100% 0%, 50% 50%, 100% 100%);
    height: 100vh;
    width: 150vw;
    animation: fB2 3s ease-in-out 0.1s;
    animation-fill-mode: forwards;
    position: fixed;
}

/* ---- Goop cover ----
   Opaque black sheet between the video and the triangles. JS punches falling
   drip-shaped holes through it every frame (destination-out), and the gooey
   SVG filter below makes nearby holes blur + threshold into one merged blob —
   the genuine dripping-liquid technique, inverted into a reveal. */
#goop-cover {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: -99;
    pointer-events: none;
    filter: url("#goo");
}
#goop-defs {
    position: fixed;
    width: 0;
    height: 0;
    overflow: hidden;
}

footer{
    width: 100vw;
    box-sizing: border-box;
    background-color: black;
    padding: 10px;
    /* keep the © line clear of the fixed "now playing" badge bottom-left */
    padding-bottom: 70px;
}

::selection{
    color: var(--main);
    background-color: var(--fColor);
}

#title-name{
    --space: 20px;
    font-size: 2em;
    padding-left: var(--space);
    padding-right: var(--space);
}

#title-info-years{
    font-size: 0.8em;
}

#title-info{
    color: var(--fColor);
    display: flex;
    flex-flow: column-reverse nowrap;
    font-size: 1em;
}

/*=====================pageChoice=====================*/

#intro-holder{
    background-color: var(--main);
    border-radius: var(--borderRad);
    height: fit-content;
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--fColor);
    width: 50vw;
    margin-left: 25vw;
    --pad: 20px;
    padding-top: var(--pad);
    padding-bottom: var(--pad); 
    font-size: 1.3em;
}

#intro-holder>div{
    width: 80%;
}

#intro-name>b{
    color: var(--subMain1);
}

#intro-des>b{
    color: var(--subMain2);
}

#intro-name{
    margin-bottom: 20px;
}

/* ============================featured======================== */

#featured-holder {
    width: 70vw;
    margin-left: 15vw;
}

#featured-header {
    text-align: center;
}

#featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 30px;
}

.featured-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--fColor);
    border: 2px solid var(--fColor);
    border-radius: var(--borderRad);
    background-color: rgba(0, 0, 0, 0.85);
    overflow: hidden;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.featured-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 8px 22px rgba(236, 236, 218, 0.25);
}

.featured-thumb {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: #000;
    border-bottom: 2px solid var(--fColor);
}

.featured-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.featured-title {
    padding: 12px 10px;
    text-align: center;
    font-size: 1.1em;
    color: var(--subMain1);
}

/* ============================projects (collapsible)======================== */

#proj-holder {
    width: 70vw;
    margin-left: 15vw;
}

#proj-header {
    text-align: center;
}

#proj-hint {
    text-align: center;
    font-size: 0.85em;
    opacity: 0.7;
    margin-top: -10px;
    margin-bottom: 30px;
}

#proj {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 25px;
    width: 100%;
}

.proj-category {
    flex: 1 1 320px;
    max-width: 480px;
    border: 2px solid var(--fColor);
    border-radius: var(--borderRad);
    background-color: rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

.proj-cat-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    background: transparent;
    border: none;
    color: var(--fColor);
    font-family: var(--pix);
    font-size: 1.4em;
    cursor: pointer;
    transition: background 0.2s ease;
}

.proj-cat-header:hover {
    background: rgba(236, 236, 218, 0.08);
}

.proj-cat-arrow {
    color: var(--subMain2);
    transition: transform 0.3s ease;
    display: inline-block;
}

.proj-category.expanded .proj-cat-arrow {
    transform: rotate(90deg);
}

/* Collapsed by default; expands "outwards" when the category is opened */
.proj-cat-items {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    gap: 18px;
    max-height: 0;
    opacity: 0;
    padding: 0 18px;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.4s ease;
}

.proj-category.expanded .proj-cat-items {
    max-height: 1200px;
    opacity: 1;
    padding: 8px 18px 22px;
}

/* Individual project example */
.proj-example {
  background-color: black;
  padding: 10px;
  border-radius: var(--borderRad);
  font-size: 1em;
  border: 2px solid var(--fColor);
  --varSize: 150px;
  width: calc(var(--varSize));
  height: calc(var(--varSize) - 50px);
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.proj-example:hover {
    cursor: pointer;
    transform: scale(1.1);
    transition: transform 0.2s ease-in-out;
}

/* ---- Load More buttons (archived projects + awards) ---- */
.load-more-btn {
    font-family: var(--pix);
    font-size: 1em;
    color: var(--fColor);
    background-color: var(--subMain2);
    border: 2px solid var(--fColor);
    border-radius: var(--borderRad);
    padding: 10px 28px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.load-more-btn:hover {
    background-color: var(--subMain1);
    transform: scale(1.05);
}

/* ---- Full-page background video ----
   A muted, autoplaying YouTube video of a random project fills the viewport
   behind everything, at FULL opacity — but it's hidden behind the opaque
   #goop-cover above it. Only the gooey falling drips punched through the
   cover reveal it, and the translucent triangles (body::before / #background)
   tint whatever the goop reveals inside them. */
#video-layer {
    position: fixed;
    inset: 0;
    z-index: -100;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    transition: opacity 1.2s ease;
}
#video-layer.playing {
    opacity: 1;
}

/* ---- "Now playing" badge (bottom-left) ----
   Names the project whose video is currently running behind the page. */
#now-playing {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 1500;
    display: none;
    align-items: center;
    gap: 10px;
    max-width: 74vw;
    padding: 8px 16px;
    font-family: var(--pix);
    font-size: 0.75em;
    line-height: 1.4em;
    color: var(--fColor);
    background: rgba(0, 0, 0, 0.75);
    border: 2px solid var(--fColor);
    border-radius: var(--borderRad);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
#now-playing.show { display: flex; }
#now-playing.pop { animation: nowPlayingPop 0.35s ease; }
@keyframes nowPlayingPop {
    0%   { transform: scale(0.85); }
    60%  { transform: scale(1.06); }
    100% { transform: scale(1); }
}
#now-playing-dot {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--subMain2);
    animation: nowPlayingPulse 1.4s ease-in-out infinite;
}
@keyframes nowPlayingPulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.35; }
}
#now-playing-label { opacity: 0.7; }
#now-playing-name { color: var(--subMain1); }

/* Card Styling */
.card-container {
  display: flex;
  gap: 20px;
}

.card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  cursor: pointer;
  transition: transform 0.2s;
}

.card:hover {
  transform: scale(1.02);
}

/* Modal Styling */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  color: black;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7); /* Blur effect */
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: var(--fColor);
  padding: 30px;
  border-radius: 10px;
  max-width: 600px;
  width: 80%;
  position: relative;
}

#modal-video {
  width: 100%;
  max-width: 560px;
  height: 315px;
  margin: 20px 0;
  border-radius: 8px;
}

@media (max-width: 600px) {
  #modal-video {
    height: calc(315px * 0.75);
  }
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 28px;
  cursor: pointer;
}

/* Prevent scrolling when modal is open */
body.modal-open {
  overflow: hidden;
}

/* ======================================= */

#school-holder {
    display: grid;
  grid-template-columns: auto auto; /* Auto-width columns */
  justify-content:space-around; /* Pushes elements to opposite sides */
}

#edu-holder, #awards-holder{
    background-color: var(--main);
    border-radius: var(--borderRad);
    height: fit-content;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--fColor);
    --pad: 20px;
    padding-top: var(--pad);
    padding-bottom: var(--pad); 
    padding: 10px;
    width: 500px
}

/* =========================================== */

#social-holder {
    display: flex;
    flex-flow: row;
    width: 100vw;
}

#social-header {
    width: 20%;
    text-align: end;
}

#social-socials {
    width: 80%;
    display: flex;
    flex-flow: row;
    align-items: center;
    justify-content: center; /* Centers children horizontally */
    gap: 10%; /* Optional: Adds space between flex items */
}

.social-social {
    background-color: black;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-social:hover {
    cursor: pointer;
    transform: scale(1.2);
    transition: transform 0.2s ease-in-out;
}

/* Media query for responsiveness */
@media screen and (max-width: 1110px) {
    #school-holder {
        display: grid;
        grid-template-columns: 1fr; /* Single column (vertical stack) */
        grid-auto-rows: auto; /* Each child gets its own row */
        gap: 20px; /* Spacing between stacked items */
        
    }

    #edu-holder, #awards-holder{
        margin: auto;
    }
}

@media screen and (max-width: 860px) {
    #proj  {
        display: flex;
        flex-wrap: wrap; /* Allows items to wrap to the next line on smaller screens */
        justify-content: center; /* Centers project sections horizontally */
        align-items: center;
        flex-flow: column ;
        height: fit-content;
        width: 100vw;
        margin-bottom: 100px;
    }
    .proj-example {
        background-color: black; /* Very light gray */
        padding: 10px;
        border-radius: var(--borderRad);
        font-size: 1em;
        border: 2px solid var(--fColor);
        --varSize: 150px;
        width: calc(var(--varSize));
        height: calc(var(--varSize) - 50px);
        margin: 20px;
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    #edu-holder, #awards-holder{
        margin: auto;
        width: 300px;
        margin-bottom: 100px;
    }

    #title-name {
        font-size: 1em;
    }

    #title-info {
        font-size: 1em;
    }

    #intro-holder{
        width: 90vw;
        margin-left: 5vw;
    }
}

body.is-mobile {
  font-size: 1.1em;
}

.hidden{
    opacity: 0;
    filter: blur(5px);
    transform: translateX(-100%);
    transition: all 1s;
}

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

.space {
    margin-top: var(--space);
    margin-bottom: var(--space);
}

.social-container {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 1rem 0;
}

.social-link {
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s;
}

.social-link:hover {
  transform: translateY(-3px);
}

.social-social {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.2s;
}

/* Bigger footer social-media icons */
.social-social i {
  font-size: 44px;
}

.social-social:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Education and Experience styling */
.edu-item {
    margin-bottom: 25px;
    padding: 15px;
    border-left: 3px solid var(--subMain1);
    background-color: rgba(78, 201, 56, 0.1);
}

.edu-item strong {
    color: var(--subMain1);
    font-size: 1.1em;
}

.experience-item {
    padding: 20px;
    border: 2px solid var(--fColor);
    border-radius: var(--borderRad);
    background-color: rgba(0, 0, 0, 0.5);
}

.experience-item h3 {
    color: var(--subMain2);
    margin-top: 0;
    margin-bottom: 10px;
}

.experience-item p {
    margin: 5px 0;
    line-height: 1.6em;
}

#awards-desc ul {
    list-style-type: none;
    padding-left: 0;
}

#awards-desc li {
    margin-bottom: 15px;
    padding-left: 25px;
    position: relative;
}

#awards-desc li::before {
    content: "▸";
    color: var(--subMain2);
    font-size: 1.2em;
    position: absolute;
    left: 0;
}

#awards-desc strong {
    color: var(--subMain1);
}

.archived-project-item {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    gap: 22px;
    padding: 20px;
    border: 2px solid var(--fColor);
    border-radius: var(--borderRad);
    background-color: rgba(0, 0, 0, 0.8);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.archived-project-item.collapsed {
    display: none;
}

.archived-thumb {
    flex: 0 0 auto;
    width: 200px;
    aspect-ratio: 16 / 10;
    border: 2px solid var(--fColor);
    border-radius: 8px;
    overflow: hidden;
    background-color: #000;
}

.archived-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.archived-text {
    flex: 1 1 auto;
}

.archived-project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(236, 236, 218, 0.2);
}

.archived-project-item h3 {
    color: var(--subMain1);
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.archived-project-item p {
    margin: 5px 0;
    line-height: 1.6em;
    font-size: 0.9em;
}

/* Responsive navigation */
@media (max-width: 1024px) {
    header {
        height: auto;
        padding: 15px 10px;
    }
    
    #title-name {
        font-size: 1.5em;
        padding-left: 10px;
        padding-right: 10px;
    }
    
    #nav-menu {
        gap: 10px;
        margin: 0 15px;
    }
    
    .nav-link {
        font-size: 0.65em;
        padding: 6px 10px;
    }
    
    #title-info {
        display: none;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 1.6em;
    }
    
    header {
        flex-direction: column;
        height: auto;
        padding: 15px 10px;
        gap: 15px;
    }
    
    #title-name {
        font-size: 1.8em;
        text-align: center;
        padding: 0;
    }
    
    #nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        margin: 0;
        gap: 8px;
        width: 100%;
    }
    
    .nav-link {
        font-size: 0.8em;
        padding: 5px 8px;
        white-space: nowrap;
    }
    
    #intro-holder,
    #archived-projects,
    #experience-holder {
        width: 90vw !important;
        margin-left: 5vw !important;
        font-size: 1.1em;
    }
    
    #proj {
        flex-direction: column;
    }
    
    #proj-software,
    #proj-robotics {
        width: 90%;
        margin-bottom: 30px;
    }
    
    .proj-examples {
        width: 100%;
    }
    
    .experience-item,
    .archived-project-item {
        padding: 15px;
    }
    
    #awards-desc li {
        font-size: 1.05em;
        line-height: 1.6em;
    }
    
    .edu-item {
        font-size: 1em;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 1.4em;
    }
    
    header {
        padding: 10px 5px;
    }
    
    #title-name {
        font-size: 1.5em;
    }
    
    #nav-menu {
        gap: 5px;
    }
    
    .nav-link {
        font-size: 0.75em;
        padding: 4px 6px;
    }
    
    #intro-holder,
    #archived-projects,
    #experience-holder {
        font-size: 1.05em;
    }
    
    .proj-topic {
        font-size: 1.2em;
    }
    
    .proj-example {
        font-size: 1em;
        padding: 8px;
    }
}

.social-icon {
  width: 40px;
  height: 40px;
}

/* ---- Responsiveness for the featured / archived / projects sections ---- */
@media (max-width: 900px) {
    #featured-grid {
        grid-template-columns: 1fr;
    }
    #featured-holder,
    #proj-holder {
        width: 90vw;
        margin-left: 5vw;
    }
}

@media (max-width: 768px) {
    #archived-projects {
        width: 90vw !important;
        margin-left: 5vw !important;
    }
    .archived-project-item {
        flex-flow: column nowrap;
        align-items: stretch;
        text-align: left;
    }
    .archived-thumb {
        width: 100%;
    }
    #proj {
        flex-flow: column nowrap;
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 0;
    }
    .proj-category {
        max-width: 100%;
        flex-basis: auto;
    }
    .proj-cat-header {
        font-size: 1.2em;
    }
    .proj-example {
        --varSize: 118px;
    }
    img {
        max-width: 100%;
    }
}