/* ========================================
   Reset & Base Styles
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    background-color: #FFFFFF;
    color: #333333;
    line-height: 1.8;
    overflow-x: hidden;
}

/* ========================================
   Typography
   ======================================== */
h1,
h2,
h3 {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-weight: 500;
    line-height: 1.4;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: 0.05em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: 0.03em;
}

h3 {
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

p,
li {
    font-size: 1rem;
    font-weight: 400;
}

a {
    color: #2C3E50;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #3498DB;
}

/* ========================================
   Animation Classes
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.fade-in {
    opacity: 0;
    animation: fadeInUp 1.2s ease forwards;
}

.fade-in.delay-1 {
    animation-delay: 0.3s;
}

.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    width: 100%;
}

.hero-image-bg {
    height: 100vh;
    width: 100vw;
    background-image: url('images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

.hero-container {
    padding: 3rem 4rem;
    background: #fff;
}

.hero-content {
    max-width: 800px;
    text-align: left;
}

.name {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-weight: 500;
    font-size: 2rem;
    color: #2C3E50;
    margin-bottom: 0.2rem;
}

.name-en {
    font-size: 1rem;
    color: #7F8C8D;
    font-weight: 300;
    letter-spacing: 0.15em;
    margin-bottom: 0.1rem;
}

.title {
    font-size: 1rem;
    color: #7F8C8D;
    margin-bottom: 2rem;
    font-weight: 300;
    letter-spacing: 0.1em;
}

.career-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.career-item h3 {
    color: #95A5A6;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-weight: 300;
}

.career-item p {
    color: #2C3E50;
    font-size: 1.1rem;
}

.timeline {
    list-style: none;
    padding-left: 1.5rem;
    border-left: 2px solid #E8E8E8;
}

.timeline li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    color: #2C3E50;
}

.timeline li::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 8px;
    width: 12px;
    height: 12px;
    background: #2C3E50;
    border-radius: 50%;
    border: 2px solid #FFFFFF;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.6;
    animation: float 2s ease-in-out infinite;
}

.scroll-indicator span {
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #95A5A6;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border-left: 2px solid #95A5A6;
    border-bottom: 2px solid #95A5A6;
    transform: rotate(-45deg);
}

/* ========================================
   Projects Section
   ======================================== */
.projects {
    padding: 8rem 2rem;
    background-color: #FAFAFA;
}

.section-title {
    text-align: center;
    color: #2C3E50;
    margin-bottom: 1rem;
    font-weight: 500;
}

.section-subtitle {
    text-align: center;
    color: #95A5A6;
    margin-bottom: 5rem;
    font-size: 1.1rem;
    font-weight: 300;
}

.sort-controls {
    text-align: center;
    margin-bottom: 2rem;
}

.sort-btn {
    background: #2C3E50;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 0.95rem;
    font-family: 'Zen Kaku Gothic New', sans-serif;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sort-btn:hover {
    background: #34495E;
    transform: translateY(-2px);
}

.projects-grid {
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.project-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    min-height: 300px;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-card:hover .project-image {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(44, 62, 80, 0.95) 0%, rgba(44, 62, 80, 0) 100%);
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    transform: translateY(100%);
    transition: transform 0.4s ease;
    color: white;
}

.project-card:hover .project-overlay {
    transform: translateY(0);
}

.project-overlay h3 {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
    color: #FFFFFF;
}

.project-overlay p {
    font-size: 0.95rem;
    color: #ECF0F1;
}

/* ========================================
   Modal
   ======================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active .modal-overlay {
    opacity: 1;
}

.modal-content {
    position: relative;
    background: #FFFFFF;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(50px);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    font-size: 2rem;
    color: #2C3E50;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-close:hover {
    background: #FFFFFF;
    transform: rotate(90deg);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.25);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 85vh;
    overflow-y: auto;
}

.modal-image-container {
    background: #1a1a1a;
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 0.8rem;
    padding: 1.5rem;
    height: 100%;
}

.modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.modal-image:hover {
    transform: scale(1.01);
}

.modal-additional-images {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    height: 100%;
}

.modal-additional-images img {
    flex: 1;
    width: 100%;
    min-height: 0;
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal-additional-images img:hover {
    transform: scale(1.03);
    opacity: 0.9;
}

.modal-info {
    padding: 2rem 2.5rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-title {
    color: #2C3E50;
    margin-bottom: 0.3rem;
    font-size: 1.8rem;
}

.modal-year {
    color: #95A5A6;
    font-size: 1rem;
    margin-bottom: 1.2rem;
}

.modal-details h3 {
    color: #34495E;
    margin-top: 1rem;
    margin-bottom: 0.4rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #E8E8E8;
    font-size: 0.95rem;
}

.modal-details p {
    color: #555555;
    line-height: 1.6;
    font-size: 0.9rem;
}

.awards-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.awards-list li {
    margin-bottom: 1rem;
    color: #555555;
    line-height: 1.5;
    font-size: 0.9rem;
}

.awards-list li strong {
    color: #2C3E50;
    font-weight: 600;
}

/* ========================================
   Lightbox
   ======================================== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    font-size: 2rem;
    color: #2C3E50;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: #2C3E50;
    color: white;
    transform: rotate(90deg);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: #2C3E50;
    color: #ECF0F1;
    text-align: center;
    padding: 2rem;
}

.footer p {
    font-size: 0.95rem;
    opacity: 0.8;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-image {
        max-width: 400px;
    }

    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(6, 200px);
    }

    .project-card {
        grid-area: auto !important;
    }

    .modal-body {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 3rem 1.5rem;
    }

    .projects {
        padding: 5rem 1.5rem;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .project-card {
        min-height: 200px;
    }

    .project-overlay {
        opacity: 1;
        transform: translateY(0) !important;
    }

    .modal-body {
        grid-template-columns: 1fr;
        height: auto;
        max-height: 90vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .modal-image-container {
        display: flex;
        flex-direction: column;
        padding: 1rem;
        height: auto;
    }

    .modal-image {
        width: 100%;
        height: auto;
        max-height: 250px;
        object-fit: cover;
    }

    .modal-additional-images {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        height: auto;
        margin-top: 0.5rem;
    }

    .modal-additional-images img {
        flex: 0 0 31%;
        height: 80px;
        object-fit: cover;
        border-radius: 8px;
    }

    .modal-info {
        padding: 1.5rem;
        height: auto;
        overflow: visible;
    }
}

@media (max-width: 480px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-card {
        min-height: 220px;
    }

    .modal-image-container {
        padding: 0.5rem !important;
    }

    .modal-image {
        max-height: 200px !important;
        border-radius: 8px !important;
        margin-bottom: 0.5rem !important;
    }

    .modal-additional-images {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.4rem !important;
        flex-direction: unset !important;
        flex-wrap: unset !important;
    }

    .modal-additional-images img {
        flex: none !important;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 4/3 !important;
        object-fit: cover !important;
        border-radius: 0 !important;
    }

    .modal-info {
        padding: 1rem !important;
    }
}