@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Outfit:wght@300;500;700;900&display=swap');

:root {
    /* Color Palette - Cinematic Neo-Noir */
    --bg-dark: #020202;
    /* Ink Black */
    --bg-panel: rgba(20, 20, 20, 0.4);
    /* Glassy dark */
    --text-main: #f0f0f0;
    --text-muted: #a0a0a0;

    /* Accents - Tungsten & Electric Cyan */
    --accent-primary: #00f2ff;
    /* Electric Blue/Cyan */
    --accent-secondary: #ffaa00;
    /* Tungsten/Warm Light */
    --accent-glow: rgba(0, 242, 255, 0.3);

    /* Typography - Widescreen Title feel */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing & Layout */
    --container-width: 1400px;
    /* Wider immersive container */
    --section-spacing: 180px;
    /* More breathing room */
    --border-light: rgba(255, 255, 255, 0.05);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    /* Cinematic Atmosphere: Deep Vignette + Subtle Spotlights */
    background-image:
        radial-gradient(circle at 50% 50%, transparent 0%, #000 100%),
        /* Vignette */
        radial-gradient(circle at 10% 20%, rgba(0, 242, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 170, 0, 0.03) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Film Grain Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    /* Noise texture (base64) */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.07'/%3E%3C/svg%3E");
    opacity: 0.5;
}

/* ... existing styles ... */

/* Profile Image Styling */
/* Profile Image Styling (Reverted to Floating) */
.profile-img-container {
    position: relative;
    width: 250px;
    height: 250px;
    margin: 0 auto 30px;
    border-radius: 50%;
    padding: 5px;
    background: linear-gradient(45deg, var(--accent-primary), var(--bg-panel), var(--accent-secondary));
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.profile-img-container:hover {
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Hero Section Modifier (With Hanging Effect) */
.hero-profile {
    width: 180px;
    height: 180px;
    margin: 0 auto 30px;
    z-index: 10;

    /* Hanging Physics */
    transform-origin: 50% -30vh;
    animation: sway 6s ease-in-out infinite alternate;

    /* Realistic Shadow for Hanging */
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.hero-profile:hover {
    animation: sway 6s ease-in-out infinite alternate;
    /* Override float on hover */
}

.hero-profile::before {
    content: '';
    position: absolute;
    top: -30vh;
    /* Long wire from top of screen */
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 30vh;
    background: linear-gradient(to bottom,
            rgba(150, 150, 150, 0.8) 0%,
            rgba(255, 255, 255, 0.5) 50%,
            rgba(150, 150, 150, 0.8) 100%);
    z-index: -1;
}

.hero-profile::after {
    content: '';
    position: absolute;
    top: -30vh;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff, #555);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: -1;
}

/* Subtle Sway Animation */
@keyframes sway {
    0% {
        transform: rotate(-1.5deg);
    }

    100% {
        transform: rotate(1.5deg);
    }
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    filter: grayscale(20%);
    transition: filter 0.3s ease;
    border: 4px solid var(--bg-dark);
}

.profile-img-container:hover .profile-img {
    filter: grayscale(0%);
}

/* Typography Defaults */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: white;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

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

/* Cursor Animation */
.cursor {
    display: inline-block;
    width: 2px;
    background-color: var(--accent-primary);
    animation: blink 1s step-end infinite;
    margin-left: 2px;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* 3D Tilt Pre-requisites */
.stat-card,
.skill-card,
.project-card,
.contact-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.1s ease-out;
    /* Faster for tilt response */
    transform-style: preserve-3d;
    will-change: transform;
}

/* Revert transition for the fade-in effect conflict - we handle tilt separately in JS via style override */

/* Enhance Glassmorphism */
nav,
.stat-card,
.skill-card,
.project-card,
.contact-item,
.contact-form-container {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(10, 10, 10, 0.6);
    /* Slightly more transparent */
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Trigger animation when parent has .visible class */
.fade-in.visible .stat-card,
.fade-in.visible .skill-card,
.fade-in.visible .project-card,
.visible .contact-item {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger Delays */
.fade-in.visible .stat-card:nth-child(1),
.fade-in.visible .skill-card:nth-child(1),
.fade-in.visible .project-card:nth-child(1),
.visible .contact-item:nth-child(1) {
    transition-delay: 0.1s;
}

.fade-in.visible .stat-card:nth-child(2),
.fade-in.visible .skill-card:nth-child(2),
.fade-in.visible .project-card:nth-child(2),
.visible .contact-item:nth-child(2) {
    transition-delay: 0.2s;
}

.fade-in.visible .stat-card:nth-child(3),
.fade-in.visible .skill-card:nth-child(3),
.fade-in.visible .project-card:nth-child(3),
.visible .contact-item:nth-child(3) {
    transition-delay: 0.3s;
}

.fade-in.visible .stat-card:nth-child(4),
.fade-in.visible .skill-card:nth-child(4),
.fade-in.visible .project-card:nth-child(4) {
    transition-delay: 0.4s;
}

.fade-in.visible .stat-card:nth-child(5),
.fade-in.visible .skill-card:nth-child(5),
.fade-in.visible .project-card:nth-child(5) {
    transition-delay: 0.5s;
}

.fade-in.visible .stat-card:nth-child(6),
.fade-in.visible .skill-card:nth-child(6),
.fade-in.visible .project-card:nth-child(6) {
    transition-delay: 0.6s;
}

.fade-in.visible .stat-card:nth-child(7),
.fade-in.visible .skill-card:nth-child(7),
.fade-in.visible .project-card:nth-child(7) {
    transition-delay: 0.7s;
}

/* Keep existing fade-in for section titles etc */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Cinematic Blur Reveal */
.blur-in {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(20px) scale(0.98);
    transition: opacity 1.2s ease, transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), filter 1.2s ease;
    will-change: opacity, transform, filter;
}

.blur-in.visible {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
}

/* About Section Staggers */
.profile-section.blur-in.visible {
    transition-delay: 0s;
}

.about-text .blur-in:nth-of-type(1) {
    transition-delay: 0.2s;
}

.about-text .blur-in:nth-of-type(2) {
    transition-delay: 0.4s;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: padding 0.3s ease;
}

nav.scrolled {
    padding: 15px 0;
    background: rgba(5, 5, 5, 0.9);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    color: white;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    position: relative;
}

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

.nav-links a:hover,
.nav-links a.active {
    color: white;
}

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

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-dark) 90%);
    /* Vignette */
    z-index: 1;
    pointer-events: none;
}

/* Cinematic Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: white;
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    /* Wide spacing like movie titles */
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-content .hero-title {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    /* Space between words */
    font-size: 6.5vw;
    /* Large and bold */
    font-weight: 900;
    margin-bottom: 20px;
    perspective: 1000px;
    cursor: default;
}

@media (min-width: 1200px) {
    .hero-content .hero-title {
        gap: 1.5rem;
    }
}

.word {
    display: flex;
    gap: 0.1em;
    /* Tight letter spacing within words */
}

.char {
    display: inline-block;
    color: transparent;
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.4);
    background: linear-gradient(135deg,
            #ffffff 0%,
            #a0a0a0 40%,
            #ffffff 50%,
            #a0a0a0 60%,
            #ffffff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow:
        0 0 15px rgba(0, 242, 255, 0.2),
        0 10px 20px rgba(0, 0, 0, 0.5);

    opacity: 0;
    transform: translateZ(-50px) scale(0.8) rotateX(10deg);
    filter: blur(10px);

    animation: cinematic-reveal 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: calc(0.1s * var(--i) + 0.3s);

    transition: all 0.4s ease;
}

/* Shimmer Effect Animation */
@keyframes glimmer {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

/* Reveal Animation */
@keyframes cinematic-reveal {
    0% {
        opacity: 0;
        transform: translateZ(-50px) scale(0.8) rotateX(20deg);
        filter: blur(15px);
    }

    100% {
        opacity: 1;
        transform: translateZ(0) scale(1) rotateX(0deg);
        filter: blur(0);
        text-shadow:
            0 0 20px rgba(0, 242, 255, 0.2),
            0 0 40px rgba(0, 242, 255, 0.1);
    }
}

/* Hover Interaction */
.hero-title:hover .char {
    text-shadow:
        0 0 20px rgba(0, 242, 255, 0.6),
        0 0 40px rgba(0, 242, 255, 0.3),
        0 0 80px rgba(0, 242, 255, 0.1);
    -webkit-text-stroke: 1px rgba(0, 242, 255, 0.5);
    transform: scale(1.02) translateY(-2px);
    transition-delay: 0s !important;
    /* Instant reaction on hover */
}

/* Add shimmer on load completion */
.char {
    /* Adding a secondary animation for the shimmer loop after reveal */
    animation:
        cinematic-reveal 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards,
        glimmer 6s linear infinite;
    animation-delay: calc(0.1s * var(--i) + 0.3s), calc(0.1s * var(--i) + 1.5s);
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 0.4em;
    /* Extremely wide for elegance */
    opacity: 0.7;
}

.subtitle .accent-text {
    color: var(--accent-primary);
    margin: 0 10px;
}

.tagline {
    font-size: 1.1rem;
    color: var(--text-main);
    max-width: 600px;
    margin: 0 auto 40px;
    opacity: 0.8;
}

/* Buttons */
/* Cyber Magnetic Button */
.btn {
    display: inline-block;
    padding: 18px 45px;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    background: rgba(0, 242, 255, 0.02);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 10;
    backdrop-filter: blur(5px);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.1);
}

/* Scanline Background */
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 300%;
    height: 100%;
    background: repeating-linear-gradient(60deg,
            transparent,
            transparent 10px,
            rgba(0, 242, 255, 0.1) 10px,
            rgba(0, 242, 255, 0.1) 20px);
    transition: transform 0.6s ease;
    z-index: -1;
    opacity: 0.5;
}

.btn:hover {
    color: #fff;
    box-shadow: 0 0 25px rgba(0, 242, 255, 0.6), inset 0 0 15px rgba(0, 242, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8), 2px 2px 0px rgba(0, 242, 255, 0.5), -1px -1px 0px rgba(255, 0, 85, 0.5);
    /* Glitch Shadow */
    transform: scale(1.05);
}

.btn:hover::before {
    transform: translateX(20%);
}

/* Glitch Animation Keyframes */
@keyframes btn-glitch {
    0% {
        clip-path: inset(80% 0 0 0);
        transform: translate(-2px, 1px);
    }

    10% {
        clip-path: inset(10% 0 80% 0);
        transform: translate(2px, -1px);
    }

    20% {
        clip-path: inset(80% 0 20% 0);
        transform: translate(-2px, 2px);
    }

    30% {
        clip-path: inset(10% 0 60% 0);
        transform: translate(1px, -1px);
    }

    40% {
        clip-path: inset(50% 0 30% 0);
        transform: translate(-1px, 2px);
    }

    50% {
        clip-path: inset(10% 0 50% 0);
        transform: translate(1px, -2px);
    }

    60% {
        clip-path: inset(40% 0 40% 0);
        transform: translate(-2px, 1px);
    }

    70% {
        clip-path: inset(20% 0 60% 0);
        transform: translate(2px, -1px);
    }

    80% {
        clip-path: inset(70% 0 10% 0);
        transform: translate(-1px, 2px);
    }

    90% {
        clip-path: inset(20% 0 50% 0);
        transform: translate(1px, -2px);
    }

    100% {
        clip-path: inset(0 0 0 0);
        transform: translate(0);
    }
}

.btn::after {
    content: 'Get in Touch';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    z-index: 11;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    pointer-events: none;
}

.btn:hover::after {
    opacity: 1;
    animation: btn-glitch 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
    color: var(--accent-secondary);
}

/* On click effect */
.btn:active {
    transform: scale(0.95);
}

/* Sections General */
section {
    padding: var(--section-spacing) 0;
    position: relative;
}

.section-title {
    font-size: 3rem;
    text-align: left;
    margin-bottom: 60px;
    position: relative;
    display: inline-block;
}

.section-title .accent-text {
    color: var(--accent-primary);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-primary);
    margin-top: 10px;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 60px;
    align-items: center;
}

.about-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.profile-section {
    display: flex;
    justify-content: center;
}

/* ... existing code ... */

.about-text {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
}

/* ... existing code ... */

/* Scroll To Top Button */
#scrollTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.2);
    backdrop-filter: blur(5px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

#scrollTopBtn.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

#scrollTopBtn:hover {
    background: var(--accent-primary);
    color: black;
    box-shadow: 0 0 25px rgba(0, 242, 255, 0.6);
    transform: translateY(-5px);
}

#scrollTopBtn svg {
    transition: transform 0.3s ease;
}

#scrollTopBtn:hover svg {
    transform: translateY(-3px);
}

/* Typewriter Effect Utilities */
.char-hidden {
    opacity: 0;
    transition: opacity 0.05s ease;
}

@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.about-text p {
    margin-bottom: 20px;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-card {
    background: var(--bg-panel);
    padding: 30px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Cinematic Shine Animation */
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), rgba(0, 242, 255, 0.1), transparent);
    transform: skewX(-25deg);
    animation: cinematic-shine 5s infinite linear;
    pointer-events: none;
}

@keyframes cinematic-shine {
    0% {
        left: -150%;
    }

    20% {
        left: 150%;
    }

    100% {
        left: 150%;
    }
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--accent-primary);
    box-shadow: 0 15px 35px rgba(0, 242, 255, 0.15), inset 0 0 20px rgba(0, 242, 255, 0.05);
    background: rgba(20, 20, 20, 0.8);
}

.stat-card:hover h3 {
    color: var(--accent-primary);
}

.stat-card h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.stat-card p {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
}

/* Skills - Refined & Polished */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    /* Slightly wider minimum */
    gap: 40px;
    /* Increased breathing room */
}

.skill-card {
    background: rgba(10, 10, 10, 0.6);
    /* Darker, glassier background */
    padding: 50px 40px;
    /* More padding for elegance */
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    /* Softer corners */
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    backdrop-filter: blur(10px);
}

/* Subtle Glow Border on Hover */
.skill-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    box-shadow: inset 0 0 20px rgba(0, 242, 255, 0.0);
    transition: box-shadow 0.4s ease;
    pointer-events: none;
    z-index: 2;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    /* Slightly thicker */
    height: 100%;
    background: var(--accent-primary);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 3;
}

.skill-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 242, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    background: rgba(15, 20, 25, 0.8);
}

.skill-card:hover::after {
    box-shadow: inset 0 0 30px rgba(0, 242, 255, 0.05);
    /* Very subtle internal glow */
}

.skill-card:hover::before {
    opacity: 1;
    box-shadow: 0 0 15px var(--accent-primary);
}

/* Skill Icons */
.skill-card .icon {
    font-size: 3rem;
    /* Larger, more impactful */
    margin-bottom: 25px;
    color: var(--accent-primary);
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), text-shadow 0.4s ease;
    /* Removed default float animation for cleaner look, added hover interaction instead */
}

.skill-card:hover .icon {
    transform: scale(1.1);
    text-shadow: 0 0 25px rgba(0, 242, 255, 0.8);
}

.skill-card h3 {
    font-size: 1.2rem;
    /* Refined size */
    font-weight: 700;
    margin-bottom: 12px;
    color: #fff;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.skill-card:hover h3 {
    color: var(--accent-primary);
}

.skill-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.7;
    /* Subtler for hierarchy */
    transition: opacity 0.3s ease;
}

.skill-card:hover p {
    opacity: 1;
    /* Highlight on interaction */
}

/* Portfolio Work */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 Column layout */
    gap: 30px;
}

.project-card {
    position: relative;
    height: 400px;
    background: var(--bg-panel);
    border: 1px solid var(--border-light);
    overflow: hidden;
    cursor: pointer;
}

.project-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-color: #111;
    /* Fallback */
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    filter: grayscale(100%);
}

.project-card:hover .project-img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

/* Overlay Info */
.project-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(to top, black, transparent);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
}

.project-card:hover .project-info {
    transform: translateY(0);
    opacity: 1;
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.project-info p {
    color: var(--accent-primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Contact */
.contact-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.contact-wrapper p {
    font-size: 1.5rem;
    max-width: 800px;
    margin-bottom: 50px;
    color: var(--text-main);
}

.contact-links {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.contact-item {
    padding: 20px 40px;
    border: 1px solid var(--border-light);
    border-radius: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 250px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-primary);
    transform: translateY(-5px);
}

.contact-item .label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 5px;
    letter-spacing: 0.1em;
}

.contact-item .value {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
}

/* Contact Links Layout */
.contact-links.center-layout {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
}

/* Connect With Me - Holographic Orb Effect */
.contact-item {
    position: relative;
    overflow: hidden;
    padding: 2px;
    /* For border space */
    border-radius: 50px;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 250px;
    transition: all 0.3s ease;
    z-index: 10;
    /* Clean slate for custom border */
    border: none;
}

/* Inner Card Content */
.contact-item-content {
    background: rgba(10, 10, 10, 0.9);
    width: 100%;
    height: 100%;
    border-radius: 48px;
    padding: 20px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    backdrop-filter: blur(10px);
}

/* Rotating Border */
.contact-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent,
            transparent,
            transparent,
            var(--accent-primary));
    animation: rotate-border 4s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-item::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent,
            transparent,
            transparent,
            var(--accent-primary));
    animation: rotate-border 4s linear infinite;
    animation-delay: -2s;
    /* Offset for double border feel */
    opacity: 0;
    transition: opacity 0.3s ease;
}

@keyframes rotate-border {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.contact-item:hover::before,
.contact-item:hover::after {
    opacity: 1;
}

/* Glow Pulse on Hover */
.contact-item:hover .contact-item-content {
    box-shadow: inset 0 0 20px rgba(0, 242, 255, 0.1);
    background: rgba(5, 5, 5, 0.8);
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.2);
}

/* Text Styles */
.contact-item .label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 5px;
    letter-spacing: 0.1em;
    position: relative;
    z-index: 3;
}

.contact-item .value {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    position: relative;
    z-index: 3;
    transition: color 0.3s ease;
}

.contact-item:hover .value {
    color: var(--accent-primary);
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
}

.contact-item .label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 5px;
    letter-spacing: 0.1em;
    transition: color 0.3s ease;
}

.contact-item:hover .label {
    color: var(--accent-primary);
    text-shadow: 0 0 5px var(--accent-primary);
}

/* Footer */
footer {
    padding: 50px 0;
    border-top: 1px solid var(--border-light);
    margin-top: 80px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Media Queries */
@media (max-width: 900px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-content h1 {
        font-size: 12vw;
    }
}

@media (max-width: 768px) {
    /* No contact-grid to modify */
}

@media (max-width: 600px) {

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

    .contact-links.center-layout {
        flex-direction: column;
        align-items: center;
    }
}

.char-hidden {
    opacity: 0;
    transition: opacity 0.05s ease;
}

/* Media Queries */
@media (max-width: 1200px) {
    .container {
        padding: 0 40px;
    }
}

@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-text {
        text-align: left;
        /* Keep text readable */
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-content h1 {
        font-size: 8vw;
    }
}

@media (max-width: 768px) {
    :root {
        --section-spacing: 100px;
        /* Reduced spacing */
    }

    .hero-content .hero-title {
        font-size: 10vw;
        gap: 0.5rem;
    }

    /* Adjust Hanging Photo for Mobile */
    .hero-profile {
        width: 120px;
        height: 120px;
        margin-bottom: 20px;
        /* Physics adjustment for shorter visual space if needed */
        transform-origin: 50% -30vh;
    }

    .hero-profile::before,
    .hero-profile::after,
    .hero-profile {
        /* Ensure wire length matches visual expectations */
        /* top: -30vh is relative to viewport, so it stays pinned to top */
    }

    .about-grid {
        gap: 40px;
    }

    .stat-card {
        padding: 20px;
    }
}

@media (max-width: 600px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .contact-links.center-layout {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .contact-item {
        width: 100%;
        min-width: unset;
    }

    .hero-content .hero-title {
        font-size: 13vw;
        /* Larger font for small screens to fill width */
    }

    .nav-links {
        display: none;
        /* Hide nav for super small screens or implement hamburger later */
    }
}