/*
 * GENERAL STYLES & RESETS
 */
:root {
    --color-background: #0B0B0C; /* near black */
    --color-surface: #121214; /* slightly lighter surface */
    --color-primary: #E6E6E6; /* light grey accent for high contrast */
    --color-secondary: #B3B3B3; /* medium grey for secondary accents */
    --color-text-light: #F6F7F8; /* near-white text */
    --color-text-muted: #8C9196; /* muted grey text */
    --color-border: #2B2B2D; /* subtle border grey */
    --font-family-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-background);
    color: var(--color-text-light);
    font-family: var(--font-family-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--color-secondary);
}

hr {
    border: none;
    height: 1px;
    background-color: var(--color-text-muted);
    margin: 40px 0;
    opacity: 0.2; /* Subtle divider */
}

/*
 * HEADER & NAVIGATION
 */
header {
    background-color: var(--color-surface); /* replaced hard hex */
    background-image: url("deuterium_tube.jpg");
    background-position: center;
    padding: 60px 0 20px;
    text-align: center;
    border-bottom: 2px solid var(--color-primary);
}

header h1 {
    font-size: 3em;
    margin-bottom: 5px;
    color: var(--color-surface);
}

nav {
    background-color: var(--color-surface); /* replaced hard hex */
    padding: 10px 0;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

nav a {
    color: var(--color-text-light);
    margin: 0 15px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav a:hover {
    background-color: var(--color-secondary);
    color: var(--color-text-light);
}

/*
 * MAIN CONTENT & SECTIONS
 */
main {
    padding: 40px 0;
}

section {
    margin-bottom: 60px;
}

h2 {
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-text-muted);
    padding-bottom: 10px;
    margin-bottom: 25px;
    font-size: 2em;
}

/* Social Links */
.social-links {
    margin-top: 20px;
}

.social-links a {
    color: var(--color-text-light);
    margin-right: 20px;
    font-size: 1.5em;
    transition: color 0.3s, transform 0.3s;
}

.social-links a:hover {
    color: var(--color-primary);
    transform: translateY(-2px);
}

/* Project Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--color-surface); /* replaced hard hex */
    padding: 25px;
    border-radius: 8px;
    border: 1px solid var(--color-border); /* replaced hard hex */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.6), 0 0 10px var(--color-primary); /* "Glow" in grayscale */
}

.project-card h3 {
    margin-bottom: 10px;
    font-size: 1.5em;
}

.project-card h3 a {
    color: var(--color-primary);
}

.project-tech {
    color: var(--color-secondary); /* switched from bluish to neutral grey */
    font-style: italic;
    margin-bottom: 15px;
    font-size: 0.9em;
}

.cta-button {
    display: inline-block;
    background-color: var(--color-secondary);
    color: var(--color-text-light);
    padding: 10px 20px;
    border-radius: 4px;
    margin-top: 15px;
    transition: background-color 0.3s;
    font-weight: bold;
}

.cta-button:hover {
    background-color: var(--color-primary);
    color: var(--color-text-light);
}

/*
 * FOOTER
 */
footer {
    background-color: var(--color-surface); /* replaced hard hex */
    text-align: center;
    padding: 20px 0;
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-border); /* replaced hard hex */
}

/*
 * JAVASCRIPT ANIMATION CLASS
 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease-out, transform 0.8s ease-out;
}

.visible {
    opacity: 1;
    transform: translateY(0);
}