@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@700&display=swap');

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

html {
    scroll-behavior: smooth;
}

:root {
    --primary: #4B4B4B;
    --white: #ffffff;
    --light: #f5f5f5;
}

/* Particle Network Background */
#particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#particle-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--primary);
    line-height: 1.6;
    background: var(--white);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: transparent;
    z-index: 100;
}

/* Main content above particles */
.main {
    position: relative;
    z-index: 2;
    pointer-events: none;
}

/* Interactive elements restore pointer events */
.main a,
.main button,
.main input,
.main .news-item,
.main .service-tab,
.main .case-card,
.main .slider-btn,
.main .tech-card,
.main .dev-platform-toggle {
    pointer-events: auto;
}

.header.scrolled {
    background: transparent;
}

.header.scrolled .nav-menu {
    opacity: 0;
    pointer-events: none;
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: padding 0.3s;
    position: relative;
}

.header.scrolled .nav {
    padding: 1rem 2rem;
}

.nav-menu {
    transition: opacity 0.3s;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Menu Toggle Button - Circle with hollow triangle */
.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--primary);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    z-index: 101;
    position: fixed;
    right: 2rem;
    top: 1.2rem;
}

.menu-toggle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-left: 1px solid var(--primary);
    border-bottom: 1px solid var(--primary);
    transform: translate(-25%, -50%) rotate(45deg);
    transition: transform 0.4s ease;
}

.header.scrolled .menu-toggle {
    display: block;
}

/* Hover effect */
.menu-toggle:hover {
    border-color: #999;
}

.menu-toggle:hover::before {
    border-color: #999;
}

/* Nav expanded state */
.header.scrolled.nav-open .nav-menu {
    opacity: 1;
    pointer-events: auto;
}

/* Toggle animation - flip triangle direction */
.header.nav-open .menu-toggle::before {
    transform: translate(-75%, -50%) rotate(-135deg);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    transition: opacity 0.3s;
}

.nav-menu a {
    color: var(--primary);
    text-decoration: none;
    transition: opacity 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    line-height: 1;
}

.nav-menu a:hover,
.nav-menu a.active {
    opacity: 0.6;
}

.nav-jp {
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-en {
    font-size: 0.55rem;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 1px;
}

/* Main */
.main {
    padding-top: 0;
}

/* Hero */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    position: relative;
    overflow: hidden;
}

.page-hero {
    height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light);
}

.hero-content {
    text-align: center;
}

/* Vision & Mission Layout */
.vision-mission {
    width: 100%;
    height: 100%;
    position: relative;
}

.vision {
    position: absolute;
    top: 25%;
    left: 10%;
    transform: translateX(0);
    transition: transform 0.6s ease, opacity 0.6s ease;
}

.mission {
    position: absolute;
    bottom: 35%;
    right: 10%;
    text-align: right;
    transform: translateX(0);
    transition: transform 0.6s ease, opacity 0.6s ease;
}

.vision .char {
    display: inline-block;
    transform: translateX(0);
    opacity: 1;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease;
}

.vision.hidden .char {
    transform: translateX(-50px);
    opacity: 0;
}

.mission .char {
    display: inline-block;
    transform: translateX(0);
    opacity: 1;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease;
}

.mission.hidden .char {
    transform: translateX(50px);
    opacity: 0;
}

.vm-label {
    font-size: 1.1rem;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.vm-jp {
    font-size: 4rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.vm-en {
    font-size: 1.1rem;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.btn-primary {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.95rem;
    transition: opacity 0.3s;
}

.btn-primary:hover {
    opacity: 0.8;
}

.btn-hero {
    position: absolute;
    bottom: 25%;
    left: 10%;
    transform: translateX(0);
    opacity: 1;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease;
    transition-delay: 0.3s;
}

.hero.btn-hidden .btn-hero {
    transform: translateX(-50px);
    opacity: 0;
}

/* Process Flow */
.process-flow {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    color: #999;
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-align: center;
    max-width: 80%;
    line-height: 1.4;
}

.process-flow .char {
    display: inline-block;
    transform: translateX(0);
    opacity: 1;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease;
}

.hero.process-hidden .process-flow .char {
    transform: translateX(50px);
    opacity: 0;
}

/* Title Styles */
.title-jp {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.title-en {
    font-size: 0.75rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 0;
    margin-left: 4px;
}

/* Section title animation */
.section-title .animate-char {
    display: block;
}

.section-title .char {
    display: inline-block;
    transform: translateX(0);
    opacity: 1;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease;
}

.section-title.hidden .char {
    transform: translateX(-50px);
    opacity: 0;
}

/* News section */
.news-container {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    height: 300px;
}

.news-slider {
    flex: 2;
    position: relative;
    background: var(--white);
}

.slider-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.slider-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease;
}

.slide {
    min-width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    background-size: cover;
    background-position: top center;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 1.5rem;
    position: relative;
    opacity: 0.6;
}

.slide:hover {
    opacity: 1;
}

.slide-title {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 0.5rem 1rem;
    font-size: 1.1rem;
}

.slider-controls {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.slider-btn {
    background: transparent;
    border: 1px solid var(--primary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
    color: var(--primary);
}

.slider-btn:hover {
    background: var(--primary);
    color: var(--white);
}

.news-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--white);
}

.news-search input {
    width: 100%;
    padding: 0.6rem 1rem;
    border: 1px solid #ddd;
    font-size: 0.9rem;
    outline: none;
}

.news-search input:focus {
    border-color: var(--primary);
}

.news-items {
    flex: 1;
    overflow-y: auto;
}

.news-item {
    display: flex;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.3s;
}

.news-item:hover {
    background: var(--light);
}

.news-date {
    color: #999;
    font-size: 0.85rem;
    white-space: nowrap;
}

.news-title {
    font-size: 0.9rem;
    color: var(--primary);
}

/* Sections */
.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    min-height: 50vh;
}

/* Content sections - transparent by default */
.section-content {
    background: transparent;
    position: relative;
    z-index: 2;
}

/* Service Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.service-tabs {
    display: flex;
    flex: 1;
    justify-content: space-between;
    align-items: center;
    margin-left: 3rem;
    height: 4rem;
}

.service-tab {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.9rem;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease, box-shadow 0.3s ease;
}

.service-tab:hover {
    color: var(--primary);
}

.service-tab.active {
    color: var(--primary);
}

/* Service Content - Case Slider */
.service-content {
    margin-top: 2rem;
}

.case-slider {
    display: block;
    overflow-x: auto;
    padding-bottom: 1rem;
}

/* Case slider animation */
.service-content {
    overflow: visible;
}

.case-slider .case-track {
    transform: translateX(0);
    opacity: 1;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.6s ease;
}

.service-content.hidden .case-slider .case-track {
    transform: translateX(-100px);
    opacity: 0;
}

.service-content.exit .case-slider .case-track {
    transform: translateX(100px);
    opacity: 0;
}

/* News container animation */
.news-container {
    transform: translateX(0);
    opacity: 1;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.6s ease;
}

.news-container.hidden {
    transform: translateX(-100px);
    opacity: 0;
}

.news-container.exit {
    transform: translateX(100px);
    opacity: 0;
}

.case-slider::-webkit-scrollbar {
    height: 4px;
}

.case-slider::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.case-slider::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.case-slider::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.case-track {
    display: flex;
    gap: 1.5rem;
}

.case-card {
    flex: 0 0 280px;
    cursor: pointer;
    transition: opacity 0.3s ease;
    background: var(--white);
    text-decoration: none;
    display: block;
}

a.news-item {
    text-decoration: none;
}

.case-track:hover .case-card {
    opacity: 0.4;
}

.case-track:hover .case-card:hover {
    opacity: 1;
}

.case-image {
    width: 100%;
    height: 180px;
    background: #f0f0f0;
    border: 1px solid #e0e0e0;
    background-size: cover;
    background-position: center;
}

.case-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0.5rem 0.5rem 0.3rem;
}

.case-desc {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.6;
    margin: 0 0.5rem 0.5rem;
}

/* Tech Stack Banner */
.section-techstack {
    min-height: auto;
    padding-bottom: 2rem;
}

#contact {
    min-height: auto;
    padding-bottom: 2rem;
}

.techstack-banner {
    width: 100%;
    aspect-ratio: 2.5 / 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: transparent;
    position: relative;
    z-index: 2;
}

.tech-card {
    flex: 1;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: flex 0.5s ease;
    border-bottom: 1px solid rgba(150, 150, 150, 0.2);
}

.tech-card:last-child {
    border-bottom: none;
}

.tech-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.tech-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 4rem;
}

.tech-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tech-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #999;
    letter-spacing: 2px;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.tech-detail {
    font-size: 0.9rem;
    color: #999;
    margin-top: 0.5rem;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.5s ease, margin-top 0.5s ease;
}

.tech-stack {
    list-style: none;
    text-align: right;
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: opacity 0.5s ease, max-width 0.5s ease;
}

.tech-stack li {
    font-size: 0.85rem;
    color: #999;
    line-height: 1.8;
    white-space: nowrap;
}

/* Hover state - expanded */
.techstack-banner:hover .tech-card {
    flex: 0.5;
}

.techstack-banner:hover .tech-card:hover {
    flex: 2.5;
}

.techstack-banner:hover .tech-card:not(:hover) .tech-title {
    opacity: 0.3;
}

.techstack-banner:hover .tech-card:not(:hover) .tech-bg {
    opacity: 0.2;
}

.tech-card:hover .tech-title {
    color: var(--primary);
}

.tech-card:hover .tech-detail {
    max-height: 100px;
    opacity: 1;
    margin-top: 1rem;
}

.tech-card:hover .tech-stack {
    opacity: 1;
    max-width: 400px;
}

/* Dev Platform */
.dev-platform {
    text-align: center;
    padding: 2rem 0;
    background: transparent;
    position: relative;
    z-index: 2;
}

.dev-platform-toggle {
    background: none;
    border: none;
    color: #999;
    font-size: 0.95rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.dev-platform-toggle:hover {
    color: var(--primary);
}

.toggle-icon {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.dev-platform.open .toggle-icon {
    transform: rotate(45deg);
}

.dev-platform-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.5s ease;
}

.dev-platform.open .dev-platform-content {
    max-height: 300px;
    padding: 2rem 0;
}

.dev-platform-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

.dev-platform-list span {
    color: #999;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* Contact Banner */
.contact-banner {
    width: 100%;
    display: flex;
    position: relative;
    z-index: 2;
}

.contact-card,
.contact-card:hover,
.contact-card * {
    text-decoration: none;
}

.contact-card {
    flex: 1;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(75, 75, 75, 0.2);
    display: block;
    cursor: pointer;
}

.contact-card:first-child {
    border-right: none;
}

.contact-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.contact-card-content {
    position: relative;
    z-index: 1;
    padding: 4rem;
    background: rgba(255, 255, 255, 0.4);
    transition: background 0.5s ease;
    min-height: 280px;
}

.contact-card:hover .contact-card-bg {
    opacity: 1;
}

.contact-card:hover .contact-card-content {
    background: rgba(255, 255, 255, 0.3);
}

.contact-label {
    font-size: 0.8rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.contact-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
}

.contact-desc {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.contact-link {
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: opacity 0.3s;
}

.contact-link:hover {
    opacity: 0.6;
}

/* Footer */
.footer {
    position: relative;
    z-index: 1;
    background: var(--primary);
    color: var(--white);
    text-align: center;
    padding: 2rem;
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */

/* Step 1: Navigation Responsive */
@media (max-width: 1024px) {
    .nav {
        padding: 1.2rem 1.5rem;
    }

    .nav-menu {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    /* Show hamburger menu on mobile */
    .menu-toggle {
        display: block;
        position: fixed;
        right: 1.5rem;
        top: 1rem;
    }

    .nav {
        padding: 1rem 1.5rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    /* Mobile navigation menu */
    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        z-index: 100;
    }

    /* When menu is open */
    .header.nav-open .nav-menu {
        opacity: 1;
        pointer-events: auto;
    }

    .nav-menu a {
        font-size: 1.1rem;
    }

    .nav-jp {
        font-size: 1.2rem;
    }

    .nav-en {
        font-size: 0.7rem;
    }

    /* Override scrolled state on mobile */
    .header.scrolled .nav-menu {
        opacity: 0;
        pointer-events: none;
    }

    .header.scrolled.nav-open .nav-menu {
        opacity: 1;
        pointer-events: auto;
    }
}

@media (max-width: 480px) {
    .nav {
        padding: 0.8rem 1rem;
    }

    .logo {
        font-size: 1.3rem;
    }

    .menu-toggle {
        right: 1rem;
        top: 0.8rem;
        width: 28px;
        height: 28px;
    }
}

/* Step 2: Hero Section Responsive */
@media (max-width: 1024px) {
    .vision {
        left: 8%;
    }

    .mission {
        right: 8%;
    }

    .vm-jp {
        font-size: 3.2rem;
    }

    .btn-hero {
        left: 8%;
    }
}

@media (max-width: 768px) {
    .hero {
        height: 100vh;
        min-height: 550px;
    }

    .vision {
        top: 22%;
        left: 5%;
    }

    .mission {
        bottom: 48%;
        right: 5%;
    }

    .vm-label {
        font-size: 0.9rem;
        letter-spacing: 2px;
    }

    .vm-jp {
        font-size: 2.5rem;
    }

    .vm-en {
        font-size: 0.9rem;
    }

    .btn-hero {
        bottom: 32%;
        left: auto;
        right: 5%;
    }

    .btn-primary {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }

    .process-flow {
        bottom: 8%;
        font-size: 0.85rem;
        max-width: 90%;
    }

    .page-hero {
        height: 30vh;
        min-height: 200px;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 420px;
    }

    .vision {
        top: 18%;
        left: 4%;
    }

    .mission {
        top: 42%;
        bottom: auto;
        right: 4%;
    }

    .vm-label {
        font-size: 0.7rem;
        letter-spacing: 1px;
        margin-bottom: 0.3rem;
    }

    .vm-jp {
        font-size: 1.6rem;
        margin-bottom: 0.15rem;
    }

    .vm-en {
        font-size: 0.7rem;
    }

    .btn-hero {
        top: 65%;
        bottom: auto;
        left: auto;
        right: 4%;
    }

    .btn-primary {
        padding: 0.55rem 0.9rem;
        font-size: 0.8rem;
    }

    .process-flow {
        bottom: 12%;
        font-size: 0.7rem;
        line-height: 1.5;
    }

    .page-hero {
        height: 25vh;
        min-height: 150px;
    }
}

/* Step 3: News Section Responsive */
@media (max-width: 1024px) {
    .section {
        padding: 3rem 1.5rem;
    }

    .news-container {
        gap: 1.5rem;
        height: 280px;
    }

    .title-jp {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 2.5rem 1.5rem;
        min-height: auto;
    }

    .title-jp {
        font-size: 1.8rem;
    }

    .title-en {
        font-size: 0.7rem;
        letter-spacing: 2px;
    }

    /* Stack news slider and list vertically */
    .news-container {
        flex-direction: column;
        height: auto;
        gap: 1.5rem;
    }

    .news-slider {
        flex: none;
        height: 220px;
    }

    .news-list {
        flex: none;
        max-height: 300px;
    }

    .slide-title {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
    }

    .slider-btn {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .news-search input {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }

    .news-item {
        padding: 0.6rem 0;
    }

    .news-date {
        font-size: 0.8rem;
    }

    .news-title {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 2rem 1rem;
    }

    .title-jp {
        font-size: 1.5rem;
    }

    .title-en {
        font-size: 0.65rem;
        margin-left: 2px;
    }

    .news-slider {
        height: 180px;
    }

    .slide {
        padding: 1rem;
    }

    .slide-title {
        font-size: 0.9rem;
    }

    .slider-controls {
        bottom: 0.5rem;
        gap: 0.3rem;
    }

    .slider-btn {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }

    .news-list {
        max-height: 250px;
    }
}

/* Step 4: Cases/Services Section Responsive */
@media (max-width: 1024px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .service-tabs {
        margin-left: 0;
        width: 100%;
        height: 3rem;
    }

    .service-tab {
        font-size: 0.85rem;
    }

    .case-card {
        flex: 0 0 250px;
    }

    .case-image {
        height: 160px;
    }
}

@media (max-width: 768px) {
    .section-header {
        gap: 1rem;
    }

    .service-tabs {
        height: auto;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .service-tab {
        flex: 0 0 auto;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        border: 1px solid #eee;
        border-radius: 4px;
    }

    .service-content {
        margin-top: 1.5rem;
    }

    .case-track {
        gap: 1rem;
    }

    .case-card {
        flex: 0 0 220px;
    }

    .case-image {
        height: 140px;
    }

    .case-title {
        font-size: 0.9rem;
        margin: 0.4rem 0.4rem 0.2rem;
    }

    .case-desc {
        font-size: 0.8rem;
        margin: 0 0.4rem 0.4rem;
        line-height: 1.5;
    }
}

@media (max-width: 480px) {
    .service-tabs {
        justify-content: flex-start;
    }

    .service-tab {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }

    .case-card {
        flex: 0 0 180px;
    }

    .case-image {
        height: 120px;
    }

    .case-title {
        font-size: 0.85rem;
    }

    .case-desc {
        font-size: 0.75rem;
    }

    .case-slider {
        padding-bottom: 0.5rem;
    }
}

/* Step 5: Tech Stack Section Responsive */
@media (max-width: 1024px) {
    .techstack-banner {
        aspect-ratio: 2 / 1;
    }

    .tech-content {
        padding: 0 2rem;
    }

    .tech-title {
        font-size: 1rem;
    }

    .tech-detail {
        font-size: 0.85rem;
    }

    .tech-stack li {
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .section-techstack {
        padding: 2rem 1rem;
    }

    .techstack-banner {
        aspect-ratio: auto;
        min-height: 400px;
    }

    .tech-card {
        flex: 1;
        min-height: 100px;
    }

    .tech-content {
        padding: 1rem 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .tech-title {
        font-size: 0.95rem;
        letter-spacing: 1px;
    }

    .tech-detail {
        font-size: 0.8rem;
        margin-top: 0.3rem;
    }

    .tech-stack {
        text-align: left;
        margin-top: 0.5rem;
    }

    .tech-stack li {
        font-size: 0.75rem;
        line-height: 1.6;
    }

    /* On mobile, always show details */
    .tech-card .tech-detail {
        max-height: 80px;
        opacity: 1;
        margin-top: 0.5rem;
    }

    .tech-card .tech-stack {
        opacity: 1;
        max-width: 100%;
    }

    /* Disable hover expansion on mobile */
    .techstack-banner:hover .tech-card {
        flex: 1;
    }

    .techstack-banner:hover .tech-card:hover {
        flex: 1;
    }

    .techstack-banner:hover .tech-card:not(:hover) .tech-title {
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .techstack-banner {
        min-height: 350px;
    }

    .tech-content {
        padding: 0.8rem 1rem;
    }

    .tech-title {
        font-size: 0.85rem;
    }

    .tech-detail {
        font-size: 0.75rem;
    }

    .tech-stack li {
        font-size: 0.7rem;
    }
}

/* Step 6: Dev Platform Section Responsive */
@media (max-width: 768px) {
    .dev-platform {
        padding: 1.5rem 0;
    }

    .dev-platform-toggle {
        font-size: 0.85rem;
        letter-spacing: 1px;
    }

    .dev-platform.open .dev-platform-content {
        max-height: 400px;
        padding: 1.5rem 0;
    }

    .dev-platform-list {
        gap: 0.8rem 1.5rem;
        padding: 0 1rem;
    }

    .dev-platform-list span {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .dev-platform-toggle {
        font-size: 0.8rem;
    }

    .toggle-icon {
        font-size: 0.9rem;
    }

    .dev-platform-list {
        gap: 0.6rem 1rem;
    }

    .dev-platform-list span {
        font-size: 0.75rem;
    }
}

/* Step 7: Contact Banner Responsive */
@media (max-width: 1024px) {
    .contact-card-content {
        padding: 3rem;
        min-height: 240px;
    }

    .contact-title {
        font-size: 1.5rem;
    }

    .contact-desc {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    #contact {
        padding: 2rem 1rem;
    }

    /* Stack contact cards vertically */
    .contact-banner {
        flex-direction: column;
    }

    .contact-card {
        border-right: 1px solid rgba(75, 75, 75, 0.2);
    }

    .contact-card:first-child {
        border-right: 1px solid rgba(75, 75, 75, 0.2);
        border-bottom: none;
    }

    .contact-card-content {
        padding: 2rem 1.5rem;
        min-height: 200px;
    }

    .contact-label {
        font-size: 0.75rem;
        letter-spacing: 1px;
    }

    .contact-title {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }

    .contact-desc {
        font-size: 0.85rem;
        line-height: 1.7;
        margin-bottom: 1rem;
    }

    .contact-link {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .contact-card-content {
        padding: 1.5rem 1rem;
        min-height: 180px;
    }

    .contact-label {
        font-size: 0.7rem;
    }

    .contact-title {
        font-size: 1.1rem;
    }

    .contact-desc {
        font-size: 0.8rem;
        line-height: 1.6;
    }

    .contact-link {
        font-size: 0.8rem;
    }
}

/* Step 8: Footer Responsive */
@media (max-width: 768px) {
    .footer {
        padding: 1.5rem 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 1.2rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Step 9: Image Responsive Strategy */
/* Ensure all images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Background images optimization */
@media (max-width: 768px) {
    .slide {
        background-size: cover;
        background-position: center top;
    }

    .contact-card-bg {
        background-size: cover;
        background-position: center;
    }
}

@media (max-width: 480px) {
    .slide {
        background-position: center;
    }
}
