
:root {
    --bg-ivory: #F5F2EB;
    --text-main: #2A2A2A;
    --text-muted: #555555;
    --accent-dark: #3E3B32;
    --accent-highlight: #8B1A1A; /* A deep red stamp/ink feel */
}

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

body {
    background-color: var(--bg-ivory);
    color: var(--text-main);
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 18px;
    line-height: 1.7;
    word-break: keep-all;
    position: relative;
}

/* Hanji Texture Overlay */
.texture-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.4;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.15'/%3E%3C/svg%3E");
}

h1, h2, h3, h4, h5, h6, .viewer-title, .section-title {
    font-family: 'Gowun Batang', serif;
    font-weight: 700;
}

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

/* Header */
.main-header {
    text-align: center;
    padding: 60px 20px 40px;
}

.logo-wrapper {
    max-width: 600px;
    margin: 0 auto 30px;
}

.logo-img {
    width: 100%;
    height: auto;
    display: block;
    /* Fade the hard cut edges of the logo */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.main-nav a {
    text-decoration: none;
    color: var(--accent-dark);
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Gowun Batang', serif;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.main-nav a:hover {
    color: var(--accent-highlight);
    border-bottom: 2px solid var(--accent-highlight);
}

/* Sections */
.section {
    margin: 80px 0;
}

.section-title {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 50px;
    color: var(--accent-dark);
    position: relative;
}

.section-title span {
    display: block;
    font-size: 1.1rem;
    color: var(--accent-highlight);
    margin-bottom: 5px;
    font-weight: 400;
}

/* Webtoon Cards */
.episodes-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 600px;
    margin: 0 auto;
}

.ep-card {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.ep-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.ep-thumb {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-right: 1px solid #eee;
}

.ep-info {
    padding: 20px 30px;
    flex-grow: 1;
}

.ep-info h3 {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.ep-info span {
    font-size: 1rem;
    color: var(--accent-highlight);
    font-weight: bold;
}

/* Illustration Grid */
.illust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.illust-item {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    background: #fff;
}

.illust-item:hover {
    transform: scale(1.02);
    z-index: 10;
}

/* Profile Section */
.profile-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 50px;
    display: flex;
    align-items: center;
    gap: 50px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.04);
}

.profile-img-wrap {
    flex-shrink: 0;
}

.owner-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-ivory);
    box-shadow: 0 0 0 2px var(--accent-dark);
}

.profile-info {
    flex-grow: 1;
}

.profile-name {
    font-size: 2.2rem;
    font-family: 'Gowun Batang', serif;
    margin-bottom: 5px;
    color: var(--accent-dark);
}

.profile-penname {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.profile-desc {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
}

.profile-contact p {
    font-size: 1.1rem;
    margin-bottom: 5px;
}
.profile-contact a {
    color: var(--accent-highlight);
    text-decoration: none;
    font-weight: 500;
}

footer {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid #ddd;
    margin-top: 100px;
}

/* Viewer */
.viewer-body {
    background-color: #111;
    color: #eee;
}

.viewer-header {
    background-color: rgba(17, 17, 17, 0.95);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #333;
}

.btn-back {
    color: #ccc;
    text-decoration: none;
    font-size: 1.1rem;
    margin-right: auto;
    font-weight: 500;
    transition: color 0.3s;
}

.btn-back:hover { color: #fff; }

.viewer-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.4rem;
    margin: 0;
    color: #fff;
}

.viewer-main {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    padding-bottom: 50px;
}

.webtoon-img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    min-height: 600px;
    background-color: #1a1a1a;
}

.viewer-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 40px 20px;
    background-color: #000;
}

.btn-nav {
    display: inline-block;
    padding: 15px 40px;
    background-color: #333;
    color: #fff;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.btn-nav.primary {
    background-color: #8B1A1A;
}

.btn-nav:hover {
    background-color: #555;
}
.btn-nav.primary:hover {
    background-color: #a82020;
}

/* Responsive */
@media (max-width: 768px) {
    .profile-card {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }
    .main-nav ul { gap: 20px; }
    .viewer-title { position: static; transform: none; margin-left: 20px; font-size: 1.2rem; }
    .btn-back { margin-right: 0; }
    .ep-card { flex-direction: column; text-align: center; }
    .ep-thumb { width: 100%; height: 200px; border-right: none; border-bottom: 1px solid #eee; }
}
