/* Global Variables & Reset */
:root {
    /* Vibrant "Electric Deep" Palette */
    --bg-color: #030712;
    /* Ultra Deep Navy */
    --sidebar-bg: rgba(10, 15, 30, 0.6);
    /* Slightly more blue-ish tint */

    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    /* Brighter, better readability */

    /* Main Gradient: Cyan -> Indigo -> Purple */
    --accent-color: #22d3ee;
    /* Fallback Cyan */
    --accent-gradient: linear-gradient(135deg, #22d3ee 0%, #8b5cf6 50%, #d946ef 100%);
    --accent-glow: rgba(139, 92, 246, 0.5);

    --card-bg: rgba(17, 24, 39, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);

    --font-main: 'Inter', sans-serif;
    --sidebar-width: 280px;
}

/* Self-hosted Inter Font (Variable) */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/Inter-Variable.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

html {
    scroll-behavior: smooth;
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    scrollbar-gutter: stable;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    /* Fade in animation handled by View Transitions or simple CSS if needed */
}

/* Utility Classes */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

h1,
h2,
h3 {
    line-height: 1.2;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

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

.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 30px rgba(139, 92, 246, 0.3));
}

/* Global Background Canvas */
.global-canvas {
    position: fixed;
    /* Fixed to stay in background */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: radial-gradient(circle at 50% 0%, #111827, #030712);
}

/* Subtle Noise Texture */
.global-canvas::after {
    content: "";
    position: absolute;
    inset: 0;
    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.05'/%3E%3C/svg%3E");
    opacity: 0.03;
    z-index: 10;
    mix-blend-mode: overlay;
}

.parallax-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    will-change: transform;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s infinite alternate ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.4) 0%, rgba(34, 211, 238, 0) 70%);
    animation-delay: -5s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.4) 0%, rgba(168, 85, 247, 0) 70%);
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(30px, 50px) scale(1.1);
    }

    100% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Main Content Layout */
.main-content {
    margin-left: 0;
    width: 100%;
    position: relative;
    z-index: 1;
}

@media (min-width: 1025px) {
    .main-content {
        margin-left: var(--sidebar-width);
        width: calc(100% - var(--sidebar-width));
    }
}

/* Section Base Styles */
section {
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem 0;
    position: relative;
    z-index: 1;
    background: transparent;
}

section h2 {
    width: 100%;
    text-align: center;
    margin-bottom: 0.5rem;
}

section > .container > p {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: -0.5rem;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    column-gap: 4rem;
    row-gap: 1.5rem;
    align-items: start;
}

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

.about-content p:last-child {
    margin-bottom: 0;
}

.skills-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.skills-list,
.toolbox-list {
    display: flex;
    flex-wrap: wrap;
    column-gap: 0.75rem;
    row-gap: 0.4rem;
    margin-top: 1rem;
}

.skills-group h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.skill-tag,
.tool-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.tool-tag {
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.5);
}

.skill-tag:hover,
.tool-tag:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(56, 189, 248, 0.15);
    box-shadow: 0 0 15px rgba(34, 211, 238, 0.3);
}

/* Portfolio item anchor variant */
a.portfolio-item {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.portfolio-logo {
    width: 75%;
    height: 75%;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.1));
    transition: all 0.5s ease;
}

.portfolio-item:hover .portfolio-logo {
    transform: scale(1.05);
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.1)) blur(5px);
    opacity: 0.6;
}

.image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive */
@media (max-width: 1200px) {
    section {
        padding: 5rem 0;
    }
}

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

    .main-content {
        padding-top: 80px;
    }
}

/* Delay Utilities */
.delay-1 { transition-delay: 0.1s; animation-delay: 0.2s; }
.delay-2 { transition-delay: 0.2s; animation-delay: 0.4s; }
.delay-3 { transition-delay: 0.3s; animation-delay: 0.6s; }