/* CSS Variables for Emerald Green Theme */
:root {
    --primary-color: #50C878;
    /* Emerald Green */
    --primary-hover: #3da862;
    --background-dark: #121212;
    --surface-dark: #1e1e1e;
    --text-main: #ffffff;
    --text-muted: #b0b0b0;
    --font-heading: 'Noto Sans JP', sans-serif;
    --font-body: 'Inter', sans-serif;
    --shadow-card: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 10px 15px rgba(80, 200, 120, 0.2);
    /* Greenish glow on hover */
}

/* Global Styles */
body {
    background-color: var(--background-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    transition: all 0.3s ease;
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    color: var(--primary-color);
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(80, 200, 120, 0.1);
    padding: 1rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.logo {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Buttons */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    line-height: 1;
    min-width: 80px;
    height: 38px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
    margin-top: 1rem;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(80, 200, 120, 0.4);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding-bottom: 4rem;
}

.card {
    background-color: var(--surface-dark);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.card-image-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #000;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensures images fill the area nicely */
    transition: transform 0.5s ease;
}

.card:hover .card-image-wrapper img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-content h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.card-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    flex-grow: 1;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Language Switching Logic */
/* Default is hidden, specific language class shows relevant text */
.text-jp,
.text-en {
    display: none;
}

body.lang-jp .text-jp {
    display: inline-block;
}

.hero body.lang-jp .text-jp,
.card-content body.lang-jp .text-jp {
    display: block;
    /* Block elements for paragraphs/headings */
}

body.lang-en .text-en {
    display: inline-block;
}

.hero body.lang-en .text-en,
.card-content body.lang-en .text-en {
    display: block;
}


/* Mobile Specific Styles (Applied via JS detection) */
body.is-mobile .container {
    padding: 0 15px;
    /* Smaller padding */
}

body.is-mobile header {
    padding: 0.8rem 0;
}

body.is-mobile .header-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
}

body.is-mobile .logo {
    font-size: 1.3rem;
    /* Slightly smaller logo */
}

body.is-mobile .projects-grid {
    grid-template-columns: 1fr;
    /* Force single column */
    gap: 1.5rem;
}

body.is-mobile .card {
    box-shadow: none;
    /* Simplify shadows for performance/cleaner look */
    border: 1px solid rgba(80, 200, 120, 0.3);
    /* Clearer border */
}

body.is-mobile .card:active {
    transform: scale(0.98);
    /* Touch feedback */
    background-color: #252525;
}

body.is-mobile .hero {
    padding: 2.5rem 0;
}

body.is-mobile .hero h2 {
    font-size: 1.8rem;
}
