/* ===== CSS Variables ===== */
:root {
    --bg-primary: #f4f2f2;
    --bg-secondary: #f9f9f9;
    --bg-card: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-light: rgba(59, 130, 246, 0.08);
    --border: #e3e3e3;
    --gradient-start: #3b82f6;
    --gradient-end: #8b5cf6;
    --font-sans: 'Inter', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: all 0.3s ease;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    gap: 32px;
}

.nav-menu a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--text-primary);
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #1e293b;
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 24px 60px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 45%, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.02) 30%, transparent 68%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.42) 0%, rgba(244, 242, 242, 0.9) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.highlight {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: var(--text-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
    color: var(--text-primary);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--accent);
    color: var(--text-primary);
}

/* ===== Sections ===== */
.section {
    padding: 100px 0;
}

.section-alt {
    background-color: var(--bg-secondary);
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    margin: 16px auto 0;
    border-radius: 2px;
}

/* ===== About Section ===== */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.8;
}

/* ===== Skills Section ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.skill-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.skill-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow-lg);
}

.skill-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    color: var(--accent);
}

.skill-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.skill-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skill-list li {
    color: var(--text-secondary);
    font-size: 0.95rem;
    padding-left: 16px;
    position: relative;
}

.skill-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--accent);
}

/* ===== Projects Section ===== */

/* Section-level project carousel (peek effect) */
.projects-carousel-outer {
    position: relative;
    max-width: 1000px;
    margin: 0 auto 104px;
    transition: height 0.45s ease;
}

.pj-viewport {
    overflow: hidden;
    cursor: grab;
    transition: height 0.45s ease;
}

.pj-viewport:active {
    cursor: grabbing;
}

.pj-track {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* Each slide: width set by JS; fade/scale for non-active */
.pj-slide {
    flex: 0 0 auto;
    align-self: flex-start;
    min-width: 0;
    opacity: 0.45;
    transform: scale(0.96);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.pj-slide.pj-active {
    opacity: 1;
    transform: scale(1);
}

/* Image in carousel: keep 16/9 so screenshots display without letterbox */
.pj-slide .project-image {
    aspect-ratio: 16/9;
}

/* 2:1 screenshots (Coach Web) */
.pj-slide .project-image--wide {
    aspect-ratio: 2/1;
}

/* Content area: fixed, no internal scroll */
.pj-slide .project-content {
    overflow: hidden;
}

/* Portrait duo layout: two phone screenshots side by side */
.project-image-duo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px 24px;
    background: var(--bg-secondary);
}

.project-image-duo img {
    height: 100%;
    width: auto;
    max-width: 45%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Image placeholder for projects without screenshots */
.project-img-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(59, 130, 246, 0.06) 100%);
    color: var(--text-muted);
}

.project-img-placeholder svg {
    opacity: 0.4;
}

.project-img-placeholder span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Controls row: prev button + dots + next button */
.pj-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
}

/* Navigation buttons (in controls row below the card) */
.pj-nav {
    background: var(--bg-card);
    border: 1px solid var(--border);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    color: var(--text-primary);
    padding: 0;
    flex-shrink: 0;
}

.pj-nav:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    box-shadow: var(--shadow-lg);
}

.pj-nav:disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

/* Dots indicator */
.pj-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pj-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.pj-dot.active {
    background: var(--accent);
    width: 28px;
    border-radius: 5px;
}

/* Base project card styles (standalone / grid fallback) */
.project-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
    /* Force compositing layer — fixes Safari overflow:hidden + border-radius
       not clipping position:absolute children */
    transform: translateZ(0);
}

.project-card:hover {
    transform: translateY(-6px) translateZ(0);
    border-color: var(--accent);
    box-shadow: var(--shadow-lg);
}

/* No hover lift inside carousel — would look odd and cause clipping */
.pj-slide .project-card:hover {
    transform: translateZ(0);
    border-color: var(--border);
    box-shadow: var(--shadow);
}

.project-image {
    position: relative;
    aspect-ratio: 16/9;
    background-color: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

/* ===== Carousel ===== */
.carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.carousel-slides {
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.carousel:hover .carousel-btn {
    opacity: 1;
}

.carousel-btn:hover {
    background: #fff;
}

.carousel-btn-prev {
    left: 10px;
}

.carousel-btn-next {
    right: 10px;
}

.carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.carousel-dot.active {
    background: #fff;
}

.project-placeholder {
    width: 80px;
    height: 80px;
    color: var(--text-muted);
}

.project-content {
    padding: 26px 30px;
}

/* Title row: name + subtitle on left, GitHub icon on right */
.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.project-title-group {
    flex: 1;
    min-width: 0;
}

.project-github-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: var(--transition);
}

.project-github-btn:hover {
    background: var(--text-primary);
    border-color: var(--text-primary);
    color: white;
}

.project-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.project-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

.project-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
    line-height: 1.65;
}

.project-features {
    margin-bottom: 16px;
}

.project-features h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.project-features ul {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.project-features li {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding-left: 20px;
    position: relative;
}

.project-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.8rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tag {
    background-color: var(--accent-light);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 20px;
}

.project-links {
    display: flex;
    gap: 16px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: var(--transition);
}

.project-link:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--text-primary);
}

.project-link svg {
    width: 18px;
    height: 18px;
}

/* ===== Architecture Section ===== */
.architecture-section {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
}

.architecture-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.architecture-section > p {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* Visual Architecture */
.arch-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.arch-layer {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.arch-layer-split {
    gap: 60px;
}

.arch-node {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 24px 32px;
    min-width: 180px;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.arch-node:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.arch-node .arch-icon {
    color: var(--accent);
}

.arch-node:hover {
    border-color: var(--accent);
}

.arch-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
}

.arch-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.arch-sublabel {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.arch-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 32px;
}

.arch-line {
    width: 2px;
    height: 100%;
    background: var(--border);
}

.arch-connector-split {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    max-width: 440px;
    height: 32px;
    position: relative;
}

.arch-connector-split::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 12px;
    background: var(--border);
}

.arch-connector-split::after {
    content: '';
    position: absolute;
    top: 12px;
    left: calc(50% - 140px);
    width: 280px;
    height: 2px;
    background: var(--border);
}

.arch-connector-split .arch-line-left,
.arch-connector-split .arch-line-right {
    position: absolute;
    top: 12px;
    width: 2px;
    height: 20px;
    background: var(--border);
}

.arch-connector-split .arch-line-left {
    left: calc(50% - 140px);
}

.arch-connector-split .arch-line-right {
    right: calc(50% - 140px);
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, var(--gradient-start), var(--gradient-end));
}

.timeline-item {
    position: relative;
    padding-left: 40px;
    padding-bottom: 40px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 2px var(--border);
}

.timeline-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.timeline-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 8px;
}

.timeline-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.timeline-company {
    color: var(--accent);
    font-size: 0.95rem;
}

.timeline-date {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.timeline-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timeline-details li {
    color: var(--text-secondary);
    font-size: 0.95rem;
    padding-left: 20px;
    position: relative;
}

.timeline-details li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* ===== Contact Section ===== */
.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-content > p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    padding: 16px 24px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: var(--transition);
}

.contact-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    color: var(--text-primary);
}

.contact-item svg {
    width: 24px;
    height: 24px;
    color: var(--accent);
}

/* ===== Footer ===== */
.footer {
    padding: 40px 24px;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== Responsive Design ===== */

/* Tablet */
@media (max-width: 900px) {
    .projects-carousel-outer {
        margin-bottom: 88px;
    }

    .pj-viewport {
        overflow: visible;
    }

    .pj-track {
        display: block;
        transform: none !important;
    }

    .pj-slide {
        display: none;
        width: 100% !important;
        flex-basis: 100% !important;
        opacity: 1;
        transform: none;
    }

    .pj-slide.pj-active {
        display: block;
    }

    .pj-controls {
        margin-top: 16px;
    }
}

@media (max-width: 768px) {
    .projects-carousel-outer {
        margin-bottom: 128px;
    }

    .pj-controls {
        margin-top: 24px;
    }

    .nav-menu {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background-color: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        padding: 24px;
        gap: 0;
        border-bottom: 1px solid var(--border);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-menu li {
        border-bottom: 1px solid var(--border);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu a {
        display: block;
        padding: 16px 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .section {
        padding: 80px 0;
    }

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

    .architecture-section {
        padding: 24px;
        margin-top: 32px;
    }

    .arch-layer-split {
        flex-direction: column;
        gap: 20px;
    }

    .arch-connector-split {
        height: 24px;
        max-width: 100%;
    }

    .arch-connector-split::before {
        height: 24px;
    }

    .arch-connector-split::after {
        display: none;
    }

    .arch-connector-split .arch-line-left,
    .arch-connector-split .arch-line-right {
        display: none;
    }

    /* Add connector between stacked frontend nodes */
    .arch-layer-split .arch-node:not(:last-child)::after {
        content: '';
        position: absolute;
        bottom: -22px;
        left: 50%;
        transform: translateX(-50%);
        width: 2px;
        height: 20px;
        background: var(--border);
    }

    .arch-layer-split .arch-node {
        position: relative;
    }

    .arch-node {
        min-width: 160px;
        padding: 20px 24px;
    }

    .timeline::before {
        left: 5px;
    }

    .timeline-marker {
        width: 12px;
        height: 12px;
    }

    .timeline-item {
        padding-left: 30px;
    }

    .timeline-content {
        padding: 28px 24px;
    }

    .timeline-header {
        flex-direction: column;
        gap: 4px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .projects-carousel-outer {
        margin-bottom: 144px;
    }

    .architecture-section {
        margin-top: 40px;
    }

    .timeline-content {
        padding: 28px 24px;
    }

    .hero {
        padding: 80px 16px 40px;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .container {
        padding: 0 16px;
    }

    .section-title {
        margin-bottom: 40px;
    }

    .project-content {
        padding: 20px;
    }

    .contact-links {
        flex-direction: column;
    }

    .contact-item {
        width: 100%;
        justify-content: center;
    }

    .arch-node {
        min-width: 140px;
        padding: 16px 20px;
    }

    .arch-icon {
        width: 36px;
        height: 36px;
    }

    .arch-label {
        font-size: 0.95rem;
    }

    .arch-sublabel {
        font-size: 0.75rem;
    }

    .arch-connector {
        height: 30px;
    }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

/* ===== Print Styles ===== */
@media print {
    .navbar,
    .hero-buttons,
    .project-links {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .section {
        padding: 40px 0;
    }
}
