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

/* Navbar */
nav {
    height: 60px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: Inter
    , sans-serif;
    padding: 0 2rem;
    z-index: 10;
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.1);
}

nav a {
    color: #0D224D;
    text-decoration: none;
    margin-left: 2rem;
    font-size: 1.3rem;
    transition: opacity 0.3s ease, color 0.3s ease;
}

@media (max-width: 768px) {
    nav {
        padding: 0 1rem;
        height: 50px;
    }
    
    nav a {
        font-size: 1rem;
        margin-left: 1rem;
    }
    
    .logo {
        font-size: 1rem;
    }
}

nav a:hover {
    opacity: 0.7;
}

/* Light text for navbar when over dark background */
nav.light-text a {
    color: #ffffff;
}

nav.light-text a:hover {
    opacity: 0.8;
}

.logo {
    font-weight: bold;
    font-size: 1.2rem;
    margin-left: 0;
}

.nav-right {
    display: flex;
    align-items: center;
}

/* Scrollable wrapper */
.scroll-wrapper {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    margin: 0;
}

/* Sections */
.scroll-section {
    scroll-snap-align: start;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-family: "Hiragino Mincho Pro", serif;
    color: white;
    padding: 2rem;
    position: relative;
}

@media (max-width: 768px) {
    .scroll-section {
        min-height: 100vh;
        height: auto;
        padding: 1rem;
    }
}

/* Hero section */
.hero {
    justify-content: flex-start;
    align-items: flex-start;
    position: relative;
}

.hero-content {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
}

.hero-title {
    font-size: 10vw;
    color: #0D224D;
    font-family: "Inter", sans-serif;
    padding-inline: 1rem;
    font-weight: regular;
    text-align: right;
    align-self: flex-end;
    margin-top: 25vh;
    margin-right: 2rem;
    line-height: 0.9;
}

.hero-tagline {
    position: absolute;
    bottom: 3rem;
    left: 9rem;
    color: #8B4513;
    font-family: "Krub", sans-serif;
    font-size: 2.0rem;
    line-height: 1.4;
}

.hero-tagline p {
    margin: 0;
    padding: 0;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 15vw;
        margin-top: 15vh;
        margin-right: 1rem;
        padding-inline: 0.5rem;
    }
    
    .hero-tagline {
        position: static;
        margin-top: 2rem;
        left: auto;
        bottom: auto;
        font-size: 1.2rem;
        text-align: left;
        padding: 0 1rem;
    }
    
    .hero-content {
        padding: 1rem;
        justify-content: flex-start;
        padding-top: 4rem;
    }
}

/* About section */
.about {
    color: #19375e;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-content {
    width: 90%;
    max-width: 1200px;
    height: 80vh;
    display: flex;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        gap: 2rem;
        padding: 4rem 1rem 2rem;
    }
    
    .about-image {
        width: 100%;
        max-width: 300px;
    }
    
    .about-text {
        width: 100%;
    }
    
    .about-title {
        font-size: 2rem;
    }
    
    .about-description {
        font-size: 1rem;
    }
    
    .skills-grid {
        flex-direction: column;
        gap: 1.5rem;
    }
}

.about-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-image img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border: 2px solid white;
    border-radius: 4px;
    object-fit: cover;
}

.about-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    color: #000;
}

.about-title {
    font-size: 3rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 1rem;
    font-family: "Inter", sans-serif;
    color: #000;
}

.about-description {
    font-size: 1.1rem;
    line-height: 1.6;
    font-family: "Krub", sans-serif;
    color: #000;
    margin-bottom: 1rem;
}

.skills-section h3 {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    font-family: sans-serif;
    color: #000;
}

.skills-grid {
    display: flex;
    gap: 3rem;
}

.skills-column {
    flex: 1;
}

.skills-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.skills-column li {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-family: sans-serif;
    color: #000;
}

/* Projects section - dark blue background */
.projects {
    background: #0D224D !important;
    padding: 3rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.projects-container {
    width: 90%;
    max-width: 1200px;
    height: 80vh;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem;
    position: relative;
}

@media (max-width: 768px) {
    .projects {
        padding: 1rem;
    }
    
    .projects-container {
        width: 100%;
        height: auto;
        min-height: 100vh;
        padding: 1.5rem 1rem;
    }
    
    .projects-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
        letter-spacing: 0.1em;
    }
    
    .projects-content {
        padding: 1rem;
        min-height: 70vh;
    }
    
    .carousel-wrapper {
        height: 60%;
        min-height: 400px;
    }
    
    .project-card {
        flex-direction: column;
        padding: 1.5rem;
        margin: 0;
        gap: 1.5rem;
    }
    
    .project-image {
        width: 100%;
        max-width: 250px;
        height: 180px;
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .project-title {
        font-size: 1.5rem;
    }
    
    .project-description {
        font-size: 1rem;
    }
    
    .carousel-arrow {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .carousel-prev {
        margin-left: 0.5rem;
    }
    
    .carousel-next {
        margin-right: 0.5rem;
    }
}

.projects-title {
    font-size: 3rem;
    color: #0a1f44;
    font-weight: bold;
    letter-spacing: 0.3em;
    margin-bottom: 3rem;
    text-align: center;
    font-family: "Hiragino Mincho Pro", serif;
}

.projects-content {
    width: 100%;
    height: 100%;
    background: rgba(126, 166, 214, 1);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Carousel styles */
.carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.carousel-wrapper {
    width: 100%;
    height: 80%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.project-card {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 0;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.project-card.active {
    transform: scale(1.02);
}

/* Carousel navigation */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
}

.carousel-arrow {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    color: #0a1f44;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: all;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.carousel-arrow:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.carousel-prev {
    margin-left: 2rem;
}

.carousel-next {
    margin-right: 2rem;
}

/* Carousel dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: white;
    transform: scale(1.2);
}

.dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.project-image {
    width: 200px;
    height: 150px;
    background: #c4c4c4;
    border-radius: 8px;
    margin-right: 2rem;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.rotating-image {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.rotating-image:hover {
    opacity: 0.9;
}

.project-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 2rem;
    color: #0a1f44;
    font-weight: bold;
    margin-bottom: 1rem;
    font-family: "Inter", sans-serif;
}

.project-description {
    font-size: 1.1rem;
    color: #333;
    line-height: 1.6;
    font-family: "Krub", sans-serif;
    flex: 1;
    margin-bottom: 1.5rem;
}

.project-link {
    color: #0a1f44;
    text-decoration: underline;
    font-size: 0.9rem;
    font-weight: 500;
    align-self: flex-start;
}

/* Expanded project view */
.project-expanded {
    display: none;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    position: relative;
}

.project-expanded.active {
    display: flex;
    flex-direction: column;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.back-button {
    color: #0a1f44;
    text-decoration: underline;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 500;
}

.close-button {
    font-size: 2rem;
    color: #0a1f44;
    cursor: pointer;
    line-height: 1;
    font-weight: bold;
}

.project-expanded-content {
    display: flex;
    gap: 2rem;
    height: 100%;
}

@media (max-width: 768px) {
    .project-expanded {
        padding: 1rem;
    }
    
    .project-expanded-content {
        flex-direction: column;
        gap: 1.5rem;
        overflow-y: auto;
    }
    
    .project-expanded-image {
        width: 100%;
        max-width: 100%;
        height: 250px;
    }
    
    .project-expanded-title {
        font-size: 1.8rem;
    }
    
    .project-expanded-description {
        font-size: 0.95rem;
    }
}

.project-expanded-image {
    width: 400px;
    height: 300px;
    background: #c4c4c4;
    border-radius: 12px;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-expanded-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.project-expanded-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-expanded-title {
    font-size: 2.5rem;
    color: #0a1f44;
    font-weight: bold;
    margin-bottom: 1rem;
    font-family: "Hiragino Mincho Pro", serif;
}

.project-expanded-description {
    font-size: 1rem;
    color: #333;
    line-height: 1.6;
    flex: 1;
}

/* Contact section */
.contact {
    color: #19375e;
    padding: 3rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.contact-content {
    width: 90%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.contact-title {
    font-size: 3rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 1rem;
    font-family: "Inter", sans-serif;
    color: #19375e;
    letter-spacing: 0.3em;
}

.contact-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(25, 55, 94, 0.2);
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-label {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #19375e;
    font-family: "Inter", sans-serif;
    margin: 0;
}

.contact-value {
    font-size: 1.2rem;
    color: #000;
    font-family: "Krub", sans-serif;
    margin: 0;
}

.contact-value a {
    color: #19375e;
    text-decoration: none;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.contact-value a:hover {
    color: #0D224D;
    opacity: 0.8;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .contact {
        padding: 1rem;
    }
    
    .contact-content {
        width: 100%;
        gap: 2rem;
        padding: 4rem 1rem 2rem;
    }
    
    .contact-title {
        font-size: 2rem;
        letter-spacing: 0.1em;
    }
    
    .contact-info {
        gap: 1.5rem;
    }
    
    .contact-item {
        padding-bottom: 1rem;
    }
    
    .contact-label {
        font-size: 0.8rem;
    }
    
    .contact-value {
        font-size: 1rem;
    }
}

/* Additional mobile optimizations */
@media (max-width: 480px) {
    .hero-title {
        font-size: 18vw;
        margin-top: 10vh;
    }
    
    .hero-tagline {
        font-size: 1rem;
    }
    
    .about-title {
        font-size: 1.5rem;
    }
    
    .projects-title {
        font-size: 1.5rem;
    }
    
    .contact-title {
        font-size: 1.5rem;
    }
    
    nav a {
        font-size: 0.9rem;
        margin-left: 0.75rem;
    }
}