/* 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;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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;
}

@media (min-width: 768px) {
    body {
        cursor: none;
    }
}

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

/* Magnetic Cursor */
.magnetic-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.2s ease, height 0.2s ease, border-color 0.2s ease;
    display: none;
}

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

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

.navbar.scrolled {
    border-bottom-color: var(--border-color);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

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

.nav-logo {
    display: flex;
    gap: 2px;
    font-family: 'Space Mono', monospace;
}

.logo-char {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    display: inline-block;
    transition: var(--transition);
    cursor: pointer;
}

.logo-char:hover {
    transform: translateY(-3px);
    color: var(--secondary-color);
}

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

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 1px;
    transition: var(--transition);
    font-family: 'Space Mono', monospace;
    position: relative;
    padding: 5px 0;
}

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

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 120px 30px 80px;
    position: relative;
    overflow: hidden;
}

.hero-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    max-width: 1200px;
    width: 100%;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    font-size: 0.7rem;
    font-family: 'Space Mono', monospace;
    letter-spacing: 2px;
    width: fit-content;
}

.badge-text {
    color: var(--secondary-color);
}

.hero-title {
    font-size: 6rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-color);
    font-family: 'Space Mono', monospace;
    letter-spacing: -3px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.title-line {
    display: block;
    line-height: 1.1;
}

.title-char {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px) rotateX(90deg);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.title-char.visible {
    opacity: 1;
    transform: translateY(0) rotateX(0);
}

.hero-description {
    font-size: 1.1rem;
    color: var(--secondary-color);
    line-height: 1.8;
    font-weight: 300;
    max-width: 500px;
}

.hero-cta {
    margin-top: 20px;
}

.cta-button {
    position: relative;
    padding: 15px 40px;
    border: 2px solid var(--primary-color);
    background-color: transparent;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 400;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Space Mono', monospace;
    letter-spacing: 2px;
    overflow: hidden;
}

.button-bg {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    transition: left 0.3s ease;
    z-index: 0;
}

.cta-button span {
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.cta-button:hover .button-bg {
    left: 0;
}

.cta-button:hover span {
    color: var(--bg-color);
}

.hero-visual {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-elements {
    position: relative;
    width: 100%;
    height: 100%;
}

.float-element {
    position: absolute;
    padding: 15px 25px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
    transition: var(--transition);
}

.float-element:nth-child(1) {
    top: 10%;
    left: 10%;
}

.float-element:nth-child(2) {
    top: 30%;
    right: 15%;
}

.float-element:nth-child(3) {
    bottom: 30%;
    left: 20%;
}

.float-element:nth-child(4) {
    top: 60%;
    right: 10%;
}

.float-element:nth-child(5) {
    bottom: 10%;
    right: 30%;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.scroll-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
    animation: scrollDot 2s ease-in-out infinite;
}

@keyframes scrollDot {
    0%, 100% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(15px);
        opacity: 0.3;
    }
}

/* Section Styles */
section {
    padding: 120px 0;
    position: relative;
}

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

.section-number {
    font-size: 0.85rem;
    color: var(--secondary-color);
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    letter-spacing: 2px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Space Mono', monospace;
    letter-spacing: 3px;
}

/* Work Section */
.work {
    background-color: #fafafa;
}

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

.work-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 60px;
    padding: 40px 0;
    border-bottom: 1px solid var(--border-color);
    opacity: 0;
    transform: translateX(-50px);
    transition: var(--transition);
    cursor: pointer;
}

.work-item:last-child {
    border-bottom: none;
}

.work-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.work-item:hover {
    padding-left: 20px;
}

.work-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    font-family: 'Space Mono', monospace;
    transition: var(--transition);
}

.work-item:hover .work-number {
    color: var(--primary-color);
    transform: scale(1.2);
}

.work-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.work-meta {
    display: flex;
    gap: 20px;
    font-size: 0.75rem;
    font-family: 'Space Mono', monospace;
    color: var(--secondary-color);
    letter-spacing: 1px;
}

.work-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Space Mono', monospace;
    transition: var(--transition);
}

.work-item:hover .work-title {
    transform: translateX(10px);
}

.work-description {
    font-size: 0.95rem;
    color: var(--secondary-color);
    line-height: 1.8;
    font-weight: 300;
    max-width: 600px;
}

.work-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.work-tags span {
    font-size: 0.7rem;
    padding: 5px 12px;
    border: 1px solid var(--border-color);
    color: var(--secondary-color);
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    transition: var(--transition);
}

.work-item:hover .work-tags span {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.work-link {
    font-size: 0.85rem;
    color: var(--primary-color);
    text-decoration: none;
    font-family: 'Space Mono', monospace;
    letter-spacing: 1px;
    margin-top: 10px;
    display: inline-block;
    transition: var(--transition);
}

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

/* About Section */
.about {
    background-color: var(--bg-color);
}

.about-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 80px;
    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;
    padding: 25px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.stat-item:hover {
    border-color: var(--primary-color);
    transform: translateX(-10px);
}

.stat-value {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Space Mono', monospace;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--secondary-color);
    font-family: 'Space Mono', monospace;
    letter-spacing: 2px;
}

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

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

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

.skill-card {
    padding: 30px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
}

.skill-card.visible {
    opacity: 1;
    transform: scale(1);
}

.skill-card:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.skill-icon {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Space Mono', monospace;
    margin-bottom: 15px;
}

.skill-name {
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 400;
    margin-bottom: 10px;
    font-family: 'Space Mono', monospace;
}

.skill-level {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary-color);
    font-family: 'Space Mono', monospace;
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition);
}

.skill-card:hover .skill-level {
    opacity: 1;
    transform: translateY(0);
}

/* Contact Section */
.contact {
    background-color: #fafafa;
}

.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;
    flex-direction: column;
    gap: 20px;
}

.contact-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-family: 'Space Mono', monospace;
    letter-spacing: 2px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.contact-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    transition: left 0.3s ease;
    z-index: 0;
}

.contact-link:hover::before {
    left: 0;
}

.contact-link span,
.contact-link .link-arrow {
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.contact-link:hover span,
.contact-link:hover .link-arrow {
    color: var(--bg-color);
}

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

/* 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: 'Space Mono', monospace;
    letter-spacing: 1px;
}

/* Responsive Design */
@media (max-width: 968px) {
    .hero-wrapper {
        grid-template-columns: 1fr;
        gap: 50px;
    }

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

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 768px) {
    .nav-menu {
        gap: 1.5rem;
    }

    .nav-link {
        font-size: 0.75rem;
    }

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

    section {
        padding: 80px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .work-item {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .work-number {
        display: none;
    }

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

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

    .work-title {
        font-size: 1.5rem;
    }
}

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

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