@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');
@import url("https://fonts.googleapis.com/css2?family=Montserrat&display=swap");

/* Define CSS Variables for Light and Dark Mode */
:root {
    --light-bg-color: #FAFAFA;
    --light-text-color: #000;
    --light-quote-bg-color: rgba(82, 134, 223, 0.15);
    --light-quote-border-color: #5286df;
    --light-scrollbar-track-color: #eeeeee;
    --light-scrollbar-thumb-color: #cccccc;
    --light-overlay-color: #f5f5f5;

    --dark-bg-color: #0e1111;
    --dark-text-color: #fff;
    --dark-quote-bg-color: rgba(82, 134, 223, 0.15);
    --dark-quote-border-color: #5286df;
    --dark-scrollbar-track-color: #0e1111;
    --dark-scrollbar-thumb-color: #121617;
    --dark-overlay-color: #121617;
}

/* General Styles */
body {
    margin-top: 55px;
    font-family: 'Inter', sans-serif;
    line-height: 1.5; 
    letter-spacing: 0.15px; 
    background-color: var(--light-bg-color);
    color: var(--light-text-color);
}

h1, h2, h3 {
    display: inline;
    margin-left: -20px;
}

h1 {
    font-size: 46px;
    margin-left: -45px;
}

h2 {
    font-size: 20px;
}

h3 {
    margin-left: -35px;
    font-size: 16px;
    margin-bottom: 0;
}

h1::before, h2::before, h3::before {
    opacity: 0;
    transition: opacity 0.3s ease;
    margin-right: 5px;
}

h1::before { content: "# "; }
h2::before { content: "## "; }
h3::before { content: "### "; }

h1:hover::before, h2:hover::before, h3:hover::before {
    opacity: 0.2;
}

p, li {
    margin-bottom: 10px;
}

li::marker {
    color: rgba(0, 0, 0, 0.6);
}

#cursor {
  display: inline-block;
  width: 10px;
  animation: blink 1s step-end infinite;
  color: var(--dark-quote-border-color);
}

#tags {
    list-style-type: none;
    padding: 0;
}
#tags li {
    display: inline-flex;
    margin-right: 10px; 
    font-size: 12px;
    width: auto; 
    background-color: #f1f1f1;
    color: var(--light-quote-border-color);
    border-radius: 5px;
    padding: 5px 10px;
}

.gradient, .gradient-null {
    position: relative;
    display: inline-block;
    background: linear-gradient(45deg, #00c6ff, #5286df, #146ebd);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientAnimation 4s ease infinite;
    font-weight: bold;
}

a.gradient::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 4px;
    width: 100%;
    height: 1px;
    background: linear-gradient(45deg, #00c6ff, #5286df, #146ebd);
    background-size: 200% 200%;
    animation: gradientAnimation 4s ease infinite;
}

a.sublink {
    font-weight: normal;
}

.gradient a {
    text-decoration: underline; 
}

a:visited, #mail, a {
    color: #5286df;
}

a:not(#back):not(#connect) {
    position: relative;
    width: min-content;
    white-space: nowrap;
}

a:not(#back):not(#connect)::before {  
    content: " ";
    display: block;
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: hsl(200, 100%, 80%);
    z-index: -1;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}

a:not(#back):not(#connect):hover::before {
    transform: scaleX(1);
    transform-origin: bottom left;
}

#back {
    color: #636b7987;
    letter-spacing: inherit; 
    text-decoration: none;
}

hr {
    margin-top: 15px;
    height: 1px;
    background-color: var(--light-scrollbar-track-color); 
    border: none; 
}

img {
    width: 100%;
}

#me {
    border-radius: 50%;
    width: 200px;
    aspect-ratio: 1 / 1;
}

#contacts {
    display: inline-block;
    margin-left: 50px;
    transform: translateY(-110px);
}

#contact-list {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    list-style-type: none;
}

#contact {
    flex: 0 0 50%;
    box-sizing: border-box;
    padding: 5px;
}

footer {
    height: 10vh;
}

#sub-head {
    font-size: 12px;
    color: #636b79;
}

#time {
    display: inline-block;
    padding-left: 5px;
    font-size: 10px;
}

.quote {
    border-left: 4px solid var(--light-quote-border-color);
    padding-left: 10px;
    margin-left: 0;
    margin-top: 0;
    background-color: var(--light-quote-bg-color);
    border-radius: 5px;
    padding: 8px;
}

video {
    filter: brightness(0) invert(0) blur(0.7px);
    opacity: 0.8;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    animation: slideIn 0.54s ease-in forwards 2.5s, slideIn2 0.36s ease-in forwards 4s;
}

.fade-out {
    transition: opacity 1s ease-out;
    opacity: 0;
}

.no-overflow {
    overflow: hidden;
}

/* Wrapper Styles */
#wrapper {
    margin: auto;
    width: 600px;
    position: relative;
}

#resume-wrapper {
    margin: auto;
    width: 600px;
    height: 100vh;
}

#pdf-embed {
    width: 100%;
    height: 102.35%;
}

/* Connect Me Button Container */
.connect-with-me {
    position: fixed;
    bottom: 25px;
    right: 25px;
    display: flex;
    flex-direction: column;
    gap: 12.5px;
    visibility: hidden;
    opacity: 0;
    transition: opacity 2s ease-out, visibility 2s ease-out;
    align-items: flex-end;
    width: auto;
}

.connect-button {
    background-color: var(--light-scrollbar-track-color);
    color: var(--light-text-color);
    border: none;
    padding-top: 12.5px;
    padding-bottom: 12.5px;
    padding-right: 22px;
    border-radius: 6.25px;
    cursor: pointer;
    font-size: 20px;
    transition: width 1s ease, margin-left 1s ease;
    text-align: right;
    width: 62.5px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.connect-button:hover {
    margin-left: -62.5px;
    text-align: right;
}

.connect-button.a:hover {
    width: 160px;
}

.connect-button.b:hover {
    width: 157px;
}

.connect-button.c:hover {
    width: 120px;
}

.status {
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.5s ease;
    white-space: nowrap;
    overflow: hidden;
}

.status:hover {
    position: relative;
    display: inline-block;
    background: linear-gradient(45deg, #00c6ff, #5286df, #146ebd);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientAnimation 4s ease infinite;
}

.connect-button:hover .status {
    visibility: visible;
    padding-left: 10px;
    opacity: 1;
    transition-delay: 0.5s;
}

.connect-button:nth-child(2) {
    background-color: #333;
}

#source {
    display: block;
    font-size: 24px;
}
/* Animations */
@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

/* Support me link */
.support {
	position: absolute;
	right: 20px;
	bottom: 20px;
}

.support a {
  color: #292c35;
  font-size: 32px;
  backface-visibility: hidden;
  display: inline-block;
  transition: transform 0.2s ease;
}

.support a:hover {
  transform: scale(1.1);
}

/* Overlay Styles */
.swup-transition-overlay {
    background-color: var(--light-overlay-color);
    transition: background-color 0.25s;
}

/* Devlog Styles */
.devlog {
    background-color: #ffffff80;
    list-style-type: none;
    padding: 20px;
    border-radius: 20px;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 12px;
}

/* Media Queries */
@media (max-width: 600px) {
    #wrapper {
        margin: auto;
        width: 90%;
    }
}

/* Hidden checkbox for dark mode toggle */
.checkbox {
  opacity: 0;
  left: 100px;
  position: absolute;
}

/* Header wrapper flex */
.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Checkbox label styles */
.checkbox-label {
  background-color: var(--light-quote-bg-color);
  width: 50px;
  height: 26px;
  border-radius: 50px;
  position: relative;
  padding: 5px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bi-moon { color: #f1c40f; padding-bottom: 4px }
.bi-brightness-high-fill { color: #f39c12; padding-bottom: 4px }


.checkbox-label .ball {
  background-color: #fafafa;
  width: 30px;
  height: 30px;
  position: absolute;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  transition: transform 0.2s linear;
}

.checkbox:checked + .checkbox-label .ball {
  transform: translateX(24px);
}

/* Dark Mode Styles */
body.dark {
    background-color: var(--dark-bg-color);
    color: var(--dark-text-color);
}

/* Scrollbar dark styles */
body.dark ::-webkit-scrollbar-track {
    background: var(--dark-scrollbar-track-color);
}

body.dark ::-webkit-scrollbar-thumb {
    background-color: var(--dark-scrollbar-thumb-color);
    border-radius: 10px;
    border: 3px solid var(--dark-scrollbar-track-color);
}

/* Video filter */
body.dark video {
    filter: brightness(0) invert(1) blur(0.7px);
    opacity: 1;
}

body.dark #tags li {
    background-color: var(--dark-scrollbar-thumb-color);
}

/* Text color */
body.dark h1, 
body.dark h2, 
body.dark h3, 
body.dark p, 
body.dark li, 
body.dark #back, 
body.dark #time {
    color: var(--dark-text-color);
}

/* List marker */
body.dark li::marker {
    color: rgba(255, 255, 255, 0.6);
}

body.dark #sub-head {
    color: #9d9696;
}

body.dark hr {
    background-color: var(--dark-scrollbar-thumb-color);
}

body.dark .connect-button {
    background-color: var(--dark-scrollbar-thumb-color);
    color: var(--dark-text-color);
}

body.dark .swup-transition-overlay {
    background-color: var(--dark-overlay-color);
}

body.dark .devlog {
    background-color: #131616;
}

body.dark .checkbox-label .ball {
    background-color: #131616;
}


/* Remove duplicate gradientAnimation keyframes from anywhere else */

#overlay {
    position: absolute; 
    width: 50%; height: 50%; 
    background-color: red; 
    z-index: 1;
}

#blur-overlay {
    position: absolute; 
    width: 100%; height: 100%; 
    inset: 0; 
    z-index: 1;
    backdrop-filter: blur(10px);
}


/* Fade in animation for connect-with-me container */
@keyframes fadeIn {
    to {
        opacity: 1;
        visibility: visible;
    }
}


body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

body * {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}