/* ==================== Variables & Reset ==================== */
:root {
    --primary-green: #2d5016;
    --secondary-green: #4caf50;
    --light-green: #a8d5ba;
    --earth-brown: #8b7355;
    --light-brown: #d4a574;
    --cream: #faf8f3;
    --dark-text: #2c3e50;
    --accent: #7cb342;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--cream);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== Navigation ==================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(45, 80, 22, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

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

.logo {
    color: var(--light-green);
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--cream);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-green);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--light-green);
}

.nav-link:hover::after {
    width: 100%;
}

/* ==================== Hero Section ==================== */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--cream);
    margin-top: 60px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2d5016 0%, #4caf50 50%, #a8d5ba 100%);
    z-index: 1;
    animation: gradient-shift 15s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background: linear-gradient(135deg, #2d5016 0%, #4caf50 50%, #a8d5ba 100%); }
    50% { background: linear-gradient(135deg, #4caf50 0%, #a8d5ba 50%, #2d5016 100%); }
}

/* Animated forest pattern */
.hero-bg::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(168, 213, 186, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(76, 175, 80, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(45, 80, 22, 0.2) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -20px) scale(1.05); }
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fade-in-up 1s ease-out;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: clamp(3rem, 10vw, 5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    margin: 0.5rem 0;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2);
    font-weight: 300;
}

.hero-cta {
    margin-top: 3rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--secondary-green), var(--accent));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: var(--cream);
    font-size: 2rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

/* ==================== Section Titles ==================== */
.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    text-align: center;
    color: var(--primary-green);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-green), var(--accent));
    margin: 1rem auto 0;
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--earth-brown);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    line-height: 1.8;
}

/* ==================== About Section ==================== */
.about {
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--cream) 0%, rgba(168, 213, 186, 0.1) 100%);
}

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

.about-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--secondary-green);
    opacity: 0;
}

.about-card.animate-in {
    animation: slide-in-up 0.6s ease-out forwards;
}

@keyframes slide-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.about-card i {
    font-size: 2.5rem;
    color: var(--secondary-green);
    margin-bottom: 1rem;
    display: block;
}

.about-card h3 {
    color: var(--primary-green);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.about-card p {
    color: #666;
    line-height: 1.7;
}

.about-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(76, 175, 80, 0.2);
    border-left-color: var(--accent);
}

/* ==================== SNS Section ==================== */
.sns-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    color: var(--cream);
}

.sns-section .section-title {
    color: var(--cream);
}

.sns-section .section-title::after {
    background: linear-gradient(90deg, var(--light-green), var(--light-brown));
}

.sns-content {
    text-align: center;
    margin-top: 3rem;
}

.sns-description {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    font-weight: 300;
}

.sns-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.sns-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    color: var(--cream);
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    opacity: 0;
}

.sns-btn.animate-in {
    animation: slide-in-up 0.6s ease-out forwards;
}

.sns-btn i {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

.sns-btn span {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.sns-btn small {
    font-size: 0.85rem;
    opacity: 0.8;
}

.sns-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-10px);
}

.sns-btn:hover i {
    transform: scale(1.2) rotateY(10deg);
}

.instagram-btn:hover {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.3), rgba(245, 96, 169, 0.3));
}

.email-btn:hover {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.3), rgba(76, 175, 80, 0.3));
}

.github-btn:hover {
    background: linear-gradient(135deg, rgba(200, 200, 200, 0.3), rgba(100, 100, 100, 0.3));
}

/* ==================== World Section ==================== */
.world-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--cream) 0%, rgba(168, 213, 186, 0.15) 100%);
}

.world-content {
    margin-top: 4rem;
}

.map-container {
    background: white;
    padding: 0;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 4rem;
    overflow: hidden;
    height: 500px;
}

#leaflet-map {
    width: 100%;
    height: 100%;
    border-radius: 15px;
}

/* Leaflet Custom Marker Styles */
.leaflet-custom-marker {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marker-content {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    animation: bounce-marker 2s infinite;
}

.visited-marker .marker-content {
    background: linear-gradient(135deg, var(--secondary-green), var(--accent));
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
    border: 3px solid white;
}

.home-marker .marker-content {
    background: linear-gradient(135deg, var(--light-brown), var(--earth-brown));
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(139, 115, 85, 0.4);
    border: 3px solid white;
}

@keyframes bounce-marker {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.map-popup {
    text-align: center;
    padding: 0.5rem;
}

.map-popup h4 {
    color: var(--primary-green);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.map-popup p {
    color: #666;
    font-size: 0.85rem;
    margin: 0;
}

/* Leaflet Default Overrides */
.leaflet-control-zoom {
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
    background-color: white;
    color: var(--primary-green);
    border: none;
    border-bottom: 1px solid #ddd;
    font-weight: bold;
    font-size: 18px;
    transition: all 0.2s ease;
}

.leaflet-control-zoom-in:hover,
.leaflet-control-zoom-out:hover {
    background-color: var(--secondary-green);
    color: white;
}

.leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 5px;
}

.leaflet-popup-content-wrapper {
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-tip {
    background-color: white;
}

/* ==================== Travel Cards ==================== */
.travel-logs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.travel-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-top: 5px solid var(--secondary-green);
    opacity: 0;
}

.travel-card.animate-in {
    animation: slide-in-up 0.6s ease-out forwards;
}

.travel-card[data-country="Philippines"] { border-top-color: #ff6b6b; }
.travel-card[data-country="HongKong"] { border-top-color: #ffd93d; }
.travel-card[data-country="Thailand"] { border-top-color: #6bcf7f; }
.travel-card[data-country="Japan"] { border-top-color: #ff8a65; }
.travel-card[data-country="USA"] { border-top-color: #4dabf7; }
.travel-card[data-country="Korea"] { border-top-color: var(--earth-brown); }

.card-header {
    background: linear-gradient(135deg, var(--secondary-green), var(--accent));
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.card-header i {
    font-size: 1.5rem;
    opacity: 0.8;
}

.card-body {
    padding: 1.5rem;
}

.card-text {
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.6;
    min-height: 50px;
}

.card-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.highlight {
    display: inline-block;
    background: rgba(76, 175, 80, 0.15);
    color: var(--secondary-green);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.travel-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 15px 50px rgba(76, 175, 80, 0.25);
}

.travel-card.highlight-card {
    animation: pulse-highlight 0.6s ease-out;
}

@keyframes pulse-highlight {
    0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
    50% { box-shadow: 0 0 0 15px rgba(76, 175, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

/* ==================== English Skills Section ==================== */
.english-section {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-bottom: 3rem;
}

.english-section h3 {
    color: var(--primary-green);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.english-section p {
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.skill-bars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.skill {
    text-align: left;
}

.skill label {
    display: block;
    color: var(--primary-green);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-green), var(--accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.5rem;
    font-size: 0.7rem;
    color: white;
    font-weight: bold;
    animation: fill-progress 1.5s ease-out forwards;
}

@keyframes fill-progress {
    from {
        width: 0;
    }
}

/* ==================== Footer ==================== */
.footer {
    background: var(--primary-green);
    color: var(--cream);
    text-align: center;
    padding: 3rem 0;
    border-top: 3px solid var(--secondary-green);
}

.footer p {
    margin: 0.5rem 0;
}

.footer-quote {
    font-style: italic;
    opacity: 0.9;
    margin-top: 1rem;
}

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .hero {
        margin-top: 50px;
    }

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

    .hero-subtitle {
        font-size: 1.1rem;
    }

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

    .sns-buttons {
        grid-template-columns: 1fr;
    }

    .travel-logs {
        grid-template-columns: 1fr;
    }

    .skill-bars {
        grid-template-columns: 1fr;
    }

    .map-container {
        height: 400px;
        padding: 0;
    }

    .nav-container {
        padding: 0.8rem 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    :root {
        font-size: 14px;
    }

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

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

    .about-card,
    .travel-card,
    .sns-btn {
        padding: 1.5rem 1rem;
    }

    .card-header {
        padding: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .english-section {
        padding: 1.5rem;
    }

    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .skill-bars {
        gap: 1.5rem;
    }
}

/* ==================== Accessibility ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==================== Print Styles ==================== */
@media print {
    .navbar,
    .scroll-indicator {
        display: none;
    }

    body {
        background: white;
    }

    .section {
        page-break-inside: avoid;
    }
}
