:root {
    --primary: #C51162; 
    --dark: #0f172a;    
    --light: #f8fafc;   
    --gray: #64748b;    

    /* Shadow calculations for dark background */
    --shadow-light: rgba(255, 255, 255, 0.05);
    --shadow-dark: rgba(0, 0, 0, 0.5);
}

/* Base Reset */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    cursor: auto;
    font-family: 'Space Mono', monospace, system-ui;
    margin: 0;
    background-color: var(--dark);
    color: var(--light);
    line-height: 1.6;
    min-height: 100vh;
    /* User selection prevention */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    overflow-x: hidden;
}

footer {
    border-top: 3px solid var(--primary);
    border-radius: 15px 15px 0 0;
    box-shadow: 4px 0 20px rgba(197, 17, 98, 0.4);
    background: rgb(15, 23, 42);
    color: var(--light);
    text-align: center;
    padding: 1px;
    position: relative;
    bottom: 0;
    z-index: 100;
}

footer a {
    color: #855000;
    text-decoration: none;
}

.codehs a {
    color: cadetblue;
    text-decoration: none;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 10%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 0 0 15px 15px;
    border-bottom: 1px solid var(--primary);
    box-shadow: 0 4px 20px rgba(197, 17, 98, 0.4);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo { 
    font-size: 1.5rem; 
    font-weight: bold; 
    color: var(--primary); 
}

.logo a { 
    text-decoration: none; 
    color: inherit; 
}

.nav-links a { 
    color: var(--light); 
    text-decoration: none; 
    margin-left: 2rem; 
    transition: color 0.3s ease;
}

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

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    text-align: center;
}

.hero h1 { 
    font-size: clamp(2.5rem, 8vw, 3.5rem); /* Responsive font size */
    margin-bottom: 1rem; 
    line-height: 1.1;
}

.hero p { 
    font-size: 1.2rem; 
    color: var(--gray); 
    max-width: 600px; 
}

/* Portfolio Grid */
.projects { 
    padding: 5rem 10%;
}

.projects h2 {
    text-align: center;
    margin-bottom: 2rem;
}

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

.card {
    background: #1e293b;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.card h3 a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
}

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

/* Buttons */
.btn {
    background: var(--primary);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    margin-top: 2rem;
    transition: opacity 0.3s ease;
}

.btn:hover {
    opacity: 0.9;
}

.pill-btn {
    border: none;
    outline: none;
    padding: 15px 40px;
    border-radius: 50px; /* Standard pill shape */ 
    font-weight: 600;
    margin: 10px;
    transition: all 0.2s ease-in-out;
    background-color: var(--dark);
    color: var(--light);
    box-shadow: 8px 8px 16px var(--shadow-dark), 
                -4px -4px 12px var(--shadow-light);
}

.pill-btn.primary {
    color: var(--primary);
}

.pill-btn:active, .pill-btn.secondary:hover {
    box-shadow: inset 6px 6px 12px var(--shadow-dark), 
                inset -4px -4px 12px var(--shadow-light);
    color: var(--gray);
    transform: scale(0.96);
}

/* Link Cursor */
a {
    cursor: pointer;
}

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

.gcard {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow-dark);
    margin: 10px;
    border: 1px solid transparent;
    transition: 0.3s ease;
    background: #1e293b; /* Fallback for --grey variable */
}

.gcard:hover { 
    border-color: var(--primary); 
    transform: translateY(-5px); 
    box-shadow: 0 8px 24px rgba(197, 17, 98, 0.3);
}

.gcard img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    display: block;
}

.gcard-body {
    padding: 20px;
}

.gcard-title {
    font-size: 1.5rem;
    margin: 0 0 10px 0;
    color: #ffffff;
}

.gcard-title a {
    text-decoration: none;
    color: inherit;
}

.gcard-description {
    font-size: 0.95rem;
    color: var(--gray);
    line-height: 1.5;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    nav {
        padding: 1rem 5%;
    }
    .nav-links {
        display: none;
    }
    .hero {
        padding: 0 5%;
    }
}