:root {
    --text-primary: #333333;
    --text-secondary: #666666;
    --bg-header: #FFFFFF;
    --btn-color: #4B3D39;
    --font-main: 'Open Sans', Helvetica, Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    min-height: 100%;
    position: relative;
    background: #f5f4f2;
}

.page-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    box-shadow: inset 0 0 200px rgba(0, 0, 0, 0.06);
    z-index: -1;
}

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

/* Header */
header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--bg-header);
    padding: 20px 0;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-bk {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.header-logo {
    height: 40px; /* Adjust as needed */
    width: auto;
    object-fit: contain;
}

.desktop-nav {
    display: flex;
    gap: 30px;
    margin: 0 auto;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: opacity 0.2s;
}

.nav-link:hover, .nav-link.active {
    opacity: 0.6;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 16px;
    transition: opacity 0.2s;
}

.social-link:hover {
    opacity: 0.6;
}

/* Hero Section */
.hero-section {
    padding: 100px 24px 80px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 600px;
    background: #ccc8c2;
    position: relative;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    animation: ambientLight 18s ease-in-out infinite;
}

@keyframes ambientLight {
    0%   { background: radial-gradient(ellipse 70% 55% at 28% 38%, rgba(255,255,255,0.38) 0%, transparent 65%); }
    20%  { background: radial-gradient(ellipse 80% 65% at 62% 28%, rgba(255,255,255,0.28) 0%, transparent 65%); }
    45%  { background: radial-gradient(ellipse 65% 55% at 72% 62%, rgba(255,255,255,0.32) 0%, transparent 65%); }
    70%  { background: radial-gradient(ellipse 75% 60% at 38% 72%, rgba(255,255,255,0.22) 0%, transparent 65%); }
    100% { background: radial-gradient(ellipse 70% 55% at 28% 38%, rgba(255,255,255,0.38) 0%, transparent 65%); }
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(ellipse at 45% 40%, rgba(255,255,255,0.65) 0%, transparent 55%),
        radial-gradient(ellipse at 75% 70%, rgba(200,195,188,0.35) 0%, transparent 45%),
        linear-gradient(160deg, rgba(222,218,212,0.88) 0%, rgba(204,200,194,0.88) 35%, rgba(216,212,206,0.88) 65%, rgba(200,196,190,0.88) 100%);
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        repeating-linear-gradient(
            125deg,
            transparent 0px,
            transparent 60px,
            rgba(255,255,255,0.04) 60px,
            rgba(255,255,255,0.04) 61px
        );
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 3;
}

.large-logo {
    font-size: 80px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.hero-logo {
    width: 380px;
    max-width: 80vw;
    height: auto;
    margin-bottom: 30px;
    object-fit: contain;
}

.hero-title {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.5px;
    margin-bottom: 30px;
    color: var(--text-secondary);
}

.btn-pdf {
    display: inline-block;
    background-color: var(--btn-color);
    color: white;
    padding: 12px 30px;
    border: none;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: background-color 0.2s;
    cursor: pointer;
}

.btn-pdf:hover {
    background-color: #3a2e2b;
}

/* Portfolio Grid */
.portfolio-section {
    padding: 56px 40px;
    width: 100%;
    margin: 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 1260px;
    margin: 0 auto;
}

.portfolio-item {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    cursor: pointer;
    background: #e0e0e0;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portfolio-item:hover img {
    transform: scale(1.03);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    padding: 20px;
    letter-spacing: -0.3px;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 40px 0;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-img {
    width: 100%;
    height: auto;
    display: block;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 2010;
}

/* About Section */
.about-section {
    padding: 100px 0;
    max-width: 1400px;
    margin: 0 auto;
}

.about-container {
    display: grid;
    /* 가운데 캐릭터 영역을 명확히 240px로 고정하여 좌우 컬럼(1fr)이 완전한 동일 가로폭을 가지게 제어 */
    grid-template-columns: 1fr 240px 1fr;
    gap: 60px;
    align-items: flex-start;
}

/* Left Column */
.about-left {
    padding-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

/*.about-name */
.about-name {
    font-size: 38px;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 0; /* Clear browser default margin to fix horizontal alignment */
    margin-bottom: 24px;
    border-bottom: 3px solid var(--text-primary);
    padding-bottom: 12px;
    display: inline-block;
    letter-spacing: -1px;
}

.about-info {
    margin-bottom: 40px;
}

.about-info p {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    letter-spacing: -0.3px;
}

.about-subheading {
    font-size: 26px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-top: 0; /* Clear browser default margin to fix horizontal alignment */
    margin-bottom: 24px;
    display: inline-block;
    border-bottom: 3px solid var(--text-primary);
    padding-bottom: 8px;
    letter-spacing: 0.5px;
}

/* Hobbies Grid - 2x2 카드형 레이아웃으로 변경하여 가로를 가득 채우고 고급스럽게 연출 */
.hobbies-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
}

.hobby-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: #ffffff;
    border: 1px solid #eef0f2;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: all 0.25s ease-in-out;
}

.hobby-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.05);
    border-color: #d1d5db;
}

.hobby-item img {
    width: 48px;
    height: auto;
    margin-bottom: 12px;
    transition: transform 0.25s ease;
}

.hobby-item:hover img {
    transform: scale(1.1);
}

.hobby-item span {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Center Column */
.about-center {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 100%;
    padding-top: 60px;
}

/* 수동 여백을 제거하고 absolute 배치로 캐릭터와 강아지의 완전한 수평 센터 정렬 확보 */
.character-wrapper {
    position: relative;
    width: 200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.character-img {
    width: 200px; /* 10% larger */
    height: auto;
    position: relative;
    z-index: 2;
}

.dog-img {
    position: absolute;
    bottom: 0; /* Adjust relative to shoes */
    left: -45px;  /* Move to the left so it's not tucked */
    width: 110px; /* Scaled proportionally */
    height: auto;
    object-fit: contain;
    z-index: 3; /* Show in front of character to prevent cropping */
}

/* Right Column */
.about-right {
    padding-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

/* Skills List - 우측 전체 가로폭(100%)을 채우도록 Grid로 2열 배치 변경 */
.skills-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
    margin-bottom: 30px;
}

.skills-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skills-list p {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0;
    background: #ffffff;
    border: 1px solid #eef0f2;
    padding: 12px 18px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.01);
    display: flex;
    align-items: center;
    gap: 8px;
}

.skills-list p::before {
    content: "•";
    color: #4B3D39;
    font-size: 18px;
    line-height: 1;
}

.skills-divider {
    border: none;
    border-top: 1px dashed #ccc;
    margin: 35px 0;
    width: 100%;
}

.skill-detail {
    margin-bottom: 0;
    background: #ffffff;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid #eef0f2;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    transition: all 0.25s ease-in-out;
}

.skill-detail:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.04);
}

.skills-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    width: 100%;
}

.skill-detail h4 {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.skill-detail p {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.6;
    word-break: keep-all;
}

/* Responsive */
@media (max-width: 1200px) {
    .about-container {
        gap: 40px;
        grid-template-columns: 1fr 1fr;
    }
    .about-center {
        grid-column: span 2;
        order: -1;
        margin-bottom: 50px;
    }
}

@media (max-width: 1200px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .portfolio-section {
        padding: 40px 24px;
    }
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .about-container {
        grid-template-columns: 1fr;
    }
    .about-center {
        grid-column: span 1;
    }
    .portfolio-section {
        padding: 24px 16px;
    }
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .skills-details-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .portfolio-section {
        padding: 16px 8px;
    }
    .portfolio-grid {
        grid-template-columns: repeat(1, 1fr);
    }
    .desktop-nav {
        display: none;
    }
    .character-img {
        width: 100%;
    }
}

/* AI Subprojects Pages Styles */
.ai-project-inline-info {
    max-width: 1260px; /* Aligns with home portfolio grid width for consistency */
    margin: 0 auto;
    padding: 20px 24px 15px 24px; /* Tight padding for info text blocks */
    box-sizing: border-box;
    text-align: center; /* Center align container contents */
}

.project-tag {
    font-size: 12px; /* Increased by 1px */
    font-weight: 800;
    color: #a2a2a2;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: block;
}

.ai-project-inline-info h3 {
    font-size: 25px; /* Increased by 1px */
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 15px;
}

.ai-tools-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    justify-content: center; /* Center align tools list */
}

.tool-badge {
    font-size: 13px; /* Increased by 1px */
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    letter-spacing: -0.2px;
}

/* Tool specific colors */
.tool-badge.photoshop { background: #e2ecf8; color: #0f62fe; }
.tool-badge.figma { background: #feebe2; color: #f25f22; }
.tool-badge.claude { background: #fef5e1; color: #d87c00; }
.tool-badge.antigravity { background: #f3ebfc; color: #8a3ffc; }
.tool-badge.stitch { background: #e5f6f4; color: #008575; }

.ai-project-desc {
    font-size: 15.5px; /* Increased by 1px */
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 auto; /* Centered layout */
    max-width: 800px; /* Improve readability */
    text-align: center; /* Center text alignment */
    word-break: keep-all;
}

/* Stockify Placeholder Styles */
.ai-project-gallery-placeholder {
    background: #fafafa;
    border: 2px dashed #ddd;
    border-radius: 16px;
    padding: 60px 20px;
    text-align: center;
}

.placeholder-text {
    font-size: 16px;
    font-weight: 700;
    color: #555;
    margin: 0 0 4px 0;
}

.placeholder-subtext {
    font-size: 12.5px;
    color: #999;
}

.visit-site-wrap {
    text-align: center;
    padding: 10px 0 50px 0; /* Tight top padding to bring description closer to the button */
}

/* Wide screens (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1300px;
    }
    .portfolio-grid {
        max-width: 1360px;
        gap: 20px;
    }
    .about-section {
        max-width: 1360px;
    }
}

/* Extra wide screens (1600px and up) */
@media (min-width: 1600px) {
    .container {
        max-width: 1500px;
    }
    .portfolio-grid {
        max-width: 1560px;
        gap: 24px;
    }
    .about-section {
        max-width: 1560px;
    }
    .hero-section {
        min-height: 700px;
    }
}

/* Ultra wide screens (1920px and up) */
@media (min-width: 1920px) {
    .container {
        max-width: 1720px;
    }
    .portfolio-grid {
        max-width: 1800px;
        gap: 28px;
    }
    .about-section {
        max-width: 1720px;
    }
    .hero-section {
        min-height: 800px;
    }
}
