/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background-color: #fff;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ===== Navigation ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #eee;
    z-index: 1000;
}

.nav-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-weight: 600;
    font-size: 1.1rem;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 0.9rem;
    color: #666;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #1a1a1a;
}

/* ===== Theme Toggle ===== */
.theme-toggle {
    background: none;
    border: 1px solid #ddd;
    border-radius: 100px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.theme-toggle:hover {
    border-color: #999;
}

.theme-toggle .icon-moon {
    display: none;
}

body.dark .theme-toggle .icon-sun {
    display: none;
}

body.dark .theme-toggle .icon-moon {
    display: inline;
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 80px;
    background: linear-gradient(180deg, #f8f9fa 0%, #fff 100%);
}

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

.hero-greeting {
    font-size: 1rem;
    color: #666;
    margin-bottom: 8px;
}

.hero-name {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.hero-title {
    font-size: 1.5rem;
    color: #2563eb;
    font-weight: 500;
    margin-bottom: 24px;
}

.hero-desc {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.8;
    margin-bottom: 32px;
}

.hero-keywords {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.hero-keywords span {
    padding: 8px 20px;
    background: #1a1a1a;
    color: #fff;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ===== Section Common ===== */
.section {
    padding: 100px 24px;
}

.section-alt {
    background: #f8f9fa;
}

.section-inner {
    max-width: 800px;
    margin: 0 auto;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 48px;
    letter-spacing: -0.5px;
}

/* ===== About Section ===== */
.about-content p {
    font-size: 1.1rem;
    color: #444;
    line-height: 1.9;
    margin-bottom: 24px;
}

.link-arrow {
    display: inline-block;
    color: #2563eb;
    font-weight: 500;
    transition: transform 0.2s;
}

.link-arrow:hover {
    transform: translateX(4px);
}

/* ===== Timeline ===== */
.timeline {
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 120px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #ddd;
}

.timeline-item {
    display: flex;
    gap: 40px;
    margin-bottom: 48px;
    position: relative;
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: 116px;
    top: 6px;
    width: 9px;
    height: 9px;
    background: #2563eb;
    border-radius: 50%;
}

.timeline-date {
    width: 100px;
    flex-shrink: 0;
    text-align: right;
}

.timeline-date .year {
    display: block;
    font-weight: 600;
    color: #1a1a1a;
}

.timeline-date .duration,
.timeline-date .status {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-top: 4px;
}

.timeline-date .status.current {
    color: #2563eb;
    font-weight: 500;
}

.timeline-content {
    flex: 1;
    padding-left: 20px;
}

.timeline-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.timeline-content .role {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.timeline-content .desc {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

/* ===== Skills Section ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.skill-group h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 16px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tags span {
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 100px;
    font-size: 0.85rem;
    color: #444;
    transition: all 0.2s;
}

.skill-tags span:hover {
    border-color: #2563eb;
    color: #2563eb;
}

/* ===== Projects Section ===== */
.project-featured {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 32px;
    border: 1px solid #eee;
}

.project-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #2563eb;
    font-weight: 600;
}

.project-featured h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 12px 0;
}

.project-featured p {
    color: #666;
    line-height: 1.7;
    margin-bottom: 20px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.project-tech span {
    padding: 4px 12px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #555;
}

.project-links {
    display: flex;
    gap: 16px;
}

.project-links a {
    color: #2563eb;
    font-weight: 500;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.project-links a:hover {
    opacity: 0.7;
}

/* ===== Contact Section ===== */
.contact-content p {
    color: #666;
    margin-bottom: 32px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 20px 24px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background 0.2s;
}

.contact-item:hover {
    background: #f0f0f0;
}

.contact-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    width: 60px;
}

.contact-value {
    font-weight: 500;
}

/* ===== Footer ===== */
.footer {
    padding: 40px 24px;
    text-align: center;
    color: #888;
    font-size: 0.85rem;
    border-top: 1px solid #eee;
}

/* ===== Dark Mode ===== */
body.dark {
    background: #0a0a0a;
    color: #e5e5e5;
}

body.dark .nav {
    background: rgba(10, 10, 10, 0.95);
    border-bottom-color: #222;
}

body.dark .nav-logo {
    color: #fff;
}

body.dark .nav-links a {
    color: #888;
}

body.dark .nav-links a:hover {
    color: #fff;
}

body.dark .theme-toggle {
    border-color: #333;
}

body.dark .hero {
    background: linear-gradient(180deg, #111 0%, #0a0a0a 100%);
}

body.dark .hero-greeting {
    color: #888;
}

body.dark .hero-name {
    color: #fff;
}

body.dark .hero-desc {
    color: #999;
}

body.dark .hero-keywords span {
    background: #fff;
    color: #0a0a0a;
}

body.dark .section-alt {
    background: #111;
}

body.dark .section-title {
    color: #fff;
}

body.dark .about-content p {
    color: #aaa;
}

body.dark .timeline::before {
    background: #333;
}

body.dark .timeline-date .year {
    color: #fff;
}

body.dark .timeline-content h3 {
    color: #fff;
}

body.dark .timeline-content .role {
    color: #888;
}

body.dark .timeline-content .desc {
    color: #666;
}

body.dark .skill-group h4 {
    color: #666;
}

body.dark .skill-tags span {
    background: #1a1a1a;
    border-color: #333;
    color: #ccc;
}

body.dark .skill-tags span:hover {
    border-color: #2563eb;
    color: #2563eb;
}

body.dark .project-featured {
    background: #1a1a1a;
    border-color: #333;
}

body.dark .project-featured h3 {
    color: #fff;
}

body.dark .project-featured p {
    color: #999;
}

body.dark .project-tech span {
    background: #252525;
    color: #aaa;
}

body.dark .contact-content p {
    color: #888;
}

body.dark .contact-item {
    background: #1a1a1a;
}

body.dark .contact-item:hover {
    background: #222;
}

body.dark .contact-value {
    color: #fff;
}

body.dark .footer {
    border-top-color: #222;
    color: #666;
}

/* ===== Floating Navigation ===== */
.floating-nav {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
}

.floating-btn {
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #555;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.floating-btn:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

body.dark .floating-btn {
    background: #1a1a1a;
    border-color: #333;
    color: #aaa;
}

body.dark .floating-btn:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

@media (max-width: 768px) {
    .floating-nav {
        display: none;
    }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero-name {
        font-size: 2.5rem;
    }

    .hero-desc {
        font-size: 1rem;
    }

    .hero-desc br {
        display: none;
    }

    .section {
        padding: 60px 20px;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 32px;
    }

    .timeline::before {
        left: 0;
    }

    .timeline-item {
        flex-direction: column;
        gap: 8px;
        padding-left: 24px;
    }

    .timeline-item::before {
        left: -4px;
    }

    .timeline-date {
        width: auto;
        text-align: left;
        display: flex;
        gap: 12px;
        align-items: center;
    }

    .timeline-date .duration,
    .timeline-date .status {
        margin-top: 0;
    }

    .timeline-content {
        padding-left: 0;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .project-featured {
        padding: 24px;
    }

    .project-links {
        flex-direction: column;
        gap: 12px;
    }
}


/* ===== Sub Page Styles ===== */
.sub-page {
    padding-top: 80px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 40px;
    transition: color 0.2s;
}

.back-link:hover {
    color: #2563eb;
}

.page-header {
    margin-bottom: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid #eee;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.page-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.page-meta .current {
    color: #2563eb;
    font-weight: 500;
}

.page-desc {
    color: #555;
    line-height: 1.7;
}

/* Project Cards */
.project-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
}

.project-card.summary-highlight {
    background: #e8f4fd;
    border-left: 4px solid #2563eb;
}

.project-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.project-card .project-period {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 16px;
}

.project-card p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 16px;
}

.project-card h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin: 20px 0 12px;
}

.project-card ul {
    list-style: none;
    padding: 0;
}

.project-card li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 8px;
    color: #555;
    line-height: 1.6;
}

.project-card li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #2563eb;
}

.project-card .tech-tags {
    margin-top: 20px;
}

.project-card .link-external {
    display: inline-block;
    margin-top: 16px;
    color: #2563eb;
    font-size: 0.9rem;
}

/* About Page */
.about-section {
    margin-bottom: 48px;
}

.about-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.about-section p {
    color: #555;
    line-height: 1.8;
    margin-bottom: 12px;
}

.about-image {
    margin: 40px 0;
    text-align: center;
}

.about-image img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.about-image figcaption {
    margin-top: 12px;
    color: #888;
    font-size: 0.9rem;
}

/* App Showcase */
.app-card {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 32px;
}

.app-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.app-icon {
    font-size: 3rem;
}

.app-title h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.app-title .platform {
    color: #888;
    font-size: 0.9rem;
}

.app-links {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.app-links a {
    padding: 10px 20px;
    background: #1a1a1a;
    color: #fff;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s;
}

.app-links a:hover {
    background: #333;
}

.app-description h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin: 24px 0 12px;
}

.app-description ul {
    list-style: none;
    padding: 0;
}

.app-description li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 8px;
    color: #555;
    line-height: 1.6;
}

.app-description li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #2563eb;
}

/* Dark Mode - Sub Pages */
body.dark .back-link {
    color: #888;
}

body.dark .back-link:hover {
    color: #2563eb;
}

body.dark .page-header {
    border-bottom-color: #333;
}

body.dark .page-header h1 {
    color: #fff;
}

body.dark .page-meta {
    color: #888;
}

body.dark .page-desc {
    color: #aaa;
}

body.dark .project-card {
    background: #1a1a1a;
}

body.dark .project-card.summary-highlight {
    background: #1a2332;
    border-left-color: #3b82f6;
}

body.dark .project-card h3 {
    color: #fff;
}

body.dark .project-card h4 {
    color: #ddd;
}

body.dark .project-card p,
body.dark .project-card li {
    color: #aaa;
}

body.dark .about-section h3 {
    color: #fff;
}

body.dark .about-section p {
    color: #aaa;
}

body.dark .app-card {
    background: #1a1a1a;
}

body.dark .app-title h3 {
    color: #fff;
}

body.dark .app-links a {
    background: #fff;
    color: #0a0a0a;
}

body.dark .app-links a:hover {
    background: #eee;
}

body.dark .app-description h4 {
    color: #ddd;
}

body.dark .app-description li {
    color: #aaa;
}

/* Responsive - Sub Pages */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.75rem;
    }

    .project-card {
        padding: 24px;
    }

    .app-card {
        padding: 24px;
    }

    .app-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .app-links {
        flex-direction: column;
    }

    .app-links a {
        text-align: center;
    }
}
