/* 响应式设计 - 响应式.css */

/* ===== 手机设备 (最大宽度 768px) ===== */
@media screen and (max-width: 768px) {
    /* 主容器响应式 */
    .father {
        width: 100%;
        padding: 0 15px;
    }

    /* 导航栏响应式 - 保持横向排列，缩小内容 */
    .nav {
        height: auto;
        padding: 15px 10px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
    }

    .n-left {
        position: relative;
        font-size: 18px;
        margin: 0;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .n-left span {
        display: inline;
    }

    .n-right {
        position: relative;
        flex-shrink: 1;
    }

    .n-right ul {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-end;
    }

    .n-right li {
        margin: 0 10px;
        font-size: 14px;
        white-space: nowrap;
    }

    /* Header区域响应式 */
    .header {
        flex-direction: column;
        height: auto;
        margin-top: 15px;
    }

    .header-left {
        flex: none;
        width: 100%;
        margin: 0 0 20px 0;
        padding: 20px;
    }

    .header-left-top h1 {
        font-size: 32px;
    }

    .header-left-top h3 {
        font-size: 16px;
    }

    .header-left p {
        font-size: 14px;
    }

    .header-right {
        flex: none;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .header-right-img {
        width: 200px;
        height: 200px;
    }

    .header-right img {
        width: 170px;
        left: 15px;
        top: 15px;
    }

    .button-1,
    .button-2 {
        width: 100px;
        height: 35px;
        font-size: 14px;
    }

    /* 关于我区域响应式 */
    .section-1 {
        height: auto;
        padding: 20px;
    }

    .section-1 h1 {
        font-size: 24px;
    }

    .section-1-1 {
        display: flex;
        flex-direction: column;
    }

    .section-1-1-left {
        position: relative;
        width: 100%;
        height: auto;
        padding: 20px;
        margin: 0 0 20px 0;
    }

    .section-1-1-right {
        position: relative;
        padding: 20px;
        text-align: center;
    }

    .section-1-1-right span {
        font-size: 18px;
    }

    .section-1-1-right p {
        font-size: 14px;
    }

    /* 专业技能区域响应式 */
    .section-2 {
        padding: 20px 15px;
    }

    .section-2 h1 {
        font-size: 24px;
    }

    .section-2-z {
        display: flex;
        flex-direction: column;
    }

    .section-2-z > div {
        height: auto;
        padding: 20px;
        margin: 10px 0;
        overflow: hidden;
    }

    .section-2-j {
        max-width: 100%;
        overflow: hidden;
    }

    .section-2-j > div {
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
    }

    /* 作品区域响应式 */
    .section-3 {
        height: auto;
        padding: 20px;
    }

    .section-3 h1 {
        font-size: 24px;
    }

    .section-3-1 {
        flex-direction: column;
    }

    .section-3-1 > div {
        height: auto;
        padding: 20px;
        margin: 10px 0;
    }

    .section-3-1 input {
        position: relative;
        bottom: auto;
        margin-top: 15px;
    }

    /* 联系我区域响应式 */
    .aside {
        height: auto;
        padding: 20px;
    }

    .aside > h1 {
        font-size: 24px;
    }

    .aside-z {
        flex-direction: column;
    }

    .aside-z > div {
        margin: 15px 0;
        padding: 15px;
    }

    .aside-right {
        flex-direction: column;
    }

    .aside-right-z textarea {
        width: 100%;
    }

    .aside-right-t {
        flex: none;
        margin: 15px 0 0 0;
    }

    .aside-right-t input {
        width: 100%;
        padding: 10px;
    }

    /* 页脚响应式 */
    .footer {
        height: auto;
        padding: 15px;
        text-align: center;
        font-size: 14px;
    }
}

/* ===== 平板设备 (769px - 1024px) ===== */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    /* 主容器响应式 */
    .father {
        width: 100%;
        padding: 0 30px;
    }

    /* 导航栏响应式 - 保持横向排列，调整间距 */
    .nav {
        height: auto;
        padding: 20px 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .n-left {
        position: relative;
        font-size: 26px;
        margin: 0;
        flex-shrink: 0;
    }

    .n-left span {
        display: inline;
    }

    .n-right {
        position: relative;
    }

    .n-right ul {
        display: flex;
        flex-wrap: nowrap;
    }

    .n-right li {
        margin: 0 20px;
        font-size: 16px;
    }

    /* Header区域响应式 */
    .header {
        height: auto;
    }

    .header-left {
        padding: 25px;
        margin: 0 30px 30px 0;
    }

    .header-left-top h1 {
        font-size: 40px;
    }

    .header-right-img {
        width: 280px;
        height: 280px;
    }

    .header-right img {
        width: 240px;
        left: 20px;
        top: 20px;
    }

    /* 关于我区域响应式 - 修复坍塌问题 */
    .section-1 {
        height: auto;
        padding: 25px;
        min-height: 500px;
    }

    .section-1 h1 {
        font-size: 28px;
    }

    .section-1-1 {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 20px;
        margin-top: 20px;
    }

    .section-1-1-left {
        position: relative;
        width: 45%;
        height: auto;
        min-height: 300px;
        padding: 40px;
        margin-left: 0;
        left: auto;
        flex-shrink: 0;
    }

    .section-1-1-right {
        position: relative;
        right: auto;
        padding: 40px;
        flex: 1;
        max-width: 50%;
    }

    .section-1-1-right span {
        font-size: 18px;
    }

    .section-1-1-right p {
        font-size: 14px;
        line-height: 1.6;
    }

    /* 专业技能区域响应式 - 修复进度条溢出 */
    .section-2 {
        padding: 30px 20px;
    }

    .section-2 h1 {
        font-size: 28px;
    }

    .section-2-z {
        display: flex;
        flex-wrap: wrap;
    }

    .section-2-z > div {
        padding: 20px;
        margin: 8px;
        height: auto;
        min-height: 180px;
        flex: 1 1 calc(50% - 16px);
        max-width: calc(50% - 16px);
        overflow: hidden;
    }

    .section-2-j {
        max-width: 100%;
        overflow: hidden;
    }

    .section-2-j > div {
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
    }

    /* 作品区域响应式 */
    .section-3 {
        height: auto;
        padding: 30px;
    }

    .section-3 h1 {
        font-size: 28px;
    }

    .section-3-1 > div {
        height: auto;
        padding: 25px;
        margin: 10px;
    }

    /* 联系我区域响应式 */
    .aside {
        height: auto;
        padding: 30px;
    }

    .aside > h1 {
        font-size: 28px;
    }

    .aside-z > div {
        margin: 15px;
        padding: 15px;
    }

    /* 页脚响应式 */
    .footer {
        height: auto;
        padding: 15px;
        font-size: 16px;
    }
}

/* ===== 电脑设备 (1025px以上) ===== */
@media screen and (min-width: 1025px) {
    /* 保持原有样式，无需修改 */
    .father {
        width: 1200px;
        margin: 0 auto;
    }
}

/* ===== 额外的响应式优化 ===== */

/* 为所有设备添加触摸友好的交互 */
@media (hover: none) and (pointer: coarse) {
    .section-2-z > div:hover,
    .section-3-1 > div:hover {
        transform: none;
    }

    .section-2-z > div:active,
    .section-3-1 > div:active {
        transform: scale(0.98);
        box-shadow: 0 4px 7px -2px rgba(0, 0, 0, 0.3);
    }
}

/* 横屏手机优化 */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .header {
        flex-direction: row;
        height: 250px;
    }

    .header-left {
        flex: 2;
        margin: 0 20px 0 0;
    }

    .header-right {
        flex: 1;
    }

    .header-right-img {
        width: 180px;
        height: 180px;
    }

    .header-right img {
        width: 150px;
        left: 15px;
        top: 15px;
    }
}

/* 超小屏幕设备 (最大宽度 480px) */
@media screen and (max-width: 480px) {
    .father {
        padding: 0 10px;
    }

    /* 导航栏超小屏幕优化 */
    .nav {
        padding: 10px 5px;
    }

    .n-left {
        font-size: 16px;
    }

    .n-right li {
        font-size: 12px;
        margin: 0 5px;
    }

    .header-left-top h1 {
        font-size: 28px;
    }

    .header-left-top h3 {
        font-size: 14px;
    }

    .section-1-1-left,
    .section-1-1-right {
        padding: 15px;
    }

    .section-2-z > div,
    .section-3-1 > div {
        padding: 15px;
    }

    .aside-z > div {
        padding: 10px;
    }
}