/* --- Core Variables --- */
:root {
    --bg: #050505;
    --accent: #00d4ff;
    --text-main: #ffffff;
    --text-dim: #a1a1a1;  
    --card-inner: #0d0d0d;
    --border: #222222;
    --transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    --container-width: 1100px;
}

/* --- Base Styles --- */
*, *::before, *::after { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg); /* Prevents white flash on load */
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* --- Navigation & Layout --- */
.container { 
    position: relative; 
    z-index: 10; 
    max-width: var(--container-width); 
    margin: 0 auto; 
    padding: 0 24px; 
}

nav {
    padding: 40px 0;
    display: flex;
    justify-content: center;
    gap: clamp(1.2rem, 4vw, 3rem);
}

.nav-link { 
    color: var(--text-dim); 
    text-decoration: none; 
    font-size: 0.75rem; 
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    transition: var(--transition);
}

.nav-link:hover { 
    color: var(--text-main); 
    text-shadow: 0 0 8px rgba(255,255,255,0.4);
}

/* --- Hero Section --- */
.hero { 
    padding: clamp(80px, 20vh, 160px) 0 100px;
    text-align: center; 
} 

.hero h1 { 
    font-size: clamp(3rem, 10vw, 6.5rem); 
    font-weight: 800; 
    letter-spacing: -0.04em; 
    line-height: 1; 
    margin-bottom: 24px; 
    background: linear-gradient(180deg, #fff 40%, rgba(255,255,255,0.5) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Custom Focus States */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    box-shadow: 0 0 15px var(--accent);
}

/* Ensure the skip-link is high contrast */
.skip-link {
    background: var(--accent);
    color: #000; /* Black text on Cyan background for maximum clarity */
    font-weight: 800;
}

/* Helper class to hide text visually but keep it for screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Skip link styling */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent);
    color: #000;
    padding: 8px;
    z-index: 2000;
    transition: top 0.3s;
}
.skip-link:focus { top: 0; }

/* --- Profile Photo Logic (Consolidated) --- */
.profile-photo {
    display: block;
    margin: 0 auto 24px;
    width: 100%; 
    max-width: 280px;
    aspect-ratio: 1 / 1; 
    object-fit: cover; 
    border-radius: 50%; 
    border: 1px solid var(--border);
    filter: grayscale(100%);
    transition: filter 0.6s var(--transition), transform 0.6s var(--transition), border-color 0.6s ease;
}

.profile-photo:hover {
    filter: grayscale(0%);
    transform: scale(1.02);
    border-color: var(--accent);
}

/* --- Work Section --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 500px), 1fr));
    gap: 32px;
}

.project-card {
    background: var(--card-inner);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px; 
    transition: var(--transition);
    height: 100%;
}

.project-card:hover {
    border-color: #333;
    transform: translateY(-8px);
}

.video-box {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 12px;
    margin-bottom: 24px;
    overflow: hidden;
    position: relative;
}

/* --- Footer & UI Controls --- */
footer {
    text-align: center;
    padding: 80px 24px;
    border-top: 1px solid var(--border);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 32px;
}

.scroll-nav {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}

.scroll-nav button {
    background-color: #1a1a1a;
    color: white;
    border: 1px solid var(--border);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    backdrop-filter: blur(8px);
}

.scroll-nav button:hover {
    background-color: var(--accent);
    color: #000;
    border-color: var(--accent);
    transform: translateY(-3px);
}

/* --- Background Ambient Light --- */
.ambient-light {
    position: fixed;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 70vh;
    background: radial-gradient(circle at 50% 0%, rgba(0, 212, 255, 0.1) 0%, transparent 75%);
    z-index: -1; /* Ensures it stays behind content */
    pointer-events: none;
}