@import url('https://googleapis.com');

@font-face {
  font-family: 'Inter Variable';
  src: url('fonts/Inter-VariableFont_opsz,wght.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Monaspace Argon';
  src: url('fonts/MonaspaceArgon-Var.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

main {
    width: 100%;
    padding: 0 1rem 4rem 1rem;
    box-sizing: border-box;
}

main.error-page-layout {
    padding: 0 1rem; 
    box-sizing: border-box;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    box-sizing: border-box;
    flex-direction: column;
}


html {
    scrollbar-gutter: stable;
    scroll-behavior: smooth;
}


::-webkit-scrollbar {
    width: 8px;               
    background-color: #04020a; 
}


::-webkit-scrollbar-thumb {
    background: #202020;       
    border-radius: 10px;       
    border: 2px solid #04020a;
    transition: background 0.2s ease;
}

body {
    background:#020202;
    font-family: Inter, sans-serif;
    color:#000000;
    margin: 0;
    
    /* this might be a placebo effect but i think my text got smoother after adding this */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

header, footer {
    background: #0e0e0e93;
    color: #ffffff;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(5px);
    flex-wrap: wrap;
    gap: 1rem;
}

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #2c2c2c;
}


.logo-header{
    /* i was going to use a box shadow just like active state buttons have buutt for some reason it looks weird  */
    /* and i cant find a solution to fix it  */
    /* box-shadow: 0 0 12px rgba(0, 183, 255, 0.6); */
    /* update: not using shadows anymore for that glow effect becauseeee i think flat lookls better and suits the website more i guess */
    /* update 2: why the hell r there so manny comments here what am i on */

    /* right padding so on smaller screens it doesn't lean against the header h1 text */
    padding-right: 1%;
    padding-bottom: 5%
}

footer {
    border-top: 1px solid #2c2c2c;
    justify-content: center; 
}


/* ngli stole this from the internet */
.glow-bg, .glow-bg-404 {
    position: absolute;
    top: 25%;
    left: 25%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #00b7ff7a 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    filter: blur(60px);
    transform: translate(-50%, -50%);
    z-index: -1;
  
    animation: glow-bg 5s ease-in-out infinite alternate;
}


@keyframes glow-bg {
  0% {
    /* i wanted to do background color changes but it feels kinda off so like nvm guys */
    /* background-color: #00b7ff18; */
    transform: translate(-50%, -50%) scale(0.7);
    opacity: 0.6;
  }
  100% {
    /* background-color: #00b7ff23; */
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.9;
  }
}

section {
    /* the fix for the weird scrolling behavior and the header hiding stuff on mobile  */
    scroll-margin-top: 200px; 
}

h1, h2 {
    text-align: left;
    font-family: 'Inter', sans-serif;
    font-weight: 725;
    font-size: 150%;
    margin: 0;
}

h2 {
    color:rgb(255, 255, 255);
    display: flex;
    justify-content: space-between; 
}

p {
    color:rgb(255, 255, 255);
}

ul {
    color:rgb(255, 255, 255);
}

table {
    width: 100%;
    border-collapse: collapse;
    color:rgb(75, 106, 192)
}
th, td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
    
}

.button-group {
  display: flex;
  align-items: center;
  gap: 1rem; 
}

th {
    color:white;
}
th {
    background-color: #2d4675;
}
tr:nth-child(even) {
    background-color: #f9f9f9;
    color:black;
}

li button, li a {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-weight: 550;
    font-size: 1rem;           
    color: #8d8d8d;
    background-color: transparent;
    border: none;              
    padding: 0.6rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;          
    outline: none;             

    transition: background-color 0.1s ease, color 0.1s ease;
}

li a{
    background-color: #101010;
    border: 1px solid #2e2e2e
}

li button:hover, li a:hover {
    color: #FFFFFF;
    background-color: #1f1f1f;
}

li button.active {
    color: #FFFFFF;
    background-color: #00b7ff;
}


.post {
    border: 0px solid #ccc;
    padding: 16px;
    margin: 20px 0;
    border-radius: 10px;
    background-color: #f0f0f0;
}

.post-image-centered {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}


.post h2 {
    margin-bottom: 5px;
}

.post h5 {
    color: gray;
    font-weight: normal;
    margin-top: 0;
}

.post p {
    line-height: 1.6;
}

.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: calc(100svh - 4rem);
    padding: 4rem 0;
    box-sizing: border-box;
    
}

.hero-wrapper {
    display: flex;
    flex-direction: column;   /* so text is vertical on mobile */
    position: relative;
    gap: 3rem;
    width: 100%;
    box-sizing: border-box;
}

.hero-inner {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0rem;
    box-sizing: border-box;
}

.header-inner ul {
    justify-content: center !important;
    padding-top: 5%;
    padding-left: 0 !important; /* This completely deletes that sneaky browser padding! */
    margin: 0;
}

.hero-quote {
    width: 100%;
    box-sizing: border-box;
}

.quote-text {
    font-family: 'Space Mono', monospace;
    font-style: italic;
    font-size: 1.4rem;
    line-height: 1.6;
    color: #ffffff;
    margin: 0 0 0.5rem 0;
}

.quote-author {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: #8d8d8d;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0;
}

.hero-pretitle {
    color: #8d8d8d;
    font-size: 1.2rem;
    margin: 0;
}

.hero-name {
    font-size: 5rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 0.5rem 0;
    letter-spacing: -1px;
}

.hero-tagline, .hero-tagline-404 {
    font-size: 1.3rem;
    font-weight: 500;
    color: #c4c2c2;
    margin: 0 0 1.5rem 0;
}

main.error-page-layout .hero-wrapper{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    gap: 1rem; 
}

#aboutsec {
    margin: 4rem 0 4rem 0;
}

.about {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.about-card, .skills-card, .knowledge-card {
    background: #0e0e0e93;
    padding: 1.5rem;
    border: 1px solid #2c2c2c;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    box-sizing: border-box;

    /* so it goes onto next line when text is too long so it looks all nice and neat and kawaii */
    overflow-wrap: break-word;
    word-break: break-word;

    /* to make it look more neat and allow for those boxes */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
}

.about-title, .learning-title, .work-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f8f7f7;
    margin: 0 0 1.5rem 0;
}

.aboutsec-title {
    font-size: 1.1rem;  
    font-weight: 550;
    color: #00b7ff;
    margin: 0 0 1.5rem 0;
    display: block;
    white-space: nowrap;
    margin-bottom: 1rem;
}

.code-text {
    font-family: 'Monaspace Argon', monospace;
    color: #FFFFFF;
    font-weight: 500;
    font-size: 1.3rem;
}

.tags-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    }

/* why is this so long im just making a box bruh */
/* W class name btw ? */
.box-box {
    /* font-family: 'Monaspace Argon', monospace; */
    display: inline-flex; 
    justify-content: center;
    align-items: center;
    white-space: nowrap;    
    width: auto;
    background: #0e0e0e93;
    border: 1px solid #2c2c2c;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    color: #c4c2c2;
    font-weight: 600;   
    font-size: 0.9rem;
    padding: 0.5rem 1rem;  

    transition: box-shadow 0.1s ease, color 0.1s ease;
}

.box-box:hover {
    box-shadow: 0 0 12px rgba(0, 183, 255, 0.15);
}

/* this ones even better than the last one */
.box-box-without-box {
    display: inline-block;
    color: #c4c2c2;
    font-weight: 550;   
    font-size: 0.9rem; 
    overflow-wrap: anywhere; 
    word-break: break-word;
}   

/* pc and mobile stuff so it doesnt look weird on mobile */
/* this adds spacing on the sides so it feels kinda centered?  */
/* better viewing experience in general rather than centering everything */

/* update: its such a pain working with this now that its reversed between pc and mobile but i made the mistake so im sticking with it */
@media (min-width: 768px) {

  main {
    max-width: 60%;
    margin-left: auto;
    margin-right: auto;
  }

  section{
    scroll-margin-top: 80px;
  }

  .header-inner {
    max-width: 60%;      
    margin: 0 auto;
    flex-direction: row;
    justify-content: space-between;
  }

  .header-title{
    opacity: 100%
  }

  .hero {
    align-items: stretch;
    width: 100%;
    min-height: calc(100dvh - 6rem);
  }

  .hero-wrapper {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;               
  }

  .hero-inner {
    max-width: 45%;
    text-align: left;
  }

  .hero-quote {
    max-width: 45%;
    text-align: right; 
    margin: 0;
  }

  /* yes i know i could have done another media query so this only happens on mobile screens so i dont have to reset here 
  but im too far in and i cant be asked 
  either way im the only one working on this who cares about readability */

  .header-inner ul {
    padding-top: 0%;
  }

  .about {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem
  }

  .logo-header{
    padding-bottom: 0%
  }

  .glow-bg {
    width: 600px;
    height: 600px;
    top: 50%;
    left: 10%;
  }
}

/* ---------- search bar ---------- */
.search-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-bar {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    background: #0e0e0e93;
    border: 1px solid #2c2c2c;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    box-sizing: border-box;
    transition: border-color 0.1s ease, box-shadow 0.1s ease;
}

.search-bar:hover {
    border-color: #3a3a3a;
}

.search-bar:focus-within {
    border-color: #00b7ff;
    box-shadow: 0 0 12px rgba(0, 183, 255, 0.15);
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: #8d8d8d;
    pointer-events: none;
    transition: color 0.1s ease;
}

.search-bar:focus-within .search-icon {
    color: #00b7ff;
}

#projectSearch {
    flex: 1;
    min-width: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 550;
    font-size: 1rem;
    color: #ffffff;
    background: transparent;
    border: none;
    outline: none;
    padding: 0.9rem 3.5rem 0.9rem 2.9rem;
    -webkit-appearance: none;
    appearance: none;
}

#projectSearch::placeholder {
    color: #8d8d8d;
}

/* hide the browser's built-in clear button, we have our own */
#projectSearch::-webkit-search-cancel-button,
#projectSearch::-webkit-search-decoration {
    -webkit-appearance: none;
    display: none;
}

.search-clear {
    position: absolute;
    right: 0.6rem;
    width: 1.8rem;
    height: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    line-height: 1;
    color: #8d8d8d;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.1s ease, color 0.1s ease;
}

.search-clear[hidden] {
    display: none;
}

.search-clear:hover {
    color: #ffffff;
    background: #1f1f1f;
}

/* "/" shortcut hint, fades away once you're typing */
.search-hint {
    position: absolute;
    right: 0.9rem;
    font-family: 'Monaspace Argon', monospace;
    font-size: 0.75rem;
    color: #8d8d8d;
    background: #101010;
    border: 1px solid #2e2e2e;
    border-radius: 5px;
    padding: 0.1rem 0.45rem;
    pointer-events: none;
    transition: opacity 0.1s ease;
}

.search-bar:focus-within .search-hint,
#projectSearch:not(:placeholder-shown) ~ .search-hint {
    opacity: 0;
}

/* ---------- filters ---------- */
.search-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    font-family: 'Inter', sans-serif;
    font-weight: 550;
    font-size: 0.9rem;
    color: #8d8d8d;
    background: #0e0e0e93;
    border: 1px solid #2c2c2c;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    outline: none;
    backdrop-filter: blur(5px);
    transition: background-color 0.1s ease, color 0.1s ease, border-color 0.1s ease;
}

.filter-btn:hover {
    color: #ffffff;
    background: #1f1f1f;
}

.filter-btn.active {
    color: #ffffff;
    background: #00b7ff;
    border-color: #00b7ff;
}

.result-count {
    font-size: 0.85rem;
    color: #8d8d8d;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* ---------- project cards ---------- */
.projects-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    background: #0e0e0e93;
    border: 1px solid #2c2c2c;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    overflow: hidden;
    box-sizing: border-box;
    transition: border-color 0.1s ease, box-shadow 0.1s ease, transform 0.1s ease;
}

.project-card[hidden] {
    display: none;
}

.project-card:hover {
    border-color: rgba(0, 183, 255, 0.5);
    box-shadow: 0 0 12px rgba(0, 183, 255, 0.15);
    transform: translateY(-2px);
}

.project-card.card-in {
    animation: card-in 0.15s ease-out both;
}

@keyframes card-in {
    from { opacity: 0; transform: translateY(6px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

.project-image-wrapper {
    aspect-ratio: 16 / 9;
    background: #101010;
    border-bottom: 1px solid #2c2c2c;
    overflow: hidden;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.15s ease;
}

.project-card:hover .project-img {
    transform: scale(1.03);
}

.project-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
    padding: 1.5rem;
}

.project-details h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #f8f7f7;
}

.project-details p {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 550;
    line-height: 1.6;
    color: #c4c2c2;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.25rem;
}

.tag-badge {
    font-size: 0.8rem;
    font-weight: 600;
    color: #00b7ff;
    background: rgba(0, 183, 255, 0.08);
    border: 1px solid rgba(0, 183, 255, 0.25);
    border-radius: 8px;
    padding: 0.25rem 0.7rem;
}

/* search highlight */
.project-details mark {
    color: #ffffff;
    background: rgba(0, 183, 255, 0.35);
    border-radius: 3px;
    padding: 0 0.1em;
}

#noProjectsMessage {
    grid-column: 1 / -1;
    text-align: center;
    color: #8d8d8d;
    font-weight: 550;
    padding: 3rem 1rem;
    background: #0e0e0e93;
    border: 1px dashed #2c2c2c;
    border-radius: 8px;
}

@media (min-width: 768px) {
    .projects-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .project-card.card-in { animation: none; }
    .project-card:hover { transform: none; }
}

/* ---------- DSD badge + hover reveal ---------- */

/* your global h2 rule is display:flex with space-between, which would spread
   the tagline apart, so put it back to normal text flow. position:relative is
   what the reveal line below anchors to */
.hero-tagline {
    display: block;
    position: relative;
}

/* "DSD" as a little badge, same look as your project tag badges */
.dsd {
    display: inline-block;
    margin: 0 0.1em;
    padding: 0 0.4em;
    color: #00b7ff;
    background: rgba(0, 183, 255, 0.08);
    border: 1px solid rgba(0, 183, 255, 0.25);
    border-radius: 8px;
    cursor: default;
    outline: none;
    transition: background-color 0.1s ease, border-color 0.1s ease, box-shadow 0.1s ease;
}

.dsd:hover,
.dsd:focus-visible {
    background: rgba(0, 183, 255, 0.16);
    border-color: rgba(0, 183, 255, 0.6);
    box-shadow: 0 0 12px rgba(0, 183, 255, 0.15);
}

/* the full name sits in the empty space under the tagline (absolutely
   positioned), so showing it never moves or re-wraps anything else.
   same font / weight / colour as the tagline so it reads as part of it.
   --pill-x is set by a few lines of JS (scripts.js) to the middle of the pill,
   so the text wipes outwards from the pill in both directions */
.dsd-full {
    --pill-x: 0px;   /* fallback if JS hasn't run: wipes in from the left */

    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.15rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    white-space: nowrap;
    color: #c4c2c2;
    pointer-events: none;

    opacity: 0;
    transform: translateY(-0.5rem);
    clip-path: inset(0 calc(100% - var(--pill-x)) 0 var(--pill-x));
    transition: clip-path 0.25s cubic-bezier(0.2, 0, 0, 1),
                opacity 0.15s ease,
                transform 0.25s cubic-bezier(0.2, 0, 0, 1);
}

.dsd-full em {
    font-style: normal;
    color: #00b7ff;
}

/* :focus so it also works by tap / keyboard */
.dsd:hover ~ .dsd-full,
.dsd:focus ~ .dsd-full {
    opacity: 1;
    transform: none;
    clip-path: inset(0 0 0 0);
}

@media (prefers-reduced-motion: reduce) {
    .dsd,
    .dsd-full {
        transition: none;
    }
}

/* ---------- contact ---------- */
#contactsec {
    margin: 6rem 0 0 0;
}

.contact-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f8f7f7;
    margin: 0 0 1.5rem 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.contact-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: #0e0e0e93;
    padding: 1.5rem;
    border: 1px solid #2c2c2c;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    box-sizing: border-box;
    overflow-wrap: anywhere;
    transition: border-color 0.1s ease, box-shadow 0.1s ease;
}

.contact-card:hover {
    border-color: rgba(0, 183, 255, 0.5);
    box-shadow: 0 0 12px rgba(0, 183, 255, 0.15);
}

.contact-card-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* icon sits in a little badge, same look as the project tag badges */
.contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    color: #00b7ff;
    background: rgba(0, 183, 255, 0.08);
    border: 1px solid rgba(0, 183, 255, 0.25);
    border-radius: 8px;
    flex-shrink: 0;
}

.contact-label {
    font-size: 1.1rem;
    font-weight: 550;
    color: #00b7ff;
}

.contact-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f8f7f7;
}

.contact-desc {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 550;
    line-height: 1.6;
    color: #c4c2c2;
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.25rem;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    font-family: 'Inter', sans-serif;
    font-weight: 550;
    font-size: 0.9rem;
    color: #8d8d8d;
    background: #0e0e0e93;
    border: 1px solid #2c2c2c;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    text-decoration: none;
    cursor: pointer;
    outline: none;
    backdrop-filter: blur(5px);
    transition: background-color 0.1s ease, color 0.1s ease, border-color 0.1s ease;
}

.contact-btn:hover,
.contact-btn:focus-visible {
    color: #ffffff;
    background: #1f1f1f;
}

.contact-btn.primary {
    color: #ffffff;
    background: #00b7ff;
    border-color: #00b7ff;
}

.contact-btn.primary:hover,
.contact-btn.primary:focus-visible {
    background: #26c2ff;
    border-color: #26c2ff;
}

.contact-btn.copied {
    color: #ffffff;
    border-color: rgba(0, 183, 255, 0.6);
}

@media (min-width: 768px) {
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}