/* CSS Variables for Amethyst Night Theme */
:root {
    --bg-primary: #161625;
    --bg-secondary: #1e1e32;
    --accent-primary: #8b5cf6;
    --text-primary: #ffffff;
    --text-secondary: #c7c7d2;
    --text-muted: #9ca3af;
    --border-color: #2d2d3d;
    --shadow-light: rgba(139, 92, 246, 0.2);
    --shadow-heavy: rgba(139, 92, 246, 0.4);
    --gradient-primary: linear-gradient(135deg, var(--accent-primary), #a855f7);
    --font-family: 'Noto Serif', serif;
    --font-tech: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    --glow-primary: 0 0 20px rgba(139, 92, 246, 0.5);
    --glow-secondary: 0 0 40px rgba(139, 92, 246, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

.navbar.scrolled {
    background: rgba(22, 22, 37, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.nav-logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--accent-primary);
    transform: translateY(-1px);
}

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

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

.resume-btn {
    background: var(--gradient-primary);
    color: var(--text-primary) !important;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--shadow-light);
}

.resume-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-heavy), var(--glow-primary);
}

/* Mobile Navigation */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: 0.3s;
    border-radius: 2px;
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center; /* Center the main content */
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    padding: 0 2rem;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2rem, 4vw, 3rem); /* Adjusted size for "Hello, I'm" */
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.hero-name {
    font-size: clamp(2.5rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    min-height: 58px; /* Prevents layout shift during animation */
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.8;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

.floating-icons {
    position: absolute;
    top: 0;
    width: 20%; /* Adjust width of the side columns */
    height: 100%;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
}

.floating-icons.left {
    left: 0;
}

.floating-icons.right {
    right: 0;
}

.floating-icons .icon {
    animation: float 10s infinite ease-in-out;
    opacity: 0.3;
    color: var(--accent-primary);
}

.floating-icons .icon {
    animation-delay: var(--delay, 0s);
    animation-duration: var(--duration, 10s);
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(5deg); }
    50% { transform: translateY(-10px) rotate(-5deg); }
    75% { transform: translateY(-15px) rotate(3deg); }
}
/* Section Titles */
.section-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
    position: relative;
    font-family: var(--font-tech);
    letter-spacing: -0.02em;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* About Section */
.about {
    padding: 8rem 0;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.tech-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(139, 92, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

.about-content {
    position: relative;
    z-index: 2;
}

.about-intro {
    display: flex;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
    background: var(--bg-secondary);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.profile-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent-primary);
    box-shadow: var(--glow-primary);
    flex-shrink: 0;
}

.intro-text h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-family: var(--font-tech);
}

.about-subtitle {
    color: var(--accent-primary);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.about-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.skills-section, .strengths-section {
    margin-bottom: 3rem;
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.skills-section h4, .strengths-section h4 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2rem;
    font-family: var(--font-tech);
}

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

.skill-category h5 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: rgba(139, 92, 246, 0.2);
    color: var(--accent-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--accent-primary);
}

.strengths-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* This creates exactly 4 equal columns */
    gap: 2rem;
}
.strength-item {
    text-align: center;
    padding: 2rem;
    background: var(--bg-primary);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.strength-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-light);
    border-color: var(--accent-primary);
}

.strength-item i {
    font-size: 2.5rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.strength-item h5 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.strength-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Projects Section */
.projects {
    padding: 8rem 0;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.binary-rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(0deg, transparent 24%, rgba(139, 92, 246, 0.03) 25%, rgba(139, 92, 246, 0.03) 26%, transparent 27%, transparent 74%, rgba(139, 92, 246, 0.03) 75%, rgba(139, 92, 246, 0.03) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(139, 92, 246, 0.03) 25%, rgba(139, 92, 246, 0.03) 26%, transparent 27%, transparent 74%, rgba(139, 92, 246, 0.03) 75%, rgba(139, 92, 246, 0.03) 76%, transparent 77%, transparent);
    background-size: 30px 30px;
    animation: matrix-move 20s linear infinite;
}

@keyframes matrix-move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 30px); }
}

.projects-grid {
    display: grid;
    /* Default to 1 column on smaller screens */
    grid-template-columns: 1fr;
    gap: 3rem;
    position: relative;
    z-index: 2;
}

/* For screens wider than 992px, use 3 columns */
@media (min-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: 20px;
}

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

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

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px var(--shadow-heavy);
    border-color: var(--accent-primary);
}

.project-image {
    margin-bottom: 1.5rem;
}

.image-placeholder {
    width: 100%;
    height: 200px;
    background: var(--bg-secondary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--border-color);
    transition: all 0.3s ease;
}

.image-placeholder i {
    font-size: 3rem;
    color: var(--accent-primary);
}

.project-card:hover .image-placeholder {
    border-color: var(--accent-primary);
    background: rgba(139, 92, 246, 0.1);
}

.project-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-family: var(--font-tech);
    letter-spacing: -0.01em;
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tech-badge {
    background: rgba(139, 92, 246, 0.2);
    color: var(--accent-primary);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--accent-primary);
}

.project-buttons {
    display: flex;
    gap: 1rem;
    position: relative;
    z-index: 10;
}

.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    flex: 1;
    justify-content: center;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-primary);
    box-shadow: 0 4px 15px var(--shadow-light);
    position: relative;
    z-index: 20;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-heavy), var(--glow-primary);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-primary);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow-light);
}

/* Photography Section */
.photography {
    padding: 6rem 0;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.photography::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.photography-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 3rem;
    font-style: italic;
}

/* Photo Grid Styles - MASONRY */
.photo-grid {
    margin: 0 auto;
}

.grid-sizer,
.photo-item {
    width: 32%;
    margin-bottom: 10px;
}

.photo-item {
    float: left;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo-item:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 30px var(--shadow-heavy);
}

.photo-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
    border-radius: 12px;
}

.photo-item:hover img {
    transform: scale(1.1);
}

.photography-description {
    text-align: center;
    margin-top: 3rem;
}

.photography-description p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: white;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: opacity 0.3s ease;
}

.lightbox-close:hover {
    opacity: 0.7;
}

#lightbox-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    transform: translateY(-50%);
    z-index: 1001;
}

.lightbox-prev,
.lightbox-next {
    background: rgba(139, 92, 246, 0.3);
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--accent-primary);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 6px 20px var(--shadow-heavy), var(--glow-primary);
}

.lightbox-counter {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

/* Contact Section */
.contact {
    padding: 8rem 0;
    background: var(--bg-primary);
    text-align: center;
}

.contact-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
    line-height: 1.8;
}

.contact-icons {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.contact-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.contact-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    transform: scale(0);
    transition: transform 0.3s ease;
    border-radius: 50%;
}

.contact-icon:hover::before {
    transform: scale(1);
}

.contact-icon:hover {
    color: var(--text-primary);
    transform: translateY(-5px);
    box-shadow: var(--glow-primary);
    border-color: var(--accent-primary);
}

.contact-icon i {
    font-size: 2rem;
    position: relative;
    z-index: 2;
}

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

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

/* --- RESPONSIVE DESIGN --- */

/* Medium devices (tablets, less than 992px) */
@media (max-width: 992px) {
    .grid-sizer,
    .photo-item {
        width: 48%;
    }
}

/* Small devices (landscape phones, less than 768px) */
@media (max-width: 768px) {
    .floating-icons {
        display: none; /* Hide floating icons on mobile for clarity */
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(22, 22, 37, 0.95);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        backdrop-filter: blur(10px);
        border-top: 1px solid var(--border-color);
        padding: 2rem 0;
    }

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

    .nav-menu li {
        margin: 1rem 0;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .about-intro {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

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

    .contact-icons {
        flex-wrap: wrap;
        gap: 1.5rem;
    }

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

    .strengths-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .container {
        padding: 0 1rem;
    }

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

    .lightbox-controls {
        padding: 0 1rem;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 50px;
        height: 50px;
    }

    .lightbox-close {
        font-size: 2rem;
        top: 1rem;
        right: 1rem;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 576px) {
    .grid-sizer,
    .photo-item {
        width: 100%;
    }

    .lightbox-content {
        padding: 1rem;
    }

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

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .profile-photo {
        width: 150px;
        height: 150px;
    }

    .about-intro {
        padding: 2rem;
    }

    .skills-section, .strengths-section {
        padding: 2rem;
    }

    .project-card {
        padding: 1.5rem;
    }

    .contact-icon {
        width: 60px;
        height: 60px;
    }

    .contact-icon i {
        font-size: 1.5rem;
    }
}
