/* Portfolio main page */

:root {
    --color-main: #2563eb;
    --color-main-soft: rgba(37, 99, 235, 0.08);
    --color-accent-green: #10b981;
    --color-accent-green-soft: rgba(16, 185, 129, 0.1);
    --color-accent-purple: #7c3aed;
    --color-accent-purple-soft: rgba(124, 58, 237, 0.09);
    --color-accent-amber: #f59e0b;
    --color-accent-amber-soft: rgba(245, 158, 11, 0.12);
    --color-accent-pink: #ec4899;
    --color-accent-pink-soft: rgba(236, 72, 153, 0.12);
}

.heeb__content {
    width: 100%;
    min-height: calc(100vh - 75px);
    padding: 40px 16px 60px;
    box-sizing: border-box;
    background:
        radial-gradient(circle at top left, var(--color-main-soft), transparent 55%),
        radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.06), transparent 60%),
        #f7f8fa;
    display: flex;
    flex-direction: column;
}

.portfolio-layout {
    max-width: 1080px;
    margin: 0 auto;
    width: 100%;
}

.section {
    padding: 40px 0;
}

.section + .section {
    border-top: 1px solid rgba(209, 213, 219, 0.7);
}

.section-muted {
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;

}

.section-contact .section-inner {
    margin-top: auto;
}

.section-inner {
    max-width: 960px;
    margin: 0 auto;
}

/* 섹션별 영역 카드를 더 또렷하게 */
.section:not(.section-hero) .section-inner {
    background-color: #ffffff;
    border-radius: 18px;
    padding: 24px 20px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
    box-sizing: border-box;
    border: 1px solid rgba(209, 213, 219, 0.9);
}

.section-header {
    margin-bottom: 24px;
}

.section-title {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    position: relative;
}

.section-description {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #4b5563;
}

.section-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 52px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(to right, var(--color-main), var(--color-accent-green));
}

/* Hero */

.section-hero {
    /* padding-top: 40px;
    padding-bottom: 44px; */
    padding-top: 28px;
    padding-bottom: 36px;
}

.hero-inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 20px 18px 22px;
    border-radius: 20px;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 55%),
        radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.16), transparent 60%),
        #ffffff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(191, 219, 254, 0.9);
}

.hero-text {
    max-width: 640px;
}

.hero-kicker {
    margin: 0 0 6px;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #2563eb;
}

.hero-title {
    margin: 0 0 14px;
    font-size: 30px;
    line-height: 1.25;
    font-weight: 800;
    color: #0f172a;
}

.hero-subtitle {
    margin: 0;
    font-size: 17px;
    line-height: 1.7;
    color: #1f2937;
}

.hero-highlight {
    font-weight: 600;
    color: #0f766e;
}

.hero-actions {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease,
        box-shadow 0.15s ease, transform 0.05s ease;
}

.btn-primary {
    background-color: var(--color-main, #2563eb);
    border-color: var(--color-main, #2563eb);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
    transform: translateY(-1px);
}

.btn-ghost {
    background-color: transparent;
    border-color: #d1d5db;
    color: #374151;
}

.btn-ghost:hover {
    background-color: #e5e7eb;
}

.hero-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.hero-meta-item {
    padding: 10px 12px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(219, 234, 254, 0.96));
    border: 1px solid rgba(191, 219, 254, 0.9);
}

.hero-meta-label {
    display: block;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    margin-bottom: 2px;
}

.hero-meta-value {
    font-size: 15px;
    color: #0f172a;
}

/* Projects */

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.project-card {
    padding: 22px 22px;
    border-radius: 12px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.07);
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.15s ease, transform 0.1s ease;
}

.project-card:hover {
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
    transform: translateY(-2px);
}

.project-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s ease-out;
}

.project-card:hover::before {
    opacity: 1;
}

/* 각 프로젝트 카드마다 살짝 다른 포인트 색상 */
.projects-grid .project-card:nth-child(1) {
    border-top: 4px solid var(--color-main);
}

.projects-grid .project-card:nth-child(1)::before {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(96, 165, 250, 0.1));
}

.projects-grid .project-card:nth-child(2) {
    border-top: 4px solid var(--color-accent-purple);
}

.projects-grid .project-card:nth-child(2)::before {
    background: linear-gradient(135deg, var(--color-accent-purple-soft), rgba(56, 189, 248, 0.12));
}

.projects-grid .project-card:nth-child(3) {
    border-top: 4px solid var(--color-accent-green);
}

.projects-grid .project-card:nth-child(3)::before {
    background: linear-gradient(135deg, var(--color-accent-green-soft), rgba(45, 212, 191, 0.12));
}

.projects-grid .project-card:nth-child(4) {
    border-top: 4px solid var(--color-accent-amber);
}

.projects-grid .project-card:nth-child(4)::before {
    background: linear-gradient(135deg, var(--color-accent-amber-soft), rgba(251, 191, 36, 0.08));
}

.projects-grid .project-card:nth-child(5) {
    border-top: 4px solid var(--color-accent-pink);
}

.projects-grid .project-card:nth-child(5)::before {
    background: linear-gradient(135deg, var(--color-accent-pink-soft), rgba(244, 114, 182, 0.08));
}

.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.project-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.project-tag {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    color: #065f46;
    background-color: #d1fae5;
}

.project-tag-sub {
    color: #1d4ed8;
    background-color: #dbeafe;
}

.project-summary {
    margin: 12px 0 16px;
    font-size: 16px;
    line-height: 1.6;
    color: #4b5563;
    text-align: left;
}

.project-extra-plain {
    margin: 4px 0 14px;
    font-size: 15px;
    line-height: 1.6;
    font-weight: 600;
    color: #0f2a4f;
}

.project-meta {
    text-align: left;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 15px;
    line-height: 1.6;
    color: #4b5563;
}

.project-meta li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 2px;
}

.project-meta strong {
    font-weight: 600;
    color: #111827;
    font-size: 17px;
    min-width: 70px;
}

.project-footer {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.portfolio-nav {
    margin-bottom: 24px;
}

.portfolio-nav .btn {
    text-decoration: none;
}

/* Portfolio modal */

.portfolio-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 80;
}

.portfolio-modal.is-open {
    display: flex;
}

.portfolio-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.portfolio-modal-dialog {
    position: relative;
    max-width: 760px;
    width: calc(100% - 32px);
    max-height: calc(100vh - 80px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.4);
    padding: 24px 24px 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.portfolio-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: none;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 18px;
    cursor: pointer;
}

.portfolio-modal-body {
    margin-top: 8px;
}

.portfolio-modal-title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    padding-right: 48px; /* 닫기 아이콘 영역만큼 여유 확보 */
}

.portfolio-modal-subtitle {
    margin: 0 0 16px;
    font-size: 14px;
    color: #6b7280;
    padding-right: 48px;
}

.portfolio-modal-content {
    text-align: left;
}

.portfolio-modal-content h4 {
    margin: 18px 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    padding-left: 10px;
    border-left: 3px solid var(--color-main, #2563eb);
}

.portfolio-modal-content h4:first-of-type {
    margin-top: 4px;
}

.portfolio-modal-content p {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.7;
    color: #374151;
}

.portfolio-modal-content ul {
    margin: 8px 0 16px 22px;
    padding: 0;
    font-size: 14px;
    color: #374151;
}

.portfolio-modal-content pre code {
    display: block;
    font-size: 12px;
    line-height: 1.6;
    background-color: #0b1120;
    color: #e5e7eb;
    padding: 10px 12px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 8px 0 14px;
}

.portfolio-modal-content .mermaid {
    width: 100%;
    padding: 15px 0;
    display: flex;
    justify-content: center;
}

/* Blog */

.blog-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.blog-item {
    padding: 12px 14px;
    border-radius: 10px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
    transition: box-shadow 0.15s ease, transform 0.1s ease;
}

.blog-item:hover {
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(219, 234, 254, 0.96));
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
    transform: translateY(-1px);
}

.blog-date {
    display: block;
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 4px;
}

.blog-title {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 600;
    color: #111827;
}

.blog-excerpt {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #4b5563;
}

/* About */

.about-grid {
    display: grid;
    /* grid-template-columns: 1fr; */
    gap: 20px;
}

.about-text p {
    margin: 0 0 10px;
    font-size: 16px;
    line-height: 1.7;
    color: #374151;
}

.about-subtitle {
    margin: 0 0 10px;
    font-size: 17px;
    font-weight: 600;
    color: #111827;
}

.skills-list {
    margin: 0;
    padding: 0;
}

.skills-list > div + div {
    margin-top: 8px;
}

.skills-list dt {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

.skills-list dd {
    margin: 2px 0 0;
    font-size: 13px;
    color: #4b5563;
}

/* Skills section */

.section-skills {
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
}

.section-skills .section-title {
    color: #111827;
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.skill-card {
    margin : 0 10px;
    padding: 14px 16px;
    border-radius: 12px;
    background-color: #ffffff;
    border: 1px solid rgba(37, 99, 235, 0.12);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    transition: box-shadow 0.15s ease, transform 0.1s ease;
}

.skill-card:hover {
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(219, 234, 254, 0.96));
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
    transform: translateY(-1px);
}

.skill-title {
    text-align: left;
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-main, #2563eb);
}

.skill-body {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
    color: #374151;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    white-space: normal;
    overflow-x: visible;
    padding-bottom: 4px;
}

.skill-tag {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 13px;
    line-height: 1.4;
    color: #1f2933;
    background-color: #e5edff;
}

/* Career timeline */

.career-timeline {
    list-style: none;
    margin: 0;
    padding: 0 0 0 18px;
    position: relative;
}

.career-timeline::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #cbd5f5, #9ca3ff);
}

.career-item {
    position: relative;
    padding-left: 18px;
    margin-bottom: 16px;
}

.career-item::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background-color: #ffffff;
    border: 2px solid var(--color-main, #2563eb);
}

.career-year {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-main, #2563eb);
    margin-bottom: 4px;
}

.career-content {
    font-size: 14px;
    line-height: 1.7;
    color: #374151;
}

/* Contact */

.contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
}

.contact-list li {
    display: flex;
    flex:1;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
    border-radius: 10px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
}

.contact-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
}

.contact-value {
    font-size: 14px;
    color: #111827;
    word-break: break-all;
}

.contact-value a {
    color: var(--color-main, #2563eb);
    text-decoration: none;
}

.contact-value a:hover {
    text-decoration: underline;
}

/* Small mobile (최소 폭 ~ 480px) */
@media (max-width: 480px) {
    html,
    body {
        width: 100%;
        min-width: 400px;
        overflow-x: auto;
    }

    .heeb__content {
        padding: 24px 0 40px;
    }

    .portfolio-layout {
        max-width: 100%;
        margin: 0;
        width: 100%;
    }

    .section {
        padding: 28px 0;
    }

    .section-inner {
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        border-left: none;
        border-right: none;
        padding-left: 16px;
        padding-right: 16px;
    }

    .section-muted {
        margin: 0;
        padding-left: 0;
        padding-right: 0;
    }

    /* Skills 섹션도 다른 섹션과 동일하게 전체 폭 사용 */
    .section-skills {
        margin: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .hero-inner {
        border-radius: 0;
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* Desktop (중간 화면 이상) */
@media (min-width: 768px) {
    .heeb__content {
        padding: 56px 24px 72px;
    }

    .section {
        padding: 56px 0;
    }

    .section-hero {
        padding-top: 56px;
        padding-bottom: 64px;
    }

    .hero-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }

    .hero-text {
        flex: 1.3;
    }

    .hero-title {
        font-size: 38px;
    }

    .hero-meta {
        flex: 1;
    }

    .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .skills-grid {
        
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .about-grid {
        /* grid-template-columns: 1.3fr 1fr; */
    }

    .contact-list {
        flex-direction: row;
    }
}

@media (max-width: 767px) {
    .contact-list {
        flex-direction: column;
    }
}

/* Large Desktop (가로가 넓을 때 추가 반응형) */

@media (min-width: 1200px) {
    .portfolio-layout {
        max-width: 1280px;
    }

    .section-inner {
        max-width: 1120px;
    }

    .hero-title {
        font-size: 42px;
    }

    .hero-text {
        max-width: none;
    }

    .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .section-skills {
        margin: 0;
        padding-left: 0;
        padding-right: 0;
    }
}
