:root {
    /* Toss design tokens — statistically extracted from tossinvest.com (1,850 nodes) */
    --toss-blue: #3182f6;
    --toss-blue-weak: #ebf3ff;
    --toss-ink: #191f28;        /* big bold numbers/titles only */
    --toss-text: #333d4b;       /* primary body text */
    --toss-text-2: #4e5968;     /* secondary */
    --toss-text-3: #6b7684;     /* tertiary / captions */
    --toss-gray: #4e5968;
    --toss-gray-weak: #6b7684;
    --toss-red: #f04452;
    --toss-bg: #f6f7f9;         /* page */
    --toss-surface: #f9fafb;    /* sub-surface */
    --toss-card: #ffffff;
    --toss-line: rgba(2, 32, 71, 0.05);
    --toss-radius: 16px;        /* cards */
    --toss-radius-sm: 8px;      /* standard */
    --toss-hairline: 0 0 0 1px rgba(2, 32, 71, 0.05) inset;
}

/* portfolio.css is loaded only on the portfolio page, so body styling is page-scoped */
body {
    background: var(--toss-bg);
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 15px;
    font-weight: 500;           /* Toss base = medium */
    line-height: 1.45;
    color: var(--toss-text);
    -webkit-font-smoothing: antialiased;
}

.portfolio {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    color: var(--toss-text);
    letter-spacing: -0.01em;
}

.profile {
    display: flex;
    gap: 3rem;
    align-items: center;
    padding: 3rem 3.5rem;
    background: var(--toss-card);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    min-height: 240px;
    border: none;
    box-shadow: var(--toss-hairline), 0 8px 32px rgba(2, 32, 71, 0.04);
}

.profile-glow {
    position: absolute;
    top: -140px;
    right: -90px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(49, 130, 246, 0.10), rgba(49, 130, 246, 0) 70%);
    pointer-events: none;
}

.geometric-bg { display: none; }

.profile-image {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.profile-image img {
    width: 168px;
    height: 168px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 5px solid #fff;
    box-shadow: 0 0 0 7px rgba(49, 130, 246, 0.06), 0 12px 28px rgba(2, 32, 71, 0.12);
}

.profile-info {
    position: relative;
    z-index: 1;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem;
    margin-bottom: 0.9rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #02a262;
    background: rgba(2, 162, 98, 0.08);
    border-radius: var(--radius-full);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #02a262;
    box-shadow: 0 0 0 3px rgba(2, 162, 98, 0.15);
    animation: status-pulse 2s ease-in-out infinite;
}

@keyframes status-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

.profile-info h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--toss-ink);
    margin-bottom: 0.3rem;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.profile-info .subtitle {
    font-size: 1.1rem;
    color: var(--toss-blue);
    font-weight: 700;
    margin-bottom: 1.2rem;
}

.profile-info .bio {
    color: var(--toss-gray);
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: 1.5rem;
    max-width: 720px;
}

.profile-info .bio strong {
    color: var(--toss-ink);
    font-weight: 700;
}

.hero-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.highlight-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--toss-blue);
    background: var(--toss-blue-weak);
    border: none;
    border-radius: var(--radius-full);
}

.highlight-chip::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--toss-blue);
}

.lab-link {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.15rem 0.5rem;
    background: var(--toss-blue);
    color: #fff !important;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-decoration: none;
    vertical-align: middle;
}

.lab-link:hover {
    background: var(--toss-blue);
}

.social-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.social-links a {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--toss-text);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.65rem 1.15rem;
    background: var(--toss-surface);
    border-radius: 12px;
    box-shadow: var(--toss-hairline);
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.social-links a:hover {
    background: var(--toss-blue);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(49, 130, 246, 0.28);
}

.section {
    background: var(--toss-card);
    border-radius: var(--toss-radius);
    box-shadow: var(--toss-hairline);
    padding: 2rem 2.25rem;
}

.section h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--toss-ink);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

/* Timeline (Experience + Education, unified) */
.tl {
    position: relative;
}

.tl::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 12px;
    bottom: 12px;
    width: 2px;
    background: var(--toss-line);
}

.tl-item {
    position: relative;
    padding-left: 2rem;
}

.tl-item:not(:last-child) {
    margin-bottom: 0.875rem;
}

.tl-dot {
    position: absolute;
    left: 0;
    top: 1.6rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--toss-blue);
    box-shadow: 0 0 0 4px var(--toss-card);
}

.item-card {
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
    padding: 1.2rem 1.4rem;
    background: var(--toss-surface);
    border-radius: 14px;
    box-shadow: var(--toss-hairline);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(2, 32, 71, 0.07);
}

.item-logo {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--toss-hairline);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7px;
}

.item-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.item-logo-fadu {
    padding: 0;
}

.item-logo-fadu img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    border-radius: 12px;
}

.item-main {
    flex: 1;
    min-width: 0;
}

.item-main h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--toss-ink);
    letter-spacing: -0.01em;
}

.item-sub {
    font-size: 0.9rem;
    color: var(--toss-text-2);
    margin-top: 0.12rem;
}

.item-right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.6rem;
    text-align: right;
}

.item-date {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--toss-text-2);
    background: var(--toss-bg);
    padding: 0.34rem 0.72rem;
    border-radius: 999px;
    white-space: nowrap;
}

.item-gpa {
    line-height: 1.1;
}

/* Education — designed cards with GPA as a Toss-style stat */
.edu-list {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.edu-card {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    padding: 1.15rem 1.4rem;
    background: var(--toss-surface);
    border-radius: 14px;
    box-shadow: var(--toss-hairline);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.edu-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(2, 32, 71, 0.07);
}

.edu-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    box-shadow: var(--toss-hairline);
    padding: 6px;
}

.edu-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.edu-main {
    flex: 1;
    min-width: 0;
}

.edu-main h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--toss-ink);
    margin-bottom: 0.15rem;
    letter-spacing: -0.01em;
}

.edu-school {
    font-size: 0.9rem;
    color: var(--toss-text-2);
    margin-bottom: 0.25rem;
}

.edu-date {
    font-size: 0.8rem;
    color: var(--toss-text-3);
    font-weight: 500;
}

.edu-gpa {
    flex-shrink: 0;
    text-align: right;
    line-height: 1.1;
}

.gpa-num {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--toss-blue);
    letter-spacing: -0.03em;
}

.gpa-max {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--toss-text-3);
    margin-left: 0.15rem;
}

.gpa-label {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--toss-text-3);
}

/* Experience — designed cards with logos */
.exp-list {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.exp-card {
    background: var(--toss-surface);
    border-radius: 14px;
    box-shadow: var(--toss-hairline);
    padding: 1.4rem 1.5rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.exp-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(2, 32, 71, 0.07);
}

.exp-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.exp-logo {
    height: 26px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
}

.exp-period {
    flex-shrink: 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--toss-text-3);
}

.exp-role {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--toss-ink);
    margin-bottom: 0.15rem;
    letter-spacing: -0.01em;
}

.exp-org {
    font-size: 0.9rem;
    color: var(--toss-blue);
    font-weight: 600;
}

.exp-body {
    margin-top: 1.1rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--toss-line);
}

.exp-body h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--toss-text);
    margin: 0 0 0.5rem;
}

.exp-body h4:not(:first-child) {
    margin-top: 1.1rem;
}

.exp-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.exp-body li {
    position: relative;
    padding-left: 1.1rem;
    font-size: 0.88rem;
    color: var(--toss-text-2);
    line-height: 1.55;
}

.exp-body li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--toss-blue);
}

/* legacy timeline (unused) */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-left: 1.5rem;
    border-left: 2px solid var(--toss-line);
}

.timeline-item {
    position: relative;
    padding-left: 1.5rem;
}

.timeline-marker {
    position: absolute;
    left: -1.5rem;
    top: 0.6rem;
    width: 12px;
    height: 12px;
    background: var(--toss-blue);
    border-radius: var(--radius-full);
    transform: translateX(-50%);
}

.timeline-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--toss-ink);
    margin-bottom: 0.2rem;
}

.timeline-content p {
    color: var(--toss-gray);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.timeline-content .gpa {
    color: var(--toss-blue);
    font-weight: 600;
    font-size: 0.85rem;
}

.timeline-content .date {
    color: var(--toss-gray-weak);
    font-size: 0.8rem;
}

.publication-list {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.pub-card {
    position: relative;
    padding: 1.2rem 1.4rem;
    background: var(--toss-surface);
    border-radius: 14px;
    box-shadow: var(--toss-hairline);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.pub-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(2, 32, 71, 0.07);
}

.pub-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.65rem;
}

.pub-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.26rem 0.62rem;
    border-radius: 999px;
    letter-spacing: -0.01em;
}

.pub-journal { background: rgba(2, 162, 98, 0.1); color: #02a262; }
.pub-conf { background: var(--toss-blue-weak); color: var(--toss-blue); }
.pub-domestic { background: rgba(123, 97, 255, 0.1); color: #7b61ff; }
.pub-venue-badge { background: var(--toss-bg); color: var(--toss-text-2); font-weight: 600; }
.pub-first-badge { background: var(--toss-blue); color: #fff; }

.pub-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--toss-ink);
    line-height: 1.45;
    margin-bottom: 0.45rem;
    padding-right: 3.5rem;
}

.pub-authors {
    font-size: 0.85rem;
    color: var(--toss-text-2);
}

.pub-authors strong {
    color: var(--toss-ink);
    font-weight: 700;
}

.pub-link {
    position: absolute;
    top: 1.2rem;
    right: 1.4rem;
    padding: 0.3rem 0.7rem;
    background: #fff;
    color: var(--toss-blue);
    box-shadow: var(--toss-hairline);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 999px;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.pub-link:hover {
    background: var(--toss-blue);
    color: #fff;
}

/* Research Experience */
.research-item {
    padding: 1.5rem;
    background: var(--toss-bg);
    border-radius: var(--radius-xl);
    margin-bottom: 1rem;
}

.research-item h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--toss-ink);
    margin-bottom: 0.3rem;
}

.research-item .lab-info {
    font-size: 0.9rem;
    color: var(--toss-blue);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.research-item .date {
    font-size: 0.8rem;
    color: var(--toss-gray-weak);
    margin-bottom: 1rem;
}

.research-item h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--toss-ink);
    margin: 1rem 0 0.5rem;
}

.research-item ul {
    list-style: none;
    padding: 0;
}

.research-item li {
    font-size: 0.85rem;
    color: var(--toss-gray);
    padding-left: 1rem;
    position: relative;
    margin-bottom: 0.4rem;
    line-height: 1.5;
}

.research-item li::before {
    content: '-';
    position: absolute;
    left: 0;
    color: var(--toss-blue);
}

/* Certifications */
.cert-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.cert-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.2rem;
    background: var(--toss-bg);
    border-radius: var(--radius-lg);
}

.cert-item .cert-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--toss-ink);
}

.cert-item .cert-detail {
    text-align: right;
}

.cert-item .cert-score {
    font-size: 0.85rem;
    color: var(--toss-blue);
    font-weight: 600;
}

.cert-item .cert-date {
    font-size: 0.75rem;
    color: var(--toss-gray-weak);
}

.awards-list {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.award-card {
    display: flex;
    gap: 1.1rem;
    align-items: flex-start;
    padding: 1.2rem 1.4rem;
    background: var(--toss-surface);
    border-radius: 14px;
    box-shadow: var(--toss-hairline);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.award-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(2, 32, 71, 0.07);
}

.award-thumb {
    flex-shrink: 0;
    width: 64px;
    height: 86px;
    object-fit: cover;
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--toss-hairline);
}

.award-body {
    flex: 1;
    min-width: 0;
}

.award-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.2rem;
}

.award-head h3 {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--toss-ink);
    letter-spacing: -0.01em;
}

.award-org {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--toss-blue);
    margin-bottom: 0.45rem;
}

.award-desc {
    font-size: 0.85rem;
    color: var(--toss-text-2);
    line-height: 1.55;
}

.scholarship-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 1.1rem 1.4rem;
    background: var(--toss-surface);
    border-radius: 14px;
    box-shadow: var(--toss-hairline);
}

.schol-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--toss-ink);
    margin-right: 0.4rem;
}

.schol-pill {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--toss-text-2);
    background: var(--toss-bg);
    padding: 0.36rem 0.72rem;
    border-radius: 999px;
}

.cert-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.875rem;
}

.cert-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1.1rem 1.3rem;
    background: var(--toss-surface);
    border-radius: 14px;
    box-shadow: var(--toss-hairline);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.cert-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(2, 32, 71, 0.07);
}

.cert-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: var(--toss-blue-weak);
    color: var(--toss-blue);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cert-info h3 {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--toss-ink);
    letter-spacing: -0.01em;
}

.cert-info p {
    font-size: 0.82rem;
    color: var(--toss-text-2);
    margin-top: 0.12rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.skill-category h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--toss-ink);
    margin-bottom: 0.8rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tags span {
    padding: 0.3rem 0.8rem;
    background: var(--toss-bg);
    border-radius: var(--radius-2xl);
    font-size: 0.8rem;
    color: var(--toss-gray);
    transition: var(--transition-fast);
}

.skill-tags span:hover {
    background: var(--toss-blue);
    color: var(--color-white);
}

.courses-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.course-group h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--toss-ink);
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--toss-line);
}

.course-group ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.course-group li {
    color: var(--toss-gray);
    font-size: 0.85rem;
    padding-left: 1rem;
    position: relative;
}

.course-group li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 4px;
    height: 4px;
    background: var(--toss-blue);
    border-radius: var(--radius-full);
}

/* Projects Section */
.project-category {
    margin-bottom: 2rem;
}

.project-category:last-child {
    margin-bottom: 0;
}

.project-category-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--toss-blue);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--toss-line);
}

/* Dark Mode */
body.dark-mode .profile {
    background: var(--gradient-dark-bg);
    border-color: var(--toss-ink);
}

body.dark-mode .profile-info h1 {
    color: var(--toss-ink);
}

body.dark-mode .profile-info .bio {
    color: var(--toss-gray);
}

body.dark-mode .social-links a {
    background: var(--toss-line);
    border-color: var(--toss-gray-weak);
    color: var(--toss-gray-weak);
}

body.dark-mode .social-links a:hover {
    background: var(--toss-blue);
    color: var(--color-white);
    border-color: var(--toss-blue);
}

body.dark-mode .section {
    background: var(--color-bg-secondary);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: none;
}

body.dark-mode .section:last-child {
    margin-bottom: 0;
}

body.dark-mode .section h2 {
    color: var(--toss-ink);
}

body.dark-mode .timeline {
    border-left-color: var(--toss-gray-weak);
}

body.dark-mode .timeline-content h3 {
    color: var(--toss-ink);
}

body.dark-mode .timeline-content p {
    color: var(--toss-gray);
}

body.dark-mode .publication-item,
body.dark-mode .research-item,
body.dark-mode .cert-item {
    background: var(--color-bg-tertiary);
}

body.dark-mode .publication-item h3,
body.dark-mode .research-item h3 {
    color: var(--toss-ink);
}

body.dark-mode .publication-item .authors,
body.dark-mode .research-item li {
    color: var(--toss-gray-weak);
}

body.dark-mode .cert-item .cert-name {
    color: var(--toss-ink);
}

body.dark-mode .skill-tags span {
    background: var(--toss-line);
    color: var(--toss-gray-weak);
}

body.dark-mode .course-group h3 {
    color: var(--toss-ink);
    border-bottom-color: var(--toss-gray-weak);
}

body.dark-mode .course-group li {
    color: var(--toss-gray);
}

body.dark-mode .award-content h3 {
    color: var(--color-primary-light);
}

body.dark-mode .award-content p {
    color: var(--toss-gray);
}

body.dark-mode .project-category-title {
    border-bottom-color: var(--toss-gray-weak);
}

/* ===== Responsive: 900px (Tablet) ===== */
@media (max-width: 900px) {
    .portfolio {
        gap: 2rem;
    }

    .profile {
        padding: 2rem;
        min-height: 240px;
    }

    .profile-image img {
        width: 150px;
        height: 150px;
    }

    .profile-info h1 {
        font-size: 1.75rem;
    }

    .section h2 {
        font-size: 1.2rem;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .courses-list {
        grid-template-columns: 1fr;
    }
}

/* ===== Responsive: 768px (Small Tablet) ===== */
@media (max-width: 768px) {
    .profile {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
        min-height: auto;
    }

    .profile-image img {
        width: 120px;
        height: 120px;
    }

    .profile-info h1 {
        font-size: 1.5rem;
    }

    .profile-info .subtitle {
        font-size: 0.9rem;
    }

    .profile-info .bio {
        font-size: 0.85rem;
    }

    .social-links {
        justify-content: center;
    }

    .social-links a {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .section {
        padding-bottom: 1.5rem;
    }

    .section h2 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .cert-list {
        grid-template-columns: 1fr;
    }

    .award-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .award-date {
        width: auto;
    }
}

/* ===== Responsive: 600px (Large Phone) ===== */
@media (max-width: 600px) {
    .portfolio {
        gap: 1.5rem;
    }

    .profile {
        padding: 1.25rem;
    }

    .profile-image img {
        width: 100px;
        height: 100px;
    }

    .profile-info h1 {
        font-size: 1.3rem;
    }

    .profile-info .bio {
        font-size: 0.8rem;
        line-height: 1.6;
    }

    .social-links a {
        font-size: 0.75rem;
        padding: 0.35rem 0.7rem;
    }

    .section h2 {
        font-size: 1rem;
        padding-left: 0.75rem;
    }

    .section h2::before {
        width: 3px;
        height: 80%;
    }

    .timeline {
        padding-left: 1rem;
    }

    .timeline-item {
        padding-left: 1rem;
    }

    .timeline-marker {
        left: -1rem;
        width: 10px;
        height: 10px;
    }

    .timeline-content h3 {
        font-size: 0.9rem;
    }

    .timeline-content p {
        font-size: 0.8rem;
    }

    .publication-item {
        padding: 1rem;
    }

    .publication-item h3 {
        font-size: 0.85rem;
    }

    .research-item {
        padding: 1rem;
    }

    .cert-item {
        padding: 0.8rem 1rem;
    }

    .cert-item .cert-name {
        font-size: 0.8rem;
    }

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

    .skill-tags span {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
    }
}

/* ===== Responsive: 480px (Small Phone) ===== */
@media (max-width: 480px) {
    .profile {
        padding: 1rem;
    }

    .profile-image img {
        width: 80px;
        height: 80px;
        border-width: 3px;
    }

    .profile-info h1 {
        font-size: 1.15rem;
    }

    .profile-info .subtitle {
        font-size: 0.8rem;
    }

    .social-links {
        gap: 0.5rem;
    }

    .social-links a {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
        gap: 0.25rem;
    }

    .section h2 {
        font-size: 0.95rem;
    }

    .timeline-content h3 {
        font-size: 0.85rem;
    }
}

/* ==================== Unified Post Card Styles ==================== */
.home-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.home-cards-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.home-cards-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    grid-auto-rows: 1fr;
}

.home-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: var(--transition-fast);
}

.home-card:hover .home-card-thumb img {
    transform: scale(1.03);
}

.home-card:hover .home-card-title {
    color: var(--toss-blue);
}

.home-card-thumb {
    width: 100%;
    height: 140px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--toss-line);
}

.home-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.home-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #f1f3f5 100%);
}

.home-card-placeholder span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--toss-gray-weak);
    text-align: center;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-card-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--toss-gray-weak);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-card-breadcrumb .breadcrumb-icon {
    width: 14px;
    height: 14px;
    object-fit: contain;
    flex-shrink: 0;
}

.home-card-body {
    padding: 0.6rem 0.2rem 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.home-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
}

.home-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--toss-ink);
    margin: 0 0 0.3rem 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-card-summary {
    font-size: 0.8rem;
    color: var(--toss-gray);
    margin: 0 0 auto 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-card-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: var(--toss-gray);
    font-weight: 500;
}

.home-card-footer span {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.home-card-footer svg {
    width: 12px;
    height: 12px;
}

.home-card-footer .sep {
    color: var(--toss-gray-weak);
}

.home-card-tags {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.2rem;
    margin-top: 0.3rem;
    overflow: hidden;
}

.home-tag {
    padding: 0.05rem 0.35rem;
    background: transparent;
    border-radius: var(--radius-xs);
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid currentColor;
}

.home-tag-more {
    font-size: 0.7rem;
    color: var(--toss-gray-weak);
}

/* Dark mode for home-card */
body.dark-mode .home-card-thumb {
    border-color: var(--toss-line);
}

body.dark-mode .home-card-placeholder {
    background: linear-gradient(135deg, #2d3436 0%, #3d4448 50%, #2d3436 100%);
}

body.dark-mode .home-card-placeholder span {
    color: var(--toss-gray-weak);
}

body.dark-mode .home-card:hover .home-card-title {
    color: var(--color-primary-light);
}

body.dark-mode .home-card-title {
    color: var(--toss-bg);
}

body.dark-mode .home-card-summary {
    color: var(--toss-gray-weak);
}

body.dark-mode .home-card-footer {
    color: var(--toss-gray-weak);
}

body.dark-mode .home-card-footer .sep {
    color: var(--toss-gray);
}

/* Responsive for home-card */
@media (max-width: 1024px) {
    .home-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .home-cards-grid.cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .home-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .home-cards-grid.cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .home-cards-list {
        grid-template-columns: 1fr;
    }
}
