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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Poppins", sans-serif;
    background: #08090d;
    color: #f5f5f5;
    line-height: 1.6;
    overflow-x: hidden;
}


/* 
   VARIABLES
*/

:root {
    --bg-dark: #08090d;
    --bg-section: #0d0f15;
    --card-bg: rgba(18, 20, 28, 0.85);

    --text-white: #f5f5f5;
    --text-gray: #a6a8b0;

    --red: #c1121f;
    --red-light: #e63946;
    --red-dark: #7f0d16;

    --border: rgba(255, 255, 255, 0.1);

    --transition: 0.3s ease;
}


/* 
   GENERAL
*/

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

.section {
    padding: 100px 8%;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title p {
    color: var(--red-light);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.section-title h2 {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: 1px;
}


/*
   NAVIGATION
 */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;

    background: rgba(8, 9, 13, 0.8);
    backdrop-filter: blur(12px);

    border-bottom: 1px solid var(--border);
}

.navbar {
    width: 100%;
    max-width: 1400px;
    margin: auto;

    padding: 20px 8%;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 2px;
}

.logo span {
    color: var(--red-light);
}

.nav-links {
    display: flex;
    gap: 35px;
}

.nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-gray);

    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--red-light);
}


/*
   HERO 
 */

.hero {
    min-height: 100vh;

    display: flex;
    align-items: center;

    padding: 120px 8% 80px;

    position: relative;

    background:
        linear-gradient(
            90deg,
            rgba(8, 9, 13, 0.98) 0%,
            rgba(8, 9, 13, 0.85) 45%,
            rgba(8, 9, 13, 0.55) 100%
        ),
        url("sakurabg.jpg");

    background-size: cover;
    background-position: center;
}


/*  overlay */

.hero::before {
    content: "";

    position: absolute;
    inset: 0;

    background:
        radial-gradient(
            circle at 75% 30%,
            rgba(193, 18, 31, 0.15),
            transparent 35%
        );

    pointer-events: none;
}


.hero-content {
    max-width: 700px;
    position: relative;
    z-index: 2;
}

.hero-subtitle {
    color: var(--red-light);

    font-size: 16px;
    font-weight: 600;

    text-transform: uppercase;
    letter-spacing: 5px;

    margin-bottom: 15px;
}

.hero h1 {
    font-size: clamp(60px, 10vw, 120px);

    line-height: 0.95;

    font-weight: 700;

    letter-spacing: -4px;

    margin-bottom: 15px;
}

.hero h2 {
    font-size: clamp(24px, 4vw, 42px);

    font-weight: 500;

    color: #d5d5d5;

    margin-bottom: 25px;
}

.hero-description {
    max-width: 600px;

    color: var(--text-gray);

    font-size: 16px;

    margin-bottom: 35px;
}


/* 
   BUTTONS */

.hero-buttons {
    display: flex;
    gap: 15px;

    flex-wrap: wrap;
}

.btn {
    display: inline-block;

    padding: 13px 28px;

    border-radius: 4px;

    font-size: 14px;
    font-weight: 600;

    transition: var(--transition);
}

.primary-btn {
    background: var(--red);

    color: white;

    border: 1px solid var(--red);
}

.primary-btn:hover {
    background: var(--red-light);

    transform: translateY(-3px);

    box-shadow:
        0 10px 30px rgba(193, 18, 31, 0.3);
}

.secondary-btn {
    border: 1px solid rgba(255, 255, 255, 0.25);

    color: white;
}

.secondary-btn:hover {
    border-color: var(--red-light);

    color: var(--red-light);

    transform: translateY(-3px);
}


/*
       ABOUT SECTION */

.about {
    background: var(--bg-section);
}

.about-container {
    max-width: 1200px;

    margin: auto;

    display: grid;

    grid-template-columns: 0.8fr 1.2fr;

    gap: 70px;

    align-items: center;
}

.about-image {
    position: relative;
}

.about-image::before {
    content: "";

    position: absolute;

    top: -15px;
    left: -15px;

    width: 100%;
    height: 100%;

    border: 1px solid var(--red);

    z-index: 0;
}

.about-image img {
    position: relative;

    z-index: 1;

    aspect-ratio: 1 / 1;

    object-fit: cover;

    filter: grayscale(20%);

    border-radius: 4px;
}

.about-content h3 {
    font-size: 30px;

    margin-bottom: 20px;
}

.about-content p {
    color: var(--text-gray);

    margin-bottom: 20px;

    font-size: 15px;
}


/*
         SKILLS SECTION */

.skills-container {
    max-width: 1200px;

    margin: auto;

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 20px;
}

.skill-card {
    background: var(--card-bg);

    border: 1px solid var(--border);

    padding: 35px 30px;

    border-radius: 5px;

    transition: var(--transition);

    position: relative;

    overflow: hidden;
}

.skill-card::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;

    width: 3px;
    height: 0;

    background: var(--red-light);

    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-8px);

    border-color: rgba(230, 57, 70, 0.4);
}

.skill-card:hover::before {
    height: 100%;
}

.skill-card h3 {
    font-size: 21px;

    margin-bottom: 10px;
}

.skill-card p {
    color: var(--text-gray);

    font-size: 14px;
}


/* 
   PROJECTS SECTION */

.projects {
    background: var(--bg-section);
}

.projects-container {
    max-width: 1200px;

    margin: auto;

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 25px;
}

.project-card {
    background: var(--card-bg);

    border: 1px solid var(--border);

    overflow: hidden;

    border-radius: 5px;

    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-8px);

    border-color: rgba(230, 57, 70, 0.5);
}

.project-image {
    height: 220px;

    overflow: hidden;
}

.project-image img {
    height: 100%;

    object-fit: cover;

    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.08);
}

.project-content {
    padding: 25px;
}

.project-category {
    color: var(--red-light);

    font-size: 11px;

    text-transform: uppercase;

    letter-spacing: 2px;

    font-weight: 600;
}

.project-content h3 {
    font-size: 22px;

    margin: 10px 0;
}

.project-content p {
    color: var(--text-gray);

    font-size: 14px;

    margin-bottom: 20px;
}

.project-link {
    color: white;

    font-size: 14px;

    font-weight: 600;

    transition: var(--transition);
}

.project-link:hover {
    color: var(--red-light);
}


/*
   CONTACT SECTION  */

.contact-container {
    max-width: 1000px;

    margin: auto;

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 60px;

    align-items: center;
}

.contact-content h3 {
    font-size: 32px;

    margin-bottom: 15px;
}

.contact-content p {
    color: var(--text-gray);

    max-width: 450px;
}

.contact-info {
    display: flex;

    flex-direction: column;

    gap: 20px;
}

.contact-item {
    padding: 20px;

    border: 1px solid var(--border);

    background: var(--card-bg);

    border-radius: 4px;

    transition: var(--transition);
}

.contact-item:hover {
    border-color: var(--red-light);

    transform: translateX(5px);
}

.contact-item h4 {
    color: var(--red-light);

    font-size: 13px;

    text-transform: uppercase;

    letter-spacing: 2px;

    margin-bottom: 5px;
}

.contact-item a {
    color: var(--text-gray);

    font-size: 14px;

    transition: var(--transition);
}

.contact-item a:hover {
    color: white;
}


.footer {
    padding: 30px 8%;

    background: #050609;

    border-top: 1px solid var(--border);

    text-align: center;

    color: #777;

    font-size: 12px;
}

.footer p:first-child {
    margin-bottom: 5px;
}




/* =========================================
   THEME TOGGLE
========================================= */

.theme-toggle {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--card-bg);
    color: var(--text-white);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition);
}

.theme-toggle:hover {
    border-color: var(--red-light);
    color: var(--red-light);
    transform: translateY(-2px);
}

/* Light theme. Dark mode remains the default. */
body.light-mode {
    --bg-dark: #f5f2ee;
    --bg-section: #ebe7e2;
    --card-bg: rgba(255, 255, 255, 0.82);
    --text-white: #17171a;
    --text-gray: #5d6068;
    --border: rgba(20, 20, 20, 0.12);
}

body.light-mode {
    background: var(--bg-dark);
    color: var(--text-white);
}

body.light-mode .header {
    background: rgba(245, 242, 238, 0.82);
}

body.light-mode .hero {
    background:
        linear-gradient(
            90deg,
            rgba(245, 242, 238, 0.96) 0%,
            rgba(245, 242, 238, 0.82) 45%,
            rgba(245, 242, 238, 0.55) 100%
        ),
        url("sakurabg.jpg");
}

body.light-mode .hero h2 {
    color: #30323a;
}

body.light-mode .secondary-btn {
    border-color: rgba(20, 20, 20, 0.22);
    color: var(--text-white);
}

body.light-mode .secondary-btn:hover {
    border-color: var(--red-light);
}

body.light-mode .footer {
    background: #ded9d3;
    color: #65666b;
}


/*
   RESPONSIVE DESIGN
*/

@media (max-width: 900px) {

    .nav-links {
        gap: 18px;
    }

    .about-container {
        grid-template-columns: 1fr;

        gap: 50px;
    }

    .about-image {
        max-width: 500px;

        margin: auto;
    }

    .skills-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 650px) {

    .navbar {
        padding: 18px 5%;
    }

    .logo {
        font-size: 22px;
    }

    .nav-links {
        gap: 12px;
    }

    .nav-links a {
        font-size: 11px;
    }

    .hero {
        padding: 120px 6% 70px;

        background-position: 65% center;
    }

    .hero h1 {
        letter-spacing: -2px;
    }

    .hero-description {
        font-size: 14px;
    }

    .section {
        padding: 80px 6%;
    }

    .section-title h2 {
        font-size: 34px;
    }

    .skills-container {
        grid-template-columns: 1fr;
    }

    .projects-container {
        grid-template-columns: 1fr;
    }

    .contact-container {
        gap: 40px;
    }

    .hero-buttons {
        flex-direction: column;

        align-items: flex-start;
    }

}

#sakura-container {
    position: fixed;
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    pointer-events: none;

    overflow: hidden;

    z-index: 9999;
}

/*  Petal */

.sakura-petal {
    position: absolute;

    top: -50px;

    width: 15px;
    height: 10px;

    background: #f3b6c8;

    border-radius: 100% 0 100% 0;

    opacity: 0.8;

    transform: rotate(45deg);

    animation:
        sakura-fall linear infinite,
        sakura-sway ease-in-out infinite;
}


/* saruka Animation */

@keyframes sakura-fall {

    0% {
        top: -50px;
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.8;
    }

    100% {
        top: 110vh;
        opacity: 0;
    }

}


/* zigzag petal animation */

@keyframes sakura-sway {

    0% {
        margin-left: 0;
    }

    50% {
        margin-left: 80px;
    }

    100% {
        margin-left: -50px;
    }

}

@media (max-width: 650px) {
    .theme-toggle {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}
