/**
 * Main stylesheet for app baker - portfolio website
 * Imports all component stylesheets
 */

/* Import Component Styles */
@import 'components/variables.css';
@import 'components/base.css';
@import 'components/animations.css';
@import 'components/header.css';
@import 'components/sections.css';
@import 'components/cards.css';
@import 'components/footer.css';
@import 'components/responsive.css';
@import 'components/safari-fixes.css';
@import 'components/about.css';

/* Theme Variables */
:root {
    /* Light Theme (Default) - Ghibli-inspired pastel palette */
    --bg-color: #f5f9e9;
    --text-color: #5c6e58;
    --header-bg: rgba(141, 177, 125, 0.95);
    --header-text: #ffffff;
    --card-bg: #ffffff;
    --card-text: #5c6e58;
    --button-primary-bg: #759d6a;
    --button-primary-text: #ffffff;
    --button-secondary-bg: rgba(141, 177, 125, 0.2);
    --button-secondary-text: #5c6e58;
    --footer-bg: #6a855e;
    --footer-text: #ffffff;
    --shadow-color: rgba(124, 156, 110, 0.3);
    --hover-shadow: rgba(124, 156, 110, 0.5);
    --accent-color: #e6c379;
    --accent-light: #f8e9c1;
    --accent-dark: #b89e57;
    --cloud-color-1: rgba(255, 255, 255, 0.8);
    --cloud-color-2: rgba(247, 249, 252, 0.9);
    --ghibli-blue: #a5cce8;
    --ghibli-blue-light: #d6e9f5;
    --card-border: #d1e2c4;
}

/* Dark Theme - Ghibli night scenes inspired */
[data-theme="dark"],
.dark-theme {
    --bg-color: #262e39;
    --text-color: #d0dbc8;
    --header-bg: rgba(61, 71, 89, 0.95);
    --header-text: #d0dbc8;
    --card-bg: #3d4759;
    --card-text: #d0dbc8;
    --button-primary-bg: #628356;
    --button-primary-text: #f5f5f5;
    --button-secondary-bg: rgba(98, 131, 86, 0.3);
    --button-secondary-text: #bec9b7;
    --footer-bg: #3d4759;
    --footer-text: #d0dbc8;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --hover-shadow: rgba(0, 0, 0, 0.7);
    --accent-color: #e6c379;
    --accent-light: #8b7a4e;
    --accent-dark: #695c3a;
    --cloud-color-1: rgba(114, 139, 179, 0.3);
    --cloud-color-2: rgba(81, 98, 126, 0.4);
    --ghibli-blue: #54728e;
    --ghibli-blue-light: #455c74;
    --card-border: #4e5a6e;
}

/* Safari-specific dark theme fixes */
@media not all and (min-resolution:.001dpcm) { 
    @supports (-webkit-appearance:none) and (stroke-color:transparent) {
        .dark-theme {
            background-color: #262e39;
            color: #d0dbc8;
        }
        
        .dark-theme .clouds::before,
        .dark-theme .clouds::after,
        .dark-theme .ghibli-cloud {
            background-color: rgba(114, 139, 179, 0.3);
        }
        
        .dark-theme .floating-leaves::before,
        .dark-theme .floating-leaves::after,
        .dark-theme .floating-leaf {
            background-color: #8b7a4e;
        }
        
        .dark-theme .floating-seeds::before,
        .dark-theme .floating-seeds::after,
        .dark-theme .floating-seed {
            background-color: #e6c379;
        }
        
        .dark-theme .card {
            background-color: #3d4759;
            color: #d0dbc8;
            border-color: #4e5a6e;
        }
        
        .dark-theme .footer {
            background-color: #3d4759;
            color: #d0dbc8;
        }
    }
}

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

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

body {
    font-family: 'Noto Sans JP', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: color 0.3s ease, background-color 0.3s ease;
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
}

/* Ghibli-inspired Background Elements */
.ghibli-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.clouds {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.clouds::before,
.clouds::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 100px;
    background-color: var(--cloud-color-1);
    border-radius: 100px 100px 0 0;
    opacity: 0.7;
}

.clouds::before {
    top: 15%;
    left: 10%;
    transform-origin: center bottom;
    animation: float 20s ease-in-out infinite;
}

.clouds::after {
    top: 35%;
    right: 15%;
    width: 300px;
    height: 150px;
    animation: float 24s ease-in-out infinite reverse;
}

.floating-leaves {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.floating-leaves::before,
.floating-leaves::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    background-color: var(--accent-light);
    opacity: 0.4;
    border-radius: 50% 0 50% 50%;
    transform: rotate(45deg);
}

.floating-leaves::before {
    top: 25%;
    left: 75%;
    animation: floatLeaf 18s ease-in-out infinite;
}

.floating-leaves::after {
    top: 60%;
    left: 20%;
    animation: floatLeaf 15s ease-in-out 2s infinite reverse;
}

.floating-seeds {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.floating-seeds::before,
.floating-seeds::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    background-color: var(--accent-color);
    opacity: 0.5;
    border-radius: 50%;
}

.floating-seeds::before {
    top: 30%;
    left: 30%;
    animation: floatSeed 25s ease-in-out infinite;
}

.floating-seeds::after {
    top: 70%;
    left: 65%;
    animation: floatSeed 20s ease-in-out 5s infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.05);
    }
}

@keyframes floatLeaf {
    0% {
        transform: rotate(45deg) translate(0, 0);
    }
    25% {
        transform: rotate(90deg) translate(20px, 10px);
    }
    50% {
        transform: rotate(135deg) translate(10px, 25px);
    }
    75% {
        transform: rotate(180deg) translate(-10px, 15px);
    }
    100% {
        transform: rotate(45deg) translate(0, 0);
    }
}

@keyframes floatSeed {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(30px, 15px);
    }
    50% {
        transform: translate(15px, 30px);
    }
    75% {
        transform: translate(-15px, 15px);
    }
}

/* Header & Navigation */
header {
    background: linear-gradient(135deg, var(--header-bg) 0%, var(--header-bg) 100%);
    box-shadow: 0 4px 15px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 5%;
    position: relative;
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
}

.nav-left {
    justify-content: flex-start;
}

.nav-right {
    justify-content: flex-end;
}

.nav-center {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.logo {
    color: var(--header-text);
    font-family: 'Courgette', cursive;
    font-size: 28px;
    text-decoration: none;
    padding: 5px 15px;
    border-radius: 4px;
    transition: all 0.4s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
    transition: all 0.4s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo:hover .logo-image {
    transform: rotate(10deg);
}

.nav-link {
    color: var(--header-text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    padding: 5px 10px;
    border-radius: 20px;
    font-family: 'Courgette', cursive;
    position: relative;
    overflow: hidden;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover {
    color: var(--accent-color);
}

.nav-link:hover::after {
    width: 80%;
}

.social-icon {
    color: var(--header-text);
    transition: all 0.3s;
    font-size: 18px;
    padding: 5px;
}

.social-icon:hover {
    color: var(--accent-color);
    transform: translateY(-2px) rotate(10deg);
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--header-text);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    position: relative;
    overflow: hidden;
}

.theme-toggle:focus {
    outline: none;
}

.theme-toggle i {
    transition: all 0.3s ease;
}

.theme-toggle .fa-sun {
    position: absolute;
    opacity: 0;
    transform: rotate(180deg) scale(0.5);
}

.theme-toggle .fa-moon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

.dark-theme .theme-toggle .fa-sun {
    opacity: 1;
    transform: rotate(0) scale(1);
}

.dark-theme .theme-toggle .fa-moon {
    opacity: 0;
    transform: rotate(-180deg) scale(0.5);
}

/* Hero Section */
.hero {
    padding: 80px 5% 100px;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 100" preserveAspectRatio="none"><path fill="%23f5f9e9" fill-opacity="1" d="M0,50 C150,100 350,0 500,50 C650,100 850,0 1000,50 C1150,100 1350,0 1440,50 L1440,100 L0,100 Z"></path></svg>');
    background-size: cover;
    background-position: center;
}

.dark-theme .hero::after {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 100" preserveAspectRatio="none"><path fill="%23262e39" fill-opacity="1" d="M0,50 C150,100 350,0 500,50 C650,100 850,0 1000,50 C1150,100 1350,0 1440,50 L1440,100 L0,100 Z"></path></svg>');
}

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 40px;
}

.hero-text {
    flex: 1;
    max-width: 600px;
}

.hero-text h1 {
    font-family: 'Courgette', cursive;
    font-size: 48px;
    margin-bottom: 15px;
    color: var(--text-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.slogan {
    font-family: 'Caveat', cursive;
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--accent-dark);
    font-weight: 500;
}

.hero-description {
    font-size: 18px;
    margin-bottom: 30px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.primary-button, .secondary-button {
    padding: 12px 24px;
    border-radius: 30px;
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px var(--shadow-color);
}

.primary-button {
    background-color: var(--button-primary-bg);
    color: var(--button-primary-text);
    border: 2px solid var(--button-primary-bg);
}

.secondary-button {
    background-color: var(--button-secondary-bg);
    color: var(--button-secondary-text);
    border: 2px solid var(--button-secondary-text);
}

.primary-button:hover, .secondary-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px var(--hover-shadow);
}

.primary-button:hover {
    background-color: transparent;
    color: var(--button-primary-bg);
}

.secondary-button:hover {
    background-color: var(--button-secondary-text);
    color: var(--bg-color);
}

.hero-image {
    flex: 1;
    max-width: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.windleaf-sprout {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sprout-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: gentleBounce 6s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

.wind-effect {
    position: absolute;
    width: 120%;
    height: 120%;
    top: -10%;
    left: -10%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-light) 0%, rgba(245, 249, 233, 0) 70%);
    opacity: 0.3;
    animation: pulse 8s ease-in-out infinite;
}

@keyframes gentleBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

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

/* Portfolio Section */
.portfolio {
    padding: 80px 5%;
    position: relative;
    background-color: var(--bg-color);
}

.section-title {
    text-align: center;
    font-family: 'Courgette', cursive;
    font-size: 36px;
    margin-bottom: 50px;
    color: var(--text-color);
    position: relative;
}

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

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.ghibli-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s ease;
    background-color: var(--card-bg);
    box-shadow: 0 8px 20px var(--shadow-color);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.card-frame {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 15px;
    border: 2px solid var(--card-border);
}

.ghibli-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: all 0.5s ease;
    border-bottom: 2px solid var(--card-border);
}

.card-content {
    padding: 25px;
    position: relative;
}

.ghibli-card h2 {
    font-family: 'Courgette', cursive;
    margin-bottom: 15px;
    color: var(--text-color);
    font-size: 24px;
}

.ghibli-card p {
    color: var(--card-text);
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.6;
}

.ghibli-button {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background-color: var(--button-primary-bg);
    color: var(--button-primary-text);
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 4px 10px var(--shadow-color);
    gap: 8px;
}

.leaf-icon {
    font-size: 14px;
    transition: all 0.3s ease;
}

.ghibli-button:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px var(--hover-shadow);
}

.ghibli-button:hover .leaf-icon {
    transform: rotate(45deg);
}

.ghibli-card:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
    box-shadow: 0 15px 30px var(--hover-shadow);
}

.ghibli-card:hover img {
    transform: scale(1.05);
}

/* About Section */
.about {
    padding: 80px 5%;
    background-color: var(--accent-light);
    position: relative;
    color: var(--text-color);
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 100" preserveAspectRatio="none"><path fill="%23f5f9e9" fill-opacity="1" d="M0,0 C150,50 350,0 500,50 C650,0 850,50 1000,0 C1150,50 1350,0 1440,50 L1440,0 L0,0 Z"></path></svg>');
    background-size: cover;
    background-position: center;
    transform: translateY(-100%);
}

.dark-theme .about::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 100" preserveAspectRatio="none"><path fill="%23262e39" fill-opacity="1" d="M0,0 C150,50 350,0 500,50 C650,0 850,50 1000,0 C1150,50 1350,0 1440,50 L1440,0 L0,0 Z"></path></svg>');
}

.about-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 50px;
}

.about-text {
    flex: 1;
    max-width: 600px;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 18px;
    line-height: 1.8;
}

.about-image {
    flex: 1;
    max-width: 400px;
    display: flex;
    justify-content: center;
}

.spirit-image {
    max-width: 100%;
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.2));
}

/* Footer */
footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 50px 5% 20px;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 100" preserveAspectRatio="none"><path fill="%23f8e9c1" fill-opacity="1" d="M0,0 C150,50 350,0 500,50 C650,0 850,50 1000,0 C1150,50 1350,0 1440,50 L1440,0 L0,0 Z"></path></svg>');
    background-size: cover;
    background-position: center;
    transform: translateY(-100%);
}

.dark-theme footer::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 100" preserveAspectRatio="none"><path fill="%238b7a4e" fill-opacity="1" d="M0,0 C150,50 350,0 500,50 C650,0 850,50 1000,0 C1150,50 1350,0 1440,50 L1440,0 L0,0 Z"></path></svg>');
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.footer-logo-image {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
}

.footer-logo p {
    font-family: 'Courgette', cursive;
    font-size: 24px;
}

.footer-slogan {
    font-family: 'Caveat', cursive;
    font-size: 48px;
    margin-bottom: 30px;
    color: var(--accent-light);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.footer-links a {
    color: var(--footer-text);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 16px;
}

.footer-links a:hover {
    color: var(--accent-light);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .hero-content, .about-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-text, .about-text {
        max-width: 100%;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero {
        padding: 60px 5% 80px;
    }
    
    .nav-left, .nav-right {
        gap: 15px;
    }
    
    .app-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero-text h1 {
        font-size: 36px;
    }
    
    .slogan {
        font-size: 20px;
    }
    
    .hero-description {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 30px;
    }
    
    .about-text p {
        font-size: 16px;
    }
    
    .nav-center {
        position: relative;
        left: 0;
        transform: none;
    }
    
    nav {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-left, .nav-right {
        width: 100%;
        justify-content: center;
    }
    
    .ghibli-card {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 32px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .primary-button, .secondary-button {
        width: 100%;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
}
