:root {
    /* Colors - Bright & Fun Palette */
    --color-bg: #FFFDF5;
    /* Creamy white */
    --color-text: #5D4037;
    /* Warm brown */
    --color-primary: #FFB347;
    /* Pastel Orange */
    --color-secondary: #AED9E0;
    /* Soft Blue */
    --color-accent: #FF6B6B;
    /* Cheerful Red/Pink */
    --color-white: #FFFFFF;
    --color-light-accent: #FFE0B2;
    /* Light Orange for backgrounds */

    /* Fonts */
    --font-heading: 'M PLUS Rounded 1c', sans-serif;
    --font-body: 'M PLUS Rounded 1c', sans-serif;
    /* Unified for a friendly look */

    /* Spacing */
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Transitions */
    --transition-base: 0.3s ease;

    /* Shapes */
    --radius-sm: 12px;
    --radius-md: 24px;
    --radius-lg: 40px;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.8;
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    /* Softer, more organic polka dot pattern */
    background-image: radial-gradient(var(--color-light-accent) 20%, transparent 20%),
        radial-gradient(var(--color-light-accent) 20%, transparent 20%);
    background-position: 0 0, 25px 25px;
    background-size: 50px 50px;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.4;
    color: var(--color-text);
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    /* Organic shape for images */
    border-radius: 2% 2% 2% 2% / 2% 2% 2% 2%;
    transition: border-radius 0.3s ease;
}

img:hover {
    border-radius: 1% 3% 2% 4% / 4% 2% 3% 1%;
}

/* Layout Utilities */
.section {
    padding: var(--spacing-xl) 0;
}

.section__container {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
}

.section__title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: var(--spacing-lg);
    position: relative;
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    color: var(--color-primary);
    text-shadow: 2px 2px 0px var(--color-light-accent);
}

.section__title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 6px;
    background-color: var(--color-accent);
    border-radius: 10px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 253, 245, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    padding: 1rem 0;
    transition: padding 0.3s;
    box-shadow: 0 4px 20px rgba(93, 64, 55, 0.05);
}

.header__container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header__logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-accent);
}

.header__nav {
    display: flex;
    align-items: center;
}

.header__list {
    display: none;
}

@media (min-width: 768px) {
    .header__list {
        display: flex;
        gap: 2rem;
    }
}

.header__item a {
    font-size: 1rem;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.header__item a:hover {
    background-color: var(--color-light-accent);
    color: var(--color-text);
}

.header__toggle {
    display: block;
    width: 30px;
    height: 20px;
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 101;
}

@media (min-width: 768px) {
    .header__toggle {
        display: none;
    }
}

.header__toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--color-primary);
    position: absolute;
    transition: 0.3s;
    border-radius: 3px;
}

.header__toggle span:nth-child(1) {
    top: 0;
}

.header__toggle span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.header__toggle span:nth-child(3) {
    bottom: 0;
}

.header__toggle.active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.header__toggle.active span:nth-child(2) {
    opacity: 0;
}

.header__toggle.active span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--color-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.4s;
    z-index: 99;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu__list {
    text-align: center;
}

.mobile-menu__item {
    margin: 2rem 0;
}

.mobile-menu__item a {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-white);
}

/* Hero */
.hero {
    width: 100%;
    height: auto;
    /* Remove fixed height */
    min-height: auto;
    position: relative;
    padding-top: 80px;
    /* Space for fixed header */
    overflow: hidden;
}

.hero__content {
    position: relative;
    /* Changed from absolute */
    top: auto;
    left: auto;
    transform: none;
    z-index: 2;
    width: 100%;
    text-align: center;
    margin-bottom: 2rem;
    /* Add space between text and image */
}

.hero__title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Center vertically/horizontally depending on dir */
    align-items: center;
    /* Center cross-axis */
    gap: 0.5rem;
    color: var(--color-text);
    text-shadow: 3px 3px 0px rgba(255, 255, 255, 0.9),
        6px 6px 0px rgba(255, 179, 71, 0.2);
    /* Layered shadow for depth */
}

@media (min-width: 768px) {
    .hero__title {
        font-size: 4.5rem;
        flex-direction: row;
        gap: 1.5rem;
    }
}

.hero__title-line {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s forwards;
}

.hero__title-line:nth-child(1) {
    animation-delay: 0.2s;
    color: var(--color-primary);
}

.hero__title-line:nth-child(2) {
    animation-delay: 0.4s;
    color: var(--color-accent);
}

.hero__title-line:nth-child(3) {
    animation-delay: 0.6s;
    color: var(--color-secondary);
}

.hero__subtitle {
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--color-text);
    opacity: 0;
    animation: fadeIn 1s forwards 1s;
    background-color: var(--color-light-accent);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    display: inline-block;
}

.hero__visual {
    position: relative;
    /* Changed from absolute */
    width: 100%;
    max-width: 1000px;
    /* Constrain width */
    margin: 0 auto;
    /* Center */
    height: auto;
    z-index: 1;
    opacity: 1;
    /* Removed opacity to show clear image */
    padding: 0 20px;
    /* Add breathing room on sides */
}

.hero__image {
    width: 100%;
    height: auto;
    /* Maintain aspect ratio */
    display: block;
    object-fit: contain;
    /* Ensure full image is seen */
    animation: none;
    /* Remove zoom animation as it might distort "100% size" intent */
    border-radius: var(--radius-md);
    /* Add rounded corners back */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    /* Add subtle shadow for depth */
}

@keyframes scaleUp {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.1);
    }
}

.hero__scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0;
    animation: fadeIn 1s forwards 1.5s;
    color: var(--color-primary);
}

.hero__scroll span {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    writing-mode: vertical-rl;
}

.hero__scroll::after {
    content: '';
    width: 2px;
    height: 60px;
    background-color: var(--color-primary);
    border-radius: 2px;
}

/* About */
.about__content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

@media (min-width: 768px) {
    .about__content {
        flex-direction: row;
        align-items: center;
        gap: 4rem;
    }
}

.about__profile {
    flex: 1;
}

.about__image-placeholder {
    width: 100%;
    height: 300px;
    background-color: var(--color-secondary);
    margin-bottom: 2rem;
    border-radius: var(--radius-md);
    border: 4px solid var(--color-white);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.about__name {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--color-accent);
}

.about__name-en {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--color-primary);
    margin-left: 1rem;
}

.about__text {
    margin-bottom: 1.5rem;
    text-align: justify;
    font-weight: 500;
}

.about__skills {
    flex: 1;
    background-color: var(--color-white);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(255, 179, 71, 0.15);
    border: 2px solid var(--color-light-accent);
}

.about__sub-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-primary);
    border-bottom: 2px dashed var(--color-secondary);
    padding-bottom: 0.5rem;
    text-align: center;
}

.about__skill-list li {
    margin-bottom: 1rem;
    padding-left: 2rem;
    position: relative;
    font-weight: 700;
    color: var(--color-text);
}

.about__skill-list li::before {
    content: '★';
    color: var(--color-primary);
    position: absolute;
    left: 0;
    font-size: 1.2rem;
    line-height: 1;
}

/* Works */
.works__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .works__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.work-card {
    background-color: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
}

.work-card:hover {
    transform: translateY(-10px) rotate(1deg);
    box-shadow: 0 15px 40px rgba(255, 179, 71, 0.25);
    border-color: var(--color-primary);
}

.work-card__image {
    width: 100%;
    height: 250px;
    background-color: var(--color-light-accent);
}

.work-card__info {
    padding: 2rem;
    text-align: center;
}

.work-card__title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.work-card__cat {
    font-size: 0.9rem;
    color: var(--color-accent);
    font-weight: 700;
    background-color: #FFF0F0;
    padding: 0.2rem 1rem;
    border-radius: 20px;
    display: inline-block;
}

/* Contact */
.contact {
    text-align: center;
    background-color: var(--color-light-accent);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 150px;
    height: 150px;
    background-color: var(--color-primary);
    border-radius: 50%;
    opacity: 0.2;
}

.contact::after {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background-color: var(--color-secondary);
    border-radius: 50%;
    opacity: 0.2;
}

.contact__text {
    margin-bottom: 3rem;
    font-weight: 500;
}

.btn {
    display: inline-block;
    padding: 1.2rem 4rem;
    background-color: var(--color-accent);
    color: var(--color-white);
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.btn:hover {
    background-color: #FF8E8E;
    transform: scale(1.1) rotate(-3deg);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.5);
}

.contact__social {
    margin-top: 4rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.contact__icon {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 2px;
}

.contact__icon:hover {
    color: var(--color-primary);
}

/* Footer */
.footer {
    padding: 2rem 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-white);
    background-color: var(--color-primary);
    font-weight: 700;
}

/* Animations */
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
}