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

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #666;
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --border-color: #e0e0e0;
    --accent-color: #1a1a1a;
    --code-bg: #f5f5f5;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    cursor: none;
}

/* Custom Cursor */
.cursor {
    width: 8px;
    height: 8px;
    border: 1px solid var(--primary-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease;
    transform: translate(-50%, -50%);
    display: none;
}

.cursor-follower {
    width: 30px;
    height: 30px;
    border: 1px solid var(--primary-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transition: transform 0.15s ease;
    transform: translate(-50%, -50%);
    opacity: 0.3;
    display: none;
}

@media (min-width: 768px) {
    .cursor, .cursor-follower {
        display: block;
    }
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--primary-color);
    z-index: 10000;
    transition: width 0.1s ease;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-color);
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    transition: var(--transition);
    font-family: 'JetBrains Mono', monospace;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 100px 30px 50px;
    background-color: var(--bg-color);
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-line {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.line-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--secondary-color);
    font-weight: 300;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 400;
    line-height: 1.2;
    color: var(--primary-color);
    font-family: 'JetBrains Mono', monospace;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.title-line {
    display: block;
}

.typed-text {
    color: var(--secondary-color);
    border-right: 2px solid var(--primary-color);
    animation: blink 1s infinite;
    padding-right: 5px;
}

@keyframes blink {
    0%, 50% { border-color: var(--primary-color); }
    51%, 100% { border-color: transparent; }
}

.hero-description {
    font-size: 1rem;
    color: var(--secondary-color);
    margin-top: 30px;
    font-weight: 300;
}

.hero-scroll-indicator {
    margin-top: 60px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.scroll-text {
    font-size: 0.7rem;
    color: var(--secondary-color);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 2px;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background-color: var(--secondary-color);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0%, 100% {
        height: 40px;
        opacity: 1;
    }
    50% {
        height: 60px;
        opacity: 0.5;
    }
}

.hero-code {
    flex: 1;
    max-width: 500px;
    background-color: var(--code-bg);
    padding: 30px;
    border: 1px solid var(--border-color);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    line-height: 1.8;
    color: var(--secondary-color);
    overflow: hidden;
}

.hero-code pre {
    margin: 0;
    white-space: pre-wrap;
}

/* Work Section */
.work {
    padding: 120px 0;
    background-color: var(--bg-color);
}

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

.section-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 60px;
    font-family: 'JetBrains Mono', monospace;
}

.title-number {
    font-size: 0.85rem;
    color: var(--secondary-color);
    font-weight: 300;
}

.title-text {
    font-size: 0.85rem;
    color: var(--primary-color);
    letter-spacing: 2px;
    font-weight: 400;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.work-card {
    padding: 30px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    transition: var(--transition);
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px);
}

.work-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.work-card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--secondary-color);
}

.work-year {
    font-weight: 300;
}

.work-category {
    font-weight: 400;
}

.work-card-title {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-family: 'JetBrains Mono', monospace;
}

.work-card-description {
    font-size: 0.9rem;
    color: var(--secondary-color);
    line-height: 1.6;
    margin-bottom: 20px;
    font-weight: 300;
}

.work-card-tech {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.work-card-tech span {
    font-size: 0.7rem;
    padding: 4px 10px;
    border: 1px solid var(--border-color);
    color: var(--secondary-color);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
}

.work-card-link {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-family: 'JetBrains Mono', monospace;
    display: inline-block;
    transition: var(--transition);
}

.work-card:hover .work-card-link {
    transform: translateX(5px);
}

/* About Section */
.about {
    padding: 120px 0;
    background-color: #fafafa;
}

.about-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    margin-bottom: 80px;
}

.about-text p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-color);
    font-weight: 300;
    margin-bottom: 20px;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.stat-item {
    text-align: right;
}

.stat-number {
    font-size: 3rem;
    font-weight: 400;
    color: var(--primary-color);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--secondary-color);
    font-weight: 300;
}

.skills-section {
    margin-top: 60px;
}

.skills-title {
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--primary-color);
    letter-spacing: 2px;
    margin-bottom: 40px;
    font-weight: 400;
}

.skills-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.skill-name {
    font-size: 0.85rem;
    color: var(--text-color);
    font-weight: 400;
    min-width: 120px;
    font-family: 'JetBrains Mono', monospace;
}

.skill-bar {
    flex: 1;
    height: 2px;
    background-color: var(--border-color);
    position: relative;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background-color: var(--primary-color);
    width: 0;
    transition: width 1s ease;
}

/* Contact Section */
.contact {
    padding: 120px 0;
    background-color: var(--bg-color);
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-text {
    font-size: 0.95rem;
    color: var(--secondary-color);
    margin-bottom: 50px;
    line-height: 1.8;
    font-weight: 300;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.contact-link {
    font-size: 0.85rem;
    color: var(--primary-color);
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    position: relative;
}

.contact-link .link-arrow {
    transition: var(--transition);
}

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

/* Footer */
.footer {
    background-color: var(--bg-color);
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
}

.footer p {
    text-align: center;
    font-size: 0.75rem;
    color: var(--secondary-color);
    font-weight: 300;
    font-family: 'JetBrains Mono', monospace;
}

/* Responsive Design */
@media (max-width: 968px) {
    .hero {
        flex-direction: column;
        gap: 40px;
    }

    .hero-code {
        max-width: 100%;
    }

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

    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-stats {
        flex-direction: row;
        justify-content: space-around;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .nav-container {
        padding: 0 20px;
    }

    .nav-menu {
        gap: 1.5rem;
        font-size: 0.75rem;
    }

    .hero {
        padding: 100px 20px 50px;
    }

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

    section {
        padding: 80px 0;
    }

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

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .work-card-title {
        font-size: 1.2rem;
    }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background-color: var(--primary-color);
    color: var(--bg-color);
}
