/* ===================== 
General and Index Rules 
===================== */

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

/* Make the body properly scroll */
body {
    display: flex;
    align-items: center;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    background: black;
    position: relative;
    font-family: 'Noto Sans JP', sans-serif;
}

body.modal-open {
  overflow: hidden;
}

/* Background video */
video {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: -1;
}

.home-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 1;
    max-width: 100%;
    width: min(800px, 90%);
    transition: opacity 0.5s ease-in-out;
}

.page-content {
    position: relative;
    text-align: center;
    font-size: 1.2rem;
    max-width: 90%;
    margin: 100px auto 0;
	padding-bottom: 50px;
    line-height: 1.5;
    z-index: 2;
}

/* Hide when scrolling */
.scrolled .home-content {
    opacity: 0;
    pointer-events: none;
    display: none; /* Fully removes it from the layout */
}

/* Title and tagline */
h1 {
    font-family: 'Lacquer', cursive;
    font-size: clamp(2rem, 8vw, 7rem);
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    margin-bottom: 10px;
}

p {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: clamp(1rem, 4vw, 1.5rem);
    margin-top: 10px;
}

#cta {
    font-family: 'Lacquer', cursive;
    font-size: 2.5rem;
    color: #5f7ce5;
    text-decoration: none;
    transition: color 0.3s ease;
    margin-top: 50px;
    display: inline-block;
}

/* Hover effects */
h1:hover {
    color: #8f64d9;
}

#cta:hover {
    color: #8f64d9;
}

/* Parallax effect */
.parallax-window {
    position: fixed;
    top: 100vh; 
    left: 0;
    width: 100%;
    height: 100vh;
    background: white;
    opacity: 0.85;
    transition: transform 0.6s ease-in-out;
}

/* Trigger when scrolling */
.scrolled .parallax-window {
    transform: translateY(-100vh);
}

/* Spacer to allow scrolling */
.spacer {
    height: 120vh;
    background: transparent;
}

/* Navigation Links */
.nav-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 25px;
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

.nav-links a {
    text-decoration: none;
    font-family: 'Lacquer', cursive;
    font-size: 2.0rem;
    color: black;
    font-weight: bold;
    transition: color 0.3s ease;
    padding: 5px 10px;
}

.nav-links a:hover {
    color: #5f7ce5;
}

/* Bio Section */
.bio {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1.0rem;
    max-width: 80%;
    color: black;
    line-height: 1.6;
}

/* Footer */
.footer {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) scale(0.5);
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.rem;
    color: black;
    opacity: 0.7;
}

/* White overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    opacity: 0.85;
    z-index: 0;
}

/* ===================== 
Portfolio Rules 
===================== */

.portfolio-info p {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1.0rem;
    line-height: 1.6;
    color: black;
}

.portfolio-content {
    text-align: center;
    font-size: 1.2rem;
    max-width: 90%;
    margin: 50px auto;
    line-height: 1.5;
}

/* Portfolio Index */
.portfolio-index {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.portfolio-index a {
    color: #5f7ce5;
    text-decoration: none;
    font-weight: bold;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.portfolio-index a:hover {
    color: #8f64d9;
}

/* Portfolio Category */
.portfolio-category {
    margin-top: 40px;
}

.portfolio-category h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

/* Portfolio Item */
.portfolio-item {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    margin: 20px auto;
    border-radius: 8px;
    max-width: 800px;
    text-align: left;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
}

.portfolio-item img {
  width: 250px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 20px;
  flex-shrink: 0;
}

.portfolio-info h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.view-project {
    display: inline-block;
    margin-top: 10px;
    font-size: 1rem;
    color: #5f7ce5;
    text-decoration: none;
    font-weight: bold;
}

.view-project:hover {
    color: #8f64d9;
}

/* ===================== 
Work With Me Rules 
===================== */

/* Work With Me Content */
.work-content {
    text-align: center;
    font-size: 1.5rem;
    max-width: 90%;
    margin: 50px auto;
    line-height: 1.5;
}

/* Work With Me Title */
.work-content h1 {
    margin-bottom: 25px; /* Adds space below the title */
}

/* Work With Me Intro & CTA Text */
.work-content h2 {
    font-size: 1.5rem;
    margin: 20px auto;
    font-weight: normal;
    text-align: center;
    display: inline-block; /* Ensures text doesn't stretch but stays centered */
}

/* Process List */
.work-content .process-list {
    list-style: none;
    padding: 0;
}

.work-content .process-list li {
    font-size: 1rem;
    margin: 10px 0;
}

.work-content .cta {
    display: inline-block;
    margin: 10px;
    padding: 12px 20px;
    font-size: 1rem;
    color: white;
    background: #5f7ce5;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.work-content .cta:hover {
    background: #8f64d9;
}

/* Contact Links */
.work-content .contact-links {
    margin-top: 20px;
}

.work-content .contact-link {
    display: inline-flex;
    align-items: center;
    margin: 10px;
    text-decoration: none;
    font-size: 1rem;
    color: black;
    transition: color 0.3s ease;
}

.work-content .contact-link:hover {
    color: #8f64d9; /* Change text color on hover */
}

/* Contact Link Icons */
.work-content .contact-link img {
    width: 20px;
    height: 20px;
    margin-right: 5px;
    transition: opacity 0.3s ease;
}

/* Swap Icons on Hover */
.work-content .contact-link:hover img[src*="linkedin.png"] {
    content: url('images/linkedin-hover.png');
}

.work-content .contact-link:hover img[src*="email-icon.png"] {
    content: url('images/email-icon-hover.png');
}

/* Contact Form */
.work-content .contact-form {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.work-content .contact-form label {
    font-size: 1rem;
    margin: 5px 0;
}

.work-content .contact-form select,
.work-content .contact-form textarea {
    width: 100%;
    max-width: 500px;
    padding: 10px;
    font-size: 1rem;
    margin-bottom: 10px;
}

.work-content .contact-form button {
    padding: 10px 20px;
	margin-top: 10px;
    font-size: 1rem;
    color: white;
    background: #5f7ce5;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s;
}

.work-content .contact-form button:hover {
    background: #8f64d9;
}

/* ===================== 
Blog Rules 
===================== */

.blog-content {
    text-align: center;
    font-size: 1.2rem;
    max-width: 90%;
    margin: 50px auto;
    line-height: 1.5;
}

/* Blog Title */
.blog-content h1 {
    margin-bottom: 25px;
}

/* Blog Entry */
.blog-post {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    margin: 30px auto;
    border-radius: 8px;
    max-width: 800px;
    text-align: left;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
}

.blog-post h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.blog-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
}

.blog-post p {
    font-size: 1rem;
}

.read-more {
    display: inline-block;
    margin-top: 10px;
    font-size: 1rem;
    color: #5f7ce5;
    text-decoration: none;
    font-weight: bold;
}

.read-more:hover {
    color: #8f64d9;
}

/* ===================== 
Modal Content 
===================== */

.modal {
    display: none;
    position: fixed;
    z-index: 10;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    overflow-y: auto;      /* enables scrolling when modal is taller than screen */
    padding: 30px 15px;    /* ensures breathing room on smaller screens */
}

.modal-content {
    background: white;
    padding: 30px;
    max-width: 800px;
    width: 90%; 
    border-radius: 8px;
    text-align: left;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    max-height: 90vh;      /* ensures modal doesn't exceed viewport height */
    overflow-y: auto;      /* makes just the content inside scrollable */
    scroll-behavior: smooth;
}

.modal-content p {
    font-size: 1rem;
    line-height: 1.4;
}

.modal-content img {
    max-width: 100%;
    max-height: 500px;
    height: auto;
    width: auto;
    display: block;
    margin: 10px auto 20px;
    border-radius: 10px;
    object-fit: contain;
    box-shadow: #666 0px 0px 10px;
}

.close-modal {
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: #5f7ce5;
    transition: transform 0.2s ease, color 0.2s ease;
}

.close-modal:hover {
    color: #8f64d9;
    transform: rotate(90deg) scale(1.3);
}

.modal-content h2,
.modal-content .cta {
    font-family: 'Lacquer', cursive;
    font-size: 3rem;
}

/* Shared CTA Base Styles */
.modal-content .cta {
  margin-top: 20px;
  padding: 12px 20px;
  font-size: 1.25rem;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  display: inline-block;
  font-family: 'Lacquer', cursive;
  transition: background 0.3s;
}

/* Hover effect for all CTAs */
.modal-content .cta:hover {
  background: #5f7ce5;
}

/* Live Demo (Primary Purple) */
.modal-content .cta-demo {
  background: #8f64d9;
}

/* GitHub (Neutral Dark) */
.modal-content .cta-github {
  background: #333333;
}

/* Video Demo (Red) */
.modal-content .cta-video {
  background: #e64a4a;
}

/* Figma Prototype (Pink) */
.modal-content .cta-figma {
  background: #ff6bc1;
}

/* Download (Green) */
.modal-content .cta-download {
  background: #4caf50;
}

/* ===================== 
Dark Mode
===================== */

#theme-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: inherit;
    transition: transform 0.2s ease;
}

#theme-toggle:hover {
    transform: scale(1.2);
}

body.dark-mode {
  color: #eee;
}

body.dark-mode .parallax-window {
  background: #111;
  opacity: 0.75;
}

body.dark-mode .overlay {
    background: #111;
    opacity: 0.75;
}

body.dark-mode a {
  color: #9bb5ff;
}

body.dark-mode .modal-content {
  background-color: #1e1e1e;
  color: #f5f5f5;
}

body.dark-mode .portfolio-item {
    background-color: #1e1e1e;
    border: 1px solid #444;
}

body.dark-mode p {
    color: #ddd;
}


body.dark-mode .modal {
    background-color: rgba(0, 0, 0, 0.9);
}

.portfolio-item,
.modal {
    transition: background-color 0.3s ease;
}

/* ===================== 
Mobile optimization  
===================== */

@media (max-width: 768px) {
    body {
        min-height: 100vh;
        padding: 20px;
    }

    .home-content {
        max-width: 100%;
    }

    h1 {
        font-size: 3rem;
    }

    .page-content {
        margin: 25px auto;
    }

    .portfolio-content h1 {
        margin-bottom: 30px;
    }

    video {
        height: 100vh;
        width: 100vw;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
        margin-top: 20px;
        position: relative;
    }

    .nav-links a {
        font-size: 1.65rem;
    }

    .bio {
        position: relative;
        text-align: center;
        font-size: 1rem;
        max-width: 90%;
        top: 5%;
        transform: translateX(-50%);
		padding-right: 25px;
		padding-left: 25px;
        line-height: 1.5;
    }

    .portfolio-content{
        margin: 10px auto;
    }

    .portfolio-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .portfolio-item img {
        width: 100%;
        height: auto;
        margin-right: 0;
        margin-bottom: 15px;
    }

    .portfolio-info p {
        font-size: 0.95rem;
        word-break: break-word;
    }

    .portfolio-info h3 {
        font-size: 1.1rem;
    }

    .modal-content {
        max-height: 80vh;
        overflow-y: auto;
        margin: 10vh auto;
        padding: 20px;
    }

    .modal-content h2 {
        font-size: 2.5rem;
        margin-bottom: 25px;
    }
}

@media screen and (max-height: 550px) and (orientation: landscape) {
    .home-content {
        font-size: 1rem;
        max-width: 85%;
    }

    .nav-links {
        flex-direction: row;
        gap: 10px;
        font-size: 1rem;
    }

    .bio {
        transform: scale(0.70);
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
        width: 95%;
        max-width: 95%;
        margin: 0 auto;
        position: relative;
        left: auto !important;
        top: 20% !important;
    }
}
