@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Pretendard:wght@300;400;600;800&display=swap');

:root {
    --bg-color: #050505;
    --second-bg-color: #111116;
    --text-color: #ededed;
    --main-color: #00f0ff;
    --secondary-color: #7a00ff;
    --gradient-color: linear-gradient(45deg, var(--main-color), var(--secondary-color));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'Outfit', 'Pretendard', sans-serif;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 5px;
}

/* Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background: rgba(5, 5, 5, 0.7);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: .3s;
}

.logo {
    font-size: 2.5rem;
    color: var(--text-color);
    font-weight: 800;
    cursor: pointer;
    transition: .3s;
}

.logo span {
    color: var(--main-color);
}

.navbar a {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-left: 4rem;
    font-weight: 600;
    transition: .3s;
}

.navbar a:hover,
.navbar a.active {
    color: var(--main-color);
    text-shadow: 0 0 10px var(--main-color);
}

#menu-icon {
    font-size: 3.6rem;
    color: var(--text-color);
    display: none;
    cursor: pointer;
}

/* Sections Global */
section {
    min-height: 100vh;
    padding: 10rem 9% 2rem;
}

.heading {
    text-align: center;
    font-size: 4.5rem;
    margin-bottom: 3rem;
}

.heading span {
    background: var(--gradient-color);
    -webkit-background-clip: text;
    color: transparent;
}

/* Home Section */
.home {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.home-content h3 {
    font-size: 2.5rem;
    font-weight: 600;
}

.home-content h1 {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1.3;
}

.home-content h1 span {
    color: transparent;
    -webkit-text-stroke: 1px var(--main-color);
    background: var(--gradient-color);
    -webkit-background-clip: text;
}

.home-content p {
    font-size: 1.1rem;
    margin: 2rem 0 3rem;
    line-height: 1.6;
    color: #ccc;
    max-width: 600px;
}

.social-media {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.social-media a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 3rem;
    height: 3rem;
    background: transparent;
    border: 2px solid var(--main-color);
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--main-color);
    transition: .5s;
}

.social-media a:hover {
    background: var(--main-color);
    color: var(--bg-color);
    box-shadow: 0 0 20px var(--main-color);
}

.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background: var(--gradient-color);
    border-radius: 4rem;
    box-shadow: 0 0 15px var(--secondary-color);
    font-size: 1.2rem;
    color: #fff;
    letter-spacing: 1px;
    font-weight: 600;
    transition: .5s;
}

.btn:hover {
    box-shadow: 0 0 25px var(--main-color);
    transform: translateY(-3px);
}

/* Visual Placeholder for Unreal Env */
.home-img {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glowing-circle {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(var(--main-color), var(--secondary-color), var(--main-color));
    animation: rotateCircle 4s linear infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 50px rgba(122, 0, 255, 0.4);
}

.glowing-circle::after {
    content: '';
    position: absolute;
    width: 98%;
    height: 98%;
    background: var(--bg-color);
    border-radius: 50%;
}

.inner-circle {
    position: absolute;
    width: 70%;
    height: 70%;
    border-radius: 50%;
    border: 2px dashed var(--main-color);
    animation: rotateCircleReverse 10s linear infinite;
    z-index: 10;
}

.floating-cube {
    position: absolute;
    width: 40px;
    height: 40px;
    background: rgba(0, 240, 255, 0.2);
    border: 1px solid var(--main-color);
    backdrop-filter: blur(5px);
    z-index: 20;
    animation: float 3s ease-in-out infinite;
}

.cube1 { top: 10%; left: 20%; animation-delay: 0s; }
.cube2 { bottom: 20%; right: 10%; animation-delay: 1s; width: 60px; height: 60px; border-color: var(--secondary-color); }
.cube3 { bottom: 10%; left: 30%; animation-delay: 2s; width: 30px; height: 30px; }

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

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

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0); }
}

/* About Section */
.about {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background: var(--second-bg-color);
}

.about-content {
    text-align: center;
    max-width: 800px;
}

.about-content h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--main-color);
}

.about-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    line-height: 1.8;
    color: #ccc;
}

/* Skills Section */
.skills {
    background: var(--bg-color);
}

.skills-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2.5rem;
}

.skills-box {
    flex: 1 1 300px;
    background: var(--second-bg-color);
    padding: 3rem 2rem;
    border-radius: 2rem;
    text-align: center;
    border: 1px solid transparent;
    transition: .5s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.skills-box:hover {
    border-color: var(--secondary-color);
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(122, 0, 255, 0.3);
}

.skills-box i {
    font-size: 4rem;
    color: var(--main-color);
    margin-bottom: 1.5rem;
}

.skills-box h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.skills-box p {
    font-size: 1rem;
    color: #ccc;
    line-height: 1.5;
}

/* Projects Section */
.projects {
    background: var(--second-bg-color);
}

.portfolio-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    align-items: center;
    gap: 2.5rem;
}

.portfolio-box {
    position: relative;
    border-radius: 2rem;
    box-shadow: 0 0 1rem rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    height: 300px;
    background: #222;
}

.portfolio-img-placeholder,
.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: 800;
    color: #555;
    background: #151515;
    transition: .5s ease;
}

.portfolio-box:hover .portfolio-img-placeholder,
.portfolio-box:hover .portfolio-img {
    transform: scale(1.1);
}

.portfolio-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.1), var(--secondary-color));
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 0 2rem;
    transform: translateY(100%);
    transition: .5s ease;
}

.portfolio-box:hover .portfolio-layer {
    transform: translateY(0);
}

.portfolio-layer h4 {
    font-size: 2rem;
    margin-bottom: .5rem;
    color: #fff;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.portfolio-layer p {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #fff;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.portfolio-layer a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 3rem;
    height: 3rem;
    background: #fff;
    border-radius: 50%;
}

.portfolio-layer a i {
    font-size: 1.5rem;
    color: var(--second-bg-color);
}

/* Footer */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 2rem 9%;
    background: var(--bg-color);
}

.footer-text p {
    font-size: 1.2rem;
    color: #ccc;
}

.footer-iconTop a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: .8rem;
    background: var(--main-color);
    border-radius: .8rem;
    transition: .5s ease;
}

.footer-iconTop a:hover {
    box-shadow: 0 0 1rem var(--main-color);
}

.footer-iconTop a i {
    font-size: 2rem;
    color: var(--bg-color);
}

/* Responsive */
@media (max-width: 1200px) {
    html { font-size: 90%; }
}

@media (max-width: 991px) {
    .header { padding: 2rem 3%; }
    section { padding: 10rem 3% 2rem; }
    .footer { padding: 2rem 3%; }
}

@media (max-width: 768px) {
    #menu-icon { display: block; }
    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 1rem 3%;
        background: var(--bg-color);
        border-top: .1rem solid rgba(0, 0, 0, .2);
        box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2);
        display: none;
    }
    .navbar.active { display: block; }
    .navbar a {
        display: block;
        font-size: 1.5rem;
        margin: 2rem 0;
    }
    .home { flex-direction: column; }
    .home-content h3 { font-size: 2.1rem; }
    .home-content h1 { font-size: 4rem; }
    .home-img { width: 300px; height: 300px; margin-top: 4rem; }
}

/* Modal Styling */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--second-bg-color);
    margin: 5% auto; 
    padding: 30px;
    border: 1px solid var(--secondary-color);
    border-radius: 20px;
    width: 80%;
    max-width: 900px;
    color: var(--text-color);
    box-shadow: 0 0 30px rgba(122, 0, 255, 0.4);
    animation: fadeIn 0.4s;
}

@keyframes fadeIn {
    from {opacity: 0; transform: translateY(-50px);}
    to {opacity: 1; transform: translateY(0);}
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close-btn:hover,
.close-btn:focus {
    color: var(--main-color);
    text-decoration: none;
    cursor: pointer;
}

.modal-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--main-color);
}

.modal-media {
    margin-bottom: 20px;
}

.modal-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #ccc;
    white-space: pre-line;
}

/* Mobile Responsive Optimization for Modals & Portfolio Cards */
@media (max-width: 768px) {
    .portfolio-container {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)) !important;
        gap: 1.5rem !important;
    }
    .portfolio-box {
        height: 250px;
    }
    .portfolio-layer {
        padding: 0 1.2rem !important;
    }
    .portfolio-layer h4 {
        font-size: 1.4rem !important;
        margin-bottom: 0.3rem !important;
    }
    .portfolio-layer p {
        font-size: 0.9rem !important;
        margin-bottom: 0.8rem !important;
    }
    .modal-content {
        width: 94% !important;
        margin: 10% auto !important;
        padding: 20px 15px !important;
    }
    .modal-title {
        font-size: 1.8rem !important;
        word-break: keep-all;
        overflow-wrap: break-word;
    }
    .modal-media p {
        word-break: keep-all;
        overflow-wrap: break-word;
}

/* Slideshow container */
.slideshow-container {
    position: relative;
    margin: auto;
    width: 100%;
}

/* Hide the images by default */
.mySlides {
    display: none;
    text-align: center;
}

/* Next & previous buttons */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0,0,0,0.5);
}

/* Position the "next button" to the right */
.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev {
    left: 0;
}

/* On hover, add a black background color with a little bit see-through */
.prev:hover, .next:hover {
    background-color: rgba(0,0,0,0.9);
}

/* Number text (1/3 etc) */
.numbertext {
    color: #f2f2f2;
    font-size: 14px;
    padding: 8px 12px;
    position: absolute;
    top: 0;
    background-color: rgba(0,0,0,0.5);
    border-radius: 0 0 5px 0;
}

/* The dots/bullets/indicators */
.dot {
    cursor: pointer;
    height: 12px;
    width: 12px;
    margin: 0 4px;
    background-color: #555;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

.active, .dot:hover {
    background-color: var(--main-color);
}

/* Fading animation */
.fade {
    animation-name: fade;
    animation-duration: 0.8s;
}

@keyframes fade {
    from {opacity: .4} 
    to {opacity: 1}
}
