@font-face {
    font-family: '00293';
    src: url('fonts/00293\ Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Moonhouse';
    src: url('fonts/Moonhouse.ttf') format('truetype');
}

@font-face {
    font-family: 'IBMPlexMono';
    src: url('fonts/IBMPlexMono-Medium.ttf') format('truetype');
}

@font-face {
    font-family: 'FiraCode';
    src: url('fonts/FiraCode-VariableFont_wght.ttf') format('truetype');
}

:root {
    --main-bg-color: #090909;
    --main-text-color: #ffffff;
    --main-surface-color: #f5deb3;
    --accent-glow: rgba(245, 222, 179, 0.4);
    --gradient-start: #f5deb3;
    --gradient-end: #d4a574;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background-color: var(--main-bg-color);
    color: var(--main-text-color);
    font-family: 'IBMPlexMono';
    font-size: x-large;
    overflow-x: hidden;
}

/* Animated background grid */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(245, 222, 179, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(245, 222, 179, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
}

h1 {
    font-size: 100px;
    letter-spacing: 10px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 60px var(--accent-glow);
    position: relative;
}

h1::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    z-index: -1;
    filter: blur(30px);
    opacity: 0.5;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

a {
    color: var(--main-surface-color);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

a:hover {
    text-shadow: 0 0 20px var(--accent-glow);
}

article {
    border: 1px solid rgba(245, 222, 179, 0.3);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    color: var(--main-text-color);
    width: 90vw;
    max-width: 900px;
    background: linear-gradient(135deg, rgba(245, 222, 179, 0.05), rgba(245, 222, 179, 0.02));
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

article::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(245, 222, 179, 0.1), transparent);
    transition: left 0.6s ease;
}

article:hover::before {
    left: 100%;
}

article:hover {
    border-color: var(--main-surface-color);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(245, 222, 179, 0.15), 0 0 40px rgba(245, 222, 179, 0.1);
}

article h2 {
    border-radius: 6px;
    padding: 12px 24px;
    color: #090909;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    margin: -24px -24px 20px -24px;
    font-size: 1.3em;
}

article p {
    line-height: 1.7;
    opacity: 0.9;
}

.home-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 100px 16px 50px;
    box-sizing: border-box;
    position: relative;
}

.home-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    max-width: 90%;
    height: 600px;
    background: radial-gradient(circle, rgba(245, 222, 179, 0.08) 0%, transparent 70%);
    pointer-events: none;
    animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

.articles {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
}

.home-section h1 {
    text-align: center;
    word-break: break-word;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.home-section h2 {
    margin-top: 40px;
    font-size: 32px;
    text-align: center;
    word-break: break-word;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.home-section h2:hover {
    letter-spacing: 3px;
    text-shadow: 0 0 30px var(--accent-glow);
}

.home-section .taglines {
    font-family: 'FiraCode';
    margin-top: 40px;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    max-width: 800px;
}

.home-section .taglines li {
    letter-spacing: 3px;
    padding: 10px 20px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: #090909;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease-out calc(0.4s + var(--i, 0) * 0.1s) both;
    box-shadow: 0 4px 15px rgba(245, 222, 179, 0.2);
}

.home-section .taglines li:nth-child(1) { --i: 0; }
.home-section .taglines li:nth-child(2) { --i: 1; }
.home-section .taglines li:nth-child(3) { --i: 2; }
.home-section .taglines li:nth-child(4) { --i: 3; }

.home-section .taglines li:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 25px rgba(245, 222, 179, 0.4);
}

.encrypt-anim-active {
    filter: blur(0px);
    text-shadow: 0 0 20px var(--accent-glow);
}

.scroll-down {
    margin-top: 60px;
    font-size: 2em;
    opacity: 0.6;
    color: var(--main-surface-color);
}

@keyframes grow-shrink {
    0% {
        transform: scale(1) translateY(0);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.1) translateY(10px);
        opacity: 1;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 0.6;
    }
}

.grow-shrink-anim {
    animation: grow-shrink 2s ease-in-out infinite;
}

.social-icons {
    margin-top: 50px;
    display: flex;
    flex-direction: row;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
    animation: fadeInUp 1s ease-out 0.8s both;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(245, 222, 179, 0.1);
    border: 1px solid rgba(245, 222, 179, 0.2);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.social-icons a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--main-surface-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
}

.social-icons a:hover::before {
    width: 100%;
    height: 100%;
}

.social-icons img {
    filter: invert(100%);
    width: 28px;
    height: 28px;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 15px 40px rgba(245, 222, 179, 0.3);
    border-color: var(--main-surface-color);
}

.social-icons a:hover img {
    filter: invert(0%);
}

.about-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(245, 222, 179, 0.2);
}

.about-figure {
    width: 45vw;
    max-width: 500px;
}

.about-img:hover {
    transform: scale(1.03) rotate(1deg);
    box-shadow: 0 20px 60px rgba(245, 222, 179, 0.2);
    border-color: var(--main-surface-color);
}

.text-img {
    margin: 0 auto;
    max-width: 1400px;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
}

.text-img p {
    flex: 1;
    line-height: 1.8;
    font-size: 1.1em;
    opacity: 0.9;
}

.text-img img {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

/* Section styling */
section {
    padding: 100px 20px;
    position: relative;
}

section > h1 {
    text-align: center;
    margin-bottom: 60px;
}

.about-section {
    background: linear-gradient(180deg, transparent 0%, rgba(245, 222, 179, 0.02) 50%, transparent 100%);
}

.articles-section,
.projects-section {
    padding-bottom: 120px;
}

.about-section p br {
    margin-bottom: 40px;
}

.encrypt-anim {
    text-wrap: wrap;
    display: inline-block;
    min-width: fit-content;
    font-variant-numeric: tabular-nums;
}

.donation-banner {
    background: linear-gradient(135deg, #5f0c0c, #8b1a1a);
    text-align: center;
    padding: 16px 20px;
    font-size: large;
    position: sticky;
    margin-top: 100px;
    border-top: 1px solid rgba(245, 222, 179, 0.3);
}

.donation-banner a {
    font-weight: bold;
    text-decoration: underline;
}

@media (max-width: 1200px) {
    .text-img {
        flex-direction: column;
        gap: 40px;
        padding: 0 20px;
    }

    .text-img .img {
        justify-content: center;
    }

    .about-figure {
        width: 100%;
        max-width: 600px;
    }
}

@media (max-width: 900px) {
    h1 {
        font-size: 70px;
    }
    
    article {
        width: 95vw;
    }
}

@media (max-width: 600px) {
    .social-icons {
        gap: 15px;
    }

    .social-icons a {
        width: 50px;
        height: 50px;
    }
    
    .social-icons img {
        width: 22px;
        height: 22px;
    }

    .home-section {
        min-height: auto;
        padding: 120px 16px 60px;
    }

    h1 {
        font-size: 50px;
        letter-spacing: 5px;
    }

    .home-section h2 {
        font-size: 24px;
        margin-top: 24px;
    }

    .home-section .taglines {
        flex-direction: column;
        align-items: center;
        margin-top: 30px;
        gap: 10px;
    }

    .home-section .taglines li {
        font-size: 12px;
        letter-spacing: 2px;
        padding: 8px 16px;
    }
    
    section {
        padding: 60px 16px;
    }
    
    section > h1 {
        margin-bottom: 40px;
    }
    
    .text-img p {
        font-size: 1em;
    }
    
    article h2 {
        font-size: 1.1em;
        padding: 10px 16px;
        margin: -24px -24px 16px -24px;
    }
}

/* Smooth scrolling offset for fixed nav */
#home, #about, #articles, #projects {
    scroll-margin-top: 80px;
}

/* Fade-in animation for scroll */
.fade-in-element {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Cursor glow effect */
.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(245, 222, 179, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: -1;
    transition: opacity 0.3s ease;
}

/* Text selection styling */
::selection {
    background: var(--main-surface-color);
    color: var(--main-bg-color);
}

::-moz-selection {
    background: var(--main-surface-color);
    color: var(--main-bg-color);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--main-bg-color);
}

::-webkit-scrollbar-thumb {
    background: rgba(245, 222, 179, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--main-surface-color);
}

/* Loading animation for page */
@keyframes pageLoad {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

body {
    animation: pageLoad 0.5s ease-out;
}