/* CSS Design System: Futuristic AI Robotic Industrial for AiyaGroup.com */

:root {
    --bg-titanium: #050507;
    --bg-carbon: #0b0b0e;
    --surface-alloy: #111116;
    --surface-plating: #171720;
    
    --border-joint: #252530;
    --border-active: #3c3c4c;
    
    --text-white: #ffffff;
    --text-iron: #8b8b96;
    --text-diagnostic: #00ff66; /* Diagnostic LED Green */
    
    --accent-cyan: #00f0ff;       /* Laser Beam Cyan */
    --accent-laser-red: #ff0055;  /* Warning Sensor Red */
    
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Space Grotesk', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-titanium);
    color: var(--text-white);
    font-family: var(--font-body);
    line-height: 1.6;
}

/* Glassmorphism Mecha Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 75px;
    z-index: 100;
    background: rgba(5, 5, 7, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 2px solid var(--border-joint);
    display: flex;
    align-items: center;
}



.header-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-logo {
    height: 36px;
    width: auto;
    object-fit: contain;
    border-radius: 2px;
    padding-right: 0.5rem;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.25rem;
    color: #ff003c; /* Glowing warning red for AIYA text */
    text-shadow: 0 0 10px rgba(255, 0, 60, 0.6);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.header-portfolio {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.portfolio-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-iron);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.header-brand-logo {
    height: 18px;
    width: auto;
    max-width: 70px;
    object-fit: contain;
    filter: brightness(0) invert(1); /* Forces all portfolio logos to pure white */
    opacity: 0.65;
    transition: opacity 0.25s ease, filter 0.25s ease;
}

.header-brand-logo:hover {
    opacity: 1;
    filter: drop-shadow(0 0 5px var(--accent-cyan)) brightness(0) invert(1);
}

.logo-accent {
    color: var(--accent-cyan); /* Restored to cyber-aqua blue for GROUP badge */
    font-family: var(--font-mono);
    font-weight: 500;
    background: rgba(0, 240, 255, 0.08);
    padding: 0.15rem 0.6rem;
    border-radius: 2px;
    font-size: 0.75rem;
    border: 1px solid rgba(0, 240, 255, 0.25);
    letter-spacing: 0.1em;
    text-shadow: none; /* No red glow overlay on GROUP badge */
}

/* Pulsing LED Status Dot animation */
.status-led {
    width: 8px;
    height: 8px;
    background-color: #ff003c;
    border-radius: 50%;
    box-shadow: 0 0 10px #ff003c;
    animation: ledPulseRed 1.8s infinite alternate;
}

@keyframes ledPulseRed {
    0% { opacity: 0.35; box-shadow: 0 0 4px #ff003c; }
    100% { opacity: 1; box-shadow: 0 0 12px #ff003c; }
}

@keyframes ledPulse {
    0% { opacity: 0.35; box-shadow: 0 0 4px var(--text-diagnostic); }
    100% { opacity: 1; box-shadow: 0 0 12px var(--text-diagnostic); }
}

.hero {
    position: relative;
    padding: 170px 0 110px;
    background: 
        linear-gradient(180deg, rgba(5, 5, 7, 0.75) 0%, rgba(5, 5, 7, 0.98) 100%),
        url('media/assets/hero_bg.jpg') no-repeat center center;
    background-size: cover;
    border-bottom: 2px solid var(--border-joint);
    overflow: hidden;
}

.hero-container-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    align-items: flex-start;
    text-align: left;
    z-index: 10;
    position: relative;
}

.hero-text-side {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-text-side .hero-title {
    text-align: left;
    margin-left: 0;
    margin-top: 0; /* Reset top margin for pixel alignment */
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-text-side .hero-subtitle {
    text-align: left;
    margin-left: 0;
    margin-bottom: 2.2rem;
}

.hero-text-side .hero-stats {
    width: 100%;
    margin-bottom: 0;
}

.hero-terminal-side {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* Terminal Window Design */
.terminal-window {
    background-color: #030305;
    border: 1px solid var(--border-joint);
    border-top: 2px solid var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.08), inset 0 0 10px rgba(0, 0, 0, 0.8);
    height: 330px; /* Locked stable height to prevent layout shifts */
    margin-top: 45px; /* Shifts the console down about half an inch to line up perfectly with the AIYA GROUP logo text */
    width: 100%;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}

.terminal-header {
    background-color: #0a0a0f;
    border-bottom: 1px solid var(--border-joint);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.terminal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.terminal-dot.red { background-color: #ff5f56; }
.terminal-dot.yellow { background-color: #ffbd2e; }
.terminal-dot.green { background-color: #27c93f; }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-iron);
    margin-left: 0.5rem;
    letter-spacing: 0.05em;
}

.terminal-body {
    flex: 1;
    padding: 1rem 1.25rem;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    line-height: 1.45;
    color: var(--accent-cyan);
    text-align: left;
}

.terminal-body::-webkit-scrollbar {
    width: 4px;
}

.terminal-body::-webkit-scrollbar-track {
    background: #030305;
}

.terminal-body::-webkit-scrollbar-thumb {
    background: var(--border-joint);
    border-radius: 2px;
}

.terminal-log-line {
    margin-bottom: 0.4rem;
    opacity: 0.9;
    animation: textScan 0.15s ease-out;
}

.terminal-log-line.cmd {
    color: var(--text-white);
}

.terminal-log-line.cmd::before {
    content: 'guest@aiyagroup:~$ ';
    color: var(--accent-cyan);
}

.terminal-log-line.success {
    color: #39ff14;
}

.terminal-log-line.warn {
    color: #ffb700;
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 900px;
    height: 450px;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.03) 0%, rgba(0, 0, 0, 0) 70%);
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    z-index: 10;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 5rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.1) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.35; /* 65% transparency for a delicate, premium glass look */
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-iron);
    margin-bottom: 4.5rem;
    font-weight: 300;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: 0.08em;
}

.hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3.5rem;
    border: 2px solid var(--border-joint);
    padding: 2.5rem 3.5rem;
    background-color: rgba(17, 17, 22, 0.85);
    /* Sci-Fi Bevel Frame Cuts */
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
    position: relative;
}

.terminal-diag {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-left: 2.5rem;
    border-left: 2px solid var(--border-joint);
    text-align: left;
    min-width: 190px;
    font-family: var(--font-mono);
}

.diag-line {
    font-size: 0.72rem;
    color: var(--text-iron);
    letter-spacing: 0.05em;
}

.diag-lbl {
    color: var(--text-iron);
}

.diag-val {
    color: var(--accent-cyan);
    font-weight: 700;
}

.diag-val.active-status {
    color: #39ff14;
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.4);
    animation: signalBlink 1s infinite alternate;
}

@keyframes signalBlink {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Card Signal Indicators */
.card-signal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-iron);
    z-index: 15;
}

.signal-led-blue {
    width: 6px;
    height: 6px;
    background-color: var(--accent-cyan);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--accent-cyan);
    animation: ledPulse 1.2s infinite alternate;
}

.signal-hash {
    color: var(--accent-cyan);
}

.hero-stats::before {
    content: '[ ENGINE_DIAG_UNIT ]';
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--accent-cyan);
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-num {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-white);
    border-bottom: 2px solid var(--accent-cyan);
    padding-bottom: 0.25rem;
    width: fit-content;
    margin: 0 auto;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-iron);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 0.5rem;
}

/* Sections Header Layout */
.section-header {
    max-width: 1200px;
    margin: 0 auto 4rem;
    padding: 0 2rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid var(--border-joint);
    padding-bottom: 1.25rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 18px;
    background-color: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan);
}

.accent-line {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-iron);
    letter-spacing: 0.1em;
}

.accent-line::before {
    content: '[ SYS.SEC.LOCK_ON : 0x441C ]';
}

/* Portfolio Section */
.portfolio {
    padding: 100px 0;
    background-color: var(--bg-carbon);
    border-bottom: 2px solid var(--border-joint);
}

.brand-grid {
    max-width: 1200px;
    margin: 0 auto 5rem;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.brand-card {
    background-color: var(--surface-alloy);
    border: 1px solid var(--border-joint);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    /* Mecha Bevel Corner Cut */
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
}

.brand-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: transparent;
    transition: background-color 0.3s ease;
}

.brand-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-cyan);
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.08);
}

.brand-card:hover::after {
    background-color: var(--accent-cyan);
}

.brand-logo-container {
    height: 140px;
    background-color: #08080a;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border-bottom: 2px solid var(--border-joint);
}

.brand-logo {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
}

.brand-info {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-name::after {
    content: 'ONLINE';
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-diagnostic);
    background: rgba(0, 255, 102, 0.08);
    padding: 0.1rem 0.4rem;
    border-radius: 2px;
    border: 1px solid rgba(0, 255, 102, 0.2);
}

.brand-desc {
    color: var(--text-iron);
    font-size: 0.85rem;
    font-weight: 300;
    margin-bottom: 2rem;
    flex-grow: 1;
    line-height: 1.6;
}

.brand-link {
    color: var(--text-white);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.brand-link:hover {
    color: var(--accent-cyan);
    transform: translateX(4px);
}

.sub-section {
    margin-top: 2rem;
    margin-bottom: 2.5rem;
    border-bottom: 2px dashed var(--border-joint);
    padding-bottom: 1.5rem;
}

.sub-section-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-iron);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.project-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

.project-card {
    background-color: var(--surface-alloy);
    border: 1px solid var(--border-joint);
    padding: 2rem;
    text-decoration: none;
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 160px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    border-left: 4px solid var(--border-active);
    /* Mecha Bevel Corner Cut */
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
}

.project-card:hover {
    border-color: var(--accent-cyan);
    border-left-color: var(--accent-cyan);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.08);
}

.project-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.project-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: brightness(0) invert(1); /* Forces logo to pure white to fit robotic theme */
}

.project-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0;
}

.project-desc {
    color: var(--text-iron);
    font-size: 0.85rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.project-link-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Directory Section */
.directory {
    padding: 100px 0;
    background-color: var(--bg-titanium);
    border-bottom: 2px solid var(--border-joint);
}

.directory-grid {
    max-width: 960px;
    margin: 0 auto 5rem;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.dir-card {
    background-color: var(--surface-plating);
    border: 1px solid var(--border-joint);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
}

.dir-card::before {
    content: '[ UNIT_REG_INFO ]';
    position: absolute;
    top: 0.75rem;
    right: 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-iron);
}

.dir-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dir-icon {
    font-size: 1.3rem;
    background: rgba(0, 240, 255, 0.05);
    padding: 0.5rem;
    border-radius: 2px;
    border: 1px solid rgba(0, 240, 255, 0.15);
}

.dir-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.dir-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--text-iron);
}

.dir-body strong {
    color: var(--text-white);
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.interactive-text {
    color: var(--text-white);
    text-decoration: none;
    border-bottom: 1px dashed var(--border-active);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.interactive-text:hover {
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
}

.routing-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.route-card {
    background-color: var(--surface-alloy);
    border: 1px solid var(--border-joint);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    border-top: 3px solid var(--border-active);
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
}

.route-card:hover {
    border-top-color: var(--accent-cyan);
}

.route-dept {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.route-desc {
    font-size: 0.8rem;
    color: var(--text-iron);
    font-weight: 300;
    flex-grow: 1;
    line-height: 1.5;
}

.route-action {
    color: var(--accent-cyan);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    letter-spacing: 0.05em;
}

.route-action:hover {
    text-decoration: underline;
}

.route-subject {
    font-size: 0.7rem;
    color: var(--text-iron);
    font-style: normal;
    background: rgba(255, 255, 255, 0.01);
    padding: 0.5rem;
    border-radius: 2px;
    border: 1px solid var(--border-joint);
}

.route-phone {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-iron);
}

/* Photoblog Gallery Section */
.gallery-section {
    padding: 100px 0;
    background-color: var(--bg-carbon);
    border-bottom: 2px solid var(--border-joint);
}

.filter-controls {
    max-width: 1200px;
    margin: 0 auto 4rem;
    padding: 0 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 2.5rem;
    background-color: rgba(17, 17, 22, 0.6);
    border: 2px solid var(--border-joint);
    padding: 2.5rem 2rem;
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-group:nth-child(1) {
    flex-grow: 2;
    min-width: 280px;
}

.filter-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-iron);
}

.gallery-input {
    background-color: var(--bg-titanium);
    border: 1px solid var(--border-joint);
    color: var(--text-white);
    padding: 0.85rem 1.25rem;
    border-radius: 2px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.25s ease;
    width: 100%;
}

.gallery-input:focus {
    border-color: var(--accent-cyan);
}

.gallery-select {
    background-color: var(--bg-titanium);
    border: 1px solid var(--border-joint);
    color: var(--text-white);
    padding: 0.85rem 1.25rem;
    border-radius: 2px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
    min-width: 160px;
    transition: border-color 0.25s ease;
}

.gallery-select:focus {
    border-color: var(--accent-cyan);
}

.theme-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.theme-pill {
    background-color: transparent;
    border: 1px solid var(--border-joint);
    color: var(--text-iron);
    padding: 0.65rem 1.25rem;
    border-radius: 2px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.theme-pill:hover {
    border-color: var(--text-white);
    color: var(--text-white);
}

.theme-pill.active {
    background-color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    color: var(--bg-titanium);
    font-weight: 700;
}

/* Image Gallery Grid - 2"x2" aspect-ratio */
.gallery-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: visible;
    cursor: pointer;
}

.gallery-img-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--border-joint);
    background-color: var(--surface-alloy);
    position: relative;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.01);
    will-change: transform;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hover Zoom & Laser Glow mechanics */
@media (hover: hover) {
    .gallery-item:hover {
        z-index: 20;
    }
    
    .gallery-item:hover .gallery-img-wrapper {
        border-color: var(--accent-cyan);
        box-shadow: 0 10px 30px rgba(0, 240, 255, 0.2);
    }
    
    .gallery-item:hover .gallery-img {
        transform: scale(1.5); /* Scales 50% bigger */
    }
    
    .gallery-item:hover .gallery-info {
        opacity: 1;
    }
}

/* Gallery Info Overlay on Hover */
.gallery-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(0deg, rgba(5, 5, 7, 0.95) 0%, rgba(5, 5, 7, 0) 100%);
    padding: 1.5rem 1rem 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.gallery-title-card {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.gallery-meta-card {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--accent-cyan);
    display: flex;
    justify-content: space-between;
}

.gallery-empty {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2rem;
    text-align: center;
    color: var(--text-iron);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    border: 2px dashed var(--border-joint);
    display: none;
}

/* Lightbox Modal */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 5, 7, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 2.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
    z-index: 1010;
}

.lightbox-close:hover {
    color: var(--accent-cyan);
}

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(17, 17, 22, 0.7);
    border: 1px solid var(--border-joint);
    color: var(--text-white);
    font-size: 1.8rem;
    padding: 0.85rem 1.1rem;
    cursor: pointer;
    border-radius: 2px;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
    z-index: 1010;
}

.lightbox-prev:hover, .lightbox-next:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    background-color: var(--bg-titanium);
}

.lightbox-prev {
    left: 2rem;
}

.lightbox-next {
    right: 2rem;
}

.lightbox-content {
    max-width: 80%;
    max-height: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.lightbox-img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 2px;
    border: 2px solid var(--border-joint);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.95);
}

.lightbox-meta {
    text-align: center;
    max-width: 600px;
}

.lightbox-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.lightbox-desc {
    font-family: var(--font-mono);
    color: var(--accent-cyan);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Footer Section */
.footer {
    padding: 50px 0;
    background-color: var(--bg-titanium);
    border-top: 2px solid var(--border-joint);
    text-align: center;
    position: relative;
}



.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-text {
    font-size: 0.8rem;
    color: var(--text-iron);
    letter-spacing: 0.05em;
}

.footer-subtext {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--border-active);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .brand-grid, .directory-grid, .routing-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    .brand-grid, .directory-grid, .routing-grid, .project-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .header {
        height: auto;
        padding: 0.35rem 0;
    }
    
    .header-container {
        flex-direction: column;
        gap: 0.35rem;
        padding: 0.4rem 1rem;
    }

    .header-portfolio {
        margin-left: 0;
        gap: 0.75rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .header-brand-logo {
        height: 14px;
    }

    .portfolio-label {
        display: none;
    }

    .accent-line {
        font-size: 0.55rem;
        letter-spacing: 0.05em;
    }

    .load-more-btn {
        font-size: 0.65rem;
        padding: 0.75rem 1.25rem;
        letter-spacing: 0.05em;
        white-space: nowrap;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding-bottom: 1rem;
        margin-bottom: 2.5rem;
    }
    
    .hero {
        padding-top: 130px;
        padding-bottom: 70px;
    }
    
    .hero-container-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
        align-items: center;
    }

    .hero-text-side {
        align-items: center;
        text-align: center;
    }

    .hero-text-side .hero-title {
        text-align: center;
        font-size: 2.8rem;
    }

    .hero-text-side .hero-subtitle {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .hero-stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        padding: 2rem 1.5rem;
    }

    .hero-stats .stat-card:nth-child(3) {
        grid-column: span 2;
        text-align: center;
    }

    .terminal-diag {
        grid-column: span 2;
        padding-left: 0;
        border-left: none;
        border-top: 1px solid var(--border-joint);
        padding-top: 1.25rem;
        align-items: center;
        text-align: center;
        width: 100%;
    }
    
    .hero-terminal-side {
        justify-content: center;
    }

    .terminal-window {
        height: 280px;
        min-height: auto;
    }

    .stat-num {
        font-size: 2rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
        padding: 0 1.5rem;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
        padding: 2rem 1.5rem;
        margin: 0 1.5rem 3rem;
    }
    
    .filter-group:nth-child(1) {
        min-width: 100%;
    }
    
    .lightbox-prev, .lightbox-next {
        font-size: 1.5rem;
        padding: 0.75rem 1rem;
    }
    
    .lightbox-prev {
        left: 0.5rem;
    }
    
    .lightbox-next {
        right: 0.5rem;
    }
}

/* Pagination load more styles */
.pagination-container {
    max-width: 1200px;
    margin: 3rem auto 0;
    padding: 0 2rem;
    text-align: center;
}

.load-more-btn {
    background-color: transparent;
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    padding: 0.9rem 3rem;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    cursor: pointer;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    transition: background-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.load-more-btn:hover {
    background-color: var(--accent-cyan);
    color: var(--bg-titanium);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}
