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

:root {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --accent-color: #4a90e2;
    --card-bg: #1e1e1e;
    --border-color: #333;
    
    /* Dynamic cursor variables updated by JS */
    --cursor-x: 50%;
    --cursor-y: 50%;
}

[data-theme="light"] {
    --bg-color: #f8fafc;
    --text-color: #1e293b;
    --accent-color: #2563eb;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
}

[data-theme="light"] body {
    background: radial-gradient(circle at var(--cursor-x) var(--cursor-y), #ffffff 0%, var(--bg-color) 60%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Interactive subtle gradient based on cursor */
    background: radial-gradient(circle at var(--cursor-x) var(--cursor-y), #1a1a2e 0%, var(--bg-color) 60%);
    overflow-x: hidden;
    line-height: 1.6;
    transition: opacity 0.4s ease-in-out, background-color 0.3s ease, color 0.3s ease;
}

body.fade-out {
    opacity: 0;
}

/* Custom Cursor Glow effect */
.cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(74, 144, 226, 0.05) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
}

/* Navigation */
nav {
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10;
}

.logo {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    text-decoration: none;
    color: var(--text-color);
    position: relative;
    display: inline-block;
    transition: transform 0.2s ease-out;
}

.logo:hover {
    transform: scale(0.85);
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.logo:hover::after {
    width: 100%;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #888;
    font-size: 0.95rem;
    transition: color 0.3s ease, transform 0.2s ease;
    position: relative;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-color);
    transform: translateY(-2px);
}

/* Layout Utilities */
main {
    flex-grow: 1;
    padding: 2rem 5%;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Subtle Asymmetry Classes */
.asym-left { margin-right: 5%; }
.asym-right { margin-left: 5%; }
.asym-tilt-left { transform: rotate(-1deg); }
.asym-tilt-right { transform: rotate(1deg); }

/* Interactive Asymmetry - applied via JS to slightly shift based on cursor */
.interactive-element {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

/* Typography */
h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 600;
    letter-spacing: -1px;
    margin-bottom: 1rem;
    line-height: 1.1;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

p {
    color: #aaa;
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 70vh;
}

.hero-subtitle {
    color: var(--accent-color);
    font-family: monospace;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: block;
}

.hero p {
    font-size: 1.1rem;
}

.home-header-bg {
    background-image: linear-gradient(to bottom, rgba(18, 18, 18, 0.6), var(--bg-color)), url('enhanced_header.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 16px;
    padding: 3rem;
    margin-top: -1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .home-header-bg {
    background-image: linear-gradient(to bottom, rgba(248, 250, 252, 0.6), var(--bg-color)), url('enhanced_header.png');
}



/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    /* Subtle initial asymmetry */
}

.card:nth-child(even) {
    transform: translateY(15px);
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255,255,255,0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 0;
}

.card:hover::before {
    opacity: 1;
}

.card > * {
    position: relative;
    z-index: 1;
}

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

[data-theme="light"] .card h3 {
    color: #000;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.card-tags span {
    background: rgba(74, 144, 226, 0.1);
    color: var(--accent-color);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: monospace;
}

.project-section-title {
    margin-top: 4rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

/* Skills Group */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.skill-category h3 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 1rem;
}

.skill-list {
    list-style: none;
}

.skill-list li {
    color: #aaa;
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.2rem;
}

.skill-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* Contact Form */
.contact-container {
    width: 100%;
}

.contact-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.contact-links a {
    color: var(--text-color);
    text-decoration: none;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.contact-links a:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--accent-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

input, textarea {
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 1rem;
    color: var(--text-color);
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s ease;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

button {
    background: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    padding: 0.8rem 2rem;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

button:hover {
    background: rgba(74, 144, 226, 0.1);
    transform: translateY(-2px);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: #555;
    font-size: 0.85rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .card:nth-child(even) {
        transform: none; /* Remove asymmetry on mobile for cleaner look */
    }
    
    h1 {
        font-size: 2.5rem;
    }
}

/* Role Flow Animation */
.role-flow {
    margin-bottom: 1.5rem;
    color: var(--accent-color);
    font-family: monospace;
    font-size: 1.1rem;
}

[data-theme="light"] .role-flow {
    color: #000;
}

.blinking-cursor {
    font-weight: bold;
    animation: blink 1s step-end infinite;
}

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

/* Welcome Badge */
.welcome-badge {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1.2rem;
    background: rgba(74, 144, 226, 0.1);
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 50px;
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    animation: floatBadge 3s ease-in-out infinite;
}

[data-theme="light"] .welcome-badge {
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.3);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.1);
    color: #000;
}

@keyframes floatBadge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
