/*
Theme Name: Ryoei Yanagisawa Portfolio
Author: Antigravity
Description: Official Portfolio Theme
Version: 1.0
*/

:root {
    --bg-color: #f7fafc; /* Bright background */
    --text-primary: #2d3748; /* Dark grey for readability */
    --text-secondary: #718096; /* Light grey */
    --accent-blue: #3182ce;
    --accent-purple: #805ad5;
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.8);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.3;
}

.glow-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, #e9d8fd, transparent 70%); /* Soft purple glow */
    animation: float 10s ease-in-out infinite alternate;
}

.glow-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, #bee3f8, transparent 70%); /* Soft blue glow */
    animation: float 12s ease-in-out infinite alternate-reverse;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Utilities */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05); /* Slight shadow for light mode */
}

.highlight {
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    color: #fff;
    box-shadow: 0 4px 15px rgba(49, 130, 206, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(128, 90, 213, 0.3);
    color: #fff;
}

.btn-secondary {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: #fff;
    border-color: rgba(0,0,0,0.1);
}

.btn-primary-small {
    background: var(--text-primary);
    color: #fff !important;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-primary-small:hover {
    background: var(--accent-blue);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--accent-blue);
    color: var(--accent-blue);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
}

.btn-outline:hover {
    background: rgba(49, 130, 206, 0.1);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 18px 5%;
    z-index: 1000;
    transition: all 0.3s ease;
    background: rgba(15, 15, 15, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.navbar.scrolled {
    padding: 12px 5%;
    background: rgba(5, 5, 5, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-style: italic;
    font-weight: 400;
    letter-spacing: 1px;
    color: #ffffff;
}

.logo-sub {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    margin-left: 10px;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 30px;
}

.nav-links a:not(.btn-primary-small) {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.nav-links a:not(.btn-primary-small):hover {
    color: #ffffff;
}

/* Sections */
.section {
    padding: 100px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-family: 'Tangerine', cursive;
    font-size: 4.5rem;
    font-weight: 700;
    margin-bottom: 0px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-header h2::after {
    content: '';
    display: block;
    width: 120px;
    height: 1.5px;
    background: linear-gradient(to right, transparent, rgba(17, 17, 17, 0.5), transparent);
    margin-top: -28px;
    margin-bottom: 8px;
}

/* Profileの 'f' のループが線に被らなぁEぁE個別に微調整 */
#about .section-header h2::after {
    margin-top: -16px;
}

.section-header p {
    font-family: 'Noto Serif JP', serif;
    color: #111;
    font-size: 1.05rem;
    letter-spacing: 2px;
    font-weight: 500;
    margin-top: 0px;
}

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 5%;
}

.hero-content {
    max-width: 800px;
}

.hero-content h1 {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 400;
    line-height: 1.1;
    margin: 0 auto 20px;
    background: linear-gradient(90deg, #2d3748, #718096);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-style: normal;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: 300;
    letter-spacing: 8px;
    margin-top: 15px;
    text-transform: uppercase;
}

.hero-content p {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-weight: 600;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Works Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--glass-bg);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-color: #fff;
}

.card-image {
    width: 100%;
    aspect-ratio: 1/1;
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover .play-overlay {
    opacity: 1;
}

.play-btn {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    padding-left: 4px;
    color: var(--accent-blue);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.card-content {
    padding: 24px;
}

.tag {
    font-size: 0.8rem;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
}

.card-content h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.card-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Scores List */
.scores-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    transition: all 0.3s ease;
}

.score-item:hover {
    border-color: rgba(255, 255, 255, 1);
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.score-info h3 {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.score-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* About Section */
.about-container {
    display: flex;
    align-items: center;
    padding: 60px 50px;
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

.about-text {
    position: relative;
    z-index: 2;
    flex: 0 0 55%;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.profile-name {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 24px !important;
}

.profile-name .name-jp {
    font-family: 'Noto Serif JP', serif;
    font-weight: 500;
    font-size: 2.5rem;
    line-height: 1.2;
}

.profile-name .name-en {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    color: #111;
    margin-left: 15px;
    letter-spacing: 2px;
}

.about-text p {
    color: #111;
    margin-bottom: 16px;
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.8;
}

.english-profile {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.english-profile p {
    font-family: 'Inter', sans-serif;
    color: #111;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.about-image {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    z-index: 1;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
    display: block;
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%);
    mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%);
}

/* Footer */
.footer {
    padding: 80px 5% 40px;
    text-align: center;
    background: #0a0a0a;
    color: rgba(255, 255, 255, 0.7);
}

.footer-content {
    max-width: 600px;
    margin: 0 auto 60px;
}

.footer-content h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: #ffffff;
}

.footer-content p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
}

.social-links {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.social-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* News Section */
.news-container {
    max-width: 900px;
    margin: 0 auto;
}

.news-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.news-list li {
    padding: 20px 30px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.news-date {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--text-secondary);
    min-width: 90px;
}

.news-tag {
    font-size: 0.8rem;
    padding: 4px 12px;
    background: rgba(49, 130, 206, 0.1);
    color: var(--accent-blue);
    border-radius: 20px;
    font-weight: 600;
    min-width: 80px;
    text-align: center;
}

.news-title {
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s;
}

.news-title:hover {
    color: var(--accent-blue);
}

@media (max-width: 768px) {
    .news-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Achievement List (Profile Page) */
.achievement-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 900px;
    margin: 0 auto;
}

.achievement-list li {
    padding: 24px 30px;
    font-size: 1.05rem;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .logo-sub {
        display: none; /* Hide subtitle on mobile to save space */
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .about-container {
        flex-direction: column;
        padding: 0;
        min-height: auto;
    }
    
    .about-text {
        flex: auto;
        padding: 30px;
        order: 2;
        width: 100%;
    }
    
    .about-image {
        position: relative;
        width: 100%;
        height: 300px;
        order: 1;
    }
    
    .about-image img {
        -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
        mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    }
    
    .score-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}
