/* ============================================
   StringStudio - Custom Overrides
   基於 Start Bootstrap Agency 模板（MIT 授權）
   配色：莫蘭迪藍 + 莫蘭迪粉
   ============================================ */

/* --- Color Variables --- */
:root {
    --ss-primary: #3B4252;
    --ss-primary-hover: #2E3440;
    --ss-primary-glow: rgba(59, 66, 82, 0.25);
    --ss-accent: #4A6FA5;
    --ss-accent-hover: #3B5D8F;
    --ss-accent-glow: rgba(74, 111, 165, 0.25);
    --ss-dark: #1A1D24;
    --ss-dark-deep: #13151A;
    --ss-gray: #6B7280;
    --ss-light: #F3F4F6;
    --ss-bg: #FAFAFA;
    --ss-bg-alt: #F0F4F8;
    --ss-bg-dark: #2E3440;
}

/* --- Font Override --- */
body {
    font-family: "Space Grotesk", "Noto Sans TC", sans-serif;
    background-color: var(--ss-bg);
    font-size: 1.1rem;
    line-height: 1.8;
}

h1, h2, h3, h4, h5, h6,
.section-heading,
.masthead-heading {
    font-family: "Space Grotesk", "Noto Sans TC", sans-serif;
    letter-spacing: -0.02em;
}

.navbar-brand {
    font-family: "Space Grotesk", "Noto Sans TC", sans-serif;
}

.section-subheading,
.text-muted,
p, li, a {
    font-family: "Space Grotesk", "Noto Sans TC", sans-serif;
}

code, pre {
    font-family: "Fira Code", monospace;
}

/* --- Primary Color Override --- */
.text-primary {
    color: var(--ss-primary) !important;
}

.bg-dark {
    background-color: var(--ss-bg) !important;
    color: var(--ss-dark) !important;
}

.bg-light {
    background-color: var(--ss-bg) !important;
}

.btn-primary {
    background-color: var(--ss-accent);
    border-color: var(--ss-accent);
    color: #fff;
    transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--ss-accent-hover);
    border-color: var(--ss-accent-hover);
    box-shadow: 0 4px 20px var(--ss-accent-glow);
    transform: translateY(-3px);
    color: #fff;
}

.btn-outline-primary {
    color: var(--ss-primary);
    border-color: var(--ss-primary);
    transition: all 0.3s ease;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: var(--ss-primary);
    border-color: var(--ss-primary);
    color: #fff;
    box-shadow: 0 4px 20px var(--ss-primary-glow);
    transform: translateY(-3px);
}

/* --- Navbar --- */
#mainNav {
    background-color: rgba(61, 74, 92, 0.95);
    transition: all 0.4s ease;
}

.navbar-logo {
    height: 32px;
    width: auto;
    margin-right: 8px;
    vertical-align: middle;
}

#mainNav .navbar-brand {
    font-family: "Space Grotesk", "Noto Sans TC", sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 0.5px;
    color: var(--ss-light);
    transition: color 0.3s;
}

#mainNav .navbar-brand:hover {
    color: var(--ss-accent);
}

#mainNav.navbar-shrink {
    background-color: rgba(61, 74, 92, 0.98);
    backdrop-filter: blur(10px);
}

#mainNav .nav-link {
    transition: color 0.3s ease;
    position: relative;
}

#mainNav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background: linear-gradient(90deg, var(--ss-primary), var(--ss-accent));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

#mainNav .nav-link:hover::after,
#mainNav .nav-link.active::after {
    width: 80%;
}

/* --- Masthead --- */
header.masthead {
    background: linear-gradient(to bottom, rgba(250,250,250,0) 0%, rgba(250,250,250,0) 50%, rgba(250,250,250,1) 85%),
                url("../assets/img/header-bg.jpg") !important;
    background-position: center top !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    min-height: 100vh;
    position: relative;
}


.masthead .masthead-subheading {
    font-family: "Space Grotesk", "Noto Sans TC", sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--ss-dark);
}

.masthead .masthead-heading {
    font-family: "Space Grotesk", "Noto Sans TC", sans-serif;
    font-weight: 800;
    color: var(--ss-dark);
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.6);
}

.masthead .masthead-description {
    color: var(--ss-dark);
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 3px;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Hero Interactive Cards --- */
.hero-cards {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 2.5rem;
}

.hero-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(141, 167, 190, 0.25);
    border-radius: 16px;
    padding: 1.5rem 1.2rem;
    width: 180px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--ss-dark);
    animation: bounceIn 0.6s ease forwards;
    opacity: 0;
}

.hero-card:nth-child(1) { animation-delay: 0.8s; }
.hero-card:nth-child(2) { animation-delay: 1.0s; }
.hero-card:nth-child(3) { animation-delay: 1.2s; }

.hero-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 12px 35px var(--ss-primary-glow);
    border-color: var(--ss-accent);
    background: rgba(255, 255, 255, 0.95);
    color: var(--ss-dark);
}

.hero-card:hover .hero-card__icon {
    animation: bounce 0.5s ease;
}

.hero-card__icon {
    font-size: 2.2rem;
    color: var(--ss-primary);
    margin-bottom: 0.75rem;
    display: block;
    transition: color 0.3s;
}

.hero-card:hover .hero-card__icon {
    color: var(--ss-accent);
}

.hero-card__title {
    font-family: "Space Grotesk", "Noto Sans TC", sans-serif;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

.hero-card__desc {
    font-size: 0.8rem;
    color: var(--ss-gray);
    line-height: 1.4;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.9);
    }
    60% {
        opacity: 1;
        transform: translateY(-8px) scale(1.02);
    }
    80% {
        transform: translateY(3px) scale(0.99);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    30% { transform: translateY(-12px); }
    50% { transform: translateY(-6px); }
    70% { transform: translateY(-3px); }
}

/* Continuous subtle float for cards - disabled */

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* --- Stats Counter Section --- */
#stats {
    background: var(--ss-bg-alt) !important;
    position: relative;
    overflow: hidden;
}

.stat-number {
    font-family: "Space Grotesk", sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--ss-accent);
    line-height: 1.1;
}

.stat-number .counter-value {
    font-family: inherit;
    font-weight: inherit;
    color: inherit;
}

.stat-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--ss-gray);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 0.4rem;
}

.counter-value.counted {
    animation: countPop 0.4s ease;
}

@keyframes countPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* --- Services Section --- */
.services-section {
    background: var(--ss-bg);
    position: relative;
}

.service-card {
    display: block;
    background: #fff;
    border: 1px solid rgba(59, 66, 82, 0.08);
    border-radius: 16px;
    padding: 2.5rem 2rem 2rem;
    text-decoration: none;
    color: var(--ss-dark);
    transition: all 0.35s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--ss-primary), var(--ss-accent));
    transform: scaleX(0);
    transition: transform 0.35s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(26, 29, 36, 0.12);
    color: var(--ss-dark);
    border-color: transparent;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card__icon {
    font-size: 2.5rem;
    color: var(--ss-primary);
    margin-bottom: 1.2rem;
    transition: all 0.35s ease;
}

.service-card:hover .service-card__icon {
    color: var(--ss-accent);
    transform: scale(1.1);
}

.service-card__title {
    font-family: "Space Grotesk", "Noto Sans TC", sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}

.service-card__tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--ss-accent);
    background: rgba(74, 111, 165, 0.1);
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    margin-bottom: 0.6rem;
}

.service-card__highlight {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ss-dark);
    line-height: 1.5;
    margin-bottom: 0.6rem;
}

.service-card__desc {
    color: var(--ss-gray);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.service-card__link {
    color: var(--ss-accent);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.service-card__link .fa-arrow-right {
    transition: transform 0.3s ease;
    margin-left: 4px;
}

.service-card:hover .service-card__link .fa-arrow-right {
    transform: translateX(5px);
}

.page-section h4 {
    font-family: "Space Grotesk", "Noto Sans TC", sans-serif;
}

/* --- Timeline (About) --- */
.timeline > li .timeline-image {
    background: linear-gradient(135deg, var(--ss-primary), var(--ss-accent));
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline > li .timeline-image:hover {
    transform: scale(1.08);
    box-shadow: 0 0 25px var(--ss-primary-glow);
}

.timeline > li::before {
    background-color: var(--ss-primary);
}

/* --- Showcase (Services + Portfolio merged) --- */
.showcase-img {
    display: block;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.showcase-img img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.showcase-img:hover img {
    transform: scale(1.05);
}

.showcase-img__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 29, 36, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 16px;
}

.showcase-img:hover .showcase-img__overlay {
    opacity: 1;
}

.showcase-title {
    font-family: "Space Grotesk", "Noto Sans TC", sans-serif;
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--ss-dark);
    margin-bottom: 0.6rem;
    margin-top: 0.5rem;
}

.showcase-highlight {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ss-dark);
    line-height: 1.5;
    margin-bottom: 0.8rem;
}

.showcase-desc {
    color: var(--ss-gray);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.showcase-link {
    display: inline-block;
    color: var(--ss-accent);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.showcase-link:hover {
    color: var(--ss-accent-hover);
    transform: translateX(4px);
}

.showcase-link .fa-arrow-right {
    transition: transform 0.3s ease;
}

.showcase-link:hover .fa-arrow-right {
    transform: translateX(5px);
}

@media (max-width: 991px) {
    .showcase-img img {
        height: 240px;
    }
    .showcase-title {
        font-size: 1.5rem;
        margin-top: 1.5rem;
    }
}

/* --- Portfolio Cards --- */
.portfolio-card {
    display: block;
    background: #fff;
    border: 1px solid rgba(59, 66, 82, 0.08);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: var(--ss-dark);
    transition: all 0.4s ease;
    height: 100%;
}

.portfolio-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(26, 29, 36, 0.12);
    border-color: transparent;
    color: var(--ss-dark);
}

.portfolio-card__img {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.portfolio-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-card:hover .portfolio-card__img img {
    transform: scale(1.08);
}

.portfolio-card__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 29, 36, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.portfolio-card:hover .portfolio-card__overlay {
    opacity: 1;
}

.portfolio-card__body {
    padding: 1.5rem;
}

.portfolio-card__tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ss-accent);
    background: rgba(74, 111, 165, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 0.6rem;
    letter-spacing: 0.5px;
}

.portfolio-card__title {
    font-family: "Space Grotesk", "Noto Sans TC", sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
}

.portfolio-card__desc {
    color: var(--ss-gray);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* --- Contact Section --- */
#contact {
    background: var(--ss-bg-alt);
    background-image: none !important;
}

#contact .section-heading {
    color: var(--ss-dark);
}

#contact .section-subheading {
    color: var(--ss-gray);
}

.contact-info-card {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    background: #fff;
    border: 1px solid rgba(59, 66, 82, 0.08);
    border-radius: 16px;
}

.contact-greeting {
    margin-bottom: 1.8rem;
}

.contact-bunny {
    font-size: 2.5rem;
    display: inline-block;
    animation: bunnyHop 2s ease-in-out infinite;
}

@keyframes bunnyHop {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    20% { transform: translateY(-12px) rotate(-5deg); }
    40% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(3deg); }
    65% { transform: translateY(0) rotate(0deg); }
}

.contact-wave {
    font-size: 2rem;
    display: inline-block;
    animation: wave 1.5s ease-in-out infinite;
    transform-origin: 70% 70%;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(20deg); }
    50% { transform: rotate(-10deg); }
    75% { transform: rotate(15deg); }
}

.contact-greeting h4 {
    font-family: "Space Grotesk", "Noto Sans TC", sans-serif;
    color: var(--ss-dark);
    font-weight: 700;
    margin: 0.5rem 0 0.6rem;
}

.contact-greeting p {
    color: var(--ss-gray);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.contact-actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.contact-action-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    background: var(--ss-bg);
    border: 1px solid rgba(59, 66, 82, 0.08);
    border-radius: 12px;
    color: var(--ss-dark);
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-action-btn:hover {
    background: var(--ss-light);
    border-color: var(--ss-accent);
    color: var(--ss-dark);
    transform: translateX(4px);
}

.contact-action-btn > i:first-child {
    font-size: 1.3rem;
    width: 20px;
    text-align: center;
    color: var(--ss-accent);
}

.contact-action-btn div {
    flex: 1;
}

.contact-action-btn strong {
    display: block;
    font-size: 0.95rem;
}

.contact-action-btn span {
    font-size: 0.8rem;
    color: var(--ss-gray);
}

.contact-action-arrow {
    font-size: 0.8rem;
    color: rgba(59, 66, 82, 0.3);
    transition: all 0.3s ease;
}

.contact-action-btn:hover .contact-action-arrow {
    color: var(--ss-accent);
    transform: translateX(4px);
}

.contact-note {
    color: var(--ss-gray);
    font-size: 0.85rem;
    margin: 0;
}

.contact-form-card {
    background: #fff;
    border: 1px solid rgba(59, 66, 82, 0.08);
    border-radius: 16px;
    padding: 2rem;
}

.contact-form-title {
    font-family: "Space Grotesk", "Noto Sans TC", sans-serif;
    color: var(--ss-dark);
    font-weight: 600;
    margin-bottom: 1.2rem;
}

.contact-form-card .form-control {
    background: var(--ss-bg);
    border: 1px solid rgba(59, 66, 82, 0.1);
    color: var(--ss-dark);
    border-radius: 10px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form-card .form-control::placeholder {
    color: var(--ss-gray);
}

.contact-form-card .form-control:focus {
    border-color: var(--ss-accent);
    box-shadow: 0 0 0 0.2rem var(--ss-accent-glow);
    background: #fff;
}

/* --- Footer --- */
.footer {
    background-color: var(--ss-primary);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    padding: 2rem 0 !important;
    border-top: none;
}

.footer a {
    color: rgba(255, 255, 255, 0.75) !important;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.footer a:hover {
    color: #fff !important;
}

.footer .text-muted {
    color: rgba(255, 255, 255, 0.4) !important;
}

/* --- Unified Section Flow --- */
.page-section {
    background: var(--ss-bg);
}

.page-section:nth-of-type(even) {
    background: var(--ss-bg-alt);
}

.page-section + .page-section {
    border-top: none;
}

/* Subtle section divider */
.section-heading::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--ss-accent);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* --- Global Transitions --- */
.btn {
    transition: all 0.3s ease;
}

.card, .portfolio-item, .timeline-panel {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* --- Selection Color --- */
::selection {
    background-color: var(--ss-accent);
    color: #fff;
}

/* --- Smooth Scroll --- */
html {
    scroll-behavior: smooth;
}

/* --- Scrollbar Accent --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--ss-light);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--ss-primary), var(--ss-accent));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--ss-primary-hover);
}

/* --- Glow effect for headings on hover --- */
.section-heading {
    transition: text-shadow 0.3s ease;
}

.section-heading:hover {
    text-shadow: 0 0 20px var(--ss-primary-glow);
}

/* --- Why Us Section (dark accent) --- */
.why-section {
    background: var(--ss-bg-dark) !important;
    position: relative;
    overflow: hidden;
}

.why-section .section-heading {
    color: #fff;
}

.why-section .section-heading::after {
    background: var(--ss-accent);
}

.why-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    height: 100%;
    transition: all 0.4s ease;
    cursor: default;
}

.why-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--ss-accent);
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(74, 111, 165, 0.25);
}

.why-card__icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(74, 111, 165, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.4rem;
    color: var(--ss-accent);
    transition: all 0.4s ease;
}

.why-card:hover .why-card__icon {
    background: var(--ss-accent);
    color: #fff;
    transform: scale(1.1);
}

.why-card__title {
    font-family: "Space Grotesk", "Noto Sans TC", sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.why-card__desc {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* --- My Story (center timeline, RNR-inspired) --- */
.mystory-section {
    position: relative;
    overflow: hidden;
}

.mystory-section::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: url("../assets/img/StringStudio_image.png") center / contain no-repeat;
    opacity: 0.08;
    pointer-events: none;
    z-index: 1;
}

.mystory-timeline {
    position: relative;
    padding: 2rem 0;
    max-width: 900px;
    margin: 0 auto;
}

.mystory-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(74, 111, 165, 0.15);
    transform: translateX(-50%);
    z-index: 0;
}

.mystory-line__progress {
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, var(--ss-accent), rgba(74, 111, 165, 0.4));
    border-radius: 2px;
    transition: height 0.1s linear;
}

/* Each row */
.mystory-row {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin-bottom: 3rem;
}

.mystory-row:last-child {
    margin-bottom: 0;
}

/* Left card: content on left, empty on right */
.mystory-row--left {
    justify-content: flex-start;
    padding-right: calc(50% + 28px);
}

/* Right card: content on right, empty on left */
.mystory-row--right {
    justify-content: flex-end;
    padding-left: calc(50% + 28px);
}

/* Center row (CTA) */
.mystory-row--center {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
    flex-direction: column;
    align-items: center;
}

.mystory-row--center .mystory-marker {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    margin-bottom: 1rem;
}

.mystory-row--center:hover .mystory-marker {
    transform: scale(1.2);
}

.mystory-row--center .mystory-card {
    max-width: 400px;
}

/* Marker dot on center line */
.mystory-marker {
    position: absolute;
    left: 50%;
    top: 12px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--ss-bg);
    border: 3px solid var(--ss-accent);
    transform: translateX(-50%);
    z-index: 2;
    transition: all 0.3s ease;
}

.mystory-row:hover .mystory-marker {
    background: var(--ss-accent);
    transform: translateX(-50%) scale(1.2);
    box-shadow: 0 0 0 4px rgba(74, 111, 165, 0.15), 0 0 15px rgba(74, 111, 165, 0.3);
}

.mystory-marker--accent {
    background: var(--ss-accent);
    width: 16px;
    height: 16px;
    box-shadow: 0 0 0 4px rgba(74, 111, 165, 0.15);
}

/* Card (glass-morphism style) */
.mystory-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(74, 111, 165, 0.12);
    border-radius: 12px;
    padding: 1.5rem 1.8rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.mystory-row:hover .mystory-card {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(74, 111, 165, 0.12);
}

.mystory-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--ss-accent);
    background: rgba(74, 111, 165, 0.08);
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    margin-bottom: 0.6rem;
}

.mystory-heading {
    font-family: "Space Grotesk", "Noto Sans TC", sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--ss-dark);
    margin-bottom: 0.5rem;
}

.mystory-text {
    color: var(--ss-gray);
    font-size: 1rem;
    line-height: 1.85;
    margin: 0;
}

/* Mobile: single column, line on left */
@media (max-width: 768px) {
    .mystory-timeline {
        padding: 1rem 0;
    }
    .mystory-line {
        left: 20px;
        transform: none;
    }
    .mystory-marker {
        left: 20px;
        transform: translateX(-50%);
        width: 12px;
        height: 12px;
    }
    .mystory-row:hover .mystory-marker {
        transform: translateX(-50%) scale(1.2);
    }
    .mystory-marker--accent {
        width: 14px;
        height: 14px;
    }
    .mystory-row--left,
    .mystory-row--right {
        padding-left: 48px;
        padding-right: 0;
        justify-content: flex-start;
    }
    .mystory-row--center {
        padding-left: 48px;
        padding-right: 0;
    }
    .mystory-card {
        padding: 1.2rem 1.4rem;
    }
}

/* --- Journey Map (legacy, keep for reference) --- */
.journey-map {
    position: relative;
    padding: 2rem 0 1rem;
    margin-bottom: 2rem;
}

.journey-path {
    position: absolute;
    top: 28px;
    left: 5%;
    width: 90%;
    height: 60px;
    z-index: 0;
}

.journey-line {
    stroke-dashoffset: 1000;
    animation: drawPath 2s ease forwards;
}

@keyframes drawPath {
    to { stroke-dashoffset: 0; }
}

.journey-nodes {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 1;
    padding: 0 2%;
}

.journey-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.journey-node__dot {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid rgba(59, 66, 82, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--ss-gray);
    transition: all 0.4s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.journey-node:hover .journey-node__dot {
    transform: scale(1.15);
    border-color: var(--ss-accent);
    color: var(--ss-accent);
    box-shadow: 0 4px 20px var(--ss-accent-glow);
}

.journey-node.active .journey-node__dot {
    background: var(--ss-accent);
    border-color: var(--ss-accent);
    color: #fff;
    transform: scale(1.15);
    box-shadow: 0 4px 20px var(--ss-accent-glow);
}

.journey-node__label {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ss-gray);
    transition: color 0.3s ease;
}

.journey-node.active .journey-node__label {
    color: var(--ss-accent);
}

.journey-content {
    min-height: 180px;
}

.journey-card {
    padding: 2rem 2.5rem;
    animation: fadeInUp 0.4s ease;
}

@media (max-width: 768px) {
    .journey-node__dot {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
    .journey-node__label {
        font-size: 0.75rem;
    }
    .journey-card {
        padding: 1.5rem;
    }
    .journey-card .col-md-4 {
        display: none;
    }
}

/* --- Page load animation --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.masthead .container > * {
    animation: fadeInUp 0.8s ease forwards;
}

.masthead .container > *:nth-child(2) { animation-delay: 0.15s; }
.masthead .container > *:nth-child(3) { animation-delay: 0.3s; }
.masthead .container > *:nth-child(4) { animation-delay: 0.45s; }
.masthead .container > *:nth-child(5) { animation-delay: 0.6s; }
.masthead .container > *:nth-child(6) { animation-delay: 0.75s; }

/* --- Responsive hero cards --- */
@media (max-width: 576px) {
    .hero-cards {
        gap: 0.75rem;
    }
    .hero-card {
        width: 140px;
        padding: 1rem 0.8rem;
    }
    .hero-card__icon {
        font-size: 1.8rem;
    }
}

/* --- Student Work Expandable Cards --- */
.student-work-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}
.student-work-card.open .student-work-detail {
    max-height: 500px;
    opacity: 1;
}
.student-work-card.open .student-work-arrow {
    transform: rotate(180deg);
}

/* --- Portfolio cards text align left --- */
.student-work-card {
    text-align: left;
}

/* --- Navbar Dropdown --- */
.navbar .dropdown-menu {
    background: #3B4252;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 180px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
.navbar .dropdown-item {
    color: rgba(255, 255, 255, 0.7);
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    transition: background 0.2s, color 0.2s;
}
.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.navbar .dropdown-divider {
    border-color: rgba(255, 255, 255, 0.15);
    margin: 0.3rem 0;
}
.navbar .dropdown-item i {
    width: 20px;
    text-align: center;
}

/* --- Footer Services --- */
.footer-service-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s, transform 0.3s;
}
.footer-service-link i {
    font-size: 1.5rem;
}
.footer-service-link:hover {
    color: #fff;
    transform: translateY(-3px);
}

/* --- Footer Instagram Icon --- */
.footer-ig-link {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s, transform 0.3s;
}
.footer-ig-link:hover {
    color: #E1306C;
    transform: scale(1.2);
}

/* =========================
   Intro Animation
========================= */
.intro-animation {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background:
        radial-gradient(circle at 30% 20%, rgba(74, 111, 165, 0.12), transparent 40%),
        linear-gradient(135deg, #1A1D24 0%, #2E3440 45%, #1A1D24 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    animation: introFadeOut 0.8s ease forwards;
    animation-delay: 3s;
}

.intro-content {
    text-align: center;
    color: #fff;
    padding: 32px;
    animation: introFloat 1s ease forwards;
}

.bead-line {
    position: relative;
    width: 200px;
    height: 70px;
    margin: 0 auto 24px;
}

.bead-line::before {
    content: "";
    position: absolute;
    top: 35px;
    left: 0;
    width: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.6);
    animation: stringGrow 1s ease forwards;
}

.bead {
    position: absolute;
    top: 22px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    opacity: 0;
    transform: translateY(-20px) scale(0.5);
    animation: beadDrop 0.45s ease forwards;
}

.bead-1 {
    left: 12px;
    background: linear-gradient(145deg, #e8ecf2, #4A6FA5);
    box-shadow: 0 0 14px rgba(74, 111, 165, 0.5),
        inset -3px -3px 6px rgba(46, 52, 64, 0.3),
        inset 3px 3px 6px rgba(255, 255, 255, 0.6);
    animation-delay: 0.25s;
}

.bead-2 {
    left: 88px;
    background: linear-gradient(145deg, #f0f4f8, #8fa7c4);
    box-shadow: 0 0 14px rgba(143, 167, 196, 0.5),
        inset -3px -3px 6px rgba(46, 52, 64, 0.3),
        inset 3px 3px 6px rgba(255, 255, 255, 0.6);
    animation-delay: 0.5s;
}

.bead-3 {
    left: 164px;
    background: linear-gradient(145deg, #f7e8ec, #c4a0a8);
    box-shadow: 0 0 14px rgba(196, 160, 168, 0.5),
        inset -3px -3px 6px rgba(46, 52, 64, 0.3),
        inset 3px 3px 6px rgba(255, 255, 255, 0.6);
    animation-delay: 0.75s;
}

.intro-brand {
    opacity: 0;
    transform: translateY(16px);
    animation: brandShow 0.7s ease forwards;
    animation-delay: 1.2s;
}

.intro-en {
    display: block;
    margin: 0 0 4px;
    font-size: 17px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(74, 111, 165, 0.8);
    font-family: "Space Grotesk", sans-serif;
}

.intro-title {
    font-size: clamp(36px, 7vw, 64px);
    letter-spacing: 0.08em;
    font-weight: 800;
    font-family: "Space Grotesk", "Noto Sans TC", sans-serif;
}

.intro-slogan {
    display: block;
    margin: 10px 0 0;
    font-size: clamp(14px, 2.4vw, 20px);
    color: rgba(255, 255, 255, 0.7);
    font-family: "Noto Sans TC", sans-serif;
}

.intro-tags {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 22px;
    opacity: 0;
    animation: tagsShow 0.6s ease forwards;
    animation-delay: 1.9s;
}

.intro-tags span {
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 14px;
    color: #2E3440;
    background: rgba(240, 244, 248, 0.95);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    font-family: "Noto Sans TC", sans-serif;
}

@keyframes stringGrow {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes beadDrop {
    0% { opacity: 0; transform: translateY(-20px) scale(0.5); }
    70% { opacity: 1; transform: translateY(3px) scale(1.06); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes brandShow {
    from { opacity: 0; transform: translateY(16px); filter: blur(4px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes tagsShow {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes introFloat {
    from { transform: scale(0.96); }
    to { transform: scale(1); }
}

@keyframes introFadeOut {
    to { opacity: 0; visibility: hidden; pointer-events: none; }
}

@media (prefers-reduced-motion: reduce) {
    .intro-animation,
    .intro-content,
    .bead-line::before,
    .bead,
    .intro-brand,
    .intro-tags {
        animation-duration: 0.01ms !important;
        animation-delay: 0s !important;
    }
}

/* --- Navbar Logo --- */

