/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Variables */
    --text-primary: #212842;
    --text-secondary: #999999;
    --text-light: #cccccc;
    --bg-primary: #FBF6EC;
    
    /* Font Variables */
    --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

[data-theme="dark"] {
    --text-primary: #FBF6EC;
    --text-secondary: #999999;
    --text-light: #666666;
    --bg-primary: #141A29;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    line-height: 1.5;
    background-color: var(--bg-primary);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headings use Space Grotesk */
h1, h2, h3, h4, h5, h6,
.work-title,
.page-title,
.project-detail-title,
.project-section-title,
.nav-brand,
.work-item-title,
.work-category-title {
    font-family: var(--font-heading);
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-primary);
    z-index: 1000;
    padding: 24px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.nav-brand {
    font-size: 16px;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 16px;
}

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

.theme-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    background-color: #666666;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.3s ease;
    outline: none;
}

.theme-toggle:hover {
    background-color: #888888;
}

[data-theme="dark"] .theme-toggle {
    background-color: #ffffff;
}

[data-theme="dark"] .theme-toggle:hover {
    background-color: #e0e0e0;
}

.theme-toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background-color: #ffffff;
    border-radius: 50%;
    transition: transform 0.3s ease;
    display: block;
}

[data-theme="dark"] .theme-toggle-slider {
    transform: translateX(20px);
    background-color: #000000;
}

.theme-toggle-icon {
    font-size: 18px;
    color: var(--text-primary);
    display: block;
    line-height: 1;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 400;
    font-size: 16px;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--text-primary);
    transition: width 0.2s ease;
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 24px;
    height: 1px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
}

/* Work Section */
.work-section {
    padding-top: 100px;
    padding-bottom: 80px;
}

.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 80px;
    min-height: 400px;
    padding: 40px 0;
}

.hero-content {
    max-width: 600px;
    text-align: left;
}

.work-intro-name {
    margin-bottom: 8px;
}

.work-intro-name strong {
    font-size: 32px;
    font-weight: 700;
}

.hero-photo {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.work-title {
    font-size: 64px;
    font-weight: 400;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.work-intro {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.6;
    max-width: 600px;
}

.work-intro:last-child {
    margin-bottom: 32px;
}

.work-intro strong {
    font-weight: 700;
    font-size: 28px;
}

.social-icons {
    display: flex;
    gap: 20px;
    margin-bottom: 48px;
    align-items: center;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text-primary);
    text-decoration: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    border-radius: 50%;
}

.social-icon:hover {
    opacity: 0.7;
    transform: translateY(-2px);
}

.social-icon svg {
    width: 24px;
    height: 24px;
}

.work-filters {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.filter-tab {
    background: none;
    border: none;
    padding: 8px 0;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 400;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
}

.filter-tab:hover {
    color: var(--text-primary);
}

.filter-tab.active {
    color: var(--text-primary);
    font-weight: 600;
}

.filter-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--text-primary);
}

.work-category {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.work-category.hidden {
    display: none;
}

.work-list {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.work-list.show-all-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-auto-rows: 1fr !important;
    gap: 24px !important;
}

.work-list.show-all-grid > .work-category {
    display: contents !important;
}

.work-list.show-all-grid .work-item-full,
.work-list.show-all-grid .work-category-items {
    display: contents !important;
    grid-template-columns: none !important;
    gap: 0 !important;
}

.work-list.show-all-grid article {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    grid-column: auto !important;
    grid-row: auto !important;
}

.work-list.show-all-grid .work-item {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 1 !important;
}

.work-category {
    width: 100%;
}

.work-category-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.work-category-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: stretch;
}

.work-list.show-all-grid .work-category-items {
    display: contents !important;
    grid-template-columns: none;
}

.work-item-full {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.work-list.show-all-grid .work-item-full {
    display: contents !important;
    grid-template-columns: none;
}

.work-item-full > article {
    grid-column: 1;
    width: 100%;
    max-width: none;
}

.work-list.show-all-grid .work-item-full > article {
    grid-column: auto !important;
}

.work-item {
    padding: 40px;
    border: none;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
    width: 100%;
}

.work-item:hover {
    opacity: 0.6;
}

.work-item-with-media:hover {
    opacity: 1;
}

.work-item-with-media:hover .work-item-media-container {
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.work-link {
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-align: center;
}

.work-item-title {
    font-size: 24px;
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.4;
    text-align: center;
    margin: 0;
    width: 100%;
}

/* Page Sections */
.page-section {
    padding-top: 100px;
    padding-bottom: 80px;
}

.page-title {
    font-size: 64px;
    font-weight: 400;
    margin-bottom: 48px;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

/* About Section */
.about-content-simple {
    max-width: 600px;
}

.about-text {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 32px;
    line-height: 1.6;
    text-align: justify;
}

.about-text:last-child {
    margin-bottom: 0;
}

/* Resume Section */
.resume-content {
    max-width: 700px;
}

.resume-section {
    margin-bottom: 80px;
}

.resume-section:last-child {
    margin-bottom: 0;
}

.resume-section-title {
    font-size: 32px;
    font-weight: 400;
    margin-bottom: 40px;
    letter-spacing: -0.02em;
}

.resume-item {
    margin-bottom: 48px;
}

.resume-item:last-child {
    margin-bottom: 0;
}

.resume-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 16px;
}

.resume-item-title {
    font-size: 24px;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.resume-item-date {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 400;
}

.resume-item-company {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.resume-item-description {
    font-size: 18px;
    color: var(--text-primary);
    line-height: 1.6;
    max-width: 600px;
}

.resume-skills {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.resume-skill-category {
    margin-bottom: 0;
}

.resume-skill-category-title {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.resume-skill-list {
    font-size: 18px;
    color: var(--text-primary);
    line-height: 1.6;
}

.resume-download {
    margin-top: 80px;
}

/* Contact Section */
.contact-content-simple {
    max-width: 600px;
}

.contact-intro {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 64px;
    line-height: 1.6;
}

/* Contact Form */
.contact-form {
    margin-bottom: 64px;
}

.form-group {
    margin-bottom: 32px;
}

.form-group label {
    display: block;
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-family: var(--font-body);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    font-family: var(--font-body);
    color: var(--text-primary);
    background-color: transparent;
    border: 1px solid var(--text-secondary);
    border-radius: 4px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--text-primary);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    padding: 12px 32px;
    font-size: 16px;
    font-family: var(--font-body);
    color: var(--bg-primary);
    background-color: var(--text-primary);
    border: 1px solid var(--text-primary);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-submit:hover {
    background-color: transparent;
    color: var(--text-primary);
}

[data-theme="dark"] .btn-submit {
    color: var(--bg-primary);
    background-color: var(--text-primary);
    border-color: var(--text-primary);
}

[data-theme="dark"] .btn-submit:hover {
    background-color: transparent;
    color: var(--text-primary);
}

.contact-info-simple {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.contact-info-item h3 {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.contact-info-item a {
    font-size: 18px;
    color: var(--text-primary);
    text-decoration: none;
    position: relative;
}

.contact-info-item a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--text-primary);
    transition: width 0.2s ease;
}

.contact-info-item a:hover::after {
    width: 100%;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    font-weight: 400;
    font-size: 16px;
    color: var(--text-primary);
    border: 1px solid var(--text-primary);
    background-color: transparent;
    transition: all 0.2s ease;
}

.btn:hover {
    background-color: var(--text-primary);
    color: var(--bg-primary);
}

.btn-primary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--text-primary);
}

.btn-primary:hover {
    background-color: var(--text-primary);
    color: var(--bg-primary);
}

/* Project Detail Section */
.project-detail-section {
    padding-top: 100px;
    padding-bottom: 80px;
}

.project-detail-section .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.project-back {
    margin-bottom: 40px;
    align-self: flex-start;
    width: 100%;
    text-align: left;
}

.back-link {
    font-size: 16px;
    color: var(--text-primary);
    text-decoration: none;
    position: relative;
}

.back-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--text-primary);
    transition: width 0.2s ease;
}

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

.project-header {
    margin-bottom: 64px;
    text-align: center;
    width: 100%;
}

.project-detail-title {
    font-size: 64px;
    font-weight: 400;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
    line-height: 1.1;
    text-align: center;
}

.project-detail-subtitle {
    font-size: 24px;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: -0.01em;
}

.project-content {
    max-width: 700px;
    width: 100%;
    text-align: center;
}

.project-image-full {
    width: 100%;
    margin-bottom: 64px;
}

.project-image-placeholder {
    width: 100%;
    height: 400px;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 18px;
}

.project-text {
    margin-bottom: 64px;
}

.project-section-title {
    font-size: 32px;
    font-weight: 400;
    margin-bottom: 24px;
    margin-top: 48px;
    letter-spacing: -0.02em;
    text-align: center;
}

.project-section-title:first-child {
    margin-top: 0;
}

.project-paragraph {
    font-size: 20px;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 24px;
    text-align: justify;
}

.project-paragraph:last-child {
    margin-bottom: 0;
}

.project-list {
    font-size: 20px;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 24px;
    text-align: justify;
    padding-left: 24px;
    list-style-type: disc;
}

.project-list li {
    margin-bottom: 8px;
}

.project-list li:last-child {
    margin-bottom: 0;
}

.project-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 32px;
    padding-top: 48px;
    border-top: 1px solid var(--text-primary);
    margin-bottom: 64px;
    width: 100%;
    max-width: 700px;
    text-align: center;
}

.project-meta-item h3 {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-meta-item p {
    font-size: 20px;
    color: var(--text-primary);
    line-height: 1.5;
}

.project-navigation {
    display: flex;
    justify-content: space-between;
    padding-top: 48px;
    border-top: 1px solid var(--text-primary);
    width: 100%;
    max-width: 700px;
}

.project-nav-link {
    font-size: 18px;
    color: var(--text-primary);
    text-decoration: none;
    position: relative;
}

.project-nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--text-primary);
    transition: width 0.2s ease;
}

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

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--text-primary);
    color: var(--bg-primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-2px);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

/* Footer */
.footer {
    padding: 60px 0 40px;
    margin-top: 80px;
    border-top: 1px solid transparent;
}

.footer p {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 72px;
        flex-direction: column;
        background-color: var(--bg-primary);
        width: 100%;
        padding: 24px;
        transition: left 0.3s ease;
        gap: 24px;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .work-title,
    .page-title {
        font-size: 48px;
    }

    .work-intro,
    .about-text,
    .contact-intro {
        font-size: 18px;
    }

    .work-item-title {
        font-size: 20px;
    }

    .work-list {
        gap: 32px;
    }

    .work-category-items {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .work-item-full {
        grid-template-columns: 1fr;
    }

    .work-item-full > article {
        grid-column: 1;
        width: 100%;
    }

    .resume-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .container {
        padding: 0 20px;
    }

    .work-section,
    .page-section {
        padding-top: 80px;
        padding-bottom: 60px;
    }

    .project-detail-title {
        font-size: 40px;
    }

    .project-detail-subtitle {
        font-size: 20px;
    }

    .project-section-title {
        font-size: 28px;
    }

    .project-paragraph {
        font-size: 18px;
    }

    .project-image-placeholder {
        height: 300px;
    }

    .project-meta {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .project-navigation {
        flex-direction: column;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .work-title,
    .page-title {
        font-size: 40px;
    }

    .work-item-title {
        font-size: 18px;
    }

    .work-item {
        padding: 30px 20px;
    }
}

/* Project with Image/Video Layout */
.work-item-with-media {
    padding: 0;
    flex-direction: column;
    overflow: hidden;
    display: flex;
    height: 100%;
}

.work-item-media-container {
    width: 100%;
    height: 70%;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
    overflow: hidden;
    transition: opacity 0.2s ease;
}

.work-item-media-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.work-item-content-container {
    width: 100%;
    height: 30%;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px;
    padding-top: 24px;
    gap: 8px;
    box-sizing: border-box;
}

.work-item-content-container .work-item-title {
    color: var(--text-primary);
    transition: color 0.2s ease, font-size 0.2s ease;
    margin: 0;
    margin-bottom: 4px;
    text-align: center;
    display: block;
    width: 100%;
    line-height: 1.3;
    font-size: 24px;
}

.work-item-subtitle {
    font-size: 18px;
    font-weight: 400;
    color: var(--text-secondary);
    transition: color 0.2s ease;
    margin: 0;
    text-align: center;
    display: block;
    width: 100%;
    line-height: 1.4;
}

[data-theme="dark"] .work-item-content-container .work-item-title {
    color: var(--text-primary);
}

[data-theme="dark"] .work-item-subtitle {
    color: var(--text-secondary);
}

.work-item-with-media:hover .work-item-content-container .work-item-title {
    color: var(--text-primary);
    font-size: 28px;
}

.work-item-with-media:hover .work-item-subtitle {
    color: var(--text-secondary);
}

.work-link-column {
    flex-direction: column;
    width: 100%;
    height: 100%;
    display: flex;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 40px;
        margin-bottom: 60px;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-photo {
        width: 200px;
        height: 200px;
    }
    
    .work-title {
        font-size: 48px;
    }
    
    .work-intro {
        font-size: 18px;
    }
    
    .social-icons {
        justify-content: center;
    }
}

