/* ================================
   CSS Variables & Reset
================================ */
:root {
    /* Minimalist Color Palette */
    --color-bg: #f8f9fa;
    --color-text: #1a1a1a;
    --color-text-secondary: #6b7280;
    --color-accent: #374151;
    --color-line: #e5e7eb;
    --color-card-bg: #ffffff;
    --color-card-hover: #f9fafb;

    /* Typography */
    --font-heading: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;

    --spacing-section: 120px;
    --spacing-section-mobile: 80px;
    --max-width: 1200px;
    --content-left-margin: 8vw;

    --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Card Shadow */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.8;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background-color: var(--color-text);
    color: var(--color-bg);
}

/* ================================
   Navigation
================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 24px 0;
    /* Hidden by default */
    transform: translateY(-100%);
    opacity: 0;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    background: transparent;
    transition:
        transform 0.8s var(--ease-smooth),
        opacity 0.8s var(--ease-smooth),
        backdrop-filter 0.8s var(--ease-smooth),
        background 0.8s var(--ease-smooth);
}

.nav.visible {
    transform: translateY(0);
    opacity: 1;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.nav-links {
    display: flex;
    gap: 48px;
}

.nav-link {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    text-decoration: none;
    position: relative;
    transition: color 0.3s var(--ease-smooth);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-text);
    transition: width 0.3s var(--ease-smooth);
}

.nav-link:hover {
    color: var(--color-text);
}

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

.nav-link.active {
    color: var(--color-text);
}

.nav-link.active::after {
    width: 100%;
}

/* Dark mode nav */
@media (prefers-color-scheme: dark) {
    .nav.visible {
        background: rgba(255, 255, 255, 0.92);
    }
}

/* ================================
   Layout
================================ */
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.section {
    padding: var(--spacing-section) 48px;
    padding-left: var(--content-left-margin);
}

.section-content {
    max-width: 640px;
}

/* ================================
   Typography
================================ */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 400;
}

h1 {
    font-size: clamp(3.5rem, 8vw, 6rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

h2 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    margin-bottom: 40px;
    letter-spacing: 0.02em;
    font-weight: 400;
}

h3 {
    font-size: 1.25rem;
    font-weight: 500;
}

p {
    color: var(--color-text-secondary);
}

/* ================================
   Hero Section
================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 48px;
    padding-left: var(--content-left-margin);
    position: relative;
    overflow: hidden;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--color-card-bg);
    border: 1px solid var(--color-line);
    border-radius: 100px;
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    margin-bottom: 32px;
    animation: fadeInUp 1s var(--ease-smooth) 0.2s both;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}

.hero-greeting {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
    letter-spacing: 0.02em;
    animation: fadeInUp 1s var(--ease-smooth) 0.3s both;
}

.hero-title {
    margin-bottom: 24px;
    animation: fadeInUp 1s var(--ease-smooth) 0.4s both;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
    animation: fadeInUp 1s var(--ease-smooth) 0.5s both;
}

.hero-tag {
    font-size: 0.875rem;
    color: var(--color-text);
    padding: 6px 16px;
    background: transparent;
    border: 1px solid var(--color-line);
    border-radius: 4px;
    transition: all 0.3s var(--ease-smooth);
}

.hero-tag:hover {
    background: var(--color-text);
    color: var(--color-bg);
    border-color: var(--color-text);
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    animation: fadeInUp 1s var(--ease-smooth) 0.6s both;
}

/* Hero Decoration */
.hero-decoration {
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    pointer-events: none;
}

.deco-line {
    position: absolute;
    background: linear-gradient(180deg, var(--color-line) 0%, transparent 100%);
    opacity: 0.6;
}

.deco-line-1 {
    width: 1px;
    height: 40%;
    right: 20%;
    top: 20%;
    animation: lineGrow 2s var(--ease-smooth) 0.8s both;
}

.deco-line-2 {
    width: 1px;
    height: 30%;
    right: 30%;
    top: 35%;
    animation: lineGrow 2s var(--ease-smooth) 1s both;
}

@keyframes lineGrow {
    from { transform: scaleY(0); transform-origin: top; }
    to { transform: scaleY(1); transform-origin: top; }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.typewriter {
    display: inline;
}

.cursor {
    display: inline-block;
    animation: blink 1s step-end infinite;
    color: var(--color-text-secondary);
}

/* ================================
   Section Header (Minimalist)
================================ */
.section-header {
    margin-bottom: 32px;
}

.section-number {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    opacity: 0.6;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 8px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: -0.01em;
}

/* ================================
   About Section
================================ */
.about {
    border-top: 1px solid var(--color-line);
}

.about-text {
    font-size: 1.125rem;
    line-height: 2;
    margin-bottom: 24px;
}

.about-stats {
    display: flex;
    gap: 48px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--color-line);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 500;
    color: var(--color-text);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

/* ================================
   Projects Section
================================ */
.projects {
    border-top: 1px solid var(--color-line);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.project-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-line);
    padding: 28px 32px;
    transition: all 0.3s var(--ease-smooth);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

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

.project-card:active {
    transform: translateY(-2px);
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.project-tag {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    background: var(--color-bg);
    padding: 4px 10px;
    border-radius: 4px;
}

.project-year {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

.project-title {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--color-text);
    transition: color 0.3s var(--ease-smooth);
}

.project-card:hover .project-title {
    color: var(--color-accent);
}

.project-desc {
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    transition: all 0.3s var(--ease-smooth);
    font-weight: 500;
}

.project-link svg {
    transition: transform 0.3s var(--ease-smooth);
}

.project-card:hover .project-link {
    color: var(--color-text);
}

.project-card:hover .project-link svg {
    transform: translateX(4px);
}

/* ================================
   Contact Section
================================ */
.contact {
    border-top: 1px solid var(--color-line);
}

.contact-text {
    font-size: 1.125rem;
    line-height: 2;
    margin-bottom: 40px;
}

.email-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    color: var(--color-text);
    text-decoration: none;
    margin-bottom: 48px;
    position: relative;
    transition: color 0.2s var(--ease-smooth);
}

.email-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-text);
    transition: width 0.3s var(--ease-smooth);
}

.email-link:hover::after {
    width: 100%;
}

.email-link:hover {
    color: var(--color-accent);
}

.link-arrow {
    transition: transform 0.3s var(--ease-smooth);
}

.email-link:hover .link-arrow {
    transform: translateX(4px);
}

.social-links {
    display: flex;
    gap: 24px;
}

.social-link {
    color: var(--color-text-secondary);
    transition: all 0.2s var(--ease-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-link:hover {
    color: var(--color-text);
    transform: scale(1.15);
}

.social-link:active {
    transform: scale(1.05);
}

/* ================================
   Footer
================================ */
.footer {
    margin-top: auto;
    padding: 48px;
    padding-left: var(--content-left-margin);
    border-top: 1px solid var(--color-line);
}

.copyright {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

/* ================================
   Scroll Animations
================================ */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 0.8s var(--ease-smooth),
        transform 0.8s var(--ease-smooth);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for siblings */
.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }
.animate-on-scroll:nth-child(5) { transition-delay: 0.4s; }

/* Project cards stagger */
[data-delay="100"] { transition-delay: 0.1s; }
[data-delay="200"] { transition-delay: 0.2s; }
[data-delay="300"] { transition-delay: 0.3s; }

/* ================================
   Focus States
================================ */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 4px;
}

/* ================================
   Responsive
================================ */
@media (max-width: 1024px) {
    :root {
        --content-left-margin: 6vw;
    }
}

@media (max-width: 768px) {
    :root {
        --spacing-section: 80px;
        --content-left-margin: 24px;
    }

    .nav-container {
        padding: 0 24px;
    }

    .nav-links {
        gap: 16px;
    }

    .nav-link {
        font-size: 0.75rem;
    }

    .section {
        padding: var(--spacing-section) 24px;
    }

    .hero {
        min-height: 90vh;
        padding: 0 24px;
    }

    .hero-badge {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .hero-title {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }

    .hero-tags {
        gap: 8px;
    }

    .hero-tag {
        font-size: 0.8125rem;
        padding: 4px 12px;
    }

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

    .hero-decoration {
        display: none;
    }

    .section-header {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 32px;
    }

    .section-title::after {
        display: none;
    }

    .about-text {
        font-size: 1rem;
    }

    .about-stats {
        flex-direction: column;
        gap: 24px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .project-card {
        padding: 24px;
    }

    .project-meta {
        flex-wrap: wrap;
    }

    .email-link {
        font-size: 1rem;
    }

    .social-links {
        gap: 20px;
    }

    .social-link svg {
        width: 22px;
        height: 22px;
    }

    .footer {
        padding: 48px 24px;
    }
}

/* ================================
   Reduced Motion
================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .animate-on-scroll,
    .nav {
        opacity: 1;
        transform: none;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ================================
   GitHub Loading Animation
================================ */
.github-loading {
    display: flex;
    gap: 8px;
    padding: 40px 0;
}

.loading-dot {
    width: 8px;
    height: 8px;
    background: var(--color-text-secondary);
    border-radius: 50%;
    animation: loadingPulse 1.4s ease-in-out infinite both;
    opacity: 0.4;
}

.loading-dot:nth-child(1) { animation-delay: 0s; }
.loading-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes loadingPulse {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.no-repos,
.repos-error {
    font-size: 1rem;
    color: var(--color-text-secondary);
    padding: 40px 0;
}

.repos-error .error-link {
    color: var(--color-text);
    text-decoration: underline;
}

/* ================================
   Index Page Inline Styles
================================ */

/* ====== 确保背景与排版纯白极简 ====== */
body { background-color: #ffffff !important; }

/* ====== Hero 文本排版美化 ====== */
.hero-greeting {
    font-family: 'Cormorant Garamond', serif !important;
    font-style: italic !important;
    font-size: 1.6rem !important;
    color: #888888 !important;
    margin-bottom: 0.5rem !important;
}

.hero-title {
    font-size: clamp(4rem, 8vw, 6.5rem) !important;
    font-weight: 700 !important;
    color: #111111 !important;
    letter-spacing: -0.02em !important;
    margin-bottom: 1.5rem !important;
    line-height: 1.1 !important;
}

.hero-desc {
    font-size: 1.25rem !important;
    color: #666666 !important;
    line-height: 1.8 !important;
    font-weight: 400 !important;
}

.hero-desc i {
    font-family: 'Cormorant Garamond', serif !important;
    font-style: italic !important;
    font-weight: 500 !important;
    color: #111111 !important;
}

/* ====== 核心修复：解决卡片丢失与全屏失衡 ====== */
#hero {
    justify-content: flex-start !important;
    padding: 0 max(48px, calc((100vw - 1200px) / 2 + 48px)) !important;
}

.hero-content {
    flex: 0 1 550px !important;
}

/* 重构右侧装饰：使其显示为重叠卡片 */
.hero-decoration {
    position: relative !important;
    flex: 0 0 400px !important;
    height: 500px !important;
    margin-left: clamp(40px, 8vw, 150px) !important;
    pointer-events: auto !important;
    width: auto !important;
    top: auto !important;
    right: auto !important;
}

.deco-line {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    border-radius: 24px !important;
    background: none !important;
    animation: none !important; /* 清除原有细线动画 */
    opacity: 1 !important;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.deco-line-1 {
    width: 320px !important;
    height: 440px !important;
    background: linear-gradient(135deg, #F9F9FB 0%, #FFFFFF 100%) !important;
    border: 1px solid #EEEEEE !important;
    transform: translate(-50%, -50%) rotate(-6deg) !important;
    z-index: 1 !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.03) !important;
}

.deco-line-2 {
    width: 280px !important;
    height: 380px !important;
    background: rgba(255, 255, 255, 0.7) !important;
    border: 1px solid #E5E5EA !important;
    transform: translate(calc(-50% + 40px), calc(-50% + 20px)) rotate(4deg) !important;
    z-index: 2 !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}

#hero:hover .deco-line-1 { transform: translate(-50%, -50%) rotate(-8deg) scale(1.02) !important; }
#hero:hover .deco-line-2 { transform: translate(calc(-50% + 50px), calc(-50% + 15px)) rotate(6deg) scale(1.02) !important; }

@media (max-width: 1024px) {
    #hero { justify-content: space-between !important; }
    .hero-decoration { flex-shrink: 1 !important; transform: scale(0.8); transform-origin: right center; }
}
@media (max-width: 768px) {
    .hero-decoration { display: none !important; }
}

/* ================================
   GitHub Link
================================ */
.github-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 48px;
    padding: 16px 24px;
    background: var(--color-card-bg);
    border: 1px solid var(--color-line);
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: all 0.3s var(--ease-smooth);
}

.github-link:hover {
    background: var(--color-text);
    color: var(--color-bg);
    border-color: var(--color-text);
    gap: 16px;
}

.github-link svg {
    transition: transform 0.3s var(--ease-smooth);
}

.github-link:hover svg {
    transform: translateX(4px);
}

/* ================================
   Page Header (Minimalist)
================================ */
.page-header {
    padding: 140px 48px 60px;
    padding-left: var(--content-left-margin);
    min-height: 40vh;
    display: flex;
    align-items: flex-end;
    background: var(--color-bg);
}

.page-header-content {
    max-width: 600px;
}

.page-label {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 12px;
    font-weight: 500;
    animation: fadeInUp 0.8s var(--ease-smooth) 0.2s both;
}

.page-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    animation: fadeInUp 0.8s var(--ease-smooth) 0.3s both;
}

.page-desc {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text-secondary);
    animation: fadeInUp 0.8s var(--ease-smooth) 0.4s both;
}

/* ================================
   Content Sections (Minimalist)
================================ */
.content-section {
    border-top: 1px solid var(--color-line);
    
    
}

.content-block {
    margin-bottom: 48px;
}

.content-block:last-child {
    margin-bottom: 0;
}

.content-heading {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--color-text);
    letter-spacing: -0.01em;
}

.content-text {
    font-size: 1rem;
    line-height: 1.9;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
}

.content-text:last-child {
    margin-bottom: 0;
}

/* ================================
   Skills Grid (Minimalist Cards)
================================ */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.skill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: var(--color-card-bg);
    border: 1px solid var(--color-line);
    border-radius: 8px;
    transition: all 0.3s var(--ease-smooth);
    box-shadow: var(--shadow-sm);
}

.skill-item:hover {
    border-color: #d1d5db;
    box-shadow: var(--shadow-md);
}

.skill-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text);
}

.skill-level {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
}

/* ================================
   Timeline (Minimalist)
================================ */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.timeline-item {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 20px 24px;
    background: var(--color-card-bg);
    border: 1px solid var(--color-line);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s var(--ease-smooth);
}

.timeline-item:hover {
    border-color: #d1d5db;
    box-shadow: var(--shadow-md);
}

.timeline-year {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    min-width: 50px;
    padding-top: 2px;
}

.timeline-content {
    flex: 1;
}

.timeline-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--color-text);
}

.timeline-desc {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

/* ================================
   Services Section (Minimalist Grid)
================================ */
.services-section {
    border-top: 1px solid var(--color-line);
    padding-top: 60px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-line);
    border-radius: 12px;
    padding: 32px;
    transition: all 0.3s var(--ease-smooth);
    box-shadow: var(--shadow-sm);
}

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

.service-number {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
    display: inline-block;
    padding: 4px 10px;
    background: var(--color-bg);
    border-radius: 4px;
}

.service-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text);
    letter-spacing: -0.01em;
}

.service-desc {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
}

.service-features {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.service-features li {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    padding: 6px 12px;
    background: var(--color-bg);
    border-radius: 6px;
}

/* ================================
   Process Section (Minimalist)
================================ */
.process-section {
    border-top: 1px solid var(--color-line);
    padding-top: 60px;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.process-step {
    background: var(--color-card-bg);
    border: 1px solid var(--color-line);
    border-radius: 10px;
    padding: 24px;
    transition: all 0.3s var(--ease-smooth);
    box-shadow: var(--shadow-sm);
}

.process-step:hover {
    border-color: #d1d5db;
    box-shadow: var(--shadow-md);
}

.step-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1;
    margin-bottom: 16px;
    opacity: 0.15;
}

.step-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text);
}

.step-desc {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* ================================
   CTA Section
================================ */
.cta-section {
    border-top: 1px solid var(--color-line);
    padding: 80px 48px;
    padding-left: var(--content-left-margin);
}

.cta-content {
    max-width: 600px;
}

.cta-text {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--color-text);
    margin-bottom: 24px;
}

.cta-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: var(--color-text);
    text-decoration: none;
    position: relative;
    transition: all 0.3s var(--ease-smooth);
}

.cta-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-text);
    transition: width 0.3s var(--ease-smooth);
}

.cta-link:hover::after {
    width: calc(100% + 24px);
}

.cta-link:hover {
    gap: 12px;
}

/* ================================
   Back Section
================================ */
.back-section {
    padding: 40px 48px;
    padding-left: var(--content-left-margin);
    border-top: 1px solid var(--color-line);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: all 0.3s var(--ease-smooth);
}

.back-link:hover {
    color: var(--color-text);
}

.back-arrow {
    transition: transform 0.3s var(--ease-smooth);
}

.back-link:hover .back-arrow {
    transform: translateX(-4px);
}

/* ================================
   Projects Showcase
================================ */
.projects-section {
    border-top: 1px solid var(--color-line);
}

.projects-showcase {
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.project-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.project-item:nth-child(even) {
    direction: rtl;
}

.project-item:nth-child(even) > * {
    direction: ltr;
}

.project-category {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.project-title {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 16px;
    color: var(--color-text);
}

.project-desc {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 24px;
}

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

.project-tag {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    padding: 4px 12px;
    border: 1px solid var(--color-line);
}

.project-visual {
    position: relative;
}

.project-image-placeholder {
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, var(--color-line) 0%, var(--color-bg) 100%);
    border: 1px solid var(--color-line);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s var(--ease-smooth);
}

.project-image-placeholder:hover {
    border-color: var(--color-accent);
}

.project-image-placeholder span {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-text-secondary);
    opacity: 0.5;
}

/* ================================
   Contact Section (Minimalist)
================================ */
.contact-section {
    border-top: 1px solid var(--color-line);
    padding-top: 60px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-label {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
}

.contact-value {
    font-size: 1rem;
    color: var(--color-text);
}

/* ================================
   Contact Form (Minimalist Card)
================================ */
.contact-form-wrapper {
    background: var(--color-card-bg);
    border: 1px solid var(--color-line);
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.form-input {
    font-family: var(--font-body);
    font-size: 1rem;
    padding: 14px 16px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    background: var(--color-bg);
    color: var(--color-text);
    transition: all 0.3s var(--ease-smooth);
    outline: none;
}

.form-input::placeholder {
    color: var(--color-text-secondary);
    opacity: 0.7;
}

.form-input:focus {
    border-color: var(--color-accent);
    background: var(--color-card-bg);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 28px;
    background: var(--color-text);
    color: var(--color-bg);
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    align-self: flex-start;
    margin-top: 8px;
}

.form-submit:hover {
    background: var(--color-accent);
    gap: 16px;
    transform: translateY(-2px);
}

.form-submit:active {
    transform: translateY(0);
}

.submit-arrow {
    transition: transform 0.3s var(--ease-smooth);
}

.form-submit:hover .submit-arrow {
    transform: translateX(4px);
}

/* ================================
   Responsive - Page Specific
================================ */
@media (max-width: 1024px) {
    .project-item {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .project-item:nth-child(even) {
        direction: ltr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .process-steps {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 768px) {
    .page-header {
        padding: 120px 24px 60px;
        min-height: auto;
        align-items: flex-start;
    }

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

    .page-desc {
        font-size: 1rem;
    }

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

    .service-card {
        padding: 24px;
    }

    .service-number {
        font-size: 1.5rem;
    }

    .process-steps {
        grid-template-columns: 1fr;
    }

    .cta-section {
        padding: 60px 24px;
    }

    .back-section {
        padding: 40px 24px;
    }

    .contact-form-wrapper {
        padding: 32px 24px;
    }

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

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

    .timeline-year {
        min-width: auto;
    }

    .timeline-content {
        padding-left: 0;
    }

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

    .project-card {
        padding: 24px;
    }
}
