/* 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;
    --accent-blue: #0066ff;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --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;
    position: relative;
}

/* Grid Background */
.grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(26, 26, 26, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26, 26, 26, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}

.grid-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 102, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
    animation: backgroundPulse 8s ease-in-out infinite;
}

@keyframes backgroundPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

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

/* 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;
    align-items: center;
    gap: 5px;
    font-family: 'DM Mono', monospace;
}

.logo-bracket {
    font-size: 1rem;
    color: var(--secondary-color);
    font-weight: 300;
}

.logo-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-color);
    letter-spacing: 2px;
}

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

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 1px;
    transition: var(--transition);
    font-family: 'DM 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,
.nav-link.active::after {
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
}

.nav-link.active {
    color: var(--accent-blue);
    font-weight: 500;
}

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

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

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

.hero-intro {
    margin-bottom: 10px;
}

.intro-text {
    font-size: 0.75rem;
    color: var(--secondary-color);
    font-family: 'DM Mono', monospace;
    letter-spacing: 3px;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.intro-text.visible {
    opacity: 1;
    transform: translateX(0);
}

.hero-title {
    font-size: 5.5rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--primary-color);
    font-family: 'DM Mono', monospace;
    letter-spacing: -3px;
    position: relative;
}

.title-part {
    display: block;
    opacity: 0;
    transform: translateY(40px) rotateX(90deg);
    transition: opacity 0.8s ease, transform 0.8s ease;
    position: relative;
}

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

.title-part::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    transition: width 1s ease;
}

.title-part.visible::after {
    width: 100%;
}

.hero-description {
    font-size: 1rem;
    color: var(--secondary-color);
    line-height: 1.8;
    font-weight: 300;
    max-width: 500px;
    margin-top: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero-description.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-actions {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.action-btn {
    position: relative;
    padding: 12px 30px;
    border: 2px solid var(--primary-color);
    background-color: transparent;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 400;
    font-family: 'DM Mono', monospace;
    letter-spacing: 1px;
    transition: var(--transition);
    overflow: hidden;
    box-shadow: 0 0 0 rgba(0, 102, 255, 0);
}

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

.btn-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.action-btn:hover .btn-line {
    width: 100%;
}

.action-btn.primary:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
    box-shadow: 0 0 20px rgba(0, 102, 255, 0.4);
    transform: translateY(-2px);
}

.action-btn.secondary:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.visual-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 400px;
}

.grid-item {
    aspect-ratio: 1;
    background-color: var(--border-color);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    opacity: 0;
    transform: scale(0.8) rotate(0deg);
    position: relative;
    overflow: hidden;
    animation: slowRotate 20s linear infinite;
    animation-play-state: paused;
}

.grid-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(0, 102, 255, 0.3), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
    border-radius: 50%;
}

@keyframes slowRotate {
    0% {
        transform: scale(1) rotate(0deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
    }
}

@keyframes floatAndRotate {
    0% {
        transform: scale(1) rotate(0deg) translateY(0);
    }
    50% {
        transform: scale(1) rotate(180deg) translateY(-10px);
    }
    100% {
        transform: scale(1) rotate(360deg) translateY(0);
    }
}

.grid-item.visible {
    opacity: 1;
    animation-play-state: running;
}

.grid-item:hover {
    background-color: var(--primary-color);
    transform: scale(1.15) rotate(5deg) !important;
    z-index: 10;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation-play-state: paused;
}

.grid-item:hover::before {
    width: 200%;
    height: 200%;
}

.hero-stats {
    display: flex;
    gap: 60px;
    justify-content: center;
    flex-wrap: wrap;
}

.stat-box {
    text-align: center;
    padding: 30px;
    border: 2px solid var(--border-color);
    min-width: 150px;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
    position: relative;
    overflow: hidden;
}

.stat-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 102, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.stat-box.visible {
    opacity: 1;
    transform: translateY(0);
}

.stat-box:hover {
    border-color: var(--accent-blue);
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 102, 255, 0.2);
}

.stat-box:hover::before {
    left: 100%;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'DM Mono', monospace;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.stat-box:hover .stat-number {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: scale(1.1);
}

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

/* Section Styles */
section {
    padding: 120px 0;
    position: relative;
    z-index: 2;
}

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

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

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'DM Mono', monospace;
    letter-spacing: 3px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

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

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

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

.work-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, var(--accent-blue), var(--accent-purple));
    transition: height 0.5s ease;
}

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

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

.work-item:hover {
    padding-left: 30px;
    background: linear-gradient(90deg, rgba(0, 102, 255, 0.05), transparent);
    transform: translateX(10px);
}

.work-item:hover::before {
    height: 100%;
}

.work-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

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

.work-year {
    font-size: 0.75rem;
    color: var(--secondary-color);
    font-family: 'DM Mono', monospace;
    letter-spacing: 1px;
}

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

.work-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'DM Mono', monospace;
    transition: var(--transition);
    position: relative;
    display: inline-block;
}

.work-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    transition: width 0.3s ease;
}

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

.work-item:hover .work-title::after {
    width: 100%;
}

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

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

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

.work-item:hover .work-tech 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: 'DM 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-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.about-text p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-color);
    font-weight: 300;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.about-text p.visible {
    opacity: 1;
    transform: translateY(0);
}

.skills-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.skills-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--primary-color);
    font-family: 'DM Mono', monospace;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

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

.skill-row {
    display: grid;
    grid-template-columns: 120px 1fr 60px;
    gap: 20px;
    align-items: center;
    opacity: 0;
    transform: translateX(-30px);
    transition: var(--transition);
}

.skill-row.visible {
    opacity: 1;
    transform: translateX(0);
}

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

.skill-bar {
    width: 100%;
    height: 3px;
    background-color: var(--border-color);
    overflow: hidden;
    position: relative;
    border-radius: 2px;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    width: 0;
    transition: width 1.5s ease;
    position: relative;
    border-radius: 2px;
}

.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(200%);
    }
}

.skill-value {
    font-size: 0.85rem;
    color: var(--secondary-color);
    font-family: 'DM Mono', monospace;
    text-align: right;
}

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

.contact-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.contact-text {
    font-size: 0.95rem;
    color: var(--secondary-color);
    margin-bottom: 50px;
    line-height: 1.8;
    font-weight: 300;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.contact-text.visible {
    opacity: 1;
    transform: translateY(0);
}

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

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 30px;
    border: 2px solid var(--border-color);
    background-color: var(--bg-color);
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
}

.contact-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, rgba(0, 102, 255, 0.1), transparent 30%);
    animation: rotate 3s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-card:hover::after {
    opacity: 1;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

.contact-card.visible {
    opacity: 1;
    transform: translateY(0);
}

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

.contact-card:hover::before {
    transform: translateY(0);
}

.contact-card:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 10px 30px rgba(0, 102, 255, 0.2);
    transform: translateY(-5px) scale(1.02);
}

.contact-icon {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'DM Mono', monospace;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.contact-card:hover .contact-icon {
    color: var(--bg-color);
}

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    position: relative;
    z-index: 1;
    margin-bottom: 15px;
}

.contact-label {
    font-size: 0.75rem;
    color: var(--secondary-color);
    font-family: 'DM Mono', monospace;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.contact-value {
    font-size: 0.85rem;
    color: var(--text-color);
    font-family: 'DM Mono', monospace;
    transition: color 0.3s ease;
}

.contact-card:hover .contact-label,
.contact-card:hover .contact-value {
    color: var(--bg-color);
}

.contact-arrow {
    font-size: 1.5rem;
    color: var(--primary-color);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.contact-card:hover .contact-arrow {
    color: var(--bg-color);
    transform: translateX(5px) scale(1.2);
}

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

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

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

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

    .contact-grid {
        grid-template-columns: 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-left {
        flex-direction: row;
        align-items: center;
    }
}

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