/* 
 * Zaid Khan - AI/ML Engineer Portfolio 
 * Theme: Dark Green / Mint / Minimalist
 */

:root {
    /* Color Palette */
    --bg-color: #05110f;
    /* Very dark green, almost black */
    --bg-secondary: #0a1f1c;
    /* Slightly lighter dark green */
    --text-primary: #e6f7f5;
    /* White with mint tint */
    --text-secondary: #8ab6b0;
    /* Muted mint */
    --accent-color: #4fd1c5;
    /* Bright Mint */
    --accent-glow: rgba(79, 209, 197, 0.2);

    /* Glassmorphism */
    --glass-bg: rgba(10, 31, 28, 0.7);
    --glass-border: rgba(79, 209, 197, 0.1);
    --glass-blur: 16px;

    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 70px;

    /* Transitions */
    --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
}

[data-theme="light"] {
    --bg-color: #f0fdfa;
    /* Very light mint */
    --bg-secondary: #ffffff;
    /* White */
    --text-primary: #134e4a;
    /* Dark green text */
    --text-secondary: #5f8d89;
    /* Muted green */
    --accent-color: #0d9488;
    /* Teal/Mint darken */
    --accent-glow: rgba(13, 148, 136, 0.1);

    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(13, 148, 136, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    cursor: default;
    /* Fallback */
}

/* Custom Cursor - Themed Arrow */
/* Custom Cursor - Dynamic Circle */
body,
a,
button,
input,
textarea {
    /* Dark Mode (Default): Mint Circle */
    cursor: url('data:image/svg+xml;utf8,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="6" fill="%234fd1c5" fill-opacity="0.8"/></svg>') 12 12, auto;
}

/* Hover State - Dark Mode: Larger Ring */
a:hover,
button:hover,
.btn:hover {
    cursor: url('data:image/svg+xml;utf8,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="8" stroke="%234fd1c5" stroke-width="2" fill="none"/></svg>') 12 12, pointer;
}

[data-theme="light"] body,
[data-theme="light"] a,
[data-theme="light"] button,
[data-theme="light"] input,
[data-theme="light"] textarea {
    /* Light Mode: Dark Circle */
    cursor: url('data:image/svg+xml;utf8,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="6" fill="%2305110f" fill-opacity="0.8"/></svg>') 12 12, auto;
}

[data-theme="light"] a:hover,
[data-theme="light"] button:hover,
[data-theme="light"] .btn:hover {
    /* Light Mode Hover: Dark Ring */
    cursor: url('data:image/svg+xml;utf8,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="8" stroke="%2305110f" stroke-width="2" fill="none"/></svg>') 12 12, pointer;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

ul {
    list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.25rem;
}

h3 {
    font-size: 1.5rem;
}

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

/* Utility Classes */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: 80px 0;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
}

.text-gradient {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #05110f;
    /* Dark text for contrast on mint */
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--accent-glow);
    filter: brightness(110%);
}

.btn-secondary {
    background: rgba(79, 209, 197, 0.15);
    /* Stronger visibility, distinct from tags */
    border: 1px solid rgba(79, 209, 197, 0.3);
    /* Visible border */
    color: var(--text-primary);
    border-radius: 8px;
    /* More squared */
}

.btn-secondary:hover {
    background: rgba(79, 209, 197, 0.25);
    border-color: var(--accent-color);
    color: var(--accent-color);
    box-shadow: 0 0 15px rgba(79, 209, 197, 0.1);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-color);
}

/* Mobile Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 101;
}

.bar {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
}

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

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 100%;
}

.hero-img-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.profile-pic {
    width: 320px;
    height: 380px;
    /* Increased vertical space by ~20% */
    object-fit: cover;
    border-radius: 24px;
    border: 2px solid var(--glass-border);
    box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.profile-pic:hover {
    transform: scale(1.02);
}

.quote-banner {
    padding: 40px 0;
    background: linear-gradient(90deg, transparent, rgba(79, 209, 197, 0.05), transparent);
    text-align: center;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    margin-top: 0;
}

@media (max-width: 900px) {
    .profile-pic {
        width: 250px;
        height: 250px;
    }
}


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

    .hero-content {
        margin: 0 auto;
    }

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

.hero-sub {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.85rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    display: block;
    font-weight: 600;
}

/* Cards (Projects/Skills) */
/* Masonry Layout */
.grid-3 {
    column-count: 2;
    column-gap: 32px;
}

@media (max-width: 1024px) {
    .grid-3 {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .grid-3 {
        column-count: 1;
    }
}

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    padding: 24px;
    /* Reduced from 32px for better density */
    border-radius: 16px;
    transition: all 0.3s var(--ease-out);
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
    /* Space between items in masonry */
    break-inside: avoid;
    /* Prevent split across columns */
    display: flex;
    flex-direction: column;
}

.card h3 {
    margin-top: 16px;
    margin-bottom: 8px;
    font-size: 1.25rem;
    /* Slightly smaller for better balance */
}

.card p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-up {
    opacity: 0;
    animation: fadeInUp 0.8s var(--ease-out) forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 70%;
        background: var(--bg-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        border-left: 1px solid var(--glass-border);
    }

    .nav-links.active {
        transform: translateX(0);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }
}