/* ========================================
   OYEON Portfolio - CSS Stylesheet (Fixed)
   ======================================== */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables */
:root {
    --primary: #FF6B6B;
    --secondary: #4ECDC4;
    --dark: #2C3E50;
    --light: #F8F9FA;
    --korean-blue: #003478;
    --korean-red: #CD2E3A;
}

/* Body */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* ========================================
   NAVIGATION
   ======================================== */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 1rem 0;
    transition: box-shadow 0.3s;
}

nav .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .logo {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--korean-blue), var(--korean-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

nav a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--korean-red);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('../images/hero-background.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    text-align: center;
    padding: 0 2rem;
    position: relative;
    overflow: hidden;
}

/* Dark overlay for better text readability */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 0;
}

/* Animated gradient overlay */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg, 
        rgba(0, 52, 120, 0.3) 0%, 
        rgba(205, 46, 58, 0.2) 100%
    );
    z-index: 0;
    animation: gradientShift 8s ease infinite;
}

.hero-content {
    position: relative;
    z-index: 1;
    animation: float 6s ease-in-out infinite;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
    text-shadow: 
        0 2px 10px rgba(0, 0, 0, 0.5),
        0 4px 20px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(0, 0, 0, 0.3);
    font-weight: 700;
    letter-spacing: 1px;
}

.hero .tagline {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    opacity: 1;
    text-shadow: 
        0 2px 10px rgba(0, 0, 0, 0.6),
        0 4px 16px rgba(0, 0, 0, 0.4);
    font-weight: 600;
    background: linear-gradient(to right, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .subtitle {
    font-size: 1.2rem;
    opacity: 1;
    margin-bottom: 2rem;
    text-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.6),
        0 4px 12px rgba(0, 0, 0, 0.4);
    font-weight: 400;
    line-height: 1.6;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: white;
    color: var(--dark);
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
    margin: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background: var(--light);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-secondary:hover {
    background: white;
    color: var(--dark);
    border-color: white;
}

/* ========================================
   SECTION STYLES
   ======================================== */
section {
    padding: 5rem 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--korean-blue), var(--korean-red));
    border-radius: 2px;
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about {
    background: var(--light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
}

.about-image {
    width: 100%;
    max-width: 350px;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--korean-blue), var(--korean-red));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--korean-blue);
}

.about-text p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.interests {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.interest-tag {
    background: white;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* ========================================
   CONTENT SHOWCASE SECTION
   ======================================== */
.content-showcase {
    background: white;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.content-card {
    background: var(--light);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.content-card:hover {
    transform: translateY(-10px);
}

.content-card-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    overflow: hidden;
}

.content-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.content-card-body {
    padding: 1.5rem;
}

.content-card h3 {
    margin-bottom: 0.5rem;
    color: var(--korean-blue);
}

.content-card p {
    color: #666;
    margin-bottom: 1rem;
}

.stats {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #888;
}

/* ========================================
   BLOG SECTION
   ======================================== */
.blog {
    background: var(--light);
}

.blog-intro {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 3rem;
    margin-top: -2rem;
}

.blog-grid {
    max-width: 900px;
    margin: 0 auto;
}

.blog-post {
    background: white;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 4px solid var(--korean-red);
}

.blog-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.post-date {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 0.5rem;
    display: inline-block;
    background: var(--light);
    padding: 0.3rem 1rem;
    border-radius: 20px;
}

.post-title {
    font-size: 1.8rem;
    color: var(--dark);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.post-excerpt {
    color: #555;
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.read-more {
    color: var(--korean-red);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s;
}

.read-more:hover {
    gap: 1rem;
}

.more-posts {
    text-align: center;
    margin-top: 3rem;
}

.more-posts .btn {
    background: var(--korean-blue);
    color: white;
}

.more-posts .btn:hover {
    background: var(--korean-red);
}

/* ========================================
   SKILLS SECTION
   ======================================== */
.skills {
    background: var(--dark);
    color: white;
}

.skills .section-title {
    color: white;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    text-align: center;
}

.skill-item {
    padding: 2rem 1rem;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    transition: transform 0.3s, background 0.3s;
}

.skill-item:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.15);
}

.skill-item .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.skill-item h4 {
    font-size: 1.1rem;
}

/* ========================================
   TOOLS & OTHERS SECTION
   ======================================== */
.tools {
    background: white;
    padding: 5rem 0;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 3rem;
    text-align: center;
    margin-top: 3rem;
}

.tool-item {
    transition: transform 0.3s;
    cursor: pointer;
}

.tool-item i {
    font-size: 4rem;
    color: var(--dark);
    margin-bottom: 1rem;
    transition: color 0.3s, transform 0.3s;
}

.tool-item:hover i {
    transform: scale(1.3);
    color: var(--korean-blue);
}

.tool-item p {
    font-weight: 600;
    color: #666;
    margin: 0;
}

/* Icon specific colors */
.tool-item:nth-child(1) i { color: #f05032; } /* Git */
.tool-item:nth-child(2) i { color: #333; }    /* GitHub */
.tool-item:nth-child(3) i { color: #34A853; } /* Apps Script */
.tool-item:nth-child(4) i { color: #F24E1E; } /* Figma */
.tool-item:nth-child(5) i { color: #007ACC; } /* VS Code */
.tool-item:nth-child(6) i { color: #0F9D58; } /* Google Sheets */

/* ========================================
   PROJECTS SECTION
   ======================================== */
.projects {
    background: var(--light);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-body {
    padding: 1.5rem;
}

.project-body h3 {
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.tag {
    background: var(--light);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    color: #666;
}

/* ========================================
   TESTIMONIALS SECTION
   ======================================== */
.testimonials {
    background: var(--light);
    padding: 5rem 0;
}

.testimonials-slider {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.testimonial-item {
    display: none;
    padding: 3rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
}

.testimonial-item.active {
    display: block;
}

.testimonial-content .quote {
    font-size: 1.3rem;
    font-style: italic;
    color: #555;
    line-height: 1.8;
    margin-bottom: 2rem;
    position: relative;
}

.testimonial-content .quote::before {
    content: '"';
    font-size: 4rem;
    color: var(--korean-red);
    position: absolute;
    top: -20px;
    left: -10px;
    opacity: 0.3;
}

.author h5 {
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.author span {
    color: #999;
    font-size: 0.95rem;
}

.testimonial-dots {
    text-align: center;
    margin-top: 2rem;
}

.dot {
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: #ddd;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active,
.dot:hover {
    background-color: var(--korean-red);
}

/* ========================================
   RESUME CTA / SUPPORT SECTION
   ======================================== */
.resume-cta {
    background: linear-gradient(135deg, var(--korean-blue), var(--korean-red));
    padding: 5rem 0;
    color: white;
}

.resume-cta h2 {
    color: white;
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.resume-cta .lead {
    color: rgba(255,255,255,0.9);
    margin-bottom: 2rem;
    font-size: 1.2rem;
}

.btn-download {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: white;
    color: var(--korean-blue);
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.btn-download:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    color: var(--korean-blue);
}

.btn-download i {
    margin-right: 0.5rem;
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.contact {
    background: white;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.social-link {
    width: 60px;
    height: 60px;
    background: var(--light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    text-decoration: none;
    color: var(--dark);
    transition: transform 0.3s, background 0.3s;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.social-link:hover {
    transform: translateY(-5px);
    background: var(--korean-red);
    color: white;
}

/* ========================================
   SOCIAL FLOATING BUTTONS
   ======================================== */
.social-floating {
    position: fixed;
    right: 30px;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.social-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* GitHub */
.social-btn.github {
    background: #333;
}

.social-btn.github:hover {
    background: #24292e;
}

/* LinkedIn */
.social-btn.linkedin {
    background: #0077b5;
}

.social-btn.linkedin:hover {
    background: #005885;
}

/* Instagram */
.social-btn.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

/* Facebook */
.social-btn.facebook {
    background: #1877f2;
}

.social-btn.facebook:hover {
    background: #0d65d9;
}

/* Support Button (☕) - แก้ไขให้ไม่มี ::before */
.social-btn.support {
    background: linear-gradient(135deg, #FFDD00 0%, #FFA500 100%);
    width: 55px;
    height: 55px;
    font-size: 1.5rem;
    animation: pulse 2s infinite;
    position: relative;
}

/* Tooltip เมื่อ hover */
.social-btn.support::after {
    content: 'Support';
    position: absolute;
    right: 70px;
    background: #333;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.social-btn.support:hover::after {
    opacity: 1;
}

/* ========================================
   BACK TO TOP BUTTON
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--korean-red);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, background 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 999;
}

.back-to-top:hover {
    background: var(--korean-blue);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.back-to-top.show {
    display: flex;
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    background: var(--dark);
    color: white;
    text-align: center;
    padding: 2rem;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gradientShift {
    0%, 100% { 
        opacity: 0.3; 
    }
    50% { 
        opacity: 0.5; 
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    /* Navigation */
    nav ul {
        display: none;
    }

    /* Hero */
    .hero {
        background-size: cover;
        background-position: center;
    }

    .hero h1 {
        font-size: 2rem;
        text-shadow: 
            0 2px 8px rgba(0, 0, 0, 0.5),
            0 4px 16px rgba(0, 0, 0, 0.4);
    }

    .hero .tagline {
        font-size: 1.2rem;
    }

    .hero .subtitle {
        font-size: 1rem;
    }

    /* About */
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-image {
        margin: 0 auto;
        font-size: 5rem;
    }

    /* Section Title */
    .section-title {
        font-size: 2rem;
    }

    /* Content Grid */
    .content-grid,
    .project-grid {
        grid-template-columns: 1fr;
    }

    /* Tools Grid */
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .tool-item i {
        font-size: 3rem;
    }

    /* Testimonials */
    .testimonial-item {
        padding: 2rem;
    }

    .testimonial-content .quote {
        font-size: 1.1rem;
    }

    /* Resume CTA */
    .resume-cta h2 {
        font-size: 1.8rem;
    }

    /* Social Floating */
    .social-floating {
        right: 20px;
        bottom: 20px;
        gap: 10px;
    }

    .social-btn {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    .social-btn.support {
        width: 50px;
        height: 50px;
    }

    /* ซ่อน tooltip บน mobile */
    .social-btn.support::after {
        display: none;
    }

    /* Social Links */
    .social-links {
        gap: 1rem;
    }

    /* Back to Top */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    /* Buttons */
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    /* Section Padding */
    section {
        padding: 3rem 1rem;
    }

    /* About Image */
    .about-image {
        max-width: 250px;
        font-size: 4rem;
    }

    /* Hero */
    .hero h1 {
        font-size: 1.5rem;
    }

    .hero .tagline {
        font-size: 1rem;
    }

    .hero .subtitle {
        font-size: 0.9rem;
    }

    /* Tools Grid */
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}