/* ===================================
   RESET & BASE STYLES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #0f1419;
    overflow-x: hidden;
}

/* ===================================
   NAVIGATION
   =================================== */
nav {
    background: #00232a;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: center;
    transition: background 0.3s, box-shadow 0.3s;
}

.nav-container {
    max-width: 1300px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
    font-weight: 600;
    color: white;
    text-decoration: none;
    cursor: pointer;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
    position: relative;
    padding-bottom: 0.5rem;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #4fc878;
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: #4fc878;
}

/* ===================================
   BUTTONS (GLOBAL)
   =================================== */
.btn {
    padding: 1rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s;
    display: inline-block;
    border: 2px solid transparent;
}

.btn-primary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
}

/* Button variants for light backgrounds */
.about .btn-primary {
    color: #00232a;
    border: 2px solid #00232a;
}

.about .btn-primary:hover {
    background: #00232a;
    color: white;
    border-color: #00232a;
}

/* ===================================
   HERO SECTION
   =================================== */
.hero {
    background: #00232a;
    background-image:
        linear-gradient(rgba(79, 200, 120, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 200, 120, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    padding: 4rem 2rem 6rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1300px;
    width: 100%;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text h1 {
    font-size: 3.5rem;
    color: white;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.hero-text p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.hero-image {
    position: relative;
}

.profile-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 600px;
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    display: block;
    object-fit: cover;
    object-position: center top;
}

/* Scroll Arrow Animation */
.scroll-arrow {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
}

.scroll-arrow svg {
    width: 40px;
    height: 40px;
    color: rgba(255, 255, 255, 0.7);
    animation: bounceArrow 2s infinite;
}

.scroll-arrow:hover svg {
    color: #4fc878;
}

@keyframes bounceArrow {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

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

    60% {
        transform: translateY(-5px);
    }
}

/* ===================================
   ABOUT SECTION
   =================================== */
.about {
    padding: 6rem 2rem;
    background: #f5faf8;
    display: flex;
    justify-content: center;
}

.about-content {
    max-width: 900px;
    width: 100%;
}

.about h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #2d3748;
    font-weight: 600;
}

.about-text {
    text-align: left;
    margin-bottom: 3rem;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4a5568;
    margin-bottom: 1.5rem;
}

/* ===================================
   PORTFOLIO SECTION - WITH IMAGE BACKGROUNDS
   =================================== */
.portfolio-section {
    padding: 6rem 2rem;
    display: flex;
    justify-content: center;
    background: #f8f9fa;
}

.container {
    max-width: 1300px;
    width: 100%;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3rem;
    color: #2d3748;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Fixed highlight visibility */
.section-title .highlight {
    color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

/* Fallback for browsers that don't support background-clip */
@supports not (background-clip: text) {
    .section-title .highlight {
        color: #667eea;
    }
}

.section-subtitle {
    font-size: 1.2rem;
    color: #64748b;
}

/* Portfolio Grid - Vertical Stack */
.portfolio-grid {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

/* Project Card - Horizontal Layout */
.project-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: stretch;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    min-height: 450px;
}

.project-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

/* Alternate layout - even cards: text left, image right */
.project-card:nth-child(even) .project-image {
    order: 2;
}

.project-card:nth-child(even) .project-content {
    order: 1;
}

/* Project Image - fills its half completely */
.project-image {
    position: relative;
    height: 100%;
    min-height: 450px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.3s ease;
}

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

/* Image paths */
.project-image-1 {
    background-image: url('../images/portfolio/mpa.jpg');
}

.project-image-2 {
    background-image: url('../images/portfolio/monitor.png');
}

.project-image-3 {
    background-image: url('../images/portfolio/toshi.jpg');
}

/* Project Content */
.project-content {
    padding: 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-category {
    display: inline-block;
    color: #667eea;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.project-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.project-description {
    font-size: 1.05rem;
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.project-link-text {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #667eea;
    font-weight: 600;
    font-size: 0.95rem;
    transition: gap 0.3s ease;
}

.project-card:hover .project-link-text {
    gap: 1rem;
}

/* Portfolio Responsive */
@media (max-width: 968px) {
    .project-card {
        grid-template-columns: 1fr;
    }

    .project-card:nth-child(even) .project-image,
    .project-card:nth-child(even) .project-content {
        order: initial;
    }

    .project-image {
        min-height: 300px;
    }

    .project-content {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .project-image {
        min-height: 250px;
    }

    .project-content {
        padding: 1.5rem;
    }

    .project-title {
        font-size: 1.4rem;
    }
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
}

/* ===================================
   SKILLS SECTION
   =================================== */
.skills-section {
    padding: 6rem 2rem;
    background: #00232a;
    background-image:
        linear-gradient(rgba(79, 200, 120, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 200, 120, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    display: flex;
    justify-content: center;
}

.skills-container {
    max-width: 1000px;
    width: 100%;
}

.skills-title {
    color: white;
    font-size: 2.8rem;
    font-weight: 500;
    letter-spacing: 6px;
    text-align: center;
    margin-bottom: 5rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem 6rem;
}

.skill-category {
    display: flex;
    flex-direction: column;
}

.skill-icon {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1rem;
    width: 28px;
    height: 28px;
}

.skill-category-title {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.skill-divider {
    width: 30px;
    height: 2px;
    background: rgba(255, 255, 255, 0.4);
    margin-bottom: 1.25rem;
}

.skill-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-list li {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.95rem;
    line-height: 1.5;
    transition: color 0.2s ease;
}

.skill-list li:hover {
    color: rgba(255, 255, 255, 0.85);
}

/* ===================================
   CTA SECTION
   =================================== */
.cta {
    padding: 6rem 2rem;
    background: #f8f9fa;
    display: flex;
    justify-content: center;
}

.cta-box {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta-box h2 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.cta-box p {
    color: #5a6c7d;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.cta-actions {
    margin: 2rem 0;
}

.cta-box .btn-primary {
    background: #00232a;
    color: white;
    border: 2px solid #00232a;
}

.cta-box .btn-primary:hover {
    background: #003440;
    border-color: #003440;
}

.cta-social-links {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.cta-social-label {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    color: #6c757d;
    font-weight: 500;
}

.social-icons-row {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* Social Icons */
.social-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(79, 200, 120, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    background: #4fc878;
    color: #00232a;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(79, 200, 120, 0.3);
}

.social-icon svg {
    width: 20px;
    height: 20px;
}

.cta-social-links .social-icon {
    background: #f8f9fa;
    color: #495057;
}

.cta-social-links .social-icon:hover {
    background: #00232a;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 35, 42, 0.2);
}

/* ===================================
   FOOTER
   =================================== */
footer {
    background: #00232a;
    padding: 4rem 2rem 2rem;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    max-width: 1300px;
    width: 100%;
    margin-bottom: 3rem;
}

.footer-about h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-about p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.footer-social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(79, 200, 120, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    text-decoration: none;
}

.footer-social-icon:hover {
    background: #4fc878;
    color: #00232a;
    transform: translateY(-2px);
}

.footer-social-icon svg {
    width: 18px;
    height: 18px;
}

.footer-links h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #4fc878;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    max-width: 1300px;
    width: 100%;
}

.ai-powered {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.ai-powered svg {
    opacity: 0.7;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .cta-buttons {
        justify-content: center;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .benefit-card {
        padding: 2rem;
    }

    .why-work h2 {
        font-size: 2rem;
    }

    .cta-box {
        padding: 2rem 1.5rem;
    }

    .cta-box h2 {
        font-size: 1.8rem;
    }

    .about h2 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .profile-container {
        height: 400px;
    }

    .scroll-arrow {
        bottom: 2rem;
        width: 32px;
        height: 32px;
    }

    .scroll-arrow svg {
        width: 32px;
        height: 32px;
    }
}