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

/* === VARIABLES === */
:root {
    --header-height: 4.5rem;
    
    /* Colors */
    --primary-color: #3B82F6; /* Blue 500 */
    --primary-color-dark: #2563EB; /* Blue 600 */
    --title-color: #1F2937; /* Gray 800 */
    --text-color: #4B5563; /* Gray 600 */
    --text-color-light: #6B7280; /* Gray 500 */
    --body-color: #F9FAFB; /* Gray 50 */
    --container-color: #FFFFFF;

    /* Font and typography */
    --body-font: 'Noto Sans KR', sans-serif;
    --title-font: 'Inter', sans-serif;
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;

    /* Font weight */
    --font-medium: 500;
    --font-bold: 700;

    /* Margins */
    --mb-0-5: .5rem;
    --mb-1: 1rem;
    --mb-1-5: 1.5rem;
    --mb-2: 2rem;

    /* z-index */
    --z-tooltip: 10;
    --z-fixed: 100;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: var(--header-height) 0 0 0;
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background-color: var(--body-color);
    color: var(--text-color);
    line-height: 1.6;
}

h1, h2, h3 {
    color: var(--title-color);
    font-weight: var(--font-bold);
    font-family: var(--title-font);
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

a:hover {
    color: var(--primary-color-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* === LAYOUT === */
.container {
    max-width: 968px;
    margin-left: var(--mb-1-5);
    margin-right: var(--mb-1-5);
}

.grid {
    display: grid;
}

/* === HEADER & NAV === */
.header {
    width: 100%;
    background-color: var(--container-color);
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-fixed);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-container {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo,
.nav-toggle {
    color: var(--title-color);
    font-weight: var(--font-bold);
}

.nav-logo {
    font-family: var(--title-font);
}

.nav-list {
    display: flex;
    gap: var(--mb-2);
}

.nav-link {
    color: var(--text-color);
    font-weight: var(--font-medium);
    transition: .3s;
}

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

/* === MAIN CONTENT === */
main {
    padding: 4rem 0 2rem;
}

.section {
    padding: 2rem 0;
}

.section-title {
    font-size: var(--h1-font-size);
    color: var(--title-color);
    text-align: center;
    margin-bottom: var(--mb-2);
}

/* Homepage Hero */
.hero {
    text-align: center;
    padding: 4rem 0;
}

.hero .subtitle {
    font-size: var(--h3-font-size);
    color: var(--text-color-light);
    margin-bottom: var(--mb-1);
}

/* Tool container on homepage */
.tool-section {
    background-color: var(--container-color);
    padding: var(--mb-2);
    border-radius: .5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.tool-container {
    max-width: 450px;
    margin: 0 auto;
}

#imageUpload {
    width: 100%;
    padding: .75rem;
    margin-bottom: var(--mb-1);
    border: 1px solid #D1D5DB;
    border-radius: .5rem;
}

#image-container {
    border: 2px dashed #D1D5DB;
    border-radius: .5rem;
    min-height: 200px;
    margin-bottom: var(--mb-1);
    display: flex;
    align-items: center;
    justify-content: center;
}

#label-container div {
    font-size: 1.2rem;
    font-weight: var(--font-medium);
    margin-bottom: var(--mb-0-5);
}

/* Content Page (About, Blog) */
.content-page {
    background-color: var(--container-color);
    padding: var(--mb-2);
    border-radius: .5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.content-page h1 {
    font-size: var(--h1-font-size);
    margin-bottom: var(--mb-1);
}

.content-page h2 {
    font-size: var(--h2-font-size);
    margin-top: var(--mb-2);
    margin-bottom: var(--mb-1);
    padding-bottom: .5rem;
    border-bottom: 2px solid #E5E7EB;
}

.content-page p {
    margin-bottom: var(--mb-1);
}

.content-page ol, .content-page ul {
    padding-left: 1.5rem;
    margin-bottom: var(--mb-1);
}

/* Blog Post Styling */
.blog-list {
    display: grid;
    gap: 1.5rem;
}

.blog-post {
    background-color: var(--container-color);
    padding: 1.5rem;
    border-radius: .5rem;
    border: 1px solid #E5E7EB;
}

.blog-post h2 {
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-0-5);
}

.post-meta {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
    margin-bottom: var(--mb-1);
}

.read-more {
    font-weight: var(--font-medium);
}

/* === FOOTER === */
.footer {
    background-color: var(--container-color);
    border-top: 1px solid #E5E7EB;
    padding: 2rem 0;
    text-align: center;
}

.footer-container {
    max-width: 968px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-container p {
    margin-bottom: var(--mb-0-5);
    color: var(--text-color-light);
}

/* AdSense Placeholder */
.adsense-placeholder, .adsense-section {
    margin: var(--mb-2) 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #E5E7EB;
    min-height: 100px;
    border-radius: .5rem;
}

/* === RESPONSIVE TYPOGRAPHY === */
@media screen and (min-width: 968px) {
    :root {
        --h1-font-size: 2.5rem;
        --h2-font-size: 1.75rem;
        --h3-font-size: 1.5rem;
        --normal-font-size: 1.125rem;
        --small-font-size: 1rem;
    }
}

/* === MEDIA QUERIES === */
@media screen and (max-width: 767px) {
    body {
        margin: var(--header-height) 0 0 0;
    }
    
    .nav-list {
        /* Mobile menu would go here - for now, we keep it simple */
        flex-direction: column;
        align-items: center;
        position: absolute;
        top: var(--header-height);
        left: -100%; /* Hidden by default */
        width: 100%;
        background-color: var(--container-color);
        padding: 1rem 0;
        box-shadow: 0 4px 4px rgba(0,0,0,0.1);
        transition: .3s;
    }

    /* Show menu (example class) */
    .show-menu {
        left: 0;
    }
}

@media screen and (min-width: 768px) {
    body {
        margin: 0;
    }

    .header {
        top: 0;
        bottom: initial;
    }

    .section {
        padding: 6rem 0 2rem;
    }

    main {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media screen and (min-width: 992px) {
    .container {
        margin-left: auto;
        margin-right: auto;
    }

    .section {
        padding: 8rem 0 2rem;
    }
}