:root {
    --bg-color: #030712;
    --card-bg: rgba(17, 24, 39, 0.7);
    --primary-accent: #38bdf8;
    --secondary-accent: #818cf8;
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --gradient-1: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --nav-height: 80px;
}

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

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Fade In Animation classes */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, visibility;
}

.fade-in-section.visible {
    opacity: 1;
    transform: none;
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 5px;
    height: 5px;
    background-color: var(--primary-accent);
}

.cursor-outline {
    width: 30px;
    height: 30px;
    border: 1px solid var(--primary-accent);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

/* Typography */
h1, h2, h3, h4, .logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    background: rgba(3, 7, 18, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: var(--glass-border);
}

.logo {
    font-size: 1.8rem;
    color: var(--text-primary);
    letter-spacing: -1px;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s;
}

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

/* Navbar Button Override */
.nav-links .btn-primary {
    background: transparent;
    border: 1px solid var(--primary-accent);
    color: var(--primary-accent);
    box-shadow: none;
}

.nav-links .btn-primary:hover {
    background: var(--primary-accent);
    color: var(--bg-color);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-primary {
    background: var(--gradient-1);
    color: #fff;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: var(--glass-border);
}

.btn-primary:hover, .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.4);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    position: relative;
    overflow: hidden;
}

/* Background glow */
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, transparent 70%);
    filter: blur(80px);
    z-index: -1;
}

.hero-content {
    max-width: 600px;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(56, 189, 248, 0.1);
    color: var(--primary-accent);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 480px;
}

.hero-btns {
    display: flex;
    gap: 1rem;
}

.hero-image {
    position: relative;
    width: 450px;
    height: 550px;
}

.image-wrapper {
    width: 100%;
    height: 100%;
    border-radius: 30px;
    overflow: hidden;
    border: var(--glass-border);
    position: relative;
    z-index: 1;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-image:hover .image-wrapper img {
    transform: scale(1.05);
}

.floating-card {
    position: absolute;
    background: rgba(17, 24, 39, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: var(--glass-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 2;
    animation: float 6s ease-in-out infinite;
}

.floating-card i {
    font-size: 1.5rem;
    color: var(--primary-accent);
}

.floating-card span {
    font-weight: 600;
}

.c1 {
    top: 50px;
    left: -40px;
    animation-delay: 0s;
}

.c2 {
    bottom: 80px;
    right: -30px;
    animation-delay: 2s;
}

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

/* Sections */
section {
    padding: 100px 10%;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 4rem;
    text-align: center;
}

/* About Grid */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.about-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    border: var(--glass-border);
    transition: transform 0.3s, border-color 0.3s;
}

.about-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-accent);
}

.about-card i {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-accent);
}

.about-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.about-card p {
    color: var(--text-secondary);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 25px;
    overflow: hidden;
    border: var(--glass-border);
    transition: all 0.3s ease;
    position: relative;
    transition: all 0.3s ease;
    position: relative;
    padding: 0; /* Remove padding from card to let image go full width */
    display: flex;
    flex-direction: column;
}

.project-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block; /* Removes bottom spacing/gap */
}

.project-card:hover .project-thumb img {
    transform: scale(1.05);
}

.card-content {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-card:hover {
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    transform: translateY(-5px);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.project-header h3 {
    font-size: 1.5rem;
    line-height: 1.3;
}

/* Stretched Link Strategy: The Main Title Link covers the card */
.main-link {
    text-decoration: none;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: opacity 0.3s;
}

.main-link::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

.main-link:hover {
    opacity: 0.8;
}

/* Demo Button - Z-index higher to be clickable separately */
.demo-btn {
    position: relative;
    z-index: 2;
    font-size: 0.85rem;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--primary-accent);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.3s;
    border: 1px solid rgba(56, 189, 248, 0.2);
    white-space: nowrap;
}

.demo-btn:hover {
    background: rgba(56, 189, 248, 0.2);
}

.project-subtitle {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.project-desc {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.project-list {
    list-style: none;
    margin-bottom: 1.5rem;
    padding-left: 0;
}

.project-list li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: flex;
    gap: 0.5rem;
}

.tech-stack {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.tech-stack span {
    padding: 0.3rem 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--secondary-accent);
    border: 1px solid rgba(129, 140, 248, 0.2);
}

/* Footer */

/* Footer */
footer {
    background: rgba(3, 7, 18, 0.95);
    padding: 5rem 10% 2rem;
    border-top: var(--glass-border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
}

.footer-left h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 1.8rem;
    transition: transform 0.3s, color 0.3s;
}

.social-links a:hover {
    color: var(--primary-accent);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    color: #4b5563;
    font-size: 0.9rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Responsive */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        text-align: center;
        justify-content: center;
        padding-top: 150px;
    }

    .hero-content {
        margin-bottom: 3rem;
    }

    .hero-btns {
        justify-content: center;
    }

    .hero-image {
        width: 100%;
        max-width: 400px;
        height: auto;
        aspect-ratio: 4/5;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
}

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

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.skills-category {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 25px;
    border: var(--glass-border);
    transition: transform 0.3s;
}

.skills-category:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.3);
}

.skills-category h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--primary-accent);
}

.skills-category h3 i {
    font-size: 1.5rem;
}

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

.skill-list li {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    padding-left: 2rem;
    position: relative;
    transition: color 0.3s;
}

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

.skill-list li:hover {
    color: var(--text-primary);
}

/* Certifications Section */
.cert-grid {
    display: flex;
    justify-content: center;
}

.cert-card {
    background: var(--card-bg);
    padding: 2rem 3rem;
    border-radius: 20px;
    border: var(--glass-border);
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: 600px;
    transition: all 0.3s ease;
    cursor: default;
}

.cert-card:hover {
    border-color: #FF9900; /* AWS Orange-ish */
    box-shadow: 0 0 20px rgba(255, 153, 0, 0.1);
    transform: translateY(-3px);
}

.cert-icon {
    font-size: 3.5rem;
    color: #FF9900;
}

.cert-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.cert-id {
    color: var(--text-secondary);
    font-family: monospace;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.8rem;
    border-radius: 4px;
    display: inline-block;
}

@media (max-width: 768px) {
    .cert-card {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }
}
