/* ===================================================
   yongjoon.dev - Calm Serene Futurism Portfolio
   Colors: #1a1a2e, #4a90d9, #f5f0e8, #e8b84b, #6c757d
   Fonts: Inter, Nunito
   =================================================== */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', 'Nunito', sans-serif;
    background-color: #f5f0e8;
    color: #1a1a2e;
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

/* --- Water Bubbles --- */
#bubbles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(74, 144, 217, 0.15), rgba(74, 144, 217, 0.03));
    border: 1px solid rgba(74, 144, 217, 0.1);
    animation: bubbleRise linear infinite;
}

@keyframes bubbleRise {
    0% {
        transform: translateY(100vh) scale(0.3);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) scale(1);
        opacity: 0;
    }
}

/* --- Geometric Accents --- */
#geometric-accents {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.geo-shape {
    position: absolute;
    animation: geoFloat 20s ease-in-out infinite;
}

.geo-shape-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    right: 5%;
    animation-duration: 25s;
}

.geo-shape-2 {
    width: 150px;
    height: 150px;
    bottom: 20%;
    left: 3%;
    animation-duration: 30s;
    animation-delay: -5s;
}

.geo-shape-3 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 15%;
    animation-duration: 22s;
    animation-delay: -10s;
}

@keyframes geoFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(15px, -20px) rotate(5deg); }
    50% { transform: translate(-10px, 10px) rotate(-3deg); }
    75% { transform: translate(20px, 15px) rotate(8deg); }
}

/* --- Navigation --- */
#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 2rem;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

#main-nav.scrolled {
    background-color: rgba(245, 240, 232, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(26, 26, 46, 0.08);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: 'Nunito', 'Inter', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a2e;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo-bracket {
    color: #4a90d9;
    font-weight: 300;
}

.logo-dot {
    color: #e8b84b;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #1a1a2e;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    position: relative;
    padding-bottom: 2px;
}

/* Underline Draw Animation */
.underline-draw {
    position: relative;
    text-decoration: none;
}

.underline-draw::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #4a90d9, #e8b84b);
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.underline-draw:hover::after {
    width: 100%;
}

#nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.toggle-bar {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #1a1a2e;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#nav-toggle.active .toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

#nav-toggle.active .toggle-bar:nth-child(2) {
    opacity: 0;
}

#nav-toggle.active .toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu */
#mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(245, 240, 232, 0.98);
    backdrop-filter: blur(20px);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    font-family: 'Nunito', 'Inter', sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: #1a1a2e;
    text-decoration: none;
    position: relative;
    padding-bottom: 4px;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #4a90d9, #e8b84b);
    transition: width 0.4s ease, left 0.4s ease;
}

.mobile-link:hover::after {
    width: 100%;
    left: 0;
}

/* --- Hero Section --- */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 4rem;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 600px;
    flex: 1;
}

.hero-greeting {
    font-size: 1.1rem;
    color: #6c757d;
    font-weight: 400;
    margin-bottom: 0.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.2s;
}

.hero-name {
    font-family: 'Nunito', 'Inter', sans-serif;
    font-size: 4.5rem;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.4s;
}

.hero-title-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.6s;
}

.hero-title {
    font-family: 'Nunito', 'Inter', sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: #4a90d9;
}

.hero-title-underline {
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #4a90d9, #e8b84b);
    border-radius: 2px;
    animation: underlineDraw 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 1.2s;
}

@keyframes underlineDraw {
    to { width: 100%; }
}

.hero-tagline {
    font-size: 1.05rem;
    color: #6c757d;
    line-height: 1.8;
    margin-bottom: 2rem;
    max-width: 480px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.8s;
}

.hero-cta-group {
    display: flex;
    gap: 1rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 1s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Visual Orb */
.hero-visual {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 4rem;
}

.hero-orb {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orb-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(74, 144, 217, 0.2);
}

.orb-ring-1 {
    width: 100%;
    height: 100%;
    animation: orbSpin 15s linear infinite;
    border-color: rgba(74, 144, 217, 0.15);
    border-top-color: rgba(232, 184, 75, 0.4);
}

.orb-ring-2 {
    width: 75%;
    height: 75%;
    animation: orbSpin 10s linear infinite reverse;
    border-color: rgba(232, 184, 75, 0.1);
    border-right-color: rgba(74, 144, 217, 0.3);
}

.orb-ring-3 {
    width: 50%;
    height: 50%;
    animation: orbSpin 8s linear infinite;
    border-color: rgba(74, 144, 217, 0.1);
    border-bottom-color: rgba(232, 184, 75, 0.3);
}

.orb-core {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 40%, #4a90d9, #1a1a2e);
    box-shadow: 0 0 40px rgba(74, 144, 217, 0.3), 0 0 80px rgba(74, 144, 217, 0.1);
    animation: orbPulse 4s ease-in-out infinite;
}

@keyframes orbSpin {
    to { transform: rotate(360deg); }
}

@keyframes orbPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 40px rgba(74, 144, 217, 0.3), 0 0 80px rgba(74, 144, 217, 0.1); }
    50% { transform: scale(1.05); box-shadow: 0 0 60px rgba(74, 144, 217, 0.4), 0 0 100px rgba(74, 144, 217, 0.15); }
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.85rem 2rem;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background-color: #4a90d9;
    color: #f5f0e8;
    box-shadow: 6px 6px 16px rgba(26, 26, 46, 0.15), -4px -4px 12px rgba(255, 255, 255, 0.6);
}

.btn-primary:hover {
    background-color: #3a7bc8;
    transform: translateY(-2px);
    box-shadow: 8px 8px 20px rgba(26, 26, 46, 0.2), -4px -4px 12px rgba(255, 255, 255, 0.7);
}

.btn-outline {
    background-color: transparent;
    color: #4a90d9;
    border: 2px solid #4a90d9;
}

.btn-outline:hover {
    background-color: #4a90d9;
    color: #f5f0e8;
    transform: translateY(-2px);
}

/* --- Sections --- */
.section {
    padding: 6rem 2rem;
    position: relative;
    z-index: 1;
}

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

.section-title {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-title-text {
    font-family: 'Nunito', 'Inter', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: #1a1a2e;
    display: inline-block;
    padding-bottom: 4px;
}

/* --- Neomorphic Cards --- */
.neo-card {
    background-color: #f5f0e8;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 8px 8px 20px rgba(26, 26, 46, 0.08), -8px -8px 20px rgba(255, 255, 255, 0.7);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.neo-card:hover {
    transform: translateY(-4px);
    box-shadow: 12px 12px 28px rgba(26, 26, 46, 0.12), -8px -8px 20px rgba(255, 255, 255, 0.8);
}

/* --- About Section --- */
.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
    align-items: start;
}

.about-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.about-avatar {
    width: 120px;
    height: 120px;
    margin-bottom: 1.5rem;
}

.about-avatar svg {
    width: 100%;
    height: 100%;
}

.about-text {
    font-size: 1rem;
    color: #1a1a2e;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.about-text:last-child {
    margin-bottom: 0;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.stat-card {
    text-align: center;
    padding: 1.5rem 1rem;
}

.stat-number {
    display: block;
    font-family: 'Nunito', 'Inter', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #4a90d9;
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
    margin-top: 0.3rem;
}

/* --- Skills Section --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.skill-card {
    text-align: center;
    padding: 2rem 1.5rem;
}

.skill-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
}

.skill-icon svg {
    width: 100%;
    height: 100%;
}

.skill-title {
    font-family: 'Nunito', 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 1rem;
}

.skill-list {
    list-style: none;
    padding: 0;
}

.skill-list li {
    font-size: 0.9rem;
    color: #6c757d;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(26, 26, 46, 0.05);
}

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

/* --- Projects Section --- */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.project-card-large {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
    align-items: center;
}

.project-image {
    border-radius: 12px;
    overflow: hidden;
}

.project-image svg {
    width: 100%;
    height: auto;
    display: block;
}

.project-info {
    padding: 0.5rem 0;
}

.project-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #e8b84b;
    background-color: rgba(232, 184, 75, 0.12);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    margin-bottom: 0.8rem;
}

.project-title {
    font-family: 'Nunito', 'Inter', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.project-title a {
    color: #1a1a2e;
    text-decoration: none;
}

.project-desc {
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-badge {
    font-size: 0.78rem;
    font-weight: 500;
    color: #4a90d9;
    background-color: rgba(74, 144, 217, 0.08);
    padding: 0.25rem 0.7rem;
    border-radius: 8px;
    border: 1px solid rgba(74, 144, 217, 0.15);
}

/* --- Experience / Timeline --- */
.timeline {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    padding-left: 40px;
}

.timeline-line {
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #4a90d9, #e8b84b, #4a90d9);
    border-radius: 1px;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding: 1.5rem 2rem;
}

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

.timeline-dot {
    position: absolute;
    left: -34px;
    top: 2rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #4a90d9;
    border: 3px solid #f5f0e8;
    box-shadow: 0 0 0 2px #4a90d9;
}

.timeline-date {
    font-size: 0.85rem;
    color: #e8b84b;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.timeline-role {
    font-family: 'Nunito', 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0.3rem 0 0.2rem;
}

.timeline-company {
    font-size: 0.95rem;
    color: #4a90d9;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.timeline-desc {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.7;
}

/* --- Contact Section --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.contact-info-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-intro {
    font-size: 1.05rem;
    color: #1a1a2e;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #1a1a2e;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: #4a90d9;
}

.contact-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* Form */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 12px;
    background-color: #f5f0e8;
    box-shadow: inset 4px 4px 10px rgba(26, 26, 46, 0.06), inset -4px -4px 10px rgba(255, 255, 255, 0.7);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: #1a1a2e;
    outline: none;
    transition: box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    box-shadow: inset 4px 4px 10px rgba(26, 26, 46, 0.08), inset -4px -4px 10px rgba(255, 255, 255, 0.8), 0 0 0 2px rgba(74, 144, 217, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
}

/* --- Footer --- */
#footer {
    position: relative;
    z-index: 1;
    padding: 2rem;
    border-top: 1px solid rgba(26, 26, 46, 0.06);
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-copy {
    font-size: 0.85rem;
    color: #6c757d;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-link {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}

.footer-link:hover {
    color: #4a90d9;
}

/* --- Scroll Reveal Animation --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* --- Responsive --- */
@media (max-width: 1024px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-orb {
        width: 220px;
        height: 220px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    #nav-toggle {
        display: flex;
    }

    #hero {
        flex-direction: column;
        text-align: center;
        padding-top: 8rem;
    }

    .hero-content {
        order: 2;
    }

    .hero-visual {
        order: 1;
        margin-left: 0;
        margin-bottom: 2rem;
    }

    .hero-orb {
        width: 180px;
        height: 180px;
    }

    .hero-name {
        font-size: 3rem;
    }

    .hero-title {
        font-size: 1.4rem;
    }

    .hero-cta-group {
        justify-content: center;
    }

    .hero-tagline {
        margin-left: auto;
        margin-right: auto;
    }

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

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

    .project-card-large {
        grid-template-columns: 1fr;
    }

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

    .footer-inner {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .section-title-text {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: 1fr 1fr;
    }

    .hero-name {
        font-size: 2.5rem;
    }

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

    .btn {
        width: 100%;
        text-align: center;
    }
}
