@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;800&family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

:root {
    --bg-color: #050609;
    --card-bg: rgba(13, 16, 27, 0.45);
    --card-border: rgba(255, 255, 255, 0.04);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-indigo: #6366f1;
    --accent-purple: #a855f7;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    --font-heading: 'Outfit', 'Noto Sans KR', sans-serif;
    --font-body: 'Inter', 'Noto Sans KR', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.08) 0%, transparent 40%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}

/* Scroll Progress Bar (Toss Style) */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--accent-gradient);
    z-index: 1000;
    transition: width 0.1s ease;
}

/* Header & Nav */
header {
    width: 100%;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--card-border);
    position: fixed;
    top: 0;
    z-index: 100;
    background-color: rgba(5, 6, 9, 0.7);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 0.2rem 0;
}

/* Active navigation item highlighting */
.nav-links a.active {
    color: var(--text-primary);
    font-weight: 600;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

/* Hamburger Menu Icon */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 22px;
    height: 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 101;
}

.menu-toggle span {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Main Layout */
main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem;
}

section {
    margin-bottom: 8rem;
}

/* Hero Section (Apple Style Spacing) */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 6rem 0 3rem;
}

.hero-avatar {
    font-size: 4.5rem;
    margin-bottom: 2rem;
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(3deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.hero-badge {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    padding: 0.4rem 1.1rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.8rem;
    letter-spacing: 0.5px;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 2rem;
    letter-spacing: -1.2px;
    max-width: 850px;
}

.hero h1 span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin-bottom: 3.5rem;
    font-weight: 400;
}

.cta-group {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 4rem; /* Prevent overlap with info-grid */
}

.cta-button {
    background: var(--accent-gradient);
    color: white;
    padding: 0.85rem 2.2rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2);
    text-align: center;
}

.cta-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.cta-secondary {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    box-shadow: none;
}

.cta-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.05);
}

/* Info Cards Grid (Clean Layout without overlap) */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    width: 100%;
    margin-top: 2rem;
}

.info-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.15);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.06);
    background: rgba(22, 26, 43, 0.6);
}

.info-card h4 {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
    letter-spacing: 0.5px;
}

.info-card p {
    font-size: 0.95rem;
    font-weight: 600;
    word-break: break-all;
}

.info-card a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.info-card a:hover {
    color: var(--accent-indigo);
}

/* Section Title */
.section-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 3.5rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 35px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

/* About Me Section */
.about-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.about-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 2.5rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-card:hover {
    transform: translateY(-6px);
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.08);
}

.about-icon {
    font-size: 2rem;
    margin-bottom: 1.25rem;
}

.about-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.85rem;
}

.about-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Timeline (Apple/Toss Style Timeline) */
.timeline {
    position: relative;
    border-left: 2px solid rgba(255, 255, 255, 0.04);
    padding-left: 2.5rem;
    margin-left: 0.5rem;
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
}

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

.timeline-dot {
    position: absolute;
    left: calc(-2.5rem - 7px);
    top: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-indigo);
    border: 3px solid var(--bg-color);
    box-shadow: 0 0 15px var(--accent-indigo);
    transition: transform 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.3);
    background: var(--accent-purple);
    box-shadow: 0 0 20px var(--accent-purple);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.timeline-title-group {
    display: flex;
    flex-direction: column;
}

.timeline-title {
    font-size: 1.3rem;
    font-weight: 700;
}

.timeline-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

.timeline-date {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 0.3rem 0.9rem;
    border-radius: 8px;
    font-size: 0.8rem;
    color: #a5b4fc;
    font-weight: 600;
}

.timeline-body {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.timeline-body ul {
    list-style: none;
    margin-top: 1rem;
}

.timeline-body li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.6rem;
    line-height: 1.7;
}

.timeline-body li::before {
    content: '•';
    color: var(--accent-indigo);
    position: absolute;
    left: 0.2rem;
    font-weight: bold;
}

/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.skill-category {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 2.2rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.skill-category h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--card-border);
    color: var(--text-primary);
}

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

.skill-tag {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
}

.skill-tag.highlight {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.25);
    color: #a5b4fc;
    font-weight: 600;
}

.skill-tag.highlight:hover {
    background: rgba(99, 102, 241, 0.15);
}

/* Reveal on Scroll (Scroll-driven Fade-in-up) */
.reveal {
    opacity: 0;
    transform: translateY(35px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0px);
}

/* Footer */
footer {
    border-top: 1px solid var(--card-border);
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

footer p {
    margin-bottom: 0.5rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .nav-container {
        padding: 1rem 1.5rem;
    }
    
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        display: flex;
        position: fixed;
        right: -100%;
        top: 0;
        width: 75%;
        height: 100vh;
        background-color: rgba(5, 6, 9, 0.96);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        border-left: 1px solid var(--card-border);
        box-shadow: -10px 0 35px rgba(0,0,0,0.6);
    }

    .nav-links.active {
        right: 0;
    }

    /* Hamburger menu click transition */
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(4px, 4px);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    main {
        padding: 6rem 1.5rem 3rem;
    }

    section {
        margin-bottom: 6rem;
    }

    .hero {
        padding: 3rem 0;
    }

    .hero h1 {
        font-size: 2.3rem;
        line-height: 1.3;
        letter-spacing: -0.8px;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 2.5rem;
    }

    .cta-group {
        margin-bottom: 3rem;
    }

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

    .info-card {
        padding: 1.1rem 1.5rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }

    .info-card h4 {
        margin-bottom: 0;
    }

    .info-card p {
        text-align: right;
    }

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

    .about-card {
        padding: 1.8rem;
    }

    .timeline {
        padding-left: 1.8rem;
    }

    .timeline-dot {
        left: calc(-1.8rem - 7px);
    }

    .timeline-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.4rem;
    }

    .timeline-date {
        align-self: flex-start;
    }
    
    .skills-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .skill-category {
        padding: 1.8rem;
    }
}
