/* Tokyo Night Theme Color Palette */
:root {
    --bg-primary: #1a1b26;
    --bg-secondary: #16161e;
    --bg-tertiary: #24283b;
    --fg-primary: #c0caf5;
    --fg-secondary: #a9b1d6;
    --fg-dim: #565f89;

    --accent-blue: #7aa2f7;
    --accent-cyan: #7dcfff;
    --accent-purple: #bb9af7;
    --accent-green: #9ece6a;
    --accent-yellow: #e0af68;
    --accent-red: #f7768e;
    --accent-orange: #ff9e64;

    --selection: #283457;
    --border: #414868;

    --gradient-1: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    --gradient-2: linear-gradient(135deg, var(--accent-cyan), var(--accent-green));
    --gradient-3: linear-gradient(135deg, var(--accent-purple), var(--accent-red));
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-primary);
    color: var(--fg-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

::selection {
    background-color: var(--selection);
    color: var(--accent-cyan);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(26, 27, 38, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(26, 27, 38, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--fg-primary);
}

.logo-bracket {
    color: var(--accent-cyan);
    font-weight: 700;
}

.logo-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-link {
    color: var(--fg-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-link:hover,
.nav-link.active {
    color: var(--accent-cyan);
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--accent-cyan);
    transition: all 0.3s ease;
    border-radius: 2px;
}

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

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, var(--accent-cyan), rgba(0,0,0,0)),
        radial-gradient(2px 2px at 60px 70px, var(--accent-purple), rgba(0,0,0,0)),
        radial-gradient(1px 1px at 50px 50px, var(--accent-blue), rgba(0,0,0,0)),
        radial-gradient(1px 1px at 130px 80px, var(--fg-dim), rgba(0,0,0,0)),
        radial-gradient(2px 2px at 90px 10px, var(--accent-green), rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: sparkle 200s linear infinite;
    opacity: 0.3;
}

@keyframes sparkle {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-2000px);
    }
}

.hero-content {
    max-width: 1200px;
    padding: 2rem;
    text-align: center;
    z-index: 2;
}

.hero-text h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glitch {
    position: relative;
    animation: glitch-text 5s infinite;
}

@keyframes glitch-text {
    0%, 90%, 100% {
        transform: translate(0);
    }
    92% {
        transform: translate(-2px, 2px);
    }
    94% {
        transform: translate(2px, -2px);
    }
    96% {
        transform: translate(-2px, -2px);
    }
    98% {
        transform: translate(2px, 2px);
    }
}

.subtitle {
    font-size: 1.8rem;
    color: var(--fg-secondary);
    min-height: 60px;
    margin-bottom: 2rem;
}

.typed-text {
    color: var(--accent-cyan);
}

.cursor {
    color: var(--accent-cyan);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: left 0.3s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-1);
    color: var(--bg-primary);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(122, 162, 247, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-cyan);
    border: 2px solid var(--accent-cyan);
}

.btn-secondary:hover {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    transform: translateY(-3px);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.scroll-indicator span {
    width: 2px;
    height: 15px;
    background: var(--accent-cyan);
    animation: scroll-down 1.5s infinite;
}

.scroll-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.scroll-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes scroll-down {
    0%, 100% {
        opacity: 0;
        transform: translateY(-10px);
    }
    50% {
        opacity: 1;
        transform: translateY(10px);
    }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.title-number {
    color: var(--accent-cyan);
    font-size: 1.8rem;
    font-weight: 400;
}

.title-line {
    flex: 1;
    height: 1px;
    background: var(--border);
    margin-left: 1rem;
}

/* About Section */
.about {
    padding: 6rem 0;
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--fg-secondary);
    font-size: 1.1rem;
}

.about-text .highlight {
    font-size: 1.3rem;
    color: var(--fg-primary);
}

.accent {
    color: var(--accent-cyan);
    font-weight: 600;
}

.tech-stack {
    margin-top: 2rem;
}

.tech-stack h3 {
    color: var(--fg-primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.tech-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
}

.tech-list li {
    color: var(--fg-secondary);
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.tech-icon {
    color: var(--accent-cyan);
    margin-right: 0.5rem;
}

.about-visual {
    position: relative;
}

.visual-box {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.visual-box:hover {
    transform: translateY(-10px);
}

.code-header {
    background: var(--bg-primary);
    padding: 0.8rem;
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: var(--accent-red);
}

.dot.yellow {
    background: var(--accent-yellow);
}

.dot.green {
    background: var(--accent-green);
}

.code-snippet {
    font-family: 'Fira Code', 'Monaco', 'Courier New', monospace;
}

.code-snippet pre {
    padding: 1.5rem;
    margin: 0;
    overflow-x: auto;
}

.code-snippet code {
    font-size: 0.9rem;
    line-height: 1.8;
}

.code-comment {
    color: var(--fg-dim);
}

.code-keyword {
    color: var(--accent-purple);
}

.code-string {
    color: var(--accent-green);
}

.code-function {
    color: var(--accent-blue);
}

/* Interests Section */
.interests {
    padding: 6rem 0;
}

.interests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.interest-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.interest-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.interest-card:hover::before {
    transform: scaleX(1);
}

.interest-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-blue);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.interest-card h3 {
    color: var(--fg-primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.interest-card p {
    color: var(--fg-secondary);
    line-height: 1.8;
}

.card-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.card-link:hover {
    color: var(--accent-blue);
    transform: translateX(5px);
}

/* Gallery Styles */
.gallery-hero {
    padding: 8rem 0 4rem;
    text-align: center;
    background: var(--bg-secondary);
}

.gallery-title {
    font-size: 4rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.gallery-subtitle {
    font-size: 1.5rem;
    color: var(--fg-secondary);
}

.gallery-filters {
    padding: 2rem 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--fg-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 600;
}

.filter-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.filter-btn.active {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    border-color: var(--accent-cyan);
}

.gallery {
    padding: 4rem 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.gallery-item {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item.hidden {
    display: none;
}

.gallery-placeholder {
    aspect-ratio: 4/3;
    background: var(--bg-tertiary);
    border: 2px dashed var(--border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.gallery-placeholder:hover {
    border-color: var(--accent-cyan);
    transform: scale(1.05);
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.placeholder-text {
    color: var(--fg-primary);
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
}

.placeholder-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(122, 162, 247, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-placeholder:hover .placeholder-overlay {
    opacity: 1;
}

.placeholder-overlay p {
    color: var(--bg-primary);
    font-size: 1.2rem;
    font-weight: 700;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.lightbox-placeholder {
    background: var(--bg-tertiary);
    padding: 4rem;
    border-radius: 12px;
    border: 2px solid var(--border);
}

.lightbox-placeholder p {
    font-size: 1.5rem;
    color: var(--fg-secondary);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 3rem;
    color: var(--fg-primary);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: var(--accent-red);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    color: var(--fg-primary);
    background: rgba(26, 27, 38, 0.8);
    border: 1px solid var(--border);
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--accent-cyan);
    color: var(--bg-primary);
}

.lightbox-prev {
    left: 2rem;
}

.lightbox-next {
    right: 2rem;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
}

.footer-content p {
    color: var(--fg-dim);
    margin: 0.5rem 0;
}

.footer-theme {
    color: var(--accent-cyan);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        flex-direction: column;
        background: var(--bg-secondary);
        width: 100%;
        padding: 2rem;
        transition: right 0.3s ease;
        border-bottom: 1px solid var(--border);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

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

    .tech-list {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
    }

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

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

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

    .lightbox-prev,
    .lightbox-next {
        font-size: 2rem;
        padding: 0.5rem 1rem;
    }

    .lightbox-prev {
        left: 1rem;
    }

    .lightbox-next {
        right: 1rem;
    }
}

/* Smooth Animations */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
