:root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --border-color: #333333;
    --accent: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body.no-scroll {
    overflow: hidden;
}

html, body {
    scroll-behavior: smooth;
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
    -ms-overflow-style: none;  
    scrollbar-width: none;  
}

html::-webkit-scrollbar, body::-webkit-scrollbar, ::-webkit-scrollbar {
    display: none;
}

#app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 60px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.3s ease-in-out;
}

header.header-hidden {
    transform: translateY(-100%);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    width: 32px;
    height: 32px;
    border-radius: 4px;
}

h1 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

nav {
    display: flex;
    gap: 24px;
}

nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--text-primary);
}

#gallery {
    display: flex;
    flex-direction: column;
    gap: 120px;
    padding-bottom: 100px;
    padding-top: 100px;
    scroll-margin-top: 100px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.8s ease, transform 0.8s ease;
    height: 85vh; 
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(50px);
}

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

.card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #0d0d0d;
    transition: opacity 0.3s ease;
}

.card-iframe-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: #0d0d0d;
}

.card-iframe-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none; 
    display: block;
}

.card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 60%, transparent 100%);
    padding: 60px 30px 30px 30px;
    z-index: 2;
    pointer-events: none;
}

.card-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.card-meta {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    font-family: monospace;
}

footer {
    margin-top: 40px;
    padding: 60px 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    scroll-margin-top: 100px;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
}

.footer-right {
    display: flex;
    justify-content: center;
    flex: 1;
    min-width: 300px;
    max-width: 400px;
}

.footer-right iframe {
    width: 100%;
    max-width: 350px;
}

@media (max-width: 900px) {
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-left {
        align-items: center;
    }
}

.social-links {
    display: flex;
    gap: 16px;
    margin: 8px 0;
}

.social-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.social-circle svg, .social-icon {
    width: 20px;
    height: 20px;
    fill: var(--text-secondary);
    transition: all 0.2s;
}

.social-icon {
    filter: brightness(0) invert(0.63); 
}

.social-circle:hover {
    border-color: var(--text-primary);
    background: var(--border-color);
    transform: translateY(-2px);
}

.social-circle:hover svg {
    fill: var(--text-primary);
}

.social-circle:hover .social-icon {
    filter: brightness(0) invert(1);
}

.footer-links {
    display: flex;
    gap: 12px;
    align-items: center;
}

.footer-links a, #go-to-top {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
    opacity: 0.7;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}

.footer-links a:hover, #go-to-top:hover {
    color: var(--text-primary);
    opacity: 1;
}

.separator {
    color: var(--text-secondary);
    opacity: 0.4;
    font-size: 0.6rem;
    position: relative;
    top: 2px;
}

#modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 1;
    transition: opacity 0.2s;
}

#modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#modal-title {
    font-size: 1.1rem;
    font-weight: 600;
}

#close-modal {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

#close-modal:hover {
    background: var(--card-bg);
    color: var(--text-primary);
}

.modal-body {
    overflow-y: auto;
}

#modal-img {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 1px solid var(--border-color);
}

#modal-img.hidden {
    display: none;
}

.modal-media-container {
    width: 100%;
    position: relative;
    border-bottom: 1px solid var(--border-color);
    background: #000;
    min-height: 200px;
}

#modal-iframe-wrapper {
    position: relative;
    width: 100%;
    height: 60vh;
    overflow: hidden;
}

#modal-iframe-wrapper.hidden {
    display: none;
}

#modal-iframe {
    width: 200%;
    height: 200%;
    border: none;
    pointer-events: none;
    transform: scale(0.5);
    transform-origin: 0 0;
}

.iframe-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 10;
}

.modal-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px 20px;
    background: var(--text-primary);
    color: var(--bg-color);
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    width: fit-content;
    transition: opacity 0.2s, transform 0.2s;
}

.project-link:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.project-link span {
    font-size: 1.1em;
}

.tags {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.75rem;
    padding: 4px 8px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
}

#modal-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
}