﻿/* ============================================
   Apple-Inspired Design System
   Personal Portfolio — styles.css
   ============================================ */

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

:root {
    /* Primary */
    --color-black: #000000;
    --color-light-gray: #f5f5f7;
    --color-near-black: #1d1d1f;

    /* Interactive */
    --color-blue: #0071e3;
    --color-link-blue: #0066cc;
    --color-bright-blue: #2997ff;

    /* Text */
    --color-white: #ffffff;
    --color-text-secondary: rgba(0, 0, 0, 0.8);
    --color-text-tertiary: rgba(0, 0, 0, 0.48);

    /* Surfaces */
    --color-dark-surface-1: #272729;
    --color-dark-surface-2: #262628;
    --color-dark-surface-3: #28282a;

    /* Buttons */
    --color-btn-active: #ededf2;
    --color-btn-default: #fafafc;
    --color-overlay: rgba(210, 210, 215, 0.64);

    /* Shadows */
    --shadow-card: rgba(0, 0, 0, 0.22) 3px 5px 30px 0px;

    /* Nav */
    --nav-bg: rgba(0, 0, 0, 0.8);
    --nav-height: 48px;

    /* Layout */
    --max-width: 980px;
    --section-padding: 120px 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.47;
    letter-spacing: -0.374px;
    color: var(--color-near-black);
    background: var(--color-white);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

img {
    max-width: 100%;
    display: block;
}

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    /* Liquid glass: layered blur + refraction simulation */
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: saturate(200%) blur(28px) brightness(0.88);
    -webkit-backdrop-filter: saturate(200%) blur(28px) brightness(0.88);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        0 1px 0 rgba(0, 0, 0, 0.4);
    z-index: 1000;
    transition: background 0.3s ease;
}

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

.nav-logo {
    font-size: 21px;
    font-weight: 700;
    color: var(--color-white);
    letter-spacing: 0.231px;
    line-height: 1.19;
}

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

.nav-links a {
    font-size: 12px;
    font-weight: 400;
    color: var(--color-white);
    letter-spacing: -0.12px;
    line-height: 1.33;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.nav-links a:hover {
    opacity: 1;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 18px;
    height: 1.5px;
    background: var(--color-white);
    transition: all 0.3s ease;
    display: block;
}

.nav-toggle.active span:first-child {
    transform: rotate(45deg) translate(2.5px, 2.5px);
}

.nav-toggle.active span:last-child {
    transform: rotate(-45deg) translate(2.5px, -2.5px);
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(41, 151, 255, 0.10) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 65% 60%, rgba(100, 60, 255, 0.04) 0%, transparent 50%),
        var(--color-black);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 24px;
    padding-top: var(--nav-height);
}

.hero-content {
    max-width: var(--max-width);
}

.hero-title {
    font-size: 56px;
    font-weight: 600;
    line-height: 1.07;
    letter-spacing: -0.28px;
    color: var(--color-white);
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 28px;
    font-weight: 400;
    line-height: 1.14;
    letter-spacing: 0.196px;
    color: var(--color-white);
    opacity: 0.9;
    margin-bottom: 20px;
}

.hero-desc {
    font-size: 21px;
    font-weight: 400;
    line-height: 1.19;
    letter-spacing: 0.231px;
    color: var(--color-white);
    opacity: 0.6;
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Buttons --- */
.btn-primary {
    display: inline-block;
    background: var(--color-blue);
    color: var(--color-white);
    font-size: 17px;
    font-weight: 400;
    line-height: 1;
    padding: 12px 24px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: -0.374px;
}

.btn-primary:hover {
    background: #0077ed;
}

.btn-primary:active {
    background: #006edb;
}

.btn-primary:focus-visible {
    outline: 2px solid var(--color-blue);
    outline-offset: 2px;
}

.btn-pill {
    display: inline-block;
    font-size: 17px;
    font-weight: 400;
    line-height: 1;
    padding: 12px 24px;
    border-radius: 980px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: -0.374px;
}

.btn-pill-outline {
    position: relative;
    overflow: hidden;
    /* Liquid glass: frosted background + inset highlight */
    background: rgba(255, 255, 255, 0.10);
    color: var(--color-white);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        inset 0 -1px 0 rgba(0, 0, 0, 0.12),
        0 4px 20px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
}

/* Diagonal shine layer */
.btn-pill-outline::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.14) 0%,
        rgba(255, 255, 255, 0.03) 50%,
        transparent 100%
    );
    border-radius: inherit;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.btn-pill-outline:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.32),
        0 4px 24px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
    color: var(--color-white);
}

/* --- Sections --- */
.section {
    padding: var(--section-padding);
}

.section-light {
    background: var(--color-light-gray);
}

.section-dark {
    background: var(--color-black);
}

.section-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section-content-narrow {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-heading {
    font-size: 40px;
    font-weight: 600;
    line-height: 1.10;
    letter-spacing: normal;
    color: var(--color-near-black);
    text-align: center;
    margin-bottom: 16px;
}

.section-heading-light {
    color: var(--color-white);
}

.section-subtitle {
    font-size: 21px;
    font-weight: 400;
    line-height: 1.19;
    letter-spacing: 0.231px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    margin-bottom: 64px;
}

.section-subtitle-dark {
    color: var(--color-text-secondary);
}

/* --- About Section --- */
.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 64px;
    align-items: start;
    margin-top: 48px;
}

.body-text {
    font-size: 17px;
    font-weight: 400;
    line-height: 1.47;
    letter-spacing: -0.374px;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
    text-align: left;
}

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

.stat-item {
    text-align: center;
    padding: 24px;
    background: var(--color-white);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: 600;
    line-height: 1.10;
    color: var(--color-near-black);
    margin-bottom: 4px;
    white-space: nowrap;
}

.stat-label {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.29;
    letter-spacing: -0.224px;
    color: var(--color-text-tertiary);
}

/* --- Education Timeline --- */
.timeline {
    max-width: 540px;
    margin: 48px auto 0;
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: rgba(255, 255, 255, 0.15);
}

.timeline-item {
    position: relative;
    padding-bottom: 40px;
    display: flex;
    gap: 0;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -32px;
    top: 6px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 2px solid var(--color-bright-blue);
    background: var(--color-black);
    z-index: 1;
}

.timeline-marker-done {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

.timeline-date {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--color-bright-blue);
    margin-bottom: 6px;
    display: block;
}

.timeline-item:last-child .timeline-date {
    color: rgba(255, 255, 255, 0.4);
}

.timeline-title {
    font-size: 21px;
    font-weight: 600;
    line-height: 1.24;
    color: var(--color-white);
    margin-bottom: 4px;
}

.timeline-place {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.43;
    color: rgba(255, 255, 255, 0.5);
}

/* --- Skills Section --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.skill-card {
    /* Simulated glass on dark background: gradient + border highlight */
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.07) 0%,
        rgba(255, 255, 255, 0.025) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 12px;
    padding: 40px 32px;
    position: relative;
    overflow: hidden;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        0 8px 32px rgba(0, 0, 0, 0.30);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Top edge highlight */
.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.28),
        transparent
    );
    pointer-events: none;
}

.skill-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        0 16px 48px rgba(0, 0, 0, 0.40),
        0 0 0 1px rgba(41, 151, 255, 0.08);
}

.skill-icon {
    color: var(--color-bright-blue);
    margin-bottom: 20px;
}

.skill-title {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.19;
    letter-spacing: 0.231px;
    color: var(--color-white);
    margin-bottom: 10px;
}

.skill-desc {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.43;
    letter-spacing: -0.224px;
    color: rgba(255, 255, 255, 0.6);
}

/* --- Projects Section --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.project-card {
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease;
    will-change: transform;
}

.project-card:hover {
    transform: translateY(-4px);
}

.projects-grid .project-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: 600px;
    justify-self: center;
    width: 100%;
}

.project-card-dark {
    background: var(--color-black);
}

.project-card-light {
    background: var(--color-white);
    box-shadow: var(--shadow-card);
}

.project-card-surface {
    background: var(--color-dark-surface-1);
}

.project-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.03);
}

.project-card-dark .project-image {
    background: var(--color-dark-surface-1);
}

.project-card-light .project-image {
    background: var(--color-light-gray);
}

.project-card-surface .project-image {
    background: var(--color-dark-surface-2);
}

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

.tag {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 980px;
}

.tag-research {
    background: rgba(41, 151, 255, 0.15);
    color: var(--color-bright-blue);
}

.tag-project {
    background: rgba(48, 209, 88, 0.15);
    color: #30d158;
}

.tag-venue {
    background: rgba(255, 159, 10, 0.15);
    color: #ff9f0a;
    font-weight: 700;
}

.section-light .tag-venue {
    background: rgba(255, 149, 0, 0.12);
    color: #c77600;
}

.tag-review {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
}

.section-light .tag-review {
    background: rgba(0, 0, 0, 0.06);
    color: var(--color-text-tertiary);
}

.tag-date {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
}

.section-light .tag-date {
    background: rgba(0, 0, 0, 0.06);
    color: var(--color-text-tertiary);
}

.project-info {
    padding: 24px 28px 28px;
}

.project-title {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.17;
    letter-spacing: 0.1px;
    color: var(--color-white);
    margin-bottom: 10px;
}

.project-title-dark {
    color: var(--color-near-black);
}

.project-desc {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: -0.224px;
    color: rgba(255, 255, 255, 0.6);
}

.project-desc-dark {
    color: var(--color-text-secondary);
}

/* --- FAQ Section --- */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.faq-item {
    padding: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.faq-item:first-child {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 22px 0;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.47;
    letter-spacing: -0.374px;
    color: var(--color-near-black);
    cursor: pointer;
    list-style: none;
    transition: color 0.2s ease;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: '+';
    font-size: 22px;
    font-weight: 300;
    color: var(--color-text-tertiary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 16px;
}

.faq-item[open] .faq-question::after {
    content: '−';
}

.faq-question:hover {
    color: var(--color-link-blue);
}

.faq-answer {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.65;
    letter-spacing: -0.224px;
    color: var(--color-text-secondary);
    padding: 0 0 22px;
}

/* --- Contact Cards --- */
.contact-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 28px;
    background: var(--color-dark-surface-1);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s ease;
}

.contact-card:hover {
    background: var(--color-dark-surface-3);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.contact-icon {
    color: var(--color-bright-blue);
    flex-shrink: 0;
}

.contact-detail {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

.contact-value {
    font-size: 17px;
    font-weight: 400;
    line-height: 1.47;
    color: var(--color-white);
}

/* --- Inline Links --- */
.inline-link {
    color: var(--color-link-blue);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.inline-link:hover {
    border-bottom-color: var(--color-link-blue);
}

/* --- Links --- */
.link-arrow {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.43;
    letter-spacing: -0.224px;
    color: var(--color-bright-blue);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.3s ease;
}

.link-arrow::after {
    content: '›';
    font-size: 18px;
    transition: transform 0.3s ease;
}

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

.link-arrow-dark {
    color: var(--color-link-blue);
}

/* --- Footer --- */
.footer {
    background: var(--color-near-black);
    padding: 40px 0;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 24px;
}

.footer-logo {
    font-size: 21px;
    font-weight: 700;
    color: var(--color-white);
    letter-spacing: 0.231px;
}

.footer-tagline {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.33;
    letter-spacing: -0.12px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 4px;
}

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

.footer-links a {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.33;
    letter-spacing: -0.12px;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--color-white);
}

.footer-bottom {
    text-align: center;
}

.footer-copy {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.33;
    letter-spacing: -0.12px;
    color: rgba(255, 255, 255, 0.3);
}

/* --- Post Detail Page --- */
.post {
    padding-top: var(--nav-height);
}

.post-hero {
    background: var(--color-black);
    padding: 80px 24px 64px;
}

.post-hero-content {
    max-width: var(--max-width);
    margin: 0 auto;
}

.post-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 400;
    color: var(--color-bright-blue);
    margin-bottom: 24px;
    transition: gap 0.3s ease;
}

.post-back:hover {
    gap: 10px;
}

.post-hero-content .project-tags {
    margin-bottom: 20px;
}

.post-title {
    font-size: 48px;
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.3px;
    color: var(--color-white);
    margin-bottom: 20px;
    max-width: 800px;
}

.post-lead {
    font-size: 21px;
    font-weight: 400;
    line-height: 1.38;
    letter-spacing: 0.1px;
    color: rgba(255, 255, 255, 0.6);
    max-width: 680px;
}

.post-lead .inline-link-light {
    color: var(--color-bright-blue);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.post-lead .inline-link-light:hover {
    border-bottom-color: var(--color-bright-blue);
}

.post-cover {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 48px 24px 0;
}

.post-cover img {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow-card);
}

.post-cover-dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.post-body {
    max-width: 720px;
    margin: 0 auto;
    padding: 64px 24px 80px;
}

.post-section {
    margin-bottom: 48px;
}

.post-section:last-child {
    margin-bottom: 0;
}

.post-section h2 {
    font-size: 32px;
    font-weight: 600;
    line-height: 1.12;
    color: var(--color-near-black);
    margin-bottom: 20px;
}

.post-section p {
    font-size: 17px;
    font-weight: 400;
    line-height: 1.65;
    letter-spacing: -0.2px;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
}

.post-section p:last-child {
    margin-bottom: 0;
}

.post-list {
    list-style: none;
    padding: 0;
    margin: 16px 0;
}

.post-list li {
    font-size: 17px;
    line-height: 1.65;
    color: var(--color-text-secondary);
    padding: 10px 0 10px 24px;
    position: relative;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.post-list li:last-child {
    border-bottom: none;
}

.post-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 18px;
    width: 8px;
    height: 8px;
    background: var(--color-bright-blue);
    border-radius: 50%;
}

/* Highlight Cards for Detail Pages */
.highlight-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
}

.highlight-card {
    background: var(--color-light-gray);
    border-radius: 12px;
    padding: 28px 24px;
}

.highlight-number {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-bright-blue);
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.highlight-card h3 {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.29;
    color: var(--color-near-black);
    margin-bottom: 8px;
}

.highlight-card p {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--color-text-secondary);
    margin-bottom: 0;
}

/* --- Post Navigation (Prev / Next) --- */
.post-nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px 80px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.post-nav-link {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 24px;
    background: var(--color-light-gray);
    border-radius: 12px;
    transition: all 0.3s ease;
    color: inherit;
}

.post-nav-link:hover {
    background: #ebebed;
    transform: translateY(-2px);
}

.post-nav-link--next {
    text-align: right;
    grid-column: 2;
}

.post-nav-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--color-text-tertiary);
}

.post-nav-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.33;
    color: var(--color-near-black);
}

@media (max-width: 480px) {
    .post-nav {
        grid-template-columns: 1fr;
        padding-bottom: 60px;
    }

    .post-nav-link--next {
        grid-column: 1;
        text-align: left;
    }
}

/* Card as link — ensure clickable area and no color override */
a.project-card {
    display: block;
    color: inherit;
    cursor: pointer;
}

a.project-card .link-arrow {
    margin-top: 16px;
}

/* --- Back to Top --- */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-near-black);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--color-blue);
    transform: translateY(-2px);
}

/* --- Reading Progress Bar (post pages) --- */
.reading-progress {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, var(--color-bright-blue) 0%, #7c3aed 100%);
    z-index: 1001;
    border-radius: 0 2px 2px 0;
    transition: width 0.08s linear;
    pointer-events: none;
}

/* --- Typewriter Cursor --- */
.typewriter-cursor {
    display: inline-block;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 200;
    margin-left: 1px;
    animation: cursor-blink 0.85s step-end infinite;
}

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

/* --- Scroll Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* --- Responsive --- */

/* Tablet */
@media (max-width: 834px) {
    :root {
        --section-padding: 80px 0;
    }

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

    .hero-subtitle {
        font-size: 24px;
    }

    .hero-desc {
        font-size: 17px;
    }

    .section-heading {
        font-size: 32px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-stats {
        flex-direction: row;
        justify-content: center;
    }

    .stat-item {
        flex: 1;
    }

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

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

    .projects-grid .project-card:last-child:nth-child(odd) {
        max-width: none;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .post-title {
        font-size: 36px;
    }

    .post-lead {
        font-size: 17px;
    }

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

    .post-cover-dual {
        grid-template-columns: 1fr;
    }
}

/* Mobile */
@media (max-width: 480px) {
    :root {
        --section-padding: 64px 0;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--nav-bg);
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 40px;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        font-size: 24px;
        font-weight: 300;
        line-height: 1.50;
        opacity: 1;
    }

    .nav-toggle {
        display: flex;
    }

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

    .hero-subtitle {
        font-size: 21px;
    }

    .hero-desc {
        font-size: 14px;
    }

    .section-heading {
        font-size: 28px;
    }

    .section-subtitle {
        font-size: 17px;
        margin-bottom: 40px;
    }

    .about-stats {
        flex-direction: column;
    }

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

    .skill-card {
        padding: 28px 24px;
    }

    .project-title,
    .project-title-dark {
        font-size: 19px;
    }

    .project-info {
        padding: 20px 24px 24px;
    }

    .hero-ctas {
        flex-direction: column;
        align-items: center;
    }

    .footer-top {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .stat-number {
        font-size: 28px;
    }

    .contact-card {
        padding: 20px 22px;
    }

    .contact-value {
        font-size: 14px;
    }

    .post-hero {
        padding: 48px 24px 40px;
    }

    .post-title {
        font-size: 28px;
    }

    .post-lead {
        font-size: 14px;
    }

    .post-section h2 {
        font-size: 24px;
    }

    .post-body {
        padding: 40px 24px 60px;
    }
}