:root {
    --bg-color: #050505;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --card-bg: #111111;
    --accent-color: #ffffff;
    /* Monochromatic accent */
    --border-color: #333333;
    --font-main: 'Inter', sans-serif;
    --transition-speed: 0.3s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow: hidden; /* Disable native scroll for custom logic */
    height: 100vh;
    width: 100vw;
}

body.is-loading {
    cursor: wait;
}

body.is-loading .site-header,
body.is-loading section,
body.is-loading footer,
body.is-loading #constellation-canvas,
body.is-loading #planet-canvas {
    pointer-events: none;
}

.startup-loader {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.75rem;
    background:
        radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.08), transparent 18rem),
        var(--bg-color);
    color: var(--text-primary);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.75s ease, visibility 0.75s ease;
}

body.is-loading .startup-loader {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body.is-ready .startup-loader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-constellation {
    position: relative;
    width: 150px;
    height: 150px;
    filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.28));
}

.loader-node,
.loader-core,
.loader-orbit,
.loader-link {
    position: absolute;
    display: block;
}

.loader-node,
.loader-core {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-primary);
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.85);
}

.loader-core {
    top: 72px;
    left: 72px;
    width: 8px;
    height: 8px;
    animation: loader-pulse 1.5s ease-in-out infinite;
}

.loader-node {
    animation: loader-node-pulse 2.4s ease-in-out infinite;
}

.node-a {
    top: 20px;
    left: 70px;
}

.node-b {
    top: 62px;
    right: 16px;
    animation-delay: 0.2s;
}

.node-c {
    bottom: 18px;
    left: 50px;
    animation-delay: 0.4s;
}

.node-d {
    top: 80px;
    left: 18px;
    animation-delay: 0.6s;
}

.loader-link {
    top: 74px;
    left: 75px;
    width: 72px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.75), transparent);
    transform-origin: left center;
    opacity: 0.55;
    animation: loader-signal 1.8s ease-in-out infinite;
}

.link-a {
    transform: rotate(-80deg);
}

.link-b {
    transform: rotate(-12deg);
    animation-delay: 0.2s;
}

.link-c {
    transform: rotate(142deg);
    animation-delay: 0.4s;
}

.loader-orbit {
    inset: 22px;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-left-color: transparent;
    border-bottom-color: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    animation: loader-spin 1.8s linear infinite;
}

.loader-orbit::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 13px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-primary);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.9);
}

.loader-copy {
    display: grid;
    gap: 0.35rem;
    text-align: center;
    letter-spacing: 0;
}

.loader-kicker {
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.loader-title {
    font-size: clamp(1.5rem, 5vw, 3.25rem);
    font-weight: 800;
}

@keyframes loader-spin {
    to { transform: rotate(360deg); }
}

@keyframes loader-pulse {
    0%, 100% { transform: scale(0.9); opacity: 0.75; }
    50% { transform: scale(1.35); opacity: 1; }
}

@keyframes loader-node-pulse {
    0%, 100% { opacity: 0.45; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

@keyframes loader-signal {
    0%, 100% { opacity: 0.18; }
    50% { opacity: 0.8; }
}

@media (prefers-reduced-motion: reduce) {
    .startup-loader,
    .loader-node,
    .loader-core,
    .loader-orbit,
    .loader-link {
        animation: none;
        transition-duration: 0.01ms;
    }
}

/* Site Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: 1fr auto 1fr; /* Center the nav */
    align-items: center;
    padding: 1.5rem 3rem;
    background: linear-gradient(to bottom, rgba(5, 5, 5, 0.9), transparent);
}

.site-header .logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    justify-self: start;
}

.site-header nav {
    justify-self: center;
}

.site-header .btn {
    justify-self: end;
}

.site-header nav ul {
    display: flex;
    gap: 2rem;
}

.site-header nav ul li a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color var(--transition-speed) ease;
}

.site-header nav ul li a:hover {
    color: var(--text-primary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed) ease;
}

ul {
    list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
    line-height: 1.1;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.75rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Utilities */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.canvas-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible; /* Allow particles to extend beyond wrapper */
}

.particle-text-canvas {
    display: block;
    border: none; /* Remove any default borders */
    outline: none; /* Remove any outlines */
    pointer-events: none; /* Let mouse events pass through to parent */
}

.hero-canvas-wrapper {
    height: 150px; /* Adjust based on font size */
    margin-bottom: 1rem;
    overflow: visible; /* Allow particles to extend beyond */
}

.project-canvas-wrapper {
    width: 600px;
    height: 150px;
    overflow: visible;
}

.skills-canvas-wrapper {
    width: 600px;
    height: 150px;
    overflow: visible;
}

.contact-canvas-wrapper {
    width: 900px;
    height: 200px;
    overflow: visible;
}

.label-canvas-wrapper {
    height: 25px;
    justify-content: flex-start;
    margin-bottom: 0.2rem;
}

.section-title-wrapper {
    justify-content: flex-start; /* Align left for Experience */
    margin-bottom: 3rem;
    height: 100px;
    overflow: visible; /* Allow particles to extend beyond */
}

.center-header-canvas {
    height: 120px;
    width: 400px; /* Fixed width for center elements to prevent overflow */
}

.container {
    max-width: 1200px;
    width: 100%; /* Ensure it takes full width for alignment */
    margin: 0 auto;
    padding: 0 2rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 4px;
    transition: all var(--transition-speed) ease;
    cursor: pointer;
}

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

.btn-primary:hover {
    background-color: var(--text-primary);
    color: var(--bg-color);
}

/* Animations */
.fade-in-up {
    /* Removed scroll reveal animation to rely on section transitions */
    opacity: 1;
    transform: none;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}

.delay-400 {
    transition-delay: 400ms;
}

/* Constellation Canvas Fixed for Parallax */
#constellation-canvas {
    position: fixed;
    /* Changed from absolute to fixed for permanent background */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: auto;
    /* Ensure it captures mouse events */
    transition: opacity 1s ease;
}

#planet-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Same level as stars, we will manage opacity */
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.5s ease;
}

body.show-planet #planet-canvas {
    opacity: 1;
}

body.show-planet #constellation-canvas {
    opacity: 0.3; /* Dim stars when planet is visible */
}

.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    /* Remove background, let fixed canvas show through */
    background: transparent;
    padding-top: 0; /* Center vertically without header offset */
}

/* --- Transition Effects --- */

/* 1. Warp (Default) - Home -> Experience */
body.fx-warp section { transform: scale(0.8); filter: blur(10px) brightness(0.5); }
body.fx-warp section.active { transform: scale(1); filter: blur(0) brightness(1); }
body.fx-warp section.past { transform: scale(1.5); filter: blur(20px); opacity: 0; }

/* 2. Slide - Experience -> Projects */
body.fx-slide section { transform: translateX(100vw) scale(0.8); filter: blur(5px); }
body.fx-slide section.active { transform: translateX(0) scale(1); filter: none; }
body.fx-slide section.past { transform: translateX(-100vw) scale(0.8); filter: blur(5px); opacity: 0; }

/* 3. Twist/Vortex - Projects -> Skills */
body.fx-twist section { transform: rotate(-90deg) scale(0.2); opacity: 0; }
body.fx-twist section.active { transform: rotate(0deg) scale(1); opacity: 1; }
body.fx-twist section.past { transform: rotate(90deg) scale(2); opacity: 0; }

/* 4. Ascend - Skills -> Contact */
body.fx-ascend section { 
    transform: translateY(100px); 
    opacity: 0; 
    filter: blur(5px);
}
body.fx-ascend section.active { 
    transform: translateY(0); 
    opacity: 1; 
    filter: none;
}
body.fx-ascend section.past { 
    transform: translateY(-100px); 
    opacity: 0; 
}

/* Hide constellation canvas on contact page */
body.fx-ascend #constellation-canvas {
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Ensure content sits above the fixed background */
section, footer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), 
                filter 1.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 80px; /* Space for header */
    z-index: 1;
    will-change: transform, opacity, filter;
}

section.active, footer.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 10;
}

section.past, footer.past {
    pointer-events: none;
    z-index: 20;
}

/* Scrollable content within sections if needed */
.section-content-wrapper {
    width: 100%;
    flex: 1; /* Take up remaining space */
    min-height: 0; /* Critical for flexbox scrolling */
    overflow-y: auto;
    padding: 2rem 0;
    /* Hide scrollbar */
    scrollbar-width: none;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center content horizontally */
}
.section-content-wrapper::-webkit-scrollbar {
    display: none;
}

.stats-section,
.summary-section,
.services-section,
.methodology-section,
.site-footer {
    background-color: transparent; /* Keep transparent for the effect */
}

/* Specific Section Tweaks */
.stats-section {
    /* background-color: rgba(5, 5, 5, 0.85); */
    /* backdrop-filter: blur(5px); */
}

.services-section {
    background-color: rgba(5, 5, 5, 0.9);
}

.summary-section {
    /* Transparent to show stars! */
}


.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: 2rem;
    text-align: center;
}

.hero-content h1.glitch {
    font-size: 5rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    margin-bottom: 1rem;
    position: relative;
    color: var(--text-primary);
}

/* Glitch Effect */
.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(30px, 9999px, 10px, 0); }
    5% { clip: rect(80px, 9999px, 90px, 0); }
    10% { clip: rect(10px, 9999px, 40px, 0); }
    15% { clip: rect(50px, 9999px, 20px, 0); }
    20% { clip: rect(20px, 9999px, 60px, 0); }
    25% { clip: rect(90px, 9999px, 30px, 0); }
    30% { clip: rect(10px, 9999px, 80px, 0); }
    35% { clip: rect(60px, 9999px, 50px, 0); }
    40% { clip: rect(40px, 9999px, 10px, 0); }
    45% { clip: rect(80px, 9999px, 20px, 0); }
    50% { clip: rect(30px, 9999px, 70px, 0); }
    55% { clip: rect(10px, 9999px, 50px, 0); }
    60% { clip: rect(50px, 9999px, 90px, 0); }
    65% { clip: rect(20px, 9999px, 40px, 0); }
    70% { clip: rect(70px, 9999px, 10px, 0); }
    75% { clip: rect(40px, 9999px, 60px, 0); }
    80% { clip: rect(90px, 9999px, 30px, 0); }
    85% { clip: rect(10px, 9999px, 50px, 0); }
    90% { clip: rect(60px, 9999px, 20px, 0); }
    95% { clip: rect(30px, 9999px, 80px, 0); }
    100% { clip: rect(50px, 9999px, 40px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(10px, 9999px, 50px, 0); }
    5% { clip: rect(60px, 9999px, 20px, 0); }
    10% { clip: rect(30px, 9999px, 80px, 0); }
    15% { clip: rect(80px, 9999px, 10px, 0); }
    20% { clip: rect(40px, 9999px, 60px, 0); }
    25% { clip: rect(20px, 9999px, 90px, 0); }
    30% { clip: rect(70px, 9999px, 30px, 0); }
    35% { clip: rect(50px, 9999px, 10px, 0); }
    40% { clip: rect(10px, 9999px, 40px, 0); }
    45% { clip: rect(90px, 9999px, 20px, 0); }
    50% { clip: rect(30px, 9999px, 60px, 0); }
    55% { clip: rect(60px, 9999px, 10px, 0); }
    60% { clip: rect(20px, 9999px, 80px, 0); }
    65% { clip: rect(50px, 9999px, 30px, 0); }
    70% { clip: rect(80px, 9999px, 50px, 0); }
    75% { clip: rect(10px, 9999px, 20px, 0); }
    80% { clip: rect(40px, 9999px, 70px, 0); }
    85% { clip: rect(70px, 9999px, 40px, 0); }
    90% { clip: rect(20px, 9999px, 90px, 0); }
    95% { clip: rect(60px, 9999px, 10px, 0); }
    100% { clip: rect(30px, 9999px, 50px, 0); }
}

.hero-subtitle-wrapper h2 {
    font-size: 2rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 1.5rem;
    display: inline-block;
}

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

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.btn-secondary {
    background-color: var(--text-primary);
    color: var(--bg-color);
    border: 1px solid var(--text-primary);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 4px;
    transition: all var(--transition-speed) ease;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: transparent;
    color: var(--text-primary);
}

/* Stats Section */
.stats-section {
    background-color: var(--bg-color);
    padding: 4rem 0;
    border-bottom: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Summary Section */
.summary-section {
    padding: 8rem 0;
    text-align: center;
}

.summary-section h3 {
    font-size: 2.5rem;
    max-width: 900px;
    margin: 0 auto 2rem;
    line-height: 1.3;
}

/* Services / Experience Grid */
.services-section {
    padding: 6rem 0;
    background-color: var(--bg-color);
}

.section-title {
    font-size: 3rem;
    margin-bottom: 4rem;
    border-left: 4px solid var(--text-primary);
    padding-left: 1.5rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1px;
    /* Gap for border effect */
    background-color: var(--border-color);
    /* Creates the grid lines */
    border: 1px solid var(--border-color);
}

.service-card {
    background-color: var(--bg-color);
    padding: 3rem 2rem;
    transition: background-color 0.3s ease;
}

.service-card:hover {
    background-color: #0f0f0f;
}

.service-card h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.service-card .subtitle {
    font-size: 0.85rem;
    color: var(--text-primary);
    /* Whiter than normal text */
    text-transform: uppercase;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

/* Timeline Styles */
.timeline {
    position: relative;
    max-width: 600px; /* Reduced width for split layout */
    margin: 0; /* Left align */
    padding: 2rem 0;
}

.experience-section .container {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Align content to left */
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 1px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 4rem;
}

.timeline-marker {
    position: absolute;
    left: -5px;
    top: 0;
    width: 11px;
    height: 11px;
    background-color: var(--bg-color);
    border: 2px solid var(--text-primary);
    border-radius: 50%;
    z-index: 1;
}

.timeline-date {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.timeline-content h3 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.timeline-content .company {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

/* Skills Section - 3D Cloud */
.skills-section {
    perspective: 1000px;
    overflow: hidden;
    padding-top: 0; /* Remove padding to center with black hole */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.skills-header-container {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    pointer-events: none; /* Let clicks pass through to cloud */
    overflow: visible; /* Allow particles to extend beyond */
}

.skills-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#skills-cloud {
    position: relative;
    width: 600px;
    height: 600px;
    transform-style: preserve-3d;
    /* Animation handled by JS for interactivity */
}

.skill-item {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-style: preserve-3d;
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: color 0.3s, text-shadow 0.3s;
    user-select: none;
    text-transform: uppercase;
}

.skill-item:hover {
    color: var(--text-primary);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    z-index: 1000 !important; /* Bring to front on hover visually */
}

.skill-item.active {
    color: var(--text-primary);
    text-shadow: 0 0 20px rgba(255, 255, 255, 1);
}

#skill-detail-overlay {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    max-width: 600px;
    background: rgba(0, 0, 0, 0.8);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

#skill-detail-overlay.visible {
    opacity: 1;
}

#skill-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

#skill-desc {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Projects - Orbit System */
.projects-section {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    perspective: 1000px;
    padding-top: 0; /* Center vertically without header offset */
}

.orbit-wrapper {
    position: relative;
    width: 800px;
    height: 800px;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
}

.orbit-center {
    position: absolute;
    z-index: 20;
    text-align: center;
    pointer-events: none;
    /* Static center text, no rotation */
    overflow: visible; /* Allow particles to extend beyond */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.orbit-center h2 {
    font-size: 3rem;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    letter-spacing: 0.2em;
}

.orbit-container {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    /* Animation handled by JS for interactivity */
    transform: rotateX(60deg);
    cursor: grab;
    top: -50px; /* Correct for perspective shift to center text visually */
}

.orbit-container:active {
    cursor: grabbing;
}

.orbit-track {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform-style: preserve-3d;
}

.project-node {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    transform-style: preserve-3d;
    /* Position on ring */
    transform: rotateZ(var(--angle)) translateY(-450px);
}

.project-card {
    /* Transforms handled by JS */
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 2rem;
    backdrop-filter: blur(8px);
    border-radius: 12px;
    opacity: 0.8;
    width: 280px;
    transform-origin: center center;
    display: block;
    text-decoration: none;
    transition: opacity 0.3s, border-color 0.3s, box-shadow 0.3s;
    /* Initial state */
    transform: translate(-50%, -50%) rotateX(-60deg);
    user-select: none; /* Prevent text selection */
    -webkit-user-drag: none; /* Webkit specific drag prevention */
}

/* Hover Effects */
.project-card:hover {
    opacity: 1;
    border-color: #fff;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
    z-index: 100;
    background: #000;
}

.node-icon {
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    margin: 0 auto 1rem;
    box-shadow: 0 0 10px #fff;
}

.card-content h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.card-content p {
    font-size: 0.8rem;
    color: #aaa;
    display: none; /* Hidden by default */
}

.project-card:hover .card-content p {
    display: block;
    animation: fade-in 0.3s ease;
}

.tech-tag {
    font-size: 0.7rem;
    border: 1px solid #555;
    padding: 2px 6px;
    border-radius: 4px;
    color: #888;
    margin-top: 0.5rem;
    display: inline-block;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Footer / Contact - Space Transmission Theme */
.site-footer {
    padding: 0;
    background-color: transparent;
    border-top: none;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100%;0; /* Center vertically without header offset */
    padding-top: 80px;
}

.contact-universe {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    overflow: visible; /* Allow particles to extend beyond */
}

/* Signal Beacon - Central Element */
/* #contact-text-canvas removed - handled by wrapper */

/* Signal Array - Holographic Theme */
.signal-grid {
    position: relative;
    z-index: 10;
    display: flex;
    gap: 4rem;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    perspective: 1000px;
}

.signal-node {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.3s ease;
    cursor: pointer;
}

/* The Glowing Ring */
.signal-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
    transition: all 0.5s ease;
}

/* Spinning effect on hover */
.signal-node:hover .signal-ring {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    transform: scale(1.2) rotate(180deg);
}

/* Inner Pulse */
.signal-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    opacity: 0;
    transition: all 0.5s ease;
}

.signal-node:hover .signal-pulse {
    width: 160%;
    height: 160%;
    opacity: 0.1;
    animation: spin-slow 10s linear infinite;
}

@keyframes spin-slow {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Core Icon */
.signal-core {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.signal-node:hover .signal-core {
    transform: scale(1.1);
    text-shadow: 0 0 15px white;
    filter: drop-shadow(0 0 5px white);
}

/* Holographic Projection */
.hologram-projection {
    position: absolute;
    bottom: 100px; /* Start above */
    left: 50%;
    transform: translateX(-50%) translateY(20px) scale(0.9);
    width: 250px;
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(5px);
    clip-path: polygon(
        0 0, 
        100% 0, 
        100% 85%, 
        90% 100%, 
        10% 100%, 
        0 85%
    ); /* Sci-fi shape */
}

/* Connecting Beam */
.hologram-projection::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 20px;
    background: linear-gradient(to top, transparent, rgba(255, 255, 255, 0.5));
}

.signal-node:hover .hologram-projection {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
    pointer-events: auto;
}

.holo-label {
    display: block;
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.2rem;
}

.holo-value {
    display: block;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 600;
    word-break: break-all;
}

/* Scanline Effect */
.holo-scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(255, 255, 255, 0.05) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
    .signal-grid {
        flex-direction: column;
        gap: 6rem; /* More space for vertical holograms */
    }
    
    .hologram-projection {
        bottom: auto;
        top: 100px; /* Project downwards on mobile */
        clip-path: polygon(
            10% 0, 
            90% 0, 
            100% 15%, 
            100% 100%, 
            0 100%, 
            0 15%
        );
    }
    
    .hologram-projection::after {
        bottom: auto;
        top: -20px;
        background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.5));
    }
}

.hero-section .section-content-wrapper {
    justify-content: center;
}
