/* ============================================================
   style.css — shared site-wide stylesheet
   Themes: "terminal" (current hacker aesthetic) and
           "default"  (polished, professional portfolio)
   ============================================================ */

/* ---------- Theme variables ---------- */
:root,
[data-theme="terminal"] {
    --bg-color: #0a0a0c;
    --panel-bg: #121217;
    --accent-cyan: #00f0ff;
    --accent-magenta: #ff0055;
    --accent-amber: #ffaa00;
    --text-main: #e2e8f0;
    --text-muted: #747d8c;
    --border-color: #262630;
    --glow-cyan: 0 0 10px rgba(0, 240, 255, 0.2);
    --glow-magenta: 0 0 10px rgba(255, 0, 85, 0.2);
    --font-mono: 'Courier New', Courier, monospace;
    --font-sans: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    --radius: 3px;
    --shadow: 0 0 10px rgba(0, 240, 255, 0.1);
}

[data-theme="default"] {
    --bg-color: #cbd5e1;
    --panel-bg: #e2e8f0;
    --accent-cyan: #1d4ed8;
    --accent-magenta: #9d174d;
    --accent-amber: #b45309;
    --text-main: #000000;
    --text-muted: #334155;
    --border-color: #94a3b8;
    --glow-cyan: 0 0 15px rgba(29, 78, 216, 0.12);
    --glow-magenta: 0 0 15px rgba(157, 23, 77, 0.12);
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --radius: 8px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

[data-theme="default"] header h1 {
    color: #000000 !important;
}

[data-theme="default"] header p,
[data-theme="default"] .text-muted,
[data-theme="default"] .cookie-banner p,
[data-theme="default"] .spec-box p,
[data-theme="default"] .video-label,
[data-theme="default"] p {
    color: #000000 !important;
}

[data-theme="default"] body::before {
    opacity: 0.12;
}

[data-theme="default"] img {
    filter: none;
}

/* ---------- Reset ---------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    padding: 20px;
}

body::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.12) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.04), rgba(0, 128, 255, 0.02), rgba(255, 0, 0, 0.04));
    z-index: 0;
    opacity: 0.35;
    pointer-events: none;
    background-size: 100% 4px, 6px 100%;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ---------- Layout grid ---------- */
.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    align-items: start;
    width: 100%;
}

@media (min-width: 768px) {
    .grid {
        grid-template-columns: 1fr 2fr;
    }
}

.left-col {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.right-col {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* ---------- Nav ---------- */
nav {
    margin-bottom: 20px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--accent-cyan);
}

/* ---------- Header ---------- */
header {
    background-color: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-cyan);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 1;
}

header h1 {
    font-family: var(--font-mono);
    font-size: 2rem;
    color: #fff;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

header p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 6px;
    font-family: var(--font-mono);
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #00f0ff;
    border-radius: 50%;
    margin-right: 6px;
    box-shadow: 0 0 8px #00f0ff;
}

[data-theme="default"] .status-dot {
    background-color: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan);
}

/* ---------- Theme toggle ---------- */
.theme-toggle {
    position: absolute;
    top: 25px;
    right: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    z-index: 10;
}

.theme-toggle select {
    background: var(--panel-bg);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 5px 10px;
    border-radius: var(--radius);
    font-family: inherit;
    cursor: pointer;
}

/* ---------- Panels / sections ---------- */
.panel,
.section-block {
    background-color: var(--panel-bg);
    border: 1px solid var(--border-color);
    padding: 30px;
    margin-bottom: 30px;
    position: relative;
    border-radius: var(--radius);
}

.panel h2,
.section-block h2 {
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    color: var(--accent-cyan);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    font-family: var(--font-mono);
}

/* ---------- Profile / images ---------- */
.profile-img-container {
    width: 100%;
    height: 200px;
    background-color: #1a1a24;
    border: 1px dashed var(--accent-cyan);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: var(--radius);
}

.profile-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.static-image-container {
    border: 1px solid var(--border-color);
    background-color: #1a1a24;
    max-height: 560px;
    overflow: hidden;
    border-radius: var(--radius);
    margin: 20px 0;
}

.static-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.meta-list {
    list-style: none;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    margin-top: 15px;
}

.meta-list li {
    margin-bottom: 8px;
    color: var(--text-muted);
}

.meta-list span {
    color: var(--accent-cyan);
}

/* ---------- Project cards ---------- */
.project-card {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.project-card:hover {
    border-color: rgba(0, 240, 255, 0.4);
}

.project-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.project-card-link:hover {
    background-color: rgba(0, 240, 255, 0.04);
}

.project-card h3 {
    color: var(--accent-cyan);
    font-size: 1.2rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-mono);
}

.project-card p {
    font-size: 0.9rem;
    color: var(--text-main);
    margin-top: 10px;
}

.highlight-text {
    color: #fff;
    font-weight: 600;
}

.tech-tag {
    font-size: 0.7rem;
    background-color: rgba(255, 0, 85, 0.1);
    color: var(--accent-magenta);
    padding: 2px 8px;
    border: 1px solid var(--accent-magenta);
    font-family: var(--font-mono);
    border-radius: 3px;
}

[data-theme="default"] .tech-tag {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
}

/* ---------- Carousels ---------- */
.carousel-container {
    position: relative;
    width: 100%;
    height: 200px;
    margin: 15px 0;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background-color: #1a1a24;
    border-radius: var(--radius);
}

.carousel-track {
    display: flex;
    width: 200%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

#profile-carousel .carousel-track {
    width: 400%;
}

.carousel-image {
    width: 50%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    image-rendering: pixelated;
}

.profile-carousel-image {
    width: 25%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    image-rendering: auto;
}

/* ---------- Flow matrix ---------- */
.flow-matrix {
    background: rgba(0, 0, 0, 0.25);
    border: 1px dashed var(--border-color);
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    margin: 20px 0;
    border-radius: var(--radius);
}

.flow-step {
    padding: 12px;
    background: rgba(18, 16, 23, 0.5);
    border: 1px solid var(--border-color);
    margin-bottom: 8px;
    border-left: 3px solid var(--accent-cyan);
    border-radius: var(--radius);
}

.flow-step.magenta-step {
    border-left-color: var(--accent-magenta);
}

.flow-arrow {
    text-align: center;
    color: var(--text-muted);
    margin: 4px 0;
    font-weight: bold;
}

/* ---------- Spec grid ---------- */
.spec-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 25px;
}

@media (min-width: 768px) {
    .spec-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.spec-box {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: var(--radius);
}

.spec-box h4 {
    font-family: var(--font-mono);
    color: #fff;
    margin-bottom: 10px;
    font-size: 1rem;
    text-transform: uppercase;
}

/* ---------- Videos ---------- */
.video-grid-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 15px;
}

@media (min-width: 768px) {
    .video-grid-row {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.video-card-item {
    border: 1px solid var(--border-color);
    background-color: #000;
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-width: 260px;
    margin: 0 auto;
    width: 100%;
}

.video-card-item video {
    width: 100%;
    aspect-ratio: 9 / 16;
    object-fit: cover;
    display: block;
}

.video-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    padding: 8px;
    background: rgba(18, 16, 23, 0.8);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

/* ---------- Quote box ---------- */
.quote-box {
    background: rgba(37, 99, 235, 0.04);
    border-left: 3px solid var(--accent-cyan);
    padding: 15px 20px;
    margin: 15px 0 25px 0;
    font-style: italic;
    font-size: 0.95rem;
    color: var(--text-muted);
    border-radius: 0 var(--radius) var(--radius) 0;
}

[data-theme="terminal"] .quote-box {
    background: rgba(255, 0, 85, 0.03);
    border-left-color: var(--accent-magenta);
}

/* ---------- Floating Discord button ---------- */
.discord-float {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 58px;
    height: 58px;
    border: 1px solid rgba(114, 137, 218, 0.6);
    border-radius: 50%;
    background: rgba(18, 18, 23, 0.9);
    color: #ffffff;
    display: grid;
    place-items: center;
    box-shadow: 0 0 18px rgba(114, 137, 218, 0.2);
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.discord-float:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 0 24px rgba(114, 137, 218, 0.35);
}

.discord-float:active {
    transform: scale(0.96);
}

/* ---------- Contact glow animation ---------- */
.contact-glow {
    animation: contact-glow 2.4s ease-out 3;
}

@keyframes contact-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 0, 85, 0.45);
    }
    20% {
        box-shadow: 0 0 0 3px rgba(255, 0, 85, 0.7), 0 0 24px rgba(255, 0, 85, 0.35);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 0, 85, 0);
    }
}

/* ---------- Cookie banner ---------- */
.cookie-banner {
    position: fixed;
    inset: auto 20px 20px;
    width: calc(100% - 40px);
    max-width: 1040px;
    background: rgba(18, 18, 23, 0.94);
    border: 1px solid rgba(0, 240, 255, 0.14);
    border-radius: var(--radius);
    padding: 18px 22px;
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    z-index: 10000;
}

.cookie-banner p {
    margin: 0;
    line-height: 1.5;
}

.cookie-banner button {
    background: transparent;
    border: 1px solid var(--accent-magenta);
    color: var(--accent-magenta);
    padding: 10px 16px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.cookie-banner button:hover {
    background: rgba(255, 0, 85, 0.1);
    color: #fff;
}

/* ---------- Google Auth overlay ---------- */
#google-auth-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.9);
}

#google-auth-overlay > div {
    width: 100%;
    max-width: 460px;
    background: var(--panel-bg);
    border: 1px solid var(--accent-cyan);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.15);
}

#google-auth-overlay h3 {
    margin: 0 0 12px;
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

#google-auth-overlay p {
    margin: 0 0 18px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.5;
}

#google-auth-status {
    color: var(--text-main);
    margin-bottom: 18px;
}

#google-auth-button,
#google-auth-cancel {
    width: 100%;
    padding: 12px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    cursor: pointer;
    font-weight: bold;
    letter-spacing: 1px;
    border-radius: var(--radius);
    margin-bottom: 12px;
}

#google-auth-button {
    background: var(--accent-cyan);
    border: 1px solid var(--accent-cyan);
    color: #0a0a0c;
}

#google-auth-cancel {
    background: transparent;
    border: 1px solid var(--accent-magenta);
    color: var(--accent-magenta);
}

/* ---------- Utility ---------- */
.text-main {
    color: var(--text-main);
}
.text-muted {
    color: var(--text-muted);
}

/* Responsive tweaks */
@media (max-width: 768px) {
    body {
        padding: 12px;
    }
    .theme-toggle {
        position: static;
        margin: 0 0 12px 0;
        justify-content: flex-end;
        width: 100%;
    }
    header {
        padding: 18px;
        margin-bottom: 20px;
    }
}
