/* Home page specific styles */
.home-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
    padding: 2rem;
    min-height: calc(100vh - 4.5rem);
    max-width: 95%;
    margin: 0 auto;
    padding-top: 6rem;
}

/* Hero section */
.hero {
    min-height: 85vh;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    padding: 0 2%;
    gap: 4rem;
    position: relative;
    margin: 0 auto;
    align-items: flex-start;
    max-width: 95%;
    padding-top: 6rem;
}

/* Left side content */
.hero-content {
    text-align: left;
    max-width: 700px;
    position: relative;
    z-index: 1;
    padding-top: 2rem;
    margin-right: auto;
}

.wave-emoji {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: wave 2.5s infinite;
}

.hero h1 {
    font-size: 3.75rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    line-height: 1.2;
    position: relative;
    color: var(--text);
    white-space: nowrap;
}

.gradient-text {
    background: linear-gradient(135deg, #8ffcff, #4dc6ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(143, 252, 255, 0.5);
    position: relative;
    filter: drop-shadow(0 0 15px rgba(143, 252, 255, 0.3));
}

/* Typing animation styles */
.typing-text {
    font-size: 1.75rem;
    color: #8ffcff;
    margin: 0.5rem 0 1.75rem;
    height: 2.5rem;
    position: relative;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
    text-shadow: 0 0 10px rgba(143, 252, 255, 0.5);
}

.typing-text::after {
    content: '';
    position: relative;
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background-color: #8ffcff;
    animation: blink 1s infinite;
    margin-left: 4px;
    vertical-align: middle;
}

.subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 550px;
    line-height: 1.6;
    display: block;
    position: relative;
    text-align: center;
}

.disclaimer {
    background: rgba(var(--primary-rgb), 0.08);
    border: 1px solid rgba(var(--primary-rgb), 0.32);
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    backdrop-filter: blur(4px);
    transition: all 0.25s ease;
}

.disclaimer:hover {
    border-color: rgba(var(--primary-rgb), 0.48);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.15);
}

.disclaimer i {
    color: var(--primary);
    font-size: 1.05rem;
}

.disclaimer p {
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

[data-theme="light"] .disclaimer {
    background: rgba(var(--primary-rgb), 0.07);
    border-color: rgba(var(--primary-rgb), 0.36);
}

/* Social links */
.social-links {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.social-links a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid rgba(143, 252, 255, 0.6);
    background: rgba(143, 252, 255, 0.05);
    color: #8ffcff;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    position: relative;
    backdrop-filter: blur(4px);
    text-decoration: none;
    box-shadow: 0 0 8px rgba(143, 252, 255, 0.4);
}

.social-links a:hover {
    color: #8ffcff;
    border-color: rgba(143, 252, 255, 0.9);
    transform: translateY(-4px) scale(1.15);
    box-shadow: 0 0 12px rgba(143, 252, 255, 0.7);
    background: rgba(143, 252, 255, 0.15);
}

.social-links a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(
        circle at center,
        rgba(143, 252, 255, 0.2),
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-links a:hover::after {
    opacity: 1;
}

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

/* Resume button */
.resume-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background-color: transparent;
    color: #8ffcff;
    border: 2px solid rgba(143, 252, 255, 0.6);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(4px);
    min-height: 44px;
    margin-bottom: 2.5rem;
    box-shadow: 0 0 8px rgba(143, 252, 255, 0.4);
}

.resume-btn:hover {
    background-color: #8ffcff;
    color: black;
    border-color: rgba(143, 252, 255, 0.9);
    box-shadow: 0 0 12px rgba(143, 252, 255, 0.7);
    transform: translateY(-2px);
}

.resume-btn i {
    color: #8ffcff;
    transition: all 0.3s ease;
}

.resume-btn:hover i {
    color: black;
}

/* Remove any pseudo-elements that might affect the button */
.resume-btn::before,
.resume-btn::after {
    display: none;
}

/* Tech stack carousel */
.tech-stack {
    width: 100%;
    max-width: 550px;
    overflow: hidden;
}

.tech-scroll {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.scroll-track {
    display: flex;
    animation: scroll 30s linear infinite;
    width: fit-content;
}

.scroll-content {
    display: flex;
    gap: 1.25rem;
    padding: 0.5rem;
    flex-shrink: 0;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
    font-size: 0.95rem;
    white-space: nowrap;
    padding: 0.625rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    min-height: 40px;
}

/* Right side content - Featured Projects */
.featured-projects {
    padding-top: 2rem;
    width: 100%;
    max-width: 650px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
    margin-left: auto;
    padding-right: 1rem;
}

.featured-projects h2 {
    font-size: 2rem;
    background: linear-gradient(135deg, #8ffcff, #4dc6ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(143, 252, 255, 0.5);
    font-weight: 600;
    position: relative;
    filter: drop-shadow(0 0 15px rgba(143, 252, 255, 0.3));
}

.project-previews {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.project-preview {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2.25rem;
    position: relative;
    transition: all var(--transition-normal);
    min-height: 130px;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.project-preview h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text);
    font-weight: 600;
    padding-right: 5.5rem; /* Add space for the links */
}

.project-preview h3,
.project-preview p,
.project-preview .tech-tags span {
    transition: color var(--transition-normal);
}

.project-preview:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.project-preview h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text);
    font-weight: 600;
    top: -0.5rem;
}

.project-preview p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: justify;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.tech-tags span {
    padding: 0.35rem 0.85rem;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-normal);
    margin-top: 1rem;
}

.view-all:hover {
    transform: translateX(4px);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Pause animation on hover */
.tech-scroll:hover .scroll-track {
    animation-play-state: paused;
}

/* Ensure smooth animation */
.scroll-track {
    will-change: transform;
    backface-visibility: hidden;
}

/* Project links - update z-index and add pointer-events */
.project-links {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10;
    display: flex;
    gap: 0.5rem;
    pointer-events: auto;
}

.project-links a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
    z-index: 11;
    pointer-events: auto;
}

.project-links a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.project-content p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Project status */
.project-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    width: 100%;
}

.project-status i {
    font-size: 0.5rem;
    margin-top: 1px;
}

.project-status.active {
    color: var(--success, #22c55e);
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.1);
}

.project-status.wip {
    color: var(--warning, #ffc100);
    border-color: rgba(255, 193, 0, 0.35);
    background: rgba(255, 193, 0, 0.1);
}

/* Network canvas */
.network-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    /* The canvas drawing color should remain unchanged in your JavaScript code */
}

/* Responsive design */
@media (max-width: 1200px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 6rem 5% 2rem;
        gap: 3rem;
        max-width: 800px;
        margin: 0 auto;
    }

    .hero-content {
        text-align: center;
        margin: 0 auto;
        padding-top: 2rem;
    }

    .social-links {
        justify-content: center;
    }

    .tech-stack {
        margin: 0 auto;
    }

    .featured-projects {
        padding-top: 2rem;
        margin: 0 auto;
        max-width: 650px;
    }
}

@media (max-width: 992px) {
    .hero {
        padding: 6rem 4% 2rem; /* Adjusted padding */
        max-width: 700px;
    }
}

@media (max-width: 768px) {
    .hero {
        display: flex;
        flex-direction: column;
        padding: 6rem 1rem 2rem; /* Reduced side padding */
        gap: 2.5rem;
        min-height: auto;
        width: 100%;
        overflow-x: hidden;
        align-items: center;
    }

    .hero-content {
        padding: 1rem;  /* Reduced padding */
        width: 100%;    /* Added width control */
        max-width: 100%; /* Added max-width */
    }

    .hero h1 {
        font-size: 2.5rem;
        white-space: normal; /* Allow text to wrap */
    }

    .typing-text {
        font-size: 1.25rem;
        white-space: normal; /* Allow text to wrap */
    }

    .subtitle {
        font-size: 1rem;
        padding: 0 0.5rem; /* Added padding */
    }

    .featured-projects {
        width: 100%;
        padding: 1rem;
        max-width: 100%; /* Added max-width */
    }

    .project-preview {
        padding: 1.25rem;
        position: relative;
        min-height: 200px;
        display: flex;
        flex-direction: column;
    }

    .project-links {
        position: absolute;
        top: 1.25rem;
        right: 1.25rem;
        z-index: 10; /* Keep higher z-index in mobile */
        pointer-events: auto;
    }

    .project-preview h3 {
        text-align: center;
        margin-bottom: 0.75rem;
        font-size: 1.1rem;
        line-height: 1.4;
        padding-right: 100px; /* Make space for buttons */
        padding-top: 0.5rem; /* Add some top spacing */
    }

    .project-status {
        width: 100%; /* Full width */
        margin: 0.75rem 0;
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
        justify-content: center;
        order: 2; /* Move status below title */
        margin-top: 1rem; /* Add space between title and status */
    }

    .project-preview p {
        text-align: center;
        margin: 0.75rem 0;
        font-size: 0.9rem;
        order: 3;
        padding: 0 0.5rem; /* Add some side padding */
    }

    .tech-tags {
        order: 4;
        justify-content: center;
        margin-top: auto; /* Push to bottom */
        padding: 0.5rem 0; /* Add some vertical padding */
    }
}

/* Additional adjustments for very small screens */
@media (max-width: 400px) {
    .project-preview {
        padding: 1rem;
    }

    .project-links {
        top: 1rem;
        right: 1rem;
        gap: 0.25rem;
    }

    .project-preview h3 {
        padding-right: 90px; /* Slightly less padding for smaller screens */
        font-size: 1rem;
    }

    .project-status {
        padding: 0.35rem 0.75rem;
        margin-top: 0.75rem;
    }
}

/* Add specific handling for very small screens */
@media (max-width: 620px) {
    .hero h1 {
        font-size: 2rem; /* Further reduce font size */
        line-height: 1.3;
    }

    .wave-emoji {
        font-size: 2.5rem; /* Reduce emoji size */
    }

    .social-links {
        gap: 1rem; /* Reduce gap between social icons */
    }

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

    .tech-tags span {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Touch device optimizations */
@media (hover: none) {
    .mouse-light {
        display: none;
    }

    .social-links a,
    .project-preview,
    .resume-btn,
    .view-all,
    .project-links a {
        z-index: 11; /* Keep higher z-index in mobile */
        pointer-events: auto;
    }

    .social-links a:active,
    .project-preview:active,
    .resume-btn:active,
    .view-all:active,
    .project-links a:active {
        transform: scale(0.98);
    }

    .social-links a:hover {
        transform: none;
        box-shadow: none;
    }

    .resume-btn:hover {
        transform: none;
        box-shadow: none;
    }

    .social-links a:active,
    .resume-btn:active {
        transform: scale(0.95);
    }
}

/* Prevent text selection on interactive elements */
.project-preview,
.resume-btn,
.view-all,
.social-links a,
.tech-tags span {
    user-select: none;
    -webkit-user-select: none;
}

/* Smooth scrolling for iOS */
@supports (-webkit-overflow-scrolling: touch) {
    html {
        -webkit-overflow-scrolling: touch;
    }
}

@media (min-width: 1400px) {
    .hero {
        padding: 5rem 5% 2rem;
        gap: 0rem;
        max-width: 95%;
    }

    .hero-content {
        padding-top: 7vh;
        max-width: 600px;
        margin-right: auto;
    }

    .social-links {
        justify-content: flex-start;
    }

    .featured-projects {
        padding-top: 3vh;
        margin-left: 0rem;
        max-width: 750px;
    }

    .floating-theme-toggle {
        display: none;
    }
}

@media (max-width: 1199px) and (min-width: 769px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 0 5%; /* Reduced from 8% */
        gap: 3rem;
        max-width: 800px;
        margin: 0 auto;
    }

    .hero-content {
        text-align: center;
        margin: 0 auto;
        padding-top: 8vh;
    }

    .social-links {
        justify-content: center;
    }

    .tech-stack {
        margin: 0 auto;
    }

    .featured-projects {
        padding-top: 2rem;
        margin: 0 auto;
        max-width: 650px;
    }
}

@media only screen and (max-width: 600px) {
    .project-preview h3 {
        font-size: 1.1rem;
    }
}
