@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Noto+Sans+JP:wght@300;400;500;700&display=swap');

/* Design System & Variable Definitions (TailwindCSS-like Light Theme) */
:root {
    --bg-page: #f8fafc;        /* slate-50 */
    --bg-card: #ffffff;
    --text-main: #0f172a;      /* slate-900 */
    --text-muted: #475569;     /* slate-600 */
    --text-light: #64748b;     /* slate-500 */
    --border: #e2e8f0;         /* slate-200 */
    --border-hover: #cbd5e1;   /* slate-300 */
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    
    --font-sans: 'Outfit', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden; /* Prevent horizontal scrolling caused by the overflowed hero image */
}

/* Container */
.container {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}

/* Minimal Header (Flex container for logo, navigation, and status link) */
.header {
    border-bottom: 1px solid var(--border);
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    position: relative;
    z-index: 100;
}

.header-container {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo a {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1.25rem;
    font-weight: 300;
    letter-spacing: 4px;
    color: var(--text-main);
    text-decoration: none;
    text-transform: lowercase;
    transition: var(--transition-fast);
    display: inline-block;
}

.logo a:hover {
    color: #10b981;
}

/* Header Right Area Wrapper - Always row layout */
.header-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Navigation List (Underline transition type) */
.header-nav {
    display: flex;
    gap: 1.25rem;
    list-style: none;
    padding: 0;
    margin: 0;
}


@media (min-width: 640px) {
    .header-nav {
        gap: 1.5rem;
    }
}

.header-nav-item a {
    display: inline-block;
    padding: 0.25rem 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    text-transform: capitalize;
    position: relative;
    transition: var(--transition-fast);
}

.header-nav-item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #10b981;
    transition: var(--transition-normal);
}

.header-nav-item a:hover {
    color: #10b981;
}

.header-nav-item a:hover::after {
    width: 100%;
}

.header-status-link {
    font-size: 0.85rem;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background-color: var(--bg-page);
    transition: var(--transition-fast);
    white-space: nowrap;
}

.header-status-link:hover {
    color: #10b981;
    border-color: #10b981;
    background-color: #ecfdf5;
}

/* Main Content Wrapper */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 5rem; /* Spacious vertical gaps between sections */
    padding: 5rem 0;
    position: relative;
}

/* 1. Hero Section (2-column layout on PC / Dynamically positioned overflow image) */
.hero-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;
    position: relative;
    min-height: 380px;
}

@media (min-width: 768px) {
    .hero-section {
        grid-template-columns: 1fr; /* Image is absolutely positioned, so 1 column is fine */
        gap: 2rem;
    }
}

.hero-title-wrapper {
    position: relative;
    display: inline-block;
    width: max-content;
    max-width: 100%;
}

.hero-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    z-index: 10; /* Keep text content in front of the background image */
}

/* Hero Title: Retaining the original typography (Noto Sans JP, wght:300, wide letter-spacing) */
.hero-title {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 300;
    line-height: 1.1;
    color: #000000;
    letter-spacing: 12px;
    text-transform: lowercase;
    position: relative;
    z-index: 2; /* In front of the absolute image inside the wrapper */
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 550px;
    text-shadow: 0 0 20px rgba(248, 250, 252, 0.9); /* Prevent text overlap issues with the background image */
    position: relative;
    z-index: 2;
}

/* Hero Image: Anchored to the end (right side) of the title text "selfish frog" */
.hero-image-area {
    position: absolute;
    top: 50%;
    left: calc(100% - 60px); /* Shifted slightly to the right (from -100px to -60px) */
    transform: translateY(-45%) rotate(5deg); /* Shifted slightly upwards (from -35% to -45%) */
    width: clamp(380px, 45vw, 580px);
    pointer-events: none;
    z-index: 1; /* Behind the title text but in front of the page background */
}



@media (max-width: 767px) {
    /* For mobile screens: center the background image and reduce opacity */
    .hero-image-area {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(5deg);
        opacity: 0.15;
        width: 300px;
    }
}


.hero-image-wrapper img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.04));
    transform: rotate(5deg);
    animation: gentle-swing 12s ease-in-out infinite; /* Slowed down from 8s to 12s for a gentler swing */
    transform-origin: center center;
    transition: var(--transition-normal);
}


.hero-image-wrapper:hover img {
    transform: scale(1.02) rotate(5deg); /* Slight scaling on hover */
}

@keyframes gentle-swing {
    0% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(10deg); /* Swings by about 5 degrees in each direction (total 10deg) */
    }
    100% {
        transform: rotate(0deg);
    }
}


/* 2. Projects Section (Flat borderless section styling) */
.projects-section {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    position: relative;
    z-index: 10;
}

.section-header {
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.75rem;
    margin-bottom: 0.5rem;
}

.section-title {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--text-main);
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1.25rem;
    background-color: var(--text-light);
    border-radius: 2px;
}

/* Project Cards Layout: Stacked Vertically */
.projects-vertical-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.proj-vertical-card {
    display: block;
    padding: 1.5rem 1.75rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--border); /* Defaults to standard gray border on idle */
    border-radius: 4px 16px 16px 4px;
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.proj-vertical-card:hover {
    border-color: var(--border-hover);
    border-left-width: 6px;
    border-left-color: var(--card-accent); /* Dynamic color change on hover */
    transform: translateY(-2px);
}

/* Customized glowing soft shadows matched to each card's theme color */
.card-int-space:hover {
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.08);
}

.card-in-field:hover {
    box-shadow: 0 10px 20px rgba(236, 72, 153, 0.08);
}

.card-kobasuke:hover {
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.08);
}

.proj-card-content {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.proj-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.proj-card-title {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    color: var(--text-main); /* Defaults to standard dark gray text */
    transition: var(--transition-fast);
}

.proj-vertical-card:hover .proj-card-title {
    color: var(--card-accent); /* Colors title dynamically on hover */
}

.proj-card-arrow {
    font-size: 0.875rem;
    color: var(--text-light);
    transition: var(--transition-fast);
}

.proj-vertical-card:hover .proj-card-arrow {
    color: var(--card-accent); /* Colors arrow dynamically on hover */
    transform: translateX(3px);
}

.proj-card-desc {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Footer Styling */
.footer {
    border-top: 1px solid var(--border);
    background-color: var(--bg-card);
    padding: 2.5rem 0;
    margin-top: auto;
    position: relative;
    z-index: 10;
}

.footer-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-copyright {
    font-size: 0.875rem;
    color: var(--text-light);
}
