/* --- Google Fonts (Google Sans) --- */
@font-face {
    font-family: 'Google Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(https://fonts.gstatic.com/s/googlesans/v69/4Ua_rENHsxJlGDuGo1OIlJfC6l_24rlCK1Yo_Iqcsih3SAyH6cAwhX9RFD48TE63OOYKtrwEIKli.ttf) format('truetype');
}
@font-face {
    font-family: 'Google Sans';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(https://fonts.gstatic.com/s/googlesans/v69/4Ua_rENHsxJlGDuGo1OIlJfC6l_24rlCK1Yo_Iqcsih3SAyH6cAwhX9RFD48TE63OOYKtrw2IKli.ttf) format('truetype');
}
@font-face {
    font-family: 'Google Sans';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(https://fonts.gstatic.com/s/googlesans/v69/4Ua_rENHsxJlGDuGo1OIlJfC6l_24rlCK1Yo_Iqcsih3SAyH6cAwhX9RFD48TE63OOYKtrzjJ6li.ttf) format('truetype');
}

/* --- CSS Variables & Reset --- */
:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #06b6d4;
    /* Cyan */
    --accent-hover: #22d3ee;
    --font-main: "Google Sans", "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "PingFang SC", "Noto Sans TC", "Noto Sans", "Microsoft JhengHei", "微軟正黑體", sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    font-family: var(--font-main);
}

html,
body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.page-mini-title {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: left;
    width: 100%;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 3rem;
    padding: 0 2rem;
}

p {
    font-size: 1.1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* --- Header / Navigation --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: calc(1rem + env(safe-area-inset-top, 0px)) calc(5% + env(safe-area-inset-right, 0px)) 1rem calc(5% + env(safe-area-inset-left, 0px));
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 1px;
}

nav ul {
    display: flex;
    gap: 2.2rem;
    align-items: center;
    justify-content: center;
}

nav ul li a {
    font-size: 1.2rem;
    font-weight: 500;
}

nav a:hover {
    color: var(--accent-color);
}

/* Mobile Menu Button */
.menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    /* Ensure it stays above the full-screen menu */
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10%;
    gap: 4rem;
    position: relative;
}

/* Background Glow Effect */
.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

/* Ensure hero section doesn't cause horizontal overflow */
.hero {
    overflow: hidden;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, #fff, var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.hero-desc {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.8rem 2rem;
    background: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn:hover {
    background: var(--accent-color);
    color: var(--bg-color);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}

.btn-primary {
    background: #fff;
    border-color: #fff;
    color: #000;
}

.btn-primary:hover {
    background: #e2e2e2;
    border-color: #e2e2e2;
    color: #000;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

.btn-outline {
    background: transparent;
    border-color: #fff;
    color: #fff;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.hero-img-container {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.hero-img {
    width: 350px;
    height: 350px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--accent-color);
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.2);
    position: relative;
    z-index: 2;
}

/* --- Section General --- */
section {
    padding: 5rem 10%;
}

section:not(.hero) {
    padding-top: 120px;
    min-height: calc(100vh - 100px);
}

.section-title {
    font-size: 2rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* --- Experience Section (Timeline) --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.container {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    opacity: 0;
    /* Animation init */
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.container.show {
    opacity: 1;
    transform: translateY(0);
}

.container::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    right: -8px;
    background-color: var(--bg-color);
    border: 4px solid var(--accent-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.left {
    left: 0;
    text-align: right;
}

.right {
    left: 50%;
    text-align: left;
}

.left::after {
    right: -8px;
}

.right::after {
    left: -8px;
}

.content {
    padding: 20px 30px;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
}

.content h3 {
    color: var(--accent-color);
    margin-bottom: 5px;
}

.content h4 {
    font-size: 0.9rem;
    color: #fff;
    margin-bottom: 10px;
}

.content small {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-size: 0.8rem;
}

.content p {
    font-size: 0.95rem;
    color: #cbd5e1;
}

/* --- Ben Roach Design Replicant (work.html) --- */
.br-work-section {
    padding: 150px 5% 100px;
    max-width: 1400px;
    margin: 0 auto;
}

.br-portfolio-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8rem;
}

.br-project-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 840px;
    /* Approx 20% wider than the previous 697px */
    text-decoration: none;
    color: var(--text-main);
    group: project-hover;
}

.br-project-image {
    width: 100%;
    border-radius: 28px;
    overflow: clip;
    position: relative;
    aspect-ratio: 2 / 1;
    background-color: rgb(255, 255, 255);
    cursor: pointer;
    box-sizing: border-box;
    display: block;
    z-index: 1;
    transform: translateZ(0);
    /* Force hardware acceleration */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.br-project-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.br-project-card:hover .br-project-image img {
    transform: scale(1.05);
}

/* Card Style with Stats */
.br-project-info {
    margin-top: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0 0.5rem;
    width: 100%;
    box-sizing: border-box;
}

.br-project-title {
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #f4f4f5;
    margin: 0 0 0.6rem 0;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.br-project-meta-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #a1a1aa;
    font-size: 0.95rem;
    width: 100%;
}

.meta-company {
    font-weight: 500;
}

.meta-stats {
    display: flex;
    gap: 1.2rem;
    font-weight: 500;
    align-items: center;
    color: #888;
}

.meta-stats span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.meta-stats i {
    font-size: 1.1rem;
}

.br-project-card:hover .br-project-title {
    color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 768px) {
    .br-portfolio-grid {
        gap: 4rem;
    }

    .br-project-info {
        flex-direction: column;
        gap: 0.5rem;
    }

    .br-project-image {
        aspect-ratio: 2 / 1;
    }
}

/* --- Leadership Cards & Accordion --- */
.leadership-cards-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 840px;
    margin: 0 auto;
}

.leadership-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 2.5rem;
}

.leadership-card-header {
    margin-bottom: 2rem;
}

.leadership-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.leadership-title h3 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 500;
}

.highlight-text {
    color: var(--accent-color);
    font-weight: bold;
}

blockquote.philosophy-quote {
    text-align: center;
    font-size: 1.3rem;
    font-style: italic;
    font-weight: 300;
    margin: 2rem auto;
    padding: 1.2rem 2.5rem;
    max-width: 900px;
    color: var(--text-main);
    border-left: 4px solid var(--accent-color);
    background: linear-gradient(to right, rgba(6, 182, 212, 0.1), transparent);
    border-radius: 0 8px 8px 0;
}

.quote-label {
    display: block;
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.8rem;
    opacity: 0.7;
}

.leadership-title .skill-icon {
    font-size: 2.2rem;
    color: var(--accent-color);
}

.leadership-desc {
    color: var(--text-secondary);
    font-size: 1.2rem;
    line-height: 1.6;
    margin: 0;
}

.br-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.accordion-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.accordion-item.active {
    border-color: var(--accent-color);
}

.accordion-header {
    width: 100%;
    padding: 1.2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    text-align: left;
    transition: background 0.3s;
}

.accordion-header h4 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
}

.accordion-header:hover {
    /* No background change on hover per user request */
}

.accordion-arrow {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
    color: var(--text-secondary);
}

.accordion-item.active .accordion-arrow {
    transform: rotate(180deg);
    color: var(--accent-color);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.accordion-content-inner {
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.accordion-content-inner p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.5;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.5rem;
}

.tag {
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* --- Footer --- */
footer {
    padding: 2rem;
    text-align: center;
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 3rem;
}

.social-links {
    margin-bottom: 1rem;
}

.social-links a {
    font-size: 1.5rem;
    margin: 0 10px;
    color: var(--text-secondary);
}

.social-links a:hover {
    color: var(--accent-color);
}

/* --- Responsive Design --- */
/* Tablet & Medium Screens */
@media (max-width: 1024px) {
    section {
        padding: 4rem 5%;
    }

    .hero {
        padding: 0 5%;
        gap: 2rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-img {
        width: 300px;
        height: 300px;
    }

    .timeline {
        max-width: 100%;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 120px;
        padding-bottom: 2rem;
        min-height: auto;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-img {
        width: 250px;
        height: 250px;
    }

    /* Timeline responsive adjustments */
    .timeline::after {
        left: 31px;
    }

    .container {
        width: 100%;
        padding-left: 70px;
        padding-right: 20px;
    }

    .container::after,
    .left::after,
    .right::after {
        left: 23px;
        right: auto;
    }

    .left {
        text-align: left;
    }

    .right {
        left: 0;
    }

    /* Navigation Menu (Slide Down Dropdown for Mobile) */
    nav {
        display: grid;
        grid-template-rows: 0fr;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-color);
        backdrop-filter: none;
        z-index: 999;
        transition: grid-template-rows 0.3s ease-out;
        overflow: hidden;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    }

    nav ul {
        min-height: 0;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        width: 100%;
        align-items: center;
        padding: 0;
        transition: padding 0.3s ease-out;
    }

    nav ul li a {
        font-size: 1.2rem;
        display: block;
        width: 100%;
    }

    nav.active {
        grid-template-rows: 1fr;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    nav.active ul {
        padding: 2rem 0;
    }

    .menu-btn {
        display: block;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-img {
        width: 200px;
        height: 200px;
    }

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

    .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }

    /* Make buttons stack vertically on very small screens */
    .hero-content>div[style*="display: flex"] {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .hero-content .btn {
        width: 100%;
        text-align: center;
    }
}

.material-symbols-outlined {
    vertical-align: middle;
}

/* --- Project Detail Pages (work1, work2, work3) --- */
section.project-header {
    padding: 150px 10% 0px;
    width: 100%;
    box-sizing: border-box;
    min-height: auto;
}

.project-header-content {
    max-width: 900px;
    margin: 0 auto 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.project-meta {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
}

.project-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    letter-spacing: -0.02em;
}

.project-hero-image {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    aspect-ratio: 2 / 1;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    background-color: var(--card-bg);
}

.project-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.section-divider {
    width: 100%;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 4rem 0;
    border: none;
}

.project-glance {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2.5rem 0;
    margin-bottom: 4rem;
}

.project-glance h3 {
    font-size: 1.2rem;
    color: #5CC5E5;
    margin-bottom: 2rem;
    font-weight: 600;
}

.project-glance p {
    color: #D9DBDC;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.project-glance strong {
    display: block;
    color: #fff;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.project-glance p:last-child {
    margin-bottom: 0;
}

.br-section {
    display: flex;
    gap: 2rem;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.br-section:first-child {
    padding-top: 0;
}

.br-section-header {
    flex: 0 0 180px;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.4rem;
    align-self: flex-start;
}

.br-section-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    white-space: nowrap;
}

.br-section-line {
    flex: 1;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
}

.br-section-content {
    flex: 1;
    color: #D9DBDC;
}

.br-section-content p,
.br-section-content ul {
    margin-bottom: 1.5rem;
}

.br-section-content p:last-child,
.br-section-content ul:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .project-header {
        padding-top: 120px;
        padding-bottom: 0px;
    }

    .br-section {
        flex-direction: column;
        gap: 1rem;
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .br-section-header {
        flex: none;
        width: 100%;
        margin-top: 0;
    }
}

section.project-details {
    padding: 2rem 10% 100px;
    background: var(--bg-color);
}

.project-details-grid {
    max-width: 900px;
    margin: 0 auto;
}

.project-meta-col {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.meta-item h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.meta-item p {
    font-size: 1.1rem;
    color: #fff;
    font-weight: 500;
}

.project-content-col h2 {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.project-content-col p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #D9DBDC;
    margin-bottom: 2.5rem;
}

.project-content-col p:has(+ ul) {
    margin-bottom: 0.8rem;
}

.project-content-col li {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #D9DBDC;
    margin-bottom: 0.5rem;
}

.project-content-col em {
    color: #757680;
}

/* --- Info Card Grid for Strategy & Result --- */
.info-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 2.5rem;
}

.info-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.info-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.info-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(92, 197, 229, 0.1);
    color: #5CC5E5;
    margin-bottom: 1.25rem;
}

.info-card-icon .material-symbols-outlined {
    font-size: 20px;
}

.info-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
}

.project-content-col p.info-card-desc {
    font-size: 1rem;
    line-height: 1.6;
    color: #D9DBDC;
    margin-bottom: 0;
}

/* --- Metric Card Grid for Result Section --- */
.metric-card-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.metric-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.metric-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.metric-category {
    color: #0093C1;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.25rem;
}

.metric-value {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    line-height: 1.2;
}

.metric-desc {
    color: #a0a0a0;
    font-size: 1rem;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .project-details-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Page Transition Overlay --- */
#page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.4s ease;
    visibility: visible;
}

#page-transition-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.md-spinner {
    animation: rotate 2s linear infinite;
    z-index: 2;
    width: 50px;
    height: 50px;
}

.md-spinner .path {
    stroke: var(--accent-color);
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }

    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }

    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}


/* --- Certificate Carousel --- */
.cert-carousel-wrapper {
    margin-top: 4rem;
    width: 100%;
    overflow: hidden;
    position: relative;
    /* Faded edges to mimic Ben Roach's smooth marquee */
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.cert-carousel-track {
    display: flex;
    width: max-content;
    animation: scroll-carousel 40s linear infinite;
}

.cert-carousel-track:hover {
    animation-play-state: paused;
}

.cert-set {
    display: flex;
    gap: 2rem;
    padding-right: 2rem;
}

.cert-set img {
    height: 220px;
    width: auto;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: brightness(0.9);
}

.cert-set img:hover {
    transform: scale(1.02);
    filter: brightness(1);
}

@keyframes scroll-carousel {
    to {
        transform: translateX(-50%);
    }
}

/* --- My Page Styles (Migrated) --- */
#about {
    padding-top: 140px !important;
    padding-bottom: 100px;
    min-height: calc(100vh - 100px);
}

.about-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.about-hero {
    margin-bottom: 6rem;
}

.about-hero h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.2;
    margin-bottom: 2rem;
    color: #fff;
    font-weight: 700;
}

.about-hero p {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    line-height: 1.8;
    color: #ccc;
    max-width: 800px;
}

.about-links {
    margin-top: 3rem;
    display: flex;
    gap: 2rem;
}

.about-links a {
    color: #e0a96d;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    border-bottom: 1px solid transparent;
    transition: border-bottom 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.about-links a:hover {
    border-bottom: 1px solid #e0a96d;
}

.about-section {
    margin-bottom: 5rem;
}

.about-section h2 {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.exp-item {
    display: flex;
    gap: 1.5rem;
    padding: 3rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.exp-item:first-of-type {
    padding-top: 1rem;
}

.exp-item:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.exp-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    padding: 8px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.exp-content {
    flex: 1;
}

.exp-content h3 {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.exp-job-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.exp-job-row .title {
    color: #cccccc;
    font-size: 1.1rem;
    font-weight: 500;
}

.exp-job-row .date {
    color: #e5e5e5;
    font-size: 1.05rem;
}

.exp-desc p {
    color: #a3a3a3;
    line-height: 1.7;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.exp-desc p a {
    color: var(--accent-color);
    text-decoration: underline;
    text-underline-offset: 4px;
    font-weight: 500;
}

.exp-desc p a:hover {
    color: var(--accent-hover);
}

.tools-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.tool-tag {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.95rem;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
}

/* --- Instagram Preview Card --- */
.ig-preview-card {
    display: block;
    max-width: 400px;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.ig-preview-card:hover {
    transform: translateY(-5px);
    border-color: #E1306C;
    box-shadow: 0 15px 35px rgba(225, 48, 108, 0.2);
}

.ig-preview-card .ig-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ig-preview-card .ig-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.5rem;
}

.ig-preview-card .ig-info {
    display: flex;
    flex-direction: column;
}

.ig-preview-card .ig-username {
    font-weight: 600;
    font-size: 1.1rem;
    color: #fff;
}

.ig-preview-card .ig-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.ig-preview-card .ig-body p {
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.5;
    margin: 0;
}

/* Next Projects Navigation */
.next-projects-container {
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.next-projects-title {
    margin-bottom: 2rem;
    font-size: 1.5rem;
    color: var(--text-color, #fff);
    font-weight: 600;
}
.next-projects-grid {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.next-project-card {
    text-decoration: none;
    flex: 1;
    min-width: 250px;
    background: #151c28; /* Slightly lighter than #0B111E but in the same hue */
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}
.next-project-card:hover {
    background: #1c2636;
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
}
.next-project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.next-project-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #a0a0a0;
    font-size: 0.85rem;
}
.next-project-icon {
    width: 24px;
    height: 24px;
    background: var(--accent-color, #5CC5E5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.next-project-icon .material-symbols-outlined {
    font-size: 14px;
    color: #111;
}
.next-project-name {
    color: var(--text-color, #fff);
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.4;
    font-weight: 500;
}

/* --- Q&A Table Layout --- */
.qa-image-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 2.5rem auto;
    padding: 0 2rem;
    box-sizing: border-box;
}

.qa-image-aspect {
    aspect-ratio: 2.2 / 1;
}

.qa-image-disclaimer {
    text-align: right;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 0.5rem;
}

.qa-tags {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 5rem auto;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0 2rem;
}

.qa-tags .tool-tag {
    font-size: 1.05rem;
    padding: 0.7rem 1.4rem;
}

@media (max-width: 768px) {
    .qa-tags {
        padding: 0 1.5rem;
        margin-bottom: 3.5rem;
        gap: 0.6rem;
    }
    .qa-tags .tool-tag {
        font-size: 0.95rem;
        padding: 0.5rem 1rem;
    }
}

.qa-table {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    padding: 0 2rem;
}

.qa-header {
    display: flex;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-main);
}

.qa-row {
    display: flex;
    padding: 2.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.qa-row:last-child {
    border-bottom: none;
}

.qa-col-left {
    flex: 0 0 35%;
    padding-right: 3rem;
}

.qa-col-right {
    flex: 0 0 65%;
}

.qa-header .qa-col-left,
.qa-header .qa-col-right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.dot-red {
    width: 10px;
    height: 10px;
    background-color: #ff3b30;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.dot-green {
    width: 10px;
    height: 10px;
    background-color: #34c759;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.qa-col-left h3 {
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--text-main);
    margin: 0;
    line-height: 1.5;
}

.qa-col-right h3 {
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--text-main);
    margin: 0 0 1.2rem 0;
    line-height: 1.5;
}

.qa-col-right p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 768px) {
    .qa-table {
        padding: 0 1rem;
    }
    .qa-row {
        padding: 1.5rem 0;
    }
    .qa-col-left, .qa-col-right {
        flex: 0 0 50%;
    }
    .qa-col-left {
        padding-right: 0.5rem;
    }
    .qa-col-right {
        padding-left: 0.5rem;
    }
    .qa-header {
        font-size: 1rem;
    }
    .qa-col-left h3, .qa-col-right h3 {
        font-size: 1.1rem;
    }
    .qa-col-right p {
        font-size: 0.95rem;
    }
    .qa-image-container {
        padding: 0 1.5rem;
    }
    .qa-image-aspect {
        aspect-ratio: 1.8 / 1;
    }
    .qa-image-disclaimer {
        font-size: 0.75rem;
    }
}