/*
* Portfolio Style Guide
* Theme: Dark / Modern / Clean
* Author: Kenji Iwai Portfolio Project
*/

:root {
    /* Colors */
    --bg-primary: #0f172a;
    /* Slate 900 - Main Background */
    --bg-secondary: #1e293b;
    /* Slate 800 - Card/Section Background */
    --bg-glass: rgba(15, 23, 42, 0.9);
    /* Glassmorphism background */

    --text-primary: #f1f5f9;
    /* Slate 100 - Main Text */
    --text-secondary: #94a3b8;
    /* Slate 400 - Muted Text */
    --text-accent: #38bdf8;
    /* Sky 400 - Accent Text */

    --accent: #14b8a6;
    /* Teal 500 - Primary Brand Color */
    --accent-hover: #0d9488;
    /* Teal 600 - Hover State */
    --accent-glow: rgba(20, 184, 166, 0.3);
    /* Glow Effect */

    --border: #334155;
    /* Slate 700 - Borders */

    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 80px;
    --section-spacing: 120px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
}

/* Reset & Base Styles */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    font-weight: 700;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    display: block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: var(--section-spacing) 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--accent);
    color: #fff;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-outline {
    border-color: var(--accent);
    color: var(--accent);
    background: transparent;
}

.btn-outline:hover {
    background: rgba(20, 184, 166, 0.1);
    transform: translateY(-2px);
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: transparent;
    /* Starts transparent */
    z-index: 1000;
    transition: background-color var(--transition-base), height var(--transition-base);
}

header.scrolled {
    background-color: var(--bg-glass);
    backdrop-filter: blur(10px);
    height: 70px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

header .container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--text-primary);
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    color: var(--text-secondary);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition-fast);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    /* Updated: Much stronger spotlight effect from top-center */
    background: radial-gradient(circle at 50% 0%, #334155 0%, var(--bg-primary) 70%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    /* Background decoration */
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    filter: blur(60px);
}

/* Section Backgrounds Rhythm */
#about {
    background-color: var(--bg-primary);
    /* Dark Navy */
}

#skills {
    background-color: #1e293b;
    /* Lighter Slate - Clearly visible difference */
    position: relative;
    border-top: 1px solid rgba(56, 189, 248, 0.1);
}

#works {
    background-color: #0f172a;
    /* More visible dot pattern */
    background-image: radial-gradient(#334155 1.5px, transparent 1.5px);
    background-size: 24px 24px;
    border-top: 1px solid rgba(56, 189, 248, 0.1);
}

#contact {
    background: linear-gradient(to bottom, #1e293b, #0f172a);
    border-top: 1px solid rgba(56, 189, 248, 0.1);
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    position: relative;
    z-index: 1;
}

.hero-text {
    flex: 1;
}

.hero-image {
    flex: 0 0 350px;
    position: relative;
}

.hero-image img {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    /* Focus on face */
    border: 4px solid var(--accent);
    box-shadow: 0 0 30px rgba(20, 184, 166, 0.2);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0);
    }
}

.hero-role {
    color: var(--accent);
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: block;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

/* About Section */
.about-grid {
    display: grid;
    gap: 4rem;
}

.about-summary {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: 20px;
    border-left: 4px solid var(--accent);
}

.about-summary h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.timeline {
    position: relative;
    border-left: 2px solid var(--border);
    margin-left: 20px;
    margin-top: 3rem;
}

.timeline-item {
    margin-bottom: 2.5rem;
    padding-left: 30px;
    position: relative;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: -7px;
    top: 5px;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--bg-primary);
}

.timeline-year {
    color: var(--accent);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.timeline-role {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}

.timeline-company {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-item {
    background: var(--bg-secondary);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: border-color var(--transition-fast);
}

.skill-item:hover {
    border-color: var(--accent);
}

.skill-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.skill-bar {
    height: 6px;
    background: #334155;
    border-radius: 3px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transform: scaleX(0);
    /* Animate from 0 */
    transform-origin: left;
    transition: transform 1.5s cubic-bezier(0.1, 0.5, 0.5, 1);
}

.skill-progress.visible {
    transform: scaleX(1);
}

/* Works Section */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.work-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    display: flex;
    flex-direction: column;
}

.work-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    border-color: rgba(20, 184, 166, 0.5);
}

.work-head {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.work-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.work-catch {
    color: var(--accent);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.work-sub {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.work-desc {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    color: #cbd5e1;
    flex: 1;
}

.work-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    color: var(--text-accent);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

/* Contact Section */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    background: var(--bg-secondary);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.2);
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

.btn-submit {
    width: 100%;
    margin-top: 1rem;
}

/* Footer */
footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border);
    margin-top: 4rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px) {
    :root {
        --header-height: 70px;
        --section-spacing: 80px;
    }

    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
    }

    .hero-image img {
        width: 280px;
        height: 280px;
    }

    .section-title {
        font-size: 2rem;
    }

    .skills-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Mobile menu implementation usually requires JS toggle */
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        text-align: center;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .about-grid {
        gap: 2rem;
    }

    .works-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 2rem 1.5rem;
    }
}