/* 
   Nocturnal Luminescence Design System
   Vanilla CSS Implementation for index.html
*/

:root {
    /* Colors & Tonal Depth */
    --surface: #010e23;
    --on-surface: #dae6ff;
    --on-surface-variant: #9dacc7;
    --primary: #ff9064;
    --primary-container: #ff7941;
    --on-primary: #571a00;
    --tertiary: #fd894f;
    --surface-container-low: #02132b;
    --surface-container-high: #0a203c;
    --surface-container-highest: #0f2644;
    --surface-container-lowest: #000000;
    --outline-variant: rgba(58, 72, 96, 0.2); /* Ghost Border Rule */
    
    /* Typography Scale */
    --font-family: 'Manrope', sans-serif;
    --font-weight-body: 400;
    --font-weight-display: 800;
    
    /* Spacing & Radii */
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --max-width: 1536px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--surface);
    color: var(--on-surface);
    font-family: var(--font-family);
    line-height: 1.6; /* body-lg scale */
    font-weight: var(--font-weight-body);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-display);
    letter-spacing: -0.02em; /* Display scale */
    line-height: 1.1;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Layout Containers */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (min-width: 768px) {
    .container {
        padding: 0 3rem;
    }
}

.section-py {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
}

@media (min-width: 768px) {
    .section-py {
        padding-top: 8rem;
        padding-bottom: 8rem;
    }
}

/* Typography Classes */
.hero-heading {
    font-size: clamp(2.2rem, 7vw, 5.5rem);
    line-height: 0.9;
}

.section-heading-lg {
    font-size: clamp(2rem, 5vw + 1rem, 3.75rem);
    text-transform: uppercase;
}

.section-heading-xl {
    font-size: clamp(1.75rem, 4.5vw + 1rem, 3.75rem);
    text-transform: uppercase;
}

.section-heading-md {
    font-size: clamp(2rem, 4vw + 1rem, 3rem);
    text-transform: uppercase;
}

.label-md {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 800;
}

/* Components */

/* Navigation */
.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background-color: rgba(15, 38, 68, 0.7); /* surface-container-highest at 70% */
    backdrop-filter: blur(20px); /* Glassmorphism rule */
    padding: 1rem 1.5rem;
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: none;
    gap: 2.5rem;
    align-items: center;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

.nav-link {
    font-size: 0.625rem; /* 10px */
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--on-surface-variant);
    position: relative;
}

.nav-link.active {
    color: var(--primary);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    width: 24px;
    height: 2px;
    background-color: var(--tertiary);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-container));
    color: var(--on-primary);
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-secondary {
    border: 1px solid var(--outline-variant);
    color: var(--primary);
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Hero Section */
.hero-section {
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-blob {
    position: absolute;
    top: 0;
    right: 0;
    width: 66%;
    height: 100%;
    background-color: var(--primary);
    opacity: 0.2;
    filter: blur(120px);
    border-radius: 50%;
    z-index: -10;
}

.text-gradient {
    background: linear-gradient(to right, var(--primary), var(--tertiary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Gallery / Projects */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-top: 5rem;
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(12, 1fr);
        gap: 2rem;
    }
}

.project-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background-color: var(--surface-container-high);
    min-height: 240px;
}

@media (min-width: 768px) {
    .col-span-8 { grid-column: span 8; }
    .col-span-4 { grid-column: span 4; }
    .aspect-video { aspect-ratio: 16 / 9; }
    .aspect-square { aspect-ratio: 1 / 1; }
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

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

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
}

/* Tech Cards */
.tech-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 5rem auto 0;
}

@media (min-width: 640px) {
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .tech-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.tech-card {
    padding: 2rem;
    border-radius: 1rem;
    background-color: var(--surface-container-high);
    border: 1px solid var(--outline-variant); /* Ghost Border */
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.3s ease;
}

.tech-card:hover {
    transform: translateY(-5px);
}

.tech-icon-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    align-items: center;
    min-height: 36px;
}

.tech-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
    transition: transform 0.25s, filter 0.25s;
    filter: brightness(0.85);
}

.tech-icon:hover {
    transform: translateY(-2px);
    filter: brightness(1.2) drop-shadow(0 0 6px var(--primary));
}

.tech-text-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--on-surface-variant);
    border: 1px solid var(--outline-variant);
    border-radius: 4px;
    padding: 0.2rem 0.45rem;
    line-height: 1;
    transition: all 0.25s;
}

.tech-card:hover .tech-text-badge {
    color: var(--primary);
    border-color: var(--primary);
}

/* About Section */
.about-flex {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 768px) {
    .about-flex {
        flex-direction: row;
        gap: 5rem;
    }
    .about-photo-wrap {
        width: 30%;
    }
    .about-content {
        width: 50%;
    }
}

.photo-container {
    padding: 1rem;
    background-color: var(--surface-container-high);
    border-radius: var(--radius-xl);
    transform: rotate(3deg);
    transition: transform 0.5s ease;
}

.photo-container:hover {
    transform: rotate(0deg);
}

.photo-container img {
    border-radius: var(--radius-lg);
    filter: grayscale(100%);
    transition: filter 0.7s ease;
    aspect-ratio: 4/5;
    object-fit: cover;
}

.photo-container:hover img {
    filter: grayscale(0%);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

@media (min-width: 640px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-number {
    color: var(--primary);
    font-weight: 900;
    font-size: 2.25rem;
}

/* Contact Section */
.contact-section {
    background-color: var(--surface-container-highest);
    border-radius: 1rem;
    margin-bottom: 8rem;
    padding: 8rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
}

.contact-card {
    background-color: var(--surface);
    padding: 1.5rem 2rem;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.contact-card:hover {
    background-color: var(--primary);
}

.contact-card:hover * {
    color: var(--on-primary) !important;
}

/* Footer */
.footer {
    padding: 4rem 1.5rem;
    border-top: 1px solid var(--outline-variant);
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 768px) {
    .footer-inner {
        flex-direction: row;
    }
}

/* Utility Classes */
.ember-indicator {
    position: relative;
}

.ember-indicator::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    width: 24px;
    height: 2px;
    background-color: var(--tertiary);
    animation: pulseGlow 3s ease-in-out infinite;
}

.ember-indicator-center::before {
    left: 0;
    right: 0;
    margin: 0 auto;
}

@keyframes pulseGlow {
    0%   { transform: scaleX(1);   opacity: 0.8; }
    50%  { transform: scaleX(1.5); opacity: 1; filter: drop-shadow(0 0 5px var(--primary)); }
    100% { transform: scaleX(1);   opacity: 0.8; }
}

.asymmetric-title {
    position: relative;
    /* Asymmetrical rule: offset or indent can be used */
}

/* Helper Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-center { text-align: center; }
.w-full { width: 100%; }
.relative { position: relative; }
.absolute { position: absolute; }
.hidden { display: none; }

@media (min-width: 768px) {
    .md-flex { display: flex; }
    .md-hidden { display: none; }
}

/* Colors Utilities */
.text-primary { color: var(--primary); }
.text-on-surface-variant { color: var(--on-surface-variant); }

/* Ambient Tinted Shadow for floating elements */
.ambient-shadow {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 144, 100, 0.05);
}

/* Mobile Nav Drawer */
.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
    background-color: rgba(15, 38, 68, 0.97);
    backdrop-filter: blur(20px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.mobile-nav.open {
    display: flex;
}

.mobile-nav-link {
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--on-surface-variant);
}

.mobile-nav-link.active {
    color: var(--primary);
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 110;
}

@media (min-width: 768px) {
    .hamburger { display: none; }
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--on-surface);
    transition: all 0.3s;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Trust Marquee Styles */
.marquee {
    position: relative;
    width: 100vw;
    max-width: 100%;
    overflow: hidden;
}

.marquee-content {
    display: flex;
    gap: 4rem;
    width: max-content;
    animation: marquee-scroll 40s linear infinite;
    align-items: center;
}

.marquee-content img {
    height: 32px;
    width: auto;
    filter: grayscale(100%) brightness(1.5);
    opacity: 0.4;
    transition: all 0.3s ease;
}

.marquee-content img:hover {
    filter: grayscale(0%) brightness(1);
    opacity: 1;
    transform: scale(1.1);
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Enhanced Project Hover Styles */
.project-card .project-overlay {
    background: linear-gradient(to top, rgba(1, 14, 35, 0.95) 0%, rgba(1, 14, 35, 0.4) 50%, transparent 100%);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 0;
}

.project-card:hover .project-details {
    max-height: 200px;
    opacity: 1;
    margin-top: 1rem;
}

.project-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.badge-sm {
    font-size: 0.625rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    background-color: rgba(255, 144, 100, 0.1);
    color: var(--primary);
    border: 1px solid rgba(255, 144, 100, 0.2);
    border-radius: 4px;
}

.project-outcome {
    font-size: 0.875rem;
    color: var(--on-surface-variant);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-outcome::before {
    content: "•";
    color: var(--primary);
    font-weight: 900;
}
