:root {
    --bg-color: #f4f7f6;
    --text-main: #1a1a1a;
    --text-sub: #666;
    --accent: #0051ff; /* 纯正的科技蓝 */
    --accent-light: #e6f0ff;
    --border-color: #e0e0e0;
    --card-bg: rgba(255, 255, 255, 0.9);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.4;
}

.container {
    width: 94%;
    max-width: 2200px;
    margin: 0 auto;
    padding: 40px 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    margin-bottom: 40px;
    border-bottom: 2px solid var(--text-main);
    padding-bottom: 20px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.internship-page-header {
    margin-bottom: 30px;
}

.page-lede {
    font-size: 1rem;
    color: var(--text-sub);
    max-width: 780px;
    line-height: 1.6;
}

.internship-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
}

.internship-card {
    background: var(--card-bg);
    border-left: 4px solid var(--accent);
    padding: 25px 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    position: relative;
}

.internship-card-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-end;
    margin-bottom: 15px;
}

.company-details {
    display: flex;
    flex-direction: column;
}

.company-name {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
}

.company-role {
    font-size: 1rem;
    color: var(--text-sub);
    margin-top: 4px;
}

.timeline {
    font-size: 1rem;
    color: var(--accent);
    font-weight: 700;
}

.company-description {
    font-size: 0.95rem;
    color: #3c3c3c;
    margin-bottom: 15px;
    line-height: 1.7;
}

.internship-section + .internship-section {
    margin-top: 18px;
}

.internship-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-main);
}

.internship-list {
    list-style: square;
    padding-left: 20px;
    line-height: 1.7;
    color: #4a4a4a;
}

.internship-keywords {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.keyword-pill {
    background: rgba(0, 81, 255, 0.1);
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(0, 81, 255, 0.3);
}

h1 {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1;
    text-transform: uppercase;
}

.contact-info {
    font-family: 'Courier New', monospace;
    font-size: 1.4rem; /* 增大字体 */
    color: var(--text-main);
    font-weight: 700; /* 加粗 */
    display: flex;
    align-items: center;
    margin-top: 12px;
}

.contact-name {
    margin-right: 30px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1;
}

.contact-divider {
    margin: 0 10px;
    color: var(--accent);
}

/* Main Grid Layout */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.en-title {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-left: 4px solid var(--accent);
    padding: 20px 25px;
    margin-bottom: 15px;
    position: relative;
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateX(5px);
    background: #fff;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
}

/* 修改标签样式：去黑底，变蓝字 */
.card-tag, .card-loc {
    font-size: 0.9rem;
    background: transparent; /* 去掉背景 */
    color: var(--accent); /* 变蓝字 */
    padding: 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-sub {
    font-size: 1rem;
    color: var(--text-sub);
    margin-bottom: 10px;
    font-weight: 500;
}

.highlight {
    color: var(--accent);
    font-weight: 600;
}

.card-content {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

/* Navigation Buttons - 巨大化 & 炫酷特效 */
.nav-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-top: auto;
    height: 35vh;
    min-height: 250px;
}

.btn-block {
    background: rgba(255, 255, 255, 0.8); /* 半透明白底 */
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    backdrop-filter: blur(10px); /* 毛玻璃效果 */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    
    /* 激光边框基础设置 - 使用背景渐变模拟边框 */
    background-image: 
        linear-gradient(90deg, transparent, var(--accent), transparent), /* 上 */
        linear-gradient(180deg, transparent, var(--accent), transparent), /* 右 */
        linear-gradient(270deg, transparent, var(--accent), transparent), /* 下 */
        linear-gradient(0deg, transparent, var(--accent), transparent);   /* 左 */
    background-repeat: no-repeat;
    background-size: 100% 2px, 2px 100%, 100% 2px, 2px 100%;
    background-position: -100% 0, 100% -100%, 100% 100%, 0 100%;
    
    /* 默认不显示激光，悬停或一直显示？用户说“循环行走”，通常是一直动 */
    animation: laserBorder 4s linear infinite;
}

@keyframes laserBorder {
    0% {
        background-position: -100% 0, 100% -100%, 100% 100%, 0 100%;
    }
    25% {
        background-position: 100% 0, 100% -100%, 100% 100%, 0 100%;
    }
    50% {
        background-position: 100% 0, 100% 100%, 100% 100%, 0 100%;
    }
    75% {
        background-position: 100% 0, 100% 100%, -100% 100%, 0 100%;
    }
    100% {
        background-position: 100% 0, 100% 100%, -100% 100%, 0 -100%;
    }
}

/* 修正动画逻辑，让它看起来像是在绕圈 */
@keyframes laserBorder {
    0% {
        background-position: -100% 0, 100% -100%, 200% 100%, 0 200%;
    }
    100% {
        background-position: 200% 0, 100% 200%, -100% 100%, 0 -100%;
    }
}

/* 镜面亮光闪过特效 */
.btn-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg, 
        transparent, 
        rgba(255, 255, 255, 0.6) 40%, 
        rgba(255, 255, 255, 0.8) 50%, 
        rgba(255, 255, 255, 0.6) 60%, 
        transparent
    );
    transform: skewX(-25deg);
    transition: none;
    z-index: 3;
    pointer-events: none;
    /* 默认持续运行镜面反光特效 */
    animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
    0% { left: -150%; }
    100% { left: 150%; }
}

.btn-block:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 81, 255, 0.2);
    background-color: #bde0fe; /* 悬浮时背景变深一点的淡蓝 */
}

.btn-num {
    font-size: 5rem;
    font-weight: 900;
    color: var(--accent);
    opacity: 0.15;
    line-height: 1;
    font-family: 'Impact', sans-serif;
    z-index: 1;
    transition: all 0.4s ease;
}

.btn-block:hover .btn-num {
    color: var(--accent);
    opacity: 0.3;
    transform: scale(1.1) translateX(10px);
}

.btn-text {
    font-size: 2.5rem;
    font-weight: 800;
    z-index: 2;
    transition: color 0.3s ease;
}

.btn-block:hover .btn-text {
    color: var(--accent); /* 悬停变蓝 */
}

.btn-arrow {
    font-size: 2.5rem;
    align-self: flex-end;
    transition: all 0.4s ease;
    color: var(--accent);
    z-index: 2;
}

.btn-block:hover .btn-arrow {
    transform: translateX(10px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* Body and Container */
    body {
        font-size: 14px;
    }

    .container {
        width: 94%;
        padding: 20px 0;
    }

    /* Header */
    header {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }

    h1 {
        font-size: 2rem;
        letter-spacing: -1px;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .contact-info {
        font-size: 0.9rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .contact-name {
        font-size: 2.2rem;
        margin-right: 0;
    }

    .contact-item {
        font-size: 0.85rem;
    }

    .contact-divider {
        display: none;
    }

    /* Main Grid */
    .main-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 20px;
    }

    /* Section Title */
    .section-title {
        font-size: 1.1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .en-title {
        font-size: 0.75rem;
    }

    /* Cards */
    .card {
        padding: 15px;
        margin-bottom: 12px;
    }

    .card-title {
        font-size: 1.1rem;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .card-tag, .card-loc {
        font-size: 0.8rem;
    }

    .card-sub {
        font-size: 0.9rem;
    }

    .card-content {
        font-size: 0.85rem;
        padding-top: 8px;
    }

    /* Navigation Buttons */
    .nav-buttons {
        grid-template-columns: 1fr;
        gap: 12px;
        height: auto;
        margin-top: 20px;
    }

    .btn-block {
        height: 100px;
        padding: 15px 20px;
        flex-direction: row;
        align-items: center;
    }

    .btn-num {
        font-size: 2.5rem;
        margin-right: 15px;
    }

    .btn-text {
        font-size: 1.2rem;
    }

    .btn-arrow {
        font-size: 1.5rem;
        margin-left: auto;
    }

    /* Internship Page */
    .internship-page-header {
        margin-bottom: 20px;
    }

    .internship-grid {
        gap: 15px;
    }

    .internship-card {
        padding: 15px;
    }

    .internship-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .company-details {
        flex-direction: column;
        gap: 5px;
    }

    .company-name {
        font-size: 1.2rem;
    }

    .company-role {
        font-size: 0.9rem;
        margin-top: 5px;
    }

    .timeline {
        font-size: 0.85rem;
        align-self: flex-start;
    }

    .company-description {
        font-size: 0.9rem;
        margin-bottom: 12px;
    }

    .internship-section h3 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .internship-list {
        padding-left: 15px;
        font-size: 0.85rem;
    }

    .internship-keywords {
        gap: 6px;
    }

    .keyword-pill {
        font-size: 0.75rem;
        padding: 4px 10px;
    }

    /* Back Button */
    .back-btn-fixed {
        position: fixed;
        right: 15px !important;
        bottom: 15px !important;
        width: 120px !important;
        height: 50px !important;
        padding: 10px 15px !important;
    }

    .back-btn-fixed .btn-text {
        font-size: 1rem !important;
    }

    /* Startup Section */
    .startup-page-header {
        padding-bottom: 15px;
        margin-bottom: 20px;
    }

    .startup-grid {
        gap: 20px;
    }

    .startup-section {
        padding: 20px;
        margin-bottom: 40px;
    }

    .startup-section .bg-number {
        font-size: 5rem;
        top: 5px;
        right: 15px;
    }

    .section-title {
        font-size: 1.3rem;
        margin-bottom: 15px;
        padding-bottom: 10px;
    }

    /* Startup Table - Mobile Friendly */
    .startup-table {
        display: block;
    }

    .startup-table thead {
        display: none;
    }

    .startup-table tbody {
        display: block;
    }

    .startup-table tr {
        display: block;
        margin-bottom: 15px;
        background: rgba(255, 255, 255, 0.5);
        border-radius: 8px;
        padding: 10px;
    }

    .startup-table td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        border: none;
        padding: 8px 0;
    }

    .startup-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--accent);
        margin-right: 10px;
        min-width: 80px;
    }

    .startup-table th {
        display: none;
    }

    .description-text {
        font-size: 0.85rem;
        line-height: 1.6;
    }

    /* Startup Gallery */
    .startup-gallery {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
        margin-top: 8px;
    }

    .startup-gallery img {
        height: 120px !important;
    }

    /* Section Divider */
    .section-divider {
        margin: -20px auto 20px auto;
    }

    /* Image Modal */
    .modal-nav-btn {
        width: 60px;
        height: 60px;
        margin-top: -30px;
    }

    .modal-nav-btn svg {
        width: 30px;
        height: 30px;
    }

    .prev-btn {
        left: 5%;
    }

    .next-btn {
        right: 5%;
    }

    .modal-counter {
        font-size: 1rem;
        padding: 6px 15px;
        bottom: 15px;
    }

    /*
      Page-specific mobile overrides
      说明：这些页面在 HTML 内有同名 class 的内联 <style>，会覆盖外部 style.css。
      这里通过更高选择器优先级（body .xxx）在移动端反向覆盖，避免影响桌面端显示。
    */

    /* Internship page: fix inline styles forcing horizontal layout and huge fonts */
    body .internship-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    body .internship-card .company-details {
        flex-direction: column;
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 6px;
    }

    body .internship-card .company-name {
        font-size: 1.15rem;
        line-height: 1.25;
    }

    body .internship-card .company-role {
        font-size: 0.95rem;
        line-height: 1.35;
        white-space: normal;
    }

    body .internship-card .timeline {
        font-size: 0.85rem;
        line-height: 1.2;
        white-space: normal;
        color: var(--accent);
    }

    /* Startup/Campus pages: override inline table + section styles */
    body .startup-page-header {
        max-width: 100% !important;
    }

    body .startup-grid {
        max-width: 100% !important;
    }

    body .startup-section {
        padding: 18px 16px;
        border-radius: 16px;
        margin-bottom: 32px;
    }

    body .startup-section .bg-number {
        font-size: 4.2rem;
        top: 6px;
        right: 12px;
    }

    /* Make the "row-per-field" table layout actually win over inline styles */
    body .startup-table {
        display: block;
        width: 100%;
    }

    body .startup-table th {
        display: none !important;
    }

    body .startup-table tr {
        display: block;
    }

    body .startup-table td {
        display: block;
        padding: 8px 0;
        border: none;
    }

    body .startup-table td::before {
        display: block;
        margin: 0 0 6px 0;
        font-size: 0.85rem;
        line-height: 1.2;
        min-width: 0;
    }

    /* Keep long content readable */
    body .startup-table td .description-text {
        display: block;
        font-size: 0.88rem;
        line-height: 1.65;
    }

    /* Footer */
    .footer {
        padding: 10px 0;
    }

    .footer p {
        font-size: 0.7rem;
        line-height: 1.4;
    }
}

/* Tablet Responsive */
@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .nav-buttons {
        grid-template-columns: 1fr;
        height: auto;
    }
    .btn-block {
        height: 150px;
        flex-direction: row;
        align-items: center;
    }
    .btn-num {
        font-size: 3rem;
        margin-right: 20px;
    }
    .btn-text {
        font-size: 1.8rem;
    }
    .internship-card {
        padding: 20px;
    }
    .internship-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .timeline {
        align-self: flex-start;
    }
}

/* 图片模态框样式 */
.image-modal {
    display: none; /* 默认隐藏 */
    position: fixed;
    z-index: 2000; /* 确保在最上层 */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.9); /* 黑色半透明背景 */
    align-items: center;
    justify-content: center;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    animation-name: zoom;
    animation-duration: 0.3s;
    cursor: zoom-out;
    margin-bottom: 50px;
}

@keyframes zoom {
    from {transform:scale(0.1); opacity: 0;}
    to {transform:scale(1); opacity: 1;}
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
}

.close-modal:hover,
.close-modal:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* 模态框导航按钮 */
.modal-nav-btn {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -45px;
    color: white;
    padding: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 50%;
    user-select: none;
    z-index: 2002;
    background: linear-gradient(135deg, rgba(0, 81, 255, 0.6), rgba(0, 122, 255, 0.4));
    border: 3px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    box-shadow:
        0 0 30px rgba(0, 81, 255, 0.4),
        0 0 60px rgba(0, 81, 255, 0.2),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    line-height: 0;
}

.modal-nav-btn svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
    margin: 0;
    padding: 0;
}

.modal-nav-btn svg path {
    transform-origin: center;
}

.modal-nav-btn:hover {
    background: linear-gradient(135deg, rgba(0, 81, 255, 0.9), rgba(0, 122, 255, 0.7));
    transform: scale(1.2);
    box-shadow: 
        0 0 40px rgba(0, 81, 255, 0.8),
        0 0 80px rgba(0, 81, 255, 0.5),
        inset 0 0 30px rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.9);
}

.modal-nav-btn:active {
    transform: scale(0.95);
    background: linear-gradient(135deg, rgba(0, 50, 200, 0.9), rgba(0, 81, 255, 0.8));
    box-shadow: 
        0 0 20px rgba(0, 81, 255, 0.5),
        inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.prev-btn {
    left: 10%;
}

.next-btn {
    right: 10%;
}

/* 文档链接样式 */
.doc-link {
    display: inline-block;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    background: rgba(0, 81, 255, 0.08);
    border: 2px solid rgba(0, 81, 255, 0.3);
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-top: 10px;
}

.doc-link:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 4px 15px rgba(0, 81, 255, 0.3);
    transform: translateY(-2px);
}

.doc-link::before {
    content: '📄 ';
    margin-right: 4px;
}

/* 模态框图片容器 */
.modal-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 90%;
    max-height: 90%;
}

/* 模态框页码显示 */
.modal-counter {
    position: absolute;
    bottom: 20px;
    background: rgba(0, 81, 255, 0.8);
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 25px;
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 2003;
    letter-spacing: 2px;
}

/* Footer */
.footer {
    width: 100%;
    text-align: center;
    padding: 15px 0;
    margin-top: auto;
    display: block;
    clear: both;
}

.footer p {
    color: rgba(102, 102, 102, 0.4);
    font-size: 0.75rem;
    margin: 0;
    text-align: center;
}

.footer a {
    color: rgba(102, 102, 102, 0.4);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer a:hover {
    color: rgba(0, 81, 255, 0.6);
    text-decoration: underline;
}
