/* ===== Variables & Reset ===== */
:root {
    /* Colors */
    --bg-color: #050505;
    --bg-darker: #000000;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #6366f1;
    --primary-light: #818cf8;
    --secondary: #ec4899;
    --accent: #14b8a6;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--secondary));
    --gradient-glow: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(236, 72, 153, 0.4));

    /* Surfaces */
    --surface: rgba(30, 41, 59, 0.4);
    --surface-border: rgba(255, 255, 255, 0.1);

    /* Typography */
    --font-sans: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* Spacing */
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    word-break: keep-all;
    overflow-wrap: break-word;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ===== Typography ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-subtitle {
    color: var(--primary-light);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    font-weight: 500;
}

/* ===== Layout Options ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 8rem 0;
}

.bg-darker {
    background-color: var(--bg-darker);
}

/* ===== Background Blobs ===== */
.blob-bg {
    position: fixed;
    top: -20%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(5, 5, 5, 0) 60%);
    z-index: -1;
    filter: blur(60px);
    animation: float 20s infinite alternate;
}

.blob-2 {
    top: 40%;
    left: 60%;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.1) 0%, rgba(5, 5, 5, 0) 60%);
    animation: float 25s infinite alternate-reverse;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(5%, 10%) scale(1.1);
    }
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 100;
    transition: var(--transition);
}

.header.scrolled {
    padding: 1rem 0;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--surface-border);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.logo-dot {
    color: var(--primary);
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

.nav-link:hover {
    color: var(--text-main);
}

.btn-contact {
    padding: 0.6rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: var(--text-main);
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 6rem;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 90%;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-border {
    width: 400px;
    height: 500px;
    border-radius: 20px;
    padding: 2px;
    background: var(--gradient-primary);
    position: relative;
    z-index: 1;
}

.profile-img-placeholder {
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    border-radius: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 5rem;
    color: rgba(255, 255, 255, 0.1);
}

.floating-card {
    position: absolute;
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid var(--surface-border);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 2;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.floating-card i {
    font-size: 1.5rem;
    color: var(--primary-light);
}

.floating-card span {
    font-weight: 600;
}

.feat-1 {
    top: 10%;
    right: -10%;
    animation: float 6s infinite ease-in-out;
}

.feat-2 {
    bottom: 15%;
    left: -15%;
    animation: float 7s infinite ease-in-out reverse;
}

/* ===== About Section ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 5rem;
    align-items: center;
}

.image-stack {
    position: relative;
    height: 600px;
}

.img-back {
    position: absolute;
    width: 80%;
    height: 80%;
    top: 0;
    left: 0;
    border-radius: 20px;
    border: 2px solid var(--surface-border);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.2;
    /* Dim the background image */
    transition: background-image 1s ease-in-out;
}

.img-front {
    position: absolute;
    width: 85%;
    height: 85%;
    bottom: 0;
    right: 0;
    border-radius: 20px;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    overflow: hidden;
    backdrop-filter: blur(10px);
    object-fit: cover;
}

.img-front.slide {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.img-front.slide.active {
    opacity: 1;
}

.about-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 6rem;
    color: rgba(255, 255, 255, 0.05);
}

.about-heading {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: white;
}

.story-paragraphs p {
    color: var(--text-muted);
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
}

.story-paragraphs .highlight-text {
    font-size: 1.2rem;
    color: var(--primary-light);
    font-style: italic;
    padding-left: 1.5rem;
    border-left: 3px solid var(--primary);
    margin-top: 2rem;
}

/* ===== Resume Timeline ===== */
.resume-section {
    margin-top: 6rem;
    padding-top: 4rem;
    border-top: 1px solid var(--surface-border);
}

.resume-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.resume-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.column-title {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: var(--primary-light);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
}

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

.timeline-dot {
    position: absolute;
    left: -2.35rem;
    top: 0.2rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 2px solid var(--primary);
    transition: var(--transition);
}

.timeline-item:hover .timeline-dot {
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--secondary);
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.timeline-content h5 {
    font-size: 1.15rem;
    color: white;
    margin-bottom: 0.3rem;
}

.timeline-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* ===== Topics Section ===== */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.topic-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 20px;
    padding: 3rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.topic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
    z-index: 0;
}

.topic-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.2);
}

.topic-card:hover::before {
    opacity: 0.05;
}

.topic-card>* {
    position: relative;
    z-index: 1;
}

.topic-icon {
    width: 60px;
    height: 60px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    color: var(--primary-light);
    margin-bottom: 1.5rem;
}

.topic-category {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--secondary);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.topic-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.topic-desc {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.topic-meta {
    display: flex;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.target {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.target i {
    color: var(--primary);
}

/* ===== Insights Section ===== */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.insight-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.insight-card:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(99, 102, 241, 0.1);
}

.insight-image {
    width: 100%;
    height: 200px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.insight-image i {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.7);
    transition: transform 0.5s ease;
}

.insight-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 2;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.1);
}

.bg-gradient-blue {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
}

.bg-gradient-purple {
    background: linear-gradient(135deg, #4c1d95, #8b5cf6);
}

.bg-gradient-teal {
    background: linear-gradient(135deg, #134e4a, #14b8a6);
}

.bg-gradient-orange {
    background: linear-gradient(135deg, #7c2d12, #f97316);
}

.bg-gradient-pink {
    background: linear-gradient(135deg, #831843, #ec4899);
}

.insight-card:hover .insight-image i {
    transform: scale(1.1) rotate(5deg);
}

.insight-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.insight-category {
    font-size: 0.8rem;
    color: var(--primary-light);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
}

.insight-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: white;
    line-height: 1.4;
}

.insight-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.read-more {
    font-size: 0.95rem;
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    margin-top: auto;
}

.read-more i {
    transition: transform 0.3s ease;
}

.insight-card:hover .read-more {
    color: var(--secondary);
}

.insight-card:hover .read-more i {
    transform: translateX(5px);
}

/* ===== Media Section ===== */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.media-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    padding: 2rem;
    border-radius: 16px;
    transition: var(--transition);
}

.media-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.media-icon {
    font-size: 2.5rem;
    color: var(--primary-light);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
}

.media-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    color: white;
}

.media-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ===== Contact Section ===== */
.contact-box {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 30px;
    padding: 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    position: relative;
    overflow: hidden;
}

.contact-box::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.1) 0%, rgba(5, 5, 5, 0) 70%);
    border-radius: 50%;
    z-index: 0;
}

.contact-info,
.contact-form {
    position: relative;
    z-index: 1;
}

.contact-info h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.method {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
}

.method i {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary-light);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--surface-border);
    padding: 1rem;
    border-radius: 10px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

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

.submit-btn {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

/* ===== Footer ===== */
.footer {
    border-top: 1px solid var(--surface-border);
    padding: 3rem 0;
    margin-top: 4rem;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
}

.footer-social a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== Animations ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.2s;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }

    .hero-container,
    .about-grid,
    .resume-grid,
    .topics-grid,
    .contact-box {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-image-wrapper {
        order: -1;
    }

    .floating-card {
        display: none;
    }

    .image-border {
        width: 100%;
        max-width: 400px;
        height: 400px;
    }

    .image-stack {
        height: 400px;
    }

    .contact-box {
        padding: 2rem;
    }
}

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

    .mobile-menu-btn {
        display: block;
    }

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

    .hero-buttons {
        justify-content: center;
    }

    .hero-buttons .btn {
        width: 140px;
        height: 140px;
        border-radius: 50%;
        padding: 1rem;
        text-align: center;
        white-space: normal;
        word-break: keep-all;
        flex-direction: column;
    }

    .section {
        padding: 5rem 0;
    }
}