/* ═══════════════════════════════════════════
   MOAYED PORTFOLIO — SHARED STYLES
   ═══════════════════════════════════════════ */

:root {
    --bg-primary: #04060b;
    --bg-secondary: #080c15;
    --accent: #00e5ff;
    --accent-glow: rgba(0, 229, 255, 0.3);
    --accent2: #00e5ff;
    --accent2-glow: rgba(47, 189, 255, 0.3);
    --text-primary: #e8eaf0;
    --text-secondary: #8a8f9e;
    --text-muted: #4a4f5e;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.06);
    --card-bg: rgba(8, 12, 21, 0.8);
}

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

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg-primary);
}
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    cursor: default;
}

/* ── Custom Cursor ── */
.cursor-dot {
    width: 8px; height: 8px;
    background: var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 99999;
    transition: transform 0.1s;
    mix-blend-mode: difference;
}
.cursor-ring {
    width: 40px; height: 40px;
    border: 1.5px solid var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 99998;
    transition: all 0.15s ease-out;
    opacity: 0.5;
}
.cursor-ring.hover {
    transform: scale(1.8);
    opacity: 0.2;
    border-color: var(--accent2);
}

/* ── Background ── */
#bg-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

.ambient-grid {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    pointer-events: none;
    background-image:
        radial-gradient(1px 1px at 20% 30%, rgba(0,229,255,0.15), transparent),
        radial-gradient(1px 1px at 40% 70%, rgba(0, 229, 255, 0.3), transparent),
        radial-gradient(1px 1px at 60% 20%, rgba(0,229,255,0.08), transparent),
        radial-gradient(1px 1px at 80% 50%, rgba(0, 229, 255, 0.3), transparent);
    animation: ambientDrift 20s ease-in-out infinite;
}
@keyframes ambientDrift {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ── Navigation ── */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 24px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(20px);
    background: rgba(4, 6, 11, 0.7);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.4s;
}
.nav.scrolled {
    padding: 16px 60px;
    background: rgba(4, 6, 11, 0.92);
}

.nav-logo {
    font-family: 'Syne', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    position: relative;
}
.nav-logo::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
}
.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    transition: color 0.3s;
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px; left: 0;
    width: 0; height: 1px;
    background: var(--accent);
    transition: width 0.3s;
}
.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}
.menu-toggle span {
    width: 28px; height: 2px;
    background: var(--text-primary);
    transition: all 0.3s;
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── Page Transition ── */
.page-transition {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--bg-primary);
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.page-transition.active {
    opacity: 1;
    pointer-events: all;
}

/* ── Section Styles ── */
.section {
    position: relative;
    z-index: 2;
    padding: 140px 60px;
    min-height: 100vh;
}

.section-header { margin-bottom: 80px; }

.section-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.section-label::before {
    content: '';
    width: 30px; height: 1px;
    background: var(--accent);
}

.section-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.05;
}

/* ── Buttons ── */
.btn-primary {
    padding: 16px 40px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: var(--bg-primary);
    border: none;
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.3s, box-shadow 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px var(--accent-glow);
}

.btn-secondary {
    padding: 16px 40px;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: inset 0 0 30px rgba(0, 229, 255, 0.05);
}

/* ── Floating 3D Objects ── */
.floating-objects {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    perspective: 1000px;
    z-index: 1;
}

.float-obj {
    position: absolute;
    opacity: 0.12;
    animation: floatRotate 15s ease-in-out infinite;
}
.float-obj:nth-child(1) {
    top: 15%; left: 8%;
    width: 120px; height: 120px;
    border: 2px solid var(--accent);
    transform: rotateX(45deg) rotateY(45deg);
}
.float-obj:nth-child(2) {
    top: 60%; right: 10%;
    width: 80px; height: 80px;
    border: 2px solid var(--accent2);
    border-radius: 50%;
    animation-delay: -5s;
    animation-duration: 18s;
}
.float-obj:nth-child(3) {
    bottom: 20%; left: 15%;
    width: 60px; height: 60px;
    background: linear-gradient(135deg, var(--accent-glow), transparent);
    transform: rotateZ(45deg);
    animation-delay: -3s;
}
.float-obj:nth-child(4) {
    top: 25%; right: 20%;
    width: 100px; height: 100px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    animation-delay: -8s;
    animation-duration: 20s;
}

@keyframes floatRotate {
    0%   { transform: rotateX(0) rotateY(0) rotateZ(0) translateY(0); }
    25%  { transform: rotateX(90deg) rotateY(45deg) rotateZ(10deg) translateY(-20px); }
    50%  { transform: rotateX(180deg) rotateY(90deg) rotateZ(-10deg) translateY(0); }
    75%  { transform: rotateX(270deg) rotateY(135deg) rotateZ(5deg) translateY(20px); }
    100% { transform: rotateX(360deg) rotateY(180deg) rotateZ(0) translateY(0); }
}

/* ── Reveal Animation ── */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ── Glitch Text ── */
.glitch-text { position: relative; }
.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}
.glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 var(--accent);
    animation: glitch1 3s infinite linear;
}
.glitch-text::after {
    left: -2px;
    text-shadow: 2px 0 var(--accent2);
    animation: glitch2 3s infinite linear;
}

@keyframes glitch1 {
    0%, 100% { clip-path: inset(80% 0 0 0); }
    10% { clip-path: inset(10% 0 85% 0); }
    20% { clip-path: inset(50% 0 30% 0); }
    30% { clip-path: inset(20% 0 60% 0); }
    40% { clip-path: inset(90% 0 1% 0); }
    50% { clip-path: inset(40% 0 50% 0); }
    60% { clip-path: inset(70% 0 15% 0); }
    70% { clip-path: inset(5% 0 75% 0); }
    80% { clip-path: inset(60% 0 25% 0); }
    90% { clip-path: inset(30% 0 55% 0); }
}
@keyframes glitch2 {
    0%, 100% { clip-path: inset(0 0 90% 0); }
    10% { clip-path: inset(70% 0 10% 0); }
    20% { clip-path: inset(20% 0 60% 0); }
    30% { clip-path: inset(80% 0 5% 0); }
    40% { clip-path: inset(10% 0 70% 0); }
    50% { clip-path: inset(50% 0 30% 0); }
    60% { clip-path: inset(30% 0 50% 0); }
    70% { clip-path: inset(60% 0 20% 0); }
    80% { clip-path: inset(15% 0 65% 0); }
    90% { clip-path: inset(45% 0 40% 0); }
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--accent-glow); }
    50% { opacity: 0.7; box-shadow: 0 0 0 8px transparent; }
}

/* ── Footer ── */
.footer {
    position: relative;
    z-index: 2;
    padding: 40px 60px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-text {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}
.footer-links { display: flex; gap: 25px; }
.footer-links a {
    color: var(--text-muted);
    font-size: 1rem;
    transition: color 0.3s;
    text-decoration: none;
}
.footer-links a:hover { color: var(--accent); }

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
    .nav { padding: 18px 24px; }
    .nav.scrolled { padding: 14px 24px; }
    .nav-links { display: none !important; }
    .menu-toggle { display: flex; }
    .section { padding: 100px 24px; }
    .footer { flex-direction: column; gap: 20px; text-align: center; }
    .cursor-dot, .cursor-ring { display: none; }
}
