@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Zen+Dots&display=swap");

:root {
    --primary-color: #d8cbfa;
    --secondary-color: #cbfad8;
    --tertiary-color: #fad8cb;
    --quaternary-color: #000000;
    --font-primary: 'DM Sans', sans-serif;
    --font-secondary: 'Zen Dots', sans-serif;
    --container-width: 580px
}

*,html {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility
}

::-moz-selection {
    color: var(--secondary-color);
    background: var(--primary-color)
}

::selection {
    color: var(--secondary-color);
    background: var(--primary-color)
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    color: var(--quaternary-color);
    font-weight: 600
}

h1 {
    font-family: var(--font-secondary);
    font-size: 1.2rem;
    font-weight: 800
}

h2 {
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase
}

p {
    font-size: 1rem;
    line-height: 1.6em;
    text-align: justify;
}

a {
    transition: all 0.2s ease-in-out;
    color: var(--quaternary-color);
    text-decoration: none;
    font-weight: 800
}

@media (prefers-color-scheme: dark) {
    a {
        color: black
    }
}

a:hover,a:focus,a:active {
    color: var(--quaternary-color)
}

a.button {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background: rgba(255,255,255,0.6);
    transition: all 0.3s ease;
    transform: translateY(0);
}

@media (prefers-color-scheme: dark) {
    a.button {
        background: rgba(0,0,0,0.1)
    }
}

a.button:hover,a.button:focus,a.button:active {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

@keyframes fade-up {
    0% {
        opacity: 0;
        transform: translateY(10vh) scale(0.9);
        filter: blur(2rem)
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0)
    }
}

@keyframes progress {
    0% {
        transform: translateX(0px);
        opacity: 0
    }

    20% {
        opacity: 1
    }

    80% {
        opacity: 1
    }

    100% {
        transform: translateX(1440px);
        opacity: 0
    }
}

html,body {
    overflow-x: hidden;
    width: 100%;
    position: relative
}

body {
    position: relative
}

body.error main {
    height: 100vh;
    justify-content: center
}

@media (prefers-color-scheme: dark) {
    html,body,main {
        filter: saturate(1) contrast(0.8) invert(1) brightness(1.2) hue-rotate(90deg);
        mix-blend-mode: difference
    }
}

@media screen and (-webkit-min-device-pixel-ratio: 0) and (prefers-color-scheme: dark) {
    body,main,html {
        mix-blend-mode: normal
    }
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 4rem;
    position: relative;
    background: linear-gradient(45deg, var(--primary-color), #fff);
    overflow: hidden;
    transition: background 1s ease-in-out
}

main:before,main:after {
    content: "";
    display: block;
    width: 60vw;
    height: 60vw;
    border-radius: 999px;
    background: var(--secondary-color);
    position: absolute;
    top: var(--before-top, 0);
    left: var(--before-left, -25%);
    z-index: 1;
    filter: blur(100px);
    transform: translateZ(0);
    transition: background 1s ease-in-out, top 1s ease-in-out, left 1s ease-in-out
}

main:after {
    top: auto;
    bottom: var(--after-bottom, 0);
    left: auto;
    right: var(--after-right, -25%);
    background: var(--tertiary-color);
    transition: background 1s ease-in-out, bottom 1s ease-in-out, right 1s ease-in-out
}

article {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: var(--container-width);
    gap: 1rem;
    z-index: 2;
    padding: 1.5rem;
    opacity: 0;
    will-change: transform, opacity;
    animation: fade-up 0.5s ease-out forwards;
    transition: all 0.3s ease-in-out
}

article:nth-child(2) {
    background: rgba(255,255,255,0.4);
    border-radius: 1.5rem;
    box-shadow: 0 0 20rem var(--tertiary-color);
    border: 2px solid transparent
}

article:nth-child(2):hover {
    box-shadow: 0 0 20rem var(--secondary-color)
}

/* Tech Stack Card - NO hover effects */
article:nth-child(3) {
    background: rgba(255,255,255,0.4);
    border-radius: 1.5rem;
    box-shadow: 0 0 20rem var(--tertiary-color);
    border: 2px solid transparent;
}

/* Projects and Timeline sections - NO hover animations on sections */
article:nth-child(4),
article:nth-child(5) {
    background: rgba(255,255,255,0.3);
    border-radius: 1.5rem;
    border: 1px solid rgba(255,255,255,0.2);
}

/* Only project links get hover effects */
article:nth-child(4) table tr td a:hover {
    color: var(--secondary-color);
    text-shadow: 0 0 8px rgba(255,255,255,0.6);
    transform: translateX(3px);
    transition: all 0.2s ease;
}

article header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.5rem
}

article p img {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.5rem;
    display: inline-block;
    vertical-align: text-bottom;
    margin: 0 0.25rem;
    box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.1)
}

@media (prefers-color-scheme: dark) {
    article p img {
        filter: grayscale(0) invert(1) hue-rotate(90deg)
    }
}

article p img.avatar {
    border-radius: 999px
}

table {
    width: 100%;
    border-collapse: collapse
}

table td {
    padding: 1.5rem 0;
    border-bottom: 1px solid white;
    vertical-align: top;
    transition: all 0.2s ease;
}

/* Subtle hover effect for table rows - no background change */
table tr:hover td {
    transform: translateX(2px);
}

@media (prefers-color-scheme: dark) {
    table td {
        border-color: rgba(0,0,0,0.05)
    }
}

table td:first-child {
    width: 8rem;
    font-weight: 800;
    font-size: 0.8rem;
    position: relative;
}

table td:first-child i {
    margin-right: 0.5rem;
    color: var(--secondary-color);
    font-size: 1rem;
}

hr {
    border: 0;
    clear: both;
    display: block;
    text-align: center;
    width: 100%;
    background: rgba(255,255,255,0.4);
    height: 1px;
    overflow: hidden;
    position: relative;
    border-radius: 999px
}

@media (prefers-color-scheme: dark) {
    hr {
        background: rgba(0,0,0,0.05)
    }
}

hr:before {
    animation-duration: 2s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-name: progress;
    background: var(--secondary-color);
    content: "";
    display: block;
    height: 1px;
    position: absolute;
    width: 20%;
    border-radius: 999px
}

@media (prefers-color-scheme: dark) {
    hr:before {
        filter: invert(1)
    }
}

/* Improved responsive design */
@media (max-width: 768px) {
    :root {
        --container-width: 90vw;
    }

    table td:first-child {
        width: 6rem;
        font-size: 0.7rem;
    }

    table td:first-child i {
        font-size: 0.8rem;
    }
}
