@import url('https://fonts.googleapis.com/css2?family=Preahvihear&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Preahvihear&display=swap');

.preahvihear-regular {
    font-family: "Preahvihear", sans-serif;
    font-weight: 400;
    font-style: normal;
}

:root {
    --primary-color: #FFFFFF;
    --text-color: #EAEAEA;
    --link-color: #BBBBBB;
    --bg-color: #000000;
    --bg-secondary: #0A0A0A;
    --bg-fallback: #050505;
    --bg-gradient: linear-gradient(145deg, #000000 0%, #111111 100%);
    --nav-color: #000000;
    --border-color: #333333;
    --font-main: "Preahvihear", sans-serif;
    --max-width: 1200px;
}

body[data-theme="light"] {
    --primary-color: #000000;
    --text-color: #111111;
    --link-color: #444444;
    --bg-color: #FFFFFF;
    --bg-secondary: #F5F5F5;
    --bg-fallback: #FAFAFA;
    --nav-color: #FFFFFF;
    --bg-gradient: linear-gradient(145deg, #FFFFFF 0%, #F9F9F9 100%);
    --border-color: #DDDDDD;
}

body[data-theme="light"] header,
body[data-theme="light"] nav {
    background-color: var(--nav-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body[data-theme="light"] article {
    background-color: var(--bg-color);
    border-color: var(--border-color);
}

body[data-theme="light"] blockquote {
    background-color: var(--bg-secondary);
    border-left-color: var(--primary-color);
}

.theme-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
}

body[data-theme="light"] .section-contact {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
}

body[data-theme="light"] .section-contact input,
body[data-theme="light"] .section-contact textarea {
    background: var(--bg-secondary);
    color: var(--text-color);
    border-color: var(--border-color);
}

body[data-theme="light"] .section-contact input:focus,
body[data-theme="light"] .section-contact textarea:focus {
    background: var(--bg-color);
    border-color: var(--primary-color);
}

body[data-theme="light"] .section-contact button {
    background: var(--primary-color);
    color: var(--bg-color);
}

body[data-theme="light"] .section-contact button:hover {
    background: var(--text-color);
    border-color: var(--primary-color);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--text-color);
}

ul {
    list-style: none;
    color: var(--text-color);
}

img {
    max-width: 100%;
    display: block;
}

header {
    background-color: var(--nav-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    max-width: var(--max-width);
    background-color: var(--nav-color);
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul {
    display: flex;
    gap: 2rem;
}

.logo img {
    mix-blend-mode: difference;
    filter: grayscale(1) invert(1) contrast(10);
}

nav a {
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

nav a:hover {
    color: var(--primary-color);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.section-intro {
    max-width: var(--max-width);
    margin: 4rem auto;
    padding: 2rem 2rem;
    text-align: left;
}

.section-intro-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 40px;
    margin-bottom: 20px;
    gap: 3rem;
    background-image: var(--bg-gradient);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    background-position: left;
    background-repeat: no-repeat;
}

.icon-personal {
    padding: 50px;
    margin-right: 20px;
}

.myname h1 {
    font-size: 50px;
    font-weight: 400;
    color: var(--text-color);
    margin-bottom: 10px;
}

.section-intro-descript {
    color: #6b7280;
    font-size: 1.1rem;
}

.section-intro-info {
    text-align: left;
    font-weight: 400;
    margin-bottom: 40px;
}

.section-intro-info h1 {
    font-size: 50px;
    font-weight: 400;
    color: var(--primary-color);
}

.intro-info-link {
    width: 100%;
    max-width: 750px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.linkedIn {
    color: var(--link-color);
}

.section-intro-description {
    margin: 0;
    width: 100%;
    max-width: 740px;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.section-education {
    max-width: var(--max-width);
    margin: 4rem auto;
    padding: 20px 2rem;
    text-align: left;
}

.section-education h3 {
    font-size: 40px;
    font-weight: 400;
}

.section-projects {
    max-width: var(--max-width);
    margin: 4rem auto;
    padding: 2rem;
    text-align: left;
    background-image: var(--bg-gradient);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    background-repeat: no-repeat;
    background-size: cover;
}

.section-projects h3 {
    font-size: 40px;
    margin-bottom: 1.5rem;
}

.section-projects ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.section-projects ul li {
    padding: 1rem;
    font-weight: 500;
    background-color: var(--bg-fallback);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: default;
}

.section-projects ul li:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    border-color: var(--primary-color);
}

.section-projects ul hr {
    display: none;
}

.section-article {
    max-width: var(--max-width);
    margin: 4rem auto;
    padding: 0 2rem;
    text-align: left;
}

.section-article h3 {
    font-size: 40px;
    font-weight: 400;
}

article {
    margin-top: 20px;
    border: 1px solid var(--border-color);
    border-radius: 15px;
    background-color: var(--bg-fallback);
    background-image: var(--bg-gradient);
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 20px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

article:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
}

.article-title {
    padding: 0;
}

article img {
    width: 80px;
    height: 80px;
}

article h4 {
    font-size: 30px;
    font-family: "Poppins", sans-serif;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

article p {
    color: var(--primary-color);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    font-family: "Poppins", sans-serif;
}

article a {
    color: var(--bg-color);
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    background-color: var(--primary-color);
    border-radius: 12px;
    padding: 5px 10px;
    font-family: "Poppins", sans-serif;
    font-weight: 400;
}

article a:hover {
    text-decoration: none;
    color: var(--primary-color);
    background-color: transparent;
    border: 1px solid var(--primary-color);
}


.reviews {
    max-width: var(--max-width);
    margin: 4rem auto;
    padding: 0 2rem;
}

.reviews-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.section-feedback-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

blockquote {
    background-blend-mode: var(--bg-color);
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-radius: 0 8px 8px 0;
    transition: all 0.3s ease;
}

blockquote:hover {
    transform: translateX(10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    background-color: var(--bg-fallback);
}

blockquote footer {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-color);
    font-style: italic;
}

.section-footer {
    background-color: var(--nav-color);
    color: var(--text-color);
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    gap: 2rem;
    font-family: "Poppins", sans-serif;
}

.section-contact {
    max-width: 700px;
    margin: 4rem auto;
    padding: 2.5rem;
    border-radius: 20px;
    background: var(--bg-secondary);
    background-image: var(--bg-gradient);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.section-contact h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 500;
}

.section-contact form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.section-contact label {
    font-size: 1rem;
    margin-bottom: 6px;
    display: block;
    opacity: 0.9;
}


.section-contact input,
.section-contact textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: transparent;
    color: var(--text-color);
    font-size: 1rem;
    outline: none;
    transition: 0.2s;
}

.section-contact button {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--bg-color);
    background: var(--primary-color);
    transition: 0.2s;
}

.section-contact button:hover {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .section-intro-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding: 20px;
    }

    .icon-personal {
        padding: 20px;
        margin: 0 auto;
    }

    .myname h1,
    .section-intro-info h1 {
        font-size: 2.2rem;
    }

    .section-intro-info,
    .section-intro-description {
        text-align: center;
    }

    .intro-info-link {
        justify-content: center;
    }

    .section-education,
    .section-projects,
    .reviews,
    .section-article {
        text-align: center;
        padding: 1.5rem 1rem;
    }

    article {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .section-contact {
        padding: 1.5rem;
        margin: 2rem 1rem;
    }
}

.section-contact-link {
    margin-top: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
}

.section-contact-link img {
    display: flex;
    flex-direction: row;
    width: 30px;
    height: 30px;
    transition: transform 0.3s ease;
}

.section-contact-link img:hover {
    transform: scale(1.2) rotate(5deg);
}

/* Smart Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.animate-on-scroll.in-view {
    opacity: 1;
    transform: translateY(0);
}