/* Modern Responsive CSS Stylesheet */

/* --- Design Tokens / Variables --- */
:root {
    /* Fonts */
    --font-primary: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --mouse-x: 50%;
    --mouse-y: 50%;
    --bg-shift-x: 0px;
    --bg-shift-y: 0px;

    /* Light Theme (White base, deep blue accents) */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    /* Deep Blue Tones */
    --primary-blue: #0f2b46;
    --primary-blue-hover: #173f66;
    --accent-blue: #2563eb;
    --accent-light: #eff6ff;
    
    /* Layout & Effects */
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
    --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.15);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 80px;
}

/* Deep Blue Theme (Dark Mode: Deep Blue base, White text/accents) */
body.dark {
    --bg-primary: #0a192f;
    --bg-secondary: #0f223a;
    --bg-card: #132a4a;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    
    --primary-blue: #38bdf8; /* Accent light blue in dark mode */
    --primary-blue-hover: #7dd3fc;
    --accent-blue: #38bdf8;
    --accent-light: rgba(56, 189, 248, 0.1);
    
    --border-color: #1e3a5f;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 25px rgba(56, 189, 248, 0.25);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

.interactive-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(37, 99, 235, 0.3), transparent 22rem),
        radial-gradient(circle at calc(100% - var(--mouse-x)) calc(100% - var(--mouse-y)), rgba(0, 180, 216, 0.2), transparent 24rem),
        radial-gradient(circle at 18% 16%, rgba(125, 211, 252, 0.22), transparent 18rem),
        radial-gradient(circle at 82% 78%, rgba(14, 165, 233, 0.2), transparent 20rem),
        conic-gradient(from 140deg at 50% 50%, rgba(37, 99, 235, 0.1), rgba(0, 180, 216, 0.16), rgba(15, 43, 70, 0.08), rgba(37, 99, 235, 0.1));
}

.interactive-bg::before,
.interactive-bg::after {
    content: '';
    position: absolute;
    pointer-events: none;
}

.interactive-bg::before {
    inset: -8%;
    opacity: 0.42;
    transform: translate3d(var(--bg-shift-x), var(--bg-shift-y), 0);
    transition: none;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.75) 0 1px, transparent 2px),
        radial-gradient(circle at 70% 60%, rgba(37, 99, 235, 0.7) 0 1px, transparent 2px),
        linear-gradient(120deg, transparent 0 42%, rgba(37, 99, 235, 0.18) 45%, transparent 50% 100%),
        linear-gradient(rgba(37, 99, 235, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.08) 1px, transparent 1px);
    background-size: 180px 180px, 240px 240px, 360px 360px, 48px 48px, 48px 48px;
    animation: bg-drift 18s linear infinite;
    mask-image: radial-gradient(circle at var(--mouse-x) var(--mouse-y), #000 0%, transparent 62%);
    -webkit-mask-image: radial-gradient(circle at var(--mouse-x) var(--mouse-y), #000 0%, transparent 62%);
}

.interactive-bg::after {
    width: 30rem;
    height: 30rem;
    left: var(--mouse-x);
    top: var(--mouse-y);
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.92) 0 1px, transparent 2px),
        radial-gradient(circle, rgba(37, 99, 235, 0.36), rgba(0, 180, 216, 0.12) 42%, transparent 68%);
    box-shadow:
        0 0 90px rgba(37, 99, 235, 0.26),
        0 0 180px rgba(0, 180, 216, 0.18);
    opacity: 0.82;
    transform: translate3d(-50%, -50%, 0);
    mix-blend-mode: screen;
    animation: cursor-aura 2.8s ease-in-out infinite;
}

body:not(.hero-in-view) .interactive-bg {
    filter: saturate(0.82);
}

body:not(.hero-in-view) #background-canvas {
    opacity: 0.68;
}

body:not(.dark):not(.hero-in-view) #background-canvas {
    opacity: 0.76;
}

body:not(.hero-in-view) .interactive-bg::after {
    opacity: 0.42;
}

#background-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.92;
}

body.dark .interactive-bg {
    background:
        radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(56, 189, 248, 0.32), transparent 30rem),
        radial-gradient(circle at calc(100% - var(--mouse-x)) calc(100% - var(--mouse-y)), rgba(37, 99, 235, 0.28), transparent 24rem),
        radial-gradient(circle at 18% 16%, rgba(14, 165, 233, 0.18), transparent 18rem),
        radial-gradient(circle at 82% 78%, rgba(59, 130, 246, 0.2), transparent 20rem),
        conic-gradient(from 140deg at 50% 50%, rgba(56, 189, 248, 0.13), rgba(37, 99, 235, 0.16), rgba(10, 25, 47, 0.08), rgba(56, 189, 248, 0.13));
}

body.dark .interactive-bg::before {
    opacity: 0.3;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.72) 0 1px, transparent 2px),
        radial-gradient(circle at 70% 60%, rgba(56, 189, 248, 0.72) 0 1px, transparent 2px),
        linear-gradient(120deg, transparent 0 42%, rgba(56, 189, 248, 0.16) 45%, transparent 50% 100%),
        linear-gradient(rgba(56, 189, 248, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.1) 1px, transparent 1px);
}

body.dark .interactive-bg::after {
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 1px, transparent 2px),
        radial-gradient(circle, rgba(56, 189, 248, 0.42), rgba(37, 99, 235, 0.16) 42%, transparent 68%);
    box-shadow:
        0 0 90px rgba(56, 189, 248, 0.3),
        0 0 190px rgba(37, 99, 235, 0.22);
}

@keyframes bg-drift {
    from {
        background-position: 0 0, 0 0, 0 0, 0 0, 0 0;
    }
    to {
        background-position: 180px 120px, -240px 180px, 360px -180px, 48px 48px, -48px 48px;
    }
}

@keyframes cursor-aura {
    0%, 100% {
        filter: blur(0);
        transform: translate3d(-50%, -50%, 0) scale(0.96);
    }
    50% {
        filter: blur(2px);
        transform: translate3d(-50%, -50%, 0) scale(1.06);
    }
}

.header,
main,
.footer,
#scroll-to-top {
    position: relative;
}

main,
.footer {
    z-index: 1;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

ul {
    list-style: none;
}

button, input, textarea {
    font-family: inherit;
    border: none;
    outline: none;
    background: none;
}

/* --- Scroll Progress Bar --- */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-blue), #00b4d8);
    width: 0%;
    z-index: 1001;
    transition: width 0.1s ease;
}

/* --- Header / Navigation --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(var(--bg-primary-rgb, 255, 255, 255), 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
}

body.dark .header {
    background-color: rgba(10, 25, 47, 0.85);
}

.header.scrolled {
    height: 70px;
    box-shadow: var(--shadow-md);
}

.header-container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100% !important;
    padding: 0 1.5rem !important;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 0;
    color: var(--text-primary);
}

.logo-img {
    height: 52px;
    width: 52px;
    object-fit: contain;
    border-radius: 50%;
    background-color: var(--accent-light);
    border: 1.5px solid var(--border-color);
    padding: 3px;
    transition: var(--transition);
}

.logo-img:hover {
    transform: scale(1.08);
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-glow);
}

.header.scrolled .logo-img {
    height: 44px;
    width: 44px;
    padding: 2px;
}

.logo span {
    color: var(--accent-blue);
}

.logo-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-blue);
    border-radius: 50%;
    display: inline-block;
}

.nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-blue);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-blue);
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    transition: var(--transition);
}

.theme-btn:hover {
    color: var(--accent-blue);
    border-color: var(--accent-blue);
    transform: translateY(-2px);
}

/* Toggle icon display based on theme */
.sun-icon { display: block; }
.moon-icon { display: none; }

body.dark .sun-icon { display: none; }
body.dark .moon-icon { display: block; }

.performance-off-icon { display: none; }
body.performance-mode .performance-on-icon { display: none; }
body.performance-mode .performance-off-icon { display: block; }

body.performance-mode .interactive-bg {
    filter: saturate(0.7);
}

body.performance-mode #background-canvas {
    opacity: 0;
}

body.performance-mode .interactive-bg::before,
body.performance-mode .interactive-bg::after,
body.performance-mode .avatar-container,
body.performance-mode .avatar-glow,
body.performance-mode .hero-image-wrapper::before,
body.performance-mode .hero-image-wrapper::after,
body.performance-mode .project-visual::before {
    animation: none;
}

body.performance-mode .interactive-bg::after {
    opacity: 0.22;
}

.mobile-nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    width: 30px;
    cursor: pointer;
}

.mobile-nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    transition: var(--transition);
    transform-origin: left center;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 6rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.decor-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.15;
    pointer-events: none;
    transition: var(--transition);
}

.blob-1 {
    top: 10%;
    right: 5%;
    width: 400px;
    height: 400px;
    background: var(--accent-blue);
}

.blob-2 {
    bottom: 10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: #00b4d8;
}

body.dark .decor-blob {
    opacity: 0.08;
}

.hero-container {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 4rem;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 5rem;
    font-weight: 800;
    line-height: 0.98;
    margin-bottom: 0.9rem;
    letter-spacing: 0;
    background: linear-gradient(135deg, var(--text-primary) 16%, var(--accent-blue) 58%, #00b4d8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-wrap: balance;
}

.hero-role {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    min-height: 3.2rem;
}

.hero-role .typewriter {
    color: var(--text-primary);
}

.hero-role .cursor {
    color: var(--accent-blue);
    animation: blink 0.8s infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.hero-desc {
    font-size: 1.08rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin-bottom: 1.35rem;
    line-height: 1.85;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2.2rem;
}

.hero-badges span {
    padding: 0.5rem 0.9rem;
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
    font-size: 0.82rem;
    font-weight: 700;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

body.dark .hero-badges span {
    background: rgba(19, 42, 74, 0.54);
    border-color: rgba(56, 189, 248, 0.2);
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.4rem;
}

.hero-terminal {
    width: min(100%, 620px);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: var(--radius-md);
    background: rgba(10, 25, 47, 0.82);
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18), var(--shadow-glow);
    color: #e0f2fe;
    overflow: hidden;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.hero-terminal-top {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(125, 211, 252, 0.14);
    background: rgba(255, 255, 255, 0.06);
}

.terminal-dots {
    display: flex;
    gap: 0.4rem;
}

.terminal-dots span {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    background: #38bdf8;
}

.terminal-dots span:nth-child(1) { background: #fb7185; }
.terminal-dots span:nth-child(2) { background: #fbbf24; }
.terminal-dots span:nth-child(3) { background: #34d399; }

.terminal-title {
    color: rgba(224, 242, 254, 0.72);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.82rem;
    font-weight: 700;
}

.terminal-output {
    height: 200px;
    overflow-y: auto;
    padding: 1rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.25) transparent;
}

.terminal-output::-webkit-scrollbar {
    width: 6px;
}

.terminal-output::-webkit-scrollbar-thumb {
    background-color: rgba(56, 189, 248, 0.25);
    border-radius: 3px;
}

.terminal-log p {
    margin: 0;
    word-break: break-all;
}

.terminal-log p:nth-child(odd) {
    color: #7dd3fc;
}

.terminal-log p:nth-child(even) {
    color: #f8fafc;
}

.terminal-prompt {
    color: #34d399;
    font-weight: 800;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #f8fafc;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.9rem;
    padding: 0;
    margin: 0;
    caret-color: #38bdf8;
}

.terminal-res {
    color: #cbd5e1;
    white-space: pre-wrap;
    margin: 0 0 0.5rem 0 !important;
}

.terminal-res.typing::after {
    content: '_';
    display: inline-block;
    color: #38bdf8;
    animation: blink 0.8s infinite;
}

.terminal-actions {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    padding: 0 1rem 1rem;
}

.terminal-command-btn {
    min-height: 34px;
    padding: 0.45rem 0.7rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(125, 211, 252, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(224, 242, 254, 0.82);
    cursor: pointer;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.78rem;
    font-weight: 800;
    transition: var(--transition);
}

.terminal-command-btn:hover,
.terminal-command-btn.active {
    background: rgba(56, 189, 248, 0.18);
    border-color: rgba(56, 189, 248, 0.5);
    color: #ffffff;
    transform: translateY(-2px);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.85rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 0 34%, rgba(255, 255, 255, 0.45) 48%, transparent 62% 100%);
    transform: translateX(-120%);
    transition: transform 0.7s ease;
}

.btn:hover::before {
    transform: translateX(120%);
}

.btn svg {
    flex: 0 0 auto;
    position: relative;
    z-index: 1;
}

.btn span,
.btn {
    z-index: 1;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: var(--bg-primary);
    box-shadow: var(--shadow-sm);
}

body.dark .btn-primary {
    background-color: var(--accent-blue);
    color: #0a192f;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
    background-color: var(--primary-blue-hover);
}

body.dark .btn-primary:hover {
    background-color: var(--primary-blue-hover);
    color: #ffffff;
}

.btn-secondary {
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    transform: translateY(-3px);
    background-color: var(--accent-light);
}

/* --- Hero Image --- */
.hero-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 420px;
}

.hero-image-wrapper::before,
.hero-image-wrapper::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    border: 1px solid rgba(37, 99, 235, 0.22);
    pointer-events: none;
}

.hero-image-wrapper::before {
    width: 390px;
    height: 390px;
    animation: orbit-ring 13s linear infinite;
}

.hero-image-wrapper::after {
    width: 455px;
    height: 455px;
    border-style: dashed;
    opacity: 0.5;
    animation: orbit-ring 18s linear infinite reverse;
}

.avatar-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.4) 0%, rgba(37, 99, 235, 0) 70%);
    filter: blur(20px);
    z-index: 1;
    animation: pulse-glow 6s infinite alternate;
}

@keyframes pulse-glow {
    0% { transform: scale(0.9); opacity: 0.5; }
    100% { transform: scale(1.1); opacity: 0.8; }
}

.avatar-container {
    width: 340px;
    height: 340px;
    border-radius: 50%;
    padding: 9px;
    background: conic-gradient(from 180deg, var(--accent-blue), #00b4d8, #7dd3fc, var(--accent-blue));
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    z-index: 2;
    overflow: hidden;
    animation: float 6s ease-in-out infinite;
    transition: var(--transition);
}

.avatar-container:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 24px 70px rgba(37, 99, 235, 0.22), var(--shadow-glow);
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--bg-primary);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes orbit-ring {
    to { transform: rotate(360deg); }
}

/* --- Section Headers --- */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-subtitle {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: 0;
}

.section-divider {
    width: 60px;
    height: 4px;
    background-color: var(--accent-blue);
    border-radius: 2px;
}

/* --- About Section --- */
.about-section {
    padding: 6rem 0;
    background-color: rgba(248, 250, 252, 0.94);
}

.about-text {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    padding: 2rem;
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.58);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.stat-card {
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.25rem;
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.66);
    box-shadow: var(--shadow-sm);
    text-align: center;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.stat-card strong {
    color: var(--accent-blue);
    font-size: 1.7rem;
    line-height: 1;
    margin-bottom: 0.55rem;
}

.stat-card span {
    color: var(--text-secondary);
    font-size: 0.86rem;
    font-weight: 700;
}

.timeline {
    max-width: 820px;
    margin: 2rem auto 0;
    display: grid;
    gap: 1rem;
}

.timeline-item {
    position: relative;
    padding: 1.25rem 1.25rem 1.25rem 3.25rem;
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.58);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 1.25rem;
    top: 1.45rem;
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 50%;
    background: var(--accent-blue);
    box-shadow: 0 0 0 6px var(--accent-light);
}

.timeline-item span {
    display: block;
    color: var(--accent-blue);
    font-size: 0.82rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
}

.timeline-item p {
    color: var(--text-secondary);
    margin: 0;
}

/* --- Skills Section --- */
.skills-section {
    padding: 6rem 0;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    perspective: 1000px;
}

.skill-card {
    background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
        linear-gradient(135deg, rgba(37, 99, 235, 0.36), rgba(0, 180, 216, 0.06), rgba(37, 99, 235, 0.22)) border-box;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    will-change: transform;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.skill-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--tilt-x, 50%) var(--tilt-y, 0%), rgba(37, 99, 235, 0.18), transparent 42%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.skill-card:hover {
    transform: translateY(-8px) rotateX(var(--tilt-rotate-x, 0deg)) rotateY(var(--tilt-rotate-y, 0deg));
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.skill-card:hover::before {
    opacity: 1;
}

body.dark .skill-card:hover {
    border-color: rgba(56, 189, 248, 0.3);
}

.skill-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent-light), rgba(0, 180, 216, 0.14));
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.skill-card:hover .skill-icon-wrapper {
    background-color: var(--accent-blue);
    color: var(--bg-primary);
    transform: scale(1.1);
}

body.dark .skill-card:hover .skill-icon-wrapper {
    color: #0a192f;
}

.skill-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.skill-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tags li {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* --- Projects Section --- */
.projects-section {
    padding: 6rem 0;
    background: rgba(255, 255, 255, 0.62);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    perspective: 1000px;
}

.project-card {
    min-height: 520px;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-md);
    border: 1px solid rgba(37, 99, 235, 0.18);
    background: rgba(255, 255, 255, 0.74);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: relative;
    transition: var(--transition);
    transform-style: preserve-3d;
    will-change: transform;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--tilt-x, 50%) var(--tilt-y, 0%), rgba(0, 180, 216, 0.2), transparent 42%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.project-card:hover {
    transform: translateY(-10px) rotateX(var(--tilt-rotate-x, 0deg)) rotateY(var(--tilt-rotate-y, 0deg));
    border-color: rgba(37, 99, 235, 0.34);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12), var(--shadow-glow);
}

.project-card:hover::before {
    opacity: 1;
}

.featured-project {
    transform: translateY(-18px);
}

.featured-project:hover {
    transform: translateY(-26px) rotateX(var(--tilt-rotate-x, 0deg)) rotateY(var(--tilt-rotate-y, 0deg));
}

.project-visual {
    min-height: 190px;
    padding: 1.5rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 20%, rgba(125, 211, 252, 0.34), transparent 34%),
        linear-gradient(135deg, rgba(15, 43, 70, 0.96), rgba(37, 99, 235, 0.8));
}

.project-visual::before {
    content: '';
    position: absolute;
    inset: -60%;
    background: conic-gradient(from 90deg, transparent, rgba(255, 255, 255, 0.18), transparent 32%);
    animation: project-sweep 8s linear infinite;
}

.terminal-visual,
.code-visual,
.portfolio-visual {
    color: #e0f2fe;
}

.terminal-bar {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    gap: 0.45rem;
}

.terminal-bar span {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.75);
}

.terminal-lines,
.code-grid,
.portfolio-preview {
    position: relative;
    z-index: 1;
    width: 100%;
}

.terminal-lines {
    display: grid;
    gap: 0.75rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.88rem;
}

.terminal-lines span,
.code-grid span {
    display: block;
    padding: 0.72rem 0.85rem;
    border-radius: var(--radius-sm);
    background: rgba(10, 25, 47, 0.54);
    border: 1px solid rgba(125, 211, 252, 0.18);
}

.code-grid {
    display: grid;
    gap: 0.7rem;
    transform: rotate(-3deg);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.browser-frame {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    height: 2rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.browser-frame span,
.browser-frame::before,
.browser-frame::after {
    content: '';
    position: absolute;
    top: 0.7rem;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #7dd3fc;
}

.browser-frame span { left: 0.8rem; }
.browser-frame::before { left: 1.65rem; }
.browser-frame::after { left: 2.5rem; }

.browser-frame div {
    position: absolute;
    top: 0.6rem;
    right: 0.8rem;
    width: 42%;
    height: 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
}

.portfolio-preview {
    display: grid;
    gap: 0.85rem;
    margin-top: 2.5rem;
}

.portfolio-preview span {
    display: block;
    height: 1.1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
}

.portfolio-preview span:nth-child(1) { width: 74%; height: 2.2rem; }
.portfolio-preview span:nth-child(2) { width: 92%; }
.portfolio-preview span:nth-child(3) { width: 58%; }

.project-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.project-meta span {
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: var(--accent-light);
    color: var(--accent-blue);
    font-size: 0.72rem;
    font-weight: 800;
}

.project-content h3 {
    color: var(--text-primary);
    font-size: 1.35rem;
    margin-bottom: 0.85rem;
}

.project-content p {
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 1.35rem;
}

.project-actions {
    display: flex;
    gap: 0.9rem;
    margin-top: auto;
}

.project-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 800;
}

.project-actions a:first-child,
.project-actions a:hover {
    background: var(--primary-blue);
    color: var(--bg-primary);
    border-color: var(--primary-blue);
}

@keyframes project-sweep {
    to { transform: rotate(360deg); }
}

/* --- Gear Page --- */
.gear-page .interactive-bg {
    background:
        radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(56, 189, 248, 0.28), transparent 24rem),
        radial-gradient(circle at 16% 20%, rgba(37, 99, 235, 0.24), transparent 22rem),
        radial-gradient(circle at 82% 74%, rgba(20, 184, 166, 0.18), transparent 22rem),
        linear-gradient(135deg, rgba(15, 43, 70, 0.08), rgba(37, 99, 235, 0.06));
}

.gear-hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: calc(var(--header-height) + 4rem) 0 6rem;
}

.gear-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
    gap: 4rem;
    align-items: center;
}

.gear-hero-copy p,
.setup-flow p {
    color: var(--text-secondary);
    line-height: 1.85;
    font-size: 1.05rem;
}

.gear-title {
    color: var(--text-primary);
    font-size: 4.4rem;
    line-height: 1.02;
    margin: 0.8rem 0 1.4rem;
    letter-spacing: 0;
}

.gear-hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.setup-film {
    min-height: 520px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(rgba(10, 25, 47, 0.78), rgba(10, 25, 47, 0.78)) padding-box,
        linear-gradient(135deg, rgba(56, 189, 248, 0.7), rgba(37, 99, 235, 0.12), rgba(20, 184, 166, 0.5)) border-box;
    box-shadow: 0 30px 90px rgba(15, 23, 42, 0.18), var(--shadow-glow);
    overflow: hidden;
    position: relative;
}

.setup-film::before {
    content: '';
    position: absolute;
    inset: -40%;
    background: conic-gradient(from 120deg, transparent, rgba(56, 189, 248, 0.16), transparent 34%);
    animation: project-sweep 12s linear infinite;
}

.film-topbar,
.film-controls,
.film-stage {
    position: relative;
    z-index: 1;
}

.film-topbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid rgba(125, 211, 252, 0.16);
    color: rgba(224, 242, 254, 0.82);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-weight: 700;
}

.film-topbar span {
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.72);
}

.film-stage {
    height: 410px;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 20%, rgba(56, 189, 248, 0.2), transparent 30%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.65));
}

.film-monitor,
.film-laptop,
.film-keyboard,
.film-mouse,
.film-earbuds {
    position: absolute;
    border-radius: var(--radius-sm);
    animation: setup-float 5s ease-in-out infinite;
}

.film-monitor {
    left: 12%;
    top: 18%;
    width: 46%;
    height: 38%;
    border: 10px solid #0f172a;
    background: linear-gradient(135deg, #38bdf8, #2563eb 55%, #0f172a);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.28);
}

.film-monitor::after {
    content: '';
    position: absolute;
    left: 45%;
    bottom: -54px;
    width: 10%;
    height: 48px;
    background: #0f172a;
    border-radius: 0 0 8px 8px;
}

.film-laptop {
    right: 9%;
    top: 34%;
    width: 34%;
    height: 25%;
    border: 8px solid #111827;
    background: linear-gradient(135deg, #0f172a, #38bdf8);
    animation-delay: -1.2s;
}

.film-laptop::after,
.film-keyboard::after {
    content: '';
    position: absolute;
    left: -8%;
    right: -8%;
    bottom: -18px;
    height: 18px;
    border-radius: 3px 3px 14px 14px;
    background: #111827;
}

.film-keyboard {
    left: 18%;
    bottom: 18%;
    width: 44%;
    height: 12%;
    background:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.16) 0 14px, transparent 14px 23px),
        linear-gradient(135deg, #1e293b, #334155);
    animation-delay: -2s;
}

.film-mouse {
    right: 20%;
    bottom: 19%;
    width: 12%;
    height: 17%;
    border-radius: 44% 44% 48% 48%;
    background: linear-gradient(135deg, #e0f2fe, #38bdf8);
    animation-delay: -0.8s;
}

.film-earbuds {
    right: 10%;
    bottom: 12%;
    width: 16%;
    height: 9%;
    border-radius: 999px;
    background: linear-gradient(135deg, #f8fafc, #94a3b8);
    animation-delay: -1.8s;
}

.film-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border-top: 1px solid rgba(125, 211, 252, 0.16);
}

.film-controls span {
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 24px rgba(56, 189, 248, 0.7);
    position: relative;
}

.film-controls span::before {
    content: '';
    position: absolute;
    left: 0.9rem;
    top: 0.65rem;
    border-left: 0.75rem solid #0f172a;
    border-top: 0.5rem solid transparent;
    border-bottom: 0.5rem solid transparent;
}

.film-controls.playing span::before {
    border: none;
    width: 0.75rem;
    height: 1rem;
    border-left: 0.25rem solid #0f172a;
    border-right: 0.25rem solid #0f172a;
    left: 0.78rem;
    top: 0.65rem;
    box-sizing: border-box;
}

.film-controls div {
    flex: 1;
    height: 0.45rem;
    border-radius: 999px;
    background: linear-gradient(90deg, #38bdf8 0 var(--video-progress, 0%), rgba(255, 255, 255, 0.14) var(--video-progress, 0%) 100%);
}

.gear-list-section,
.setup-flow-section {
    padding: 6rem 0;
}

.gear-list-section {
    background: rgba(255, 255, 255, 0.72);
}

.gear-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1.5rem;
    perspective: 1000px;
}

.gear-card {
    grid-column: span 2;
    min-height: 620px;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-md);
    border: 1px solid rgba(37, 99, 235, 0.16);
    background: rgba(255, 255, 255, 0.76);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: relative;
    transition: var(--transition);
    transform-style: preserve-3d;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.featured-gear {
    grid-column: span 4;
}

.gear-card:hover {
    transform: translateY(-10px) rotateX(var(--tilt-rotate-x, 0deg)) rotateY(var(--tilt-rotate-y, 0deg));
    box-shadow: 0 26px 80px rgba(15, 23, 42, 0.14), var(--shadow-glow);
}

.gear-media {
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 28% 24%, rgba(125, 211, 252, 0.34), transparent 34%),
        linear-gradient(135deg, rgba(15, 43, 70, 0.96), rgba(37, 99, 235, 0.8));
}

.gear-media::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: conic-gradient(from 90deg, transparent, rgba(255, 255, 255, 0.16), transparent 34%);
    animation: project-sweep 10s linear infinite;
}

.gear-media img {
    max-width: 96%;
    max-height: 260px;
    object-fit: contain;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 24px 45px rgba(0, 0, 0, 0.34));
    transition: transform 0.45s ease, filter 0.45s ease;
}

.gear-card:hover .gear-media img {
    transform: translateY(-8px) scale(1.04);
    filter: drop-shadow(0 34px 55px rgba(0, 0, 0, 0.38));
}

.featured-gear .gear-media img {
    max-height: 300px;
}

.keyboard-media.image-fallback::after,
.mouse-media.image-fallback::after {
    content: '';
    position: relative;
    z-index: 1;
    display: block;
    filter: drop-shadow(0 24px 45px rgba(0, 0, 0, 0.34));
}

.keyboard-media.image-fallback::after {
    width: 78%;
    height: 96px;
    border-radius: 14px;
    background:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0 18px, transparent 18px 28px),
        repeating-linear-gradient(0deg, transparent 0 28px, rgba(255, 255, 255, 0.16) 28px 30px),
        linear-gradient(135deg, #1e293b, #38bdf8);
}

.mouse-media.image-fallback::after {
    width: 132px;
    height: 190px;
    border-radius: 48% 48% 44% 44%;
    background:
        linear-gradient(90deg, transparent 48%, rgba(15, 23, 42, 0.3) 49% 51%, transparent 52%),
        linear-gradient(135deg, #f8fafc, #38bdf8 70%, #2563eb);
}

.gear-monitor-shape,
.gear-laptop-shape,
.gear-audio-shape {
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 26px 46px rgba(0, 0, 0, 0.34));
}

.gear-monitor-shape {
    width: 76%;
    aspect-ratio: 16 / 9;
    border: 12px solid #0f172a;
    border-radius: 10px;
    background: linear-gradient(135deg, #38bdf8, #2563eb 60%, #0f172a);
}

.gear-monitor-shape::before {
    content: '';
    position: absolute;
    left: 45%;
    bottom: -62px;
    width: 10%;
    height: 50px;
    background: #0f172a;
}

.gear-monitor-shape::after {
    content: '';
    position: absolute;
    left: 32%;
    bottom: -72px;
    width: 36%;
    height: 12px;
    border-radius: 999px;
    background: #0f172a;
}

.gear-laptop-shape {
    width: 80%;
    aspect-ratio: 16 / 10;
    border: 12px solid #0f172a;
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(56, 189, 248, 0.9), rgba(37, 99, 235, 0.82)),
        repeating-linear-gradient(90deg, transparent 0 26px, rgba(255, 255, 255, 0.18) 26px 28px);
}

.gear-laptop-shape::after {
    content: '';
    position: absolute;
    left: -10%;
    right: -10%;
    bottom: -26px;
    height: 24px;
    border-radius: 3px 3px 18px 18px;
    background: #111827;
}

.gear-audio-shape {
    width: 70%;
    height: 170px;
}

.gear-audio-shape::before,
.gear-audio-shape::after {
    content: '';
    position: absolute;
    width: 34%;
    height: 66%;
    border-radius: 48% 48% 52% 52%;
    background: linear-gradient(135deg, #f8fafc, #38bdf8);
}

.gear-audio-shape::before {
    left: 12%;
    top: 6%;
    transform: rotate(-18deg);
}

.gear-audio-shape::after {
    right: 12%;
    top: 6%;
    transform: rotate(18deg);
}

.gear-content {
    padding: 1.5rem;
}

.gear-kicker {
    display: inline-flex;
    margin-bottom: 0.85rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: var(--accent-light);
    color: var(--accent-blue);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.gear-content h3 {
    color: var(--text-primary);
    font-size: 1.55rem;
    margin-bottom: 0.8rem;
}

.gear-content p,
.gear-content li {
    color: var(--text-secondary);
    line-height: 1.72;
}

.gear-content ul {
    display: grid;
    gap: 0.45rem;
    margin-top: 1rem;
}

.gear-content li {
    position: relative;
    padding-left: 1.2rem;
}

.gear-content li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.75rem;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--accent-blue);
}

.setup-flow-section {
    background: rgba(248, 250, 252, 0.94);
}

.setup-flow {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1.15fr);
    gap: 4rem;
    align-items: start;
}

.setup-flow .section-title {
    text-align: left;
}

.flow-steps {
    display: grid;
    gap: 1rem;
}

.flow-steps div {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 1rem;
    align-items: center;
    padding: 1.15rem;
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.flow-steps span {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary-blue);
    color: var(--bg-primary);
    font-weight: 800;
}

@keyframes setup-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* --- Contact Section --- */
.contact-section {
    padding: 6rem 0;
    background-color: rgba(248, 250, 252, 0.94);
}

/* --- Feedback Section --- */
.feedback-section {
    padding: 6rem 0;
    background-color: var(--bg-primary);
    position: relative;
    z-index: 1;
}

.feedback-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem;
    align-items: flex-start;
}

@media (max-width: 1024px) {
    .feedback-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

.feedback-desc {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.feedback-form {
    background: rgba(255, 255, 255, 0.76);
    padding: 3rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(37, 99, 235, 0.16);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

body.dark .feedback-form {
    background: rgba(19, 42, 74, 0.76);
    border-color: rgba(56, 189, 248, 0.16);
}

.feedback-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.feedback-row.row-education {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 900px) {
    .feedback-row,
    .feedback-row.row-education {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .feedback-row,
    .feedback-row.row-education {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feedback-form {
        padding: 2rem 1.5rem;
    }
}

/* Feedback List & Stats Styles */
.feedback-list-col {
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

body.dark .feedback-list-col {
    background: rgba(15, 34, 58, 0.45);
    border-color: rgba(56, 189, 248, 0.1);
}

.feedback-list-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.25rem;
}

.feedback-list-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feedback-stats {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.feedback-avg-score {
    font-size: 2rem;
    font-weight: 800;
    color: #f59e0b;
    line-height: 1;
}

.feedback-avg-stars {
    color: #f59e0b;
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.feedback-total-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.feedback-list {
    max-height: 480px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding-right: 0.5rem;
}

/* Custom Scrollbar for Feedback List */
.feedback-list::-webkit-scrollbar {
    width: 6px;
}

.feedback-list::-webkit-scrollbar-track {
    background: transparent;
}

.feedback-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.feedback-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Feedback Card Styles */
.feedback-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    animation: feedbackSlideIn 0.5s cubic-bezier(0.19, 1, 0.22, 1) both;
}

@keyframes feedbackSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feedback-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: rgba(37, 99, 235, 0.25);
}

body.dark .feedback-card:hover {
    border-color: rgba(56, 189, 248, 0.25);
}

.feedback-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.feedback-card-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.feedback-card-avatar {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), #0d9488);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.15);
}

.feedback-card-name-row {
    display: flex;
    flex-direction: column;
}

.feedback-card-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.feedback-card-phone {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.feedback-card-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.feedback-card-stars {
    color: #f59e0b;
    font-size: 0.9rem;
    letter-spacing: 1px;
    white-space: nowrap;
}

.feedback-card-content {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    word-break: break-word;
}

.feedback-empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Star Rating Styles */
.rating-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: rgba(248, 250, 252, 0.5);
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border-color);
}

body.dark .rating-group {
    background: rgba(15, 34, 58, 0.5);
}

.rating-group > label {
    font-weight: 700 !important;
    font-size: 1rem !important;
    color: var(--text-primary) !important;
}

.star-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 0.5rem;
}

.star-rating input {
    display: none;
}

.star-rating label {
    cursor: pointer;
    color: var(--text-muted);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.star-rating label svg {
    width: 32px;
    height: 32px;
    fill: transparent;
    stroke: var(--text-muted);
    stroke-width: 1.5;
    transition: fill 0.25s ease, stroke 0.25s ease, filter 0.25s ease;
}

.star-rating label:hover {
    transform: scale(1.25);
}

/* Hover & Checked state logic using flex-direction row-reverse */
.star-rating label:hover svg,
.star-rating label:hover ~ label svg,
.star-rating input:checked ~ label svg {
    fill: #f59e0b;
    stroke: #f59e0b;
    filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.4));
}

body.dark .star-rating label:hover svg,
body.dark .star-rating label:hover ~ label svg,
body.dark .star-rating input:checked ~ label svg {
    fill: #f59e0b;
    stroke: #f59e0b;
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.6));
}

.rating-badge {
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    background-color: var(--accent-light);
    color: var(--accent-blue);
    margin-top: 0.25rem;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(5px);
}

.rating-badge.show {
    opacity: 1;
    transform: translateY(0);
}


.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 4rem;
    align-items: flex-start;
}

.contact-info h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--accent-light);
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-text span {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 0.15rem;
}

.contact-text a, .contact-text p {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
    margin: 0;
}

.contact-text a:hover {
    color: var(--accent-blue);
}

.contact-form {
    background: rgba(255, 255, 255, 0.76);
    padding: 2.5rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(37, 99, 235, 0.16);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--accent-blue);
    background-color: var(--bg-card);
}

.btn-submit {
    width: 100%;
}

/* --- Footer --- */
.footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    background-color: rgba(255, 255, 255, 0.9);
}

body.dark .about-section,
body.dark .projects-section,
body.dark .gear-list-section,
body.dark .setup-flow-section,
body.dark .contact-section,
body.dark .feedback-section {
    background-color: rgba(15, 34, 58, 0.9);
}

body.dark .footer {
    background-color: rgba(10, 25, 47, 0.9);
}

body.dark .about-text,
body.dark .stat-card,
body.dark .timeline-item,
body.dark .project-card,
body.dark .gear-card,
body.dark .flow-steps div,
body.dark .contact-form {
    background: rgba(19, 42, 74, 0.72);
    border-color: rgba(56, 189, 248, 0.18);
}

body.dark .project-actions a:first-child,
body.dark .project-actions a:hover {
    background: var(--accent-blue);
    color: #0a192f;
    border-color: var(--accent-blue);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.footer-status {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.9rem;
}

.footer-status span {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 18px rgba(34, 197, 94, 0.72);
}

.footer-status p {
    margin: 0;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 700;
}

.footer-links a:hover {
    color: var(--accent-blue);
    transform: translateX(4px);
}

.footer-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.qr-code-img {
    width: 90px;
    height: 90px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-color);
    padding: 6px;
    background-color: #ffffff;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.qr-code-img:hover {
    transform: scale(1.05);
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-md);
}

.footer-qr p {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.footer-socials {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.social-link:hover {
    color: var(--accent-blue);
    border-color: var(--accent-blue);
    transform: translateY(-3px);
    background-color: var(--accent-light);
}

/* --- Scroll To Top Button --- */
#scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: -60px; /* Hidden offscreen initially */
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--primary-blue);
    color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 99;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body.dark #scroll-to-top {
    background-color: var(--accent-blue);
    color: #0a192f;
    box-shadow: var(--shadow-glow);
}

#scroll-to-top.show {
    right: 30px;
}

#scroll-to-top:hover {
    transform: translateY(-5px);
}

/* --- Reveal on Scroll Animation --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive Media Queries --- */

/* Laptops / Desktops (1024px and below) */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-container {
        gap: 2rem;
    }
    
    .avatar-container {
        width: 280px;
        height: 280px;
    }

    .hero-image-wrapper::before {
        width: 330px;
        height: 330px;
    }

    .hero-image-wrapper::after {
        width: 380px;
        height: 380px;
    }

    .projects-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gear-title {
        font-size: 3.4rem;
    }

    .gear-hero-grid,
    .setup-flow {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .gear-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gear-card,
    .featured-gear {
        grid-column: auto;
    }

    .featured-project {
        transform: none;
    }

    .featured-project:hover {
        transform: translateY(-10px) rotateX(var(--tilt-rotate-x, 0deg)) rotateY(var(--tilt-rotate-y, 0deg));
    }
}

/* Tablets (768px and below) */
@media (max-width: 768px) {
    /* Header Menu Toggle */
    .mobile-nav-toggle {
        display: flex;
        z-index: 1002;
    }
    
    .mobile-nav-toggle.open span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 5px);
    }
    
    .mobile-nav-toggle.open span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-nav-toggle.open span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -5px);
    }
    
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--bg-primary);
        box-shadow: var(--shadow-lg);
        flex-direction: column;
        justify-content: center;
        padding: 4rem 2rem;
        z-index: 1000;
        transition: var(--transition);
        border-left: 1px solid var(--border-color);
    }
    
    .nav.open {
        right: 0;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 2rem;
        width: 100%;
        align-items: center;
    }
    
    .nav-link {
        font-size: 1.15rem;
    }
    
    /* Hero layout stack */
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
        padding-top: 2rem;
    }
    
    .hero-content {
        align-items: center;
        order: 2;
    }
    
    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-actions {
        justify-content: center;
    }

    .hero-badges {
        justify-content: center;
    }

    .hero-terminal {
        text-align: left;
    }
    
    .hero-image-wrapper {
        order: 1;
        min-height: 300px;
    }
    
    .avatar-container {
        width: 240px;
        height: 240px;
    }

    .hero-image-wrapper::before {
        width: 285px;
        height: 285px;
    }

    .hero-image-wrapper::after {
        width: 325px;
        height: 325px;
    }

    .section-header {
        margin-bottom: 2.75rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        min-height: auto;
    }

    .gear-hero-section {
        padding-top: calc(var(--header-height) + 3rem);
    }

    .gear-hero-copy,
    .setup-flow {
        text-align: center;
    }

    .gear-hero-actions {
        justify-content: center;
    }

    .setup-flow .section-title {
        text-align: center;
    }

    .setup-film {
        min-height: 430px;
    }

    .film-stage {
        height: 320px;
    }

    .gear-grid {
        grid-template-columns: 1fr;
    }
    
    /* Contact Grid stack */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .contact-info {
        text-align: center;
    }
    
    .contact-item {
        justify-content: center;
    }
    
    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .footer-status {
        justify-content: center;
    }

    .footer-links {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Mobile Devices (480px and below) */
@media (max-width: 480px) {
    .container {
        padding: 0 1.25rem;
    }

    .interactive-bg::after {
        width: 20rem;
        height: 20rem;
    }

    #background-canvas {
        opacity: 0.5;
    }

    .hero-section {
        padding-bottom: 4rem;
    }
    
    .hero-title {
        font-size: 2.7rem;
    }
    
    .hero-role {
        font-size: 1.5rem;
        min-height: 2.5rem;
    }

    .hero-desc {
        font-size: 1rem;
        line-height: 1.75;
    }

    .hero-actions {
        width: 100%;
        gap: 0.85rem;
    }

    .btn {
        width: 100%;
        padding: 0.85rem 1.25rem;
    }

    .hero-terminal {
        width: 100%;
    }

    .terminal-output {
        min-height: 118px;
        font-size: 0.82rem;
    }

    .terminal-command-btn {
        flex: 1 1 calc(50% - 0.55rem);
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .skill-card {
        padding: 1.75rem;
    }

    .about-section,
    .skills-section,
    .projects-section,
    .gear-list-section,
    .setup-flow-section,
    .contact-section {
        padding: 4.5rem 0;
    }

    .gear-title {
        font-size: 2.55rem;
    }

    .gear-hero-section {
        padding-bottom: 4rem;
    }

    .setup-film {
        min-height: 360px;
        border-radius: var(--radius-md);
    }

    .film-stage {
        height: 260px;
    }

    .film-monitor {
        width: 52%;
        height: 32%;
        left: 8%;
    }

    .film-laptop {
        width: 38%;
        right: 7%;
    }

    .film-keyboard {
        width: 50%;
        left: 12%;
    }

    .gear-media {
        min-height: 220px;
    }

    .gear-card {
        min-height: auto;
    }

    .flow-steps div {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .flow-steps span {
        margin: 0 auto;
    }

    .about-text {
        padding: 1.4rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        min-height: 96px;
    }

    .timeline-item {
        padding: 1.15rem 1rem 1.15rem 2.8rem;
    }

    .project-visual {
        min-height: 165px;
    }

    .project-actions {
        flex-direction: column;
    }
    
    .contact-form {
        padding: 1.5rem;
    }

    .contact-item {
        align-items: flex-start;
        justify-content: flex-start;
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    .interactive-bg::before,
    .interactive-bg::after {
        animation: none;
        transition: none;
    }
}

/* --- Tech Command Theme Overrides --- */
:root {
    --bg-primary: #071014;
    --bg-secondary: #0b171c;
    --bg-card: rgba(11, 23, 28, 0.78);
    --text-primary: #f4fbff;
    --text-secondary: #a9bdc7;
    --text-muted: #6e8792;
    --primary-blue: #38e8ff;
    --primary-blue-hover: #8df4ff;
    --accent-blue: #38e8ff;
    --accent-light: rgba(56, 232, 255, 0.1);
    --border-color: rgba(121, 238, 255, 0.16);
    --shadow-sm: 0 1px 12px rgba(0, 0, 0, 0.22);
    --shadow-md: 0 18px 50px rgba(0, 0, 0, 0.26);
    --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.36);
    --shadow-glow: 0 0 42px rgba(56, 232, 255, 0.18);
    --radius-md: 14px;
    --radius-lg: 18px;
}

body,
body.dark {
    --bg-primary: #071014;
    --bg-secondary: #0b171c;
    --bg-card: rgba(11, 23, 28, 0.78);
    --text-primary: #f4fbff;
    --text-secondary: #a9bdc7;
    --text-muted: #6e8792;
    --primary-blue: #38e8ff;
    --primary-blue-hover: #8df4ff;
    --accent-blue: #38e8ff;
    --accent-light: rgba(56, 232, 255, 0.1);
    --border-color: rgba(121, 238, 255, 0.16);
    background:
        linear-gradient(180deg, #071014 0%, #09161b 38%, #0b1115 100%);
}

body:not(.dark) {
    --bg-primary: #f7fbff;
    --bg-secondary: #edf7fb;
    --bg-card: rgba(255, 255, 255, 0.84);
    --text-primary: #0a1720;
    --text-secondary: #36515e;
    --text-muted: #6f8792;
    --primary-blue: #075f73;
    --primary-blue-hover: #0a7e98;
    --accent-blue: #087f99;
    --accent-light: rgba(8, 127, 153, 0.1);
    --border-color: rgba(8, 127, 153, 0.18);
    background: #f7fbff;
}

.interactive-bg {
    background:
        linear-gradient(90deg, rgba(56, 232, 255, 0.05) 1px, transparent 1px),
        linear-gradient(0deg, rgba(56, 232, 255, 0.05) 1px, transparent 1px),
        linear-gradient(135deg, rgba(7, 16, 20, 0.98), rgba(12, 24, 28, 0.96) 45%, rgba(11, 17, 21, 0.98));
    background-size: 64px 64px, 64px 64px, 100% 100%;
}

.interactive-bg::before {
    opacity: 0.58;
    background-image:
        linear-gradient(115deg, transparent 0 34%, rgba(56, 232, 255, 0.12) 39%, transparent 44% 100%),
        linear-gradient(65deg, transparent 0 58%, rgba(45, 212, 191, 0.1) 63%, transparent 70% 100%),
        repeating-linear-gradient(90deg, rgba(56, 232, 255, 0.08) 0 1px, transparent 1px 96px);
    background-size: 520px 520px, 620px 620px, 100% 100%;
    mask-image: linear-gradient(#000, #000);
    -webkit-mask-image: linear-gradient(#000, #000);
}

.interactive-bg::after,
.decor-blob {
    display: none;
}

.header,
body.dark .header {
    background: rgba(7, 16, 20, 0.78);
    border-bottom-color: rgba(121, 238, 255, 0.14);
}

body:not(.dark) .header {
    background: rgba(247, 251, 255, 0.82);
}

.hero-section {
    padding-top: calc(var(--header-height) + 3rem);
    background:
        linear-gradient(180deg, rgba(56, 232, 255, 0.07), transparent 38%),
        linear-gradient(90deg, rgba(45, 212, 191, 0.06), transparent 36%, rgba(245, 158, 11, 0.04));
}

.hero-container {
    grid-template-columns: minmax(0, 1fr) minmax(420px, 0.9fr);
}

.hero-subtitle,
.section-subtitle,
.gear-kicker,
.project-meta span {
    color: #79eeff;
}

body:not(.dark) .hero-subtitle,
body:not(.dark) .section-subtitle,
body:not(.dark) .gear-kicker,
body:not(.dark) .project-meta span {
    color: var(--accent-blue);
}

.hero-title {
    max-width: 760px;
    background: linear-gradient(135deg, #ffffff 4%, #79eeff 48%, #2dd4bf 76%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body:not(.dark) .hero-title {
    background: linear-gradient(135deg, #071014 5%, #087f99 55%, #0f766e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-badges span,
.terminal-command-btn,
.project-actions a,
.skill-tags li {
    border-radius: 8px;
}

.btn {
    border-radius: 10px;
}

.btn-primary,
body.dark .btn-primary {
    background: linear-gradient(135deg, #79eeff, #2dd4bf);
    color: #061216;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
}

.hero-terminal,
.skill-card,
.project-card,
.gear-card,
.setup-film,
.contact-form,
.about-text,
.stat-card,
.timeline-item,
.flow-steps div {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)) padding-box,
        linear-gradient(135deg, rgba(121, 238, 255, 0.34), rgba(45, 212, 191, 0.08), rgba(245, 158, 11, 0.16)) border-box;
    border: 1px solid transparent;
}

.about-section,
.projects-section,
.gear-list-section,
.setup-flow-section,
.contact-section,
.feedback-section,
body.dark .about-section,
body.dark .projects-section,
body.dark .gear-list-section,
body.dark .setup-flow-section,
body.dark .contact-section,
body.dark .feedback-section {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.035)),
        rgba(7, 16, 20, 0.72);
}

body:not(.dark) .about-section,
body:not(.dark) .projects-section,
body:not(.dark) .gear-list-section,
body:not(.dark) .setup-flow-section,
body:not(.dark) .contact-section,
body:not(.dark) .feedback-section {
    background: rgba(239, 247, 251, 0.76);
}

.tech-hero-visual {
    min-height: 590px;
    perspective: 1100px;
}

.tech-hero-visual::before,
.tech-hero-visual::after,
.avatar-glow,
.avatar-container {
    display: none;
}

.tech-panel {
    position: absolute;
    border-radius: 14px;
    border: 1px solid rgba(121, 238, 255, 0.2);
    background: rgba(6, 18, 22, 0.72);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

body:not(.dark) .tech-panel {
    background: rgba(255, 255, 255, 0.76);
}

.main-panel {
    width: min(100%, 430px);
    aspect-ratio: 1 / 1;
    left: 50%;
    top: 50%;
    overflow: hidden;
    transform: translate(-50%, -50%) rotateX(58deg) rotateZ(-34deg);
    animation: tech-panel-float 8s ease-in-out infinite;
}

.main-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(121, 238, 255, 0.1) 1px, transparent 1px),
        linear-gradient(0deg, rgba(121, 238, 255, 0.1) 1px, transparent 1px);
    background-size: 38px 38px;
}

.main-panel::after {
    content: '';
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(45, 212, 191, 0.22);
    border-radius: 12px;
}

.panel-topline {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    color: #dffbff;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0;
}

.panel-topline span:last-child {
    color: #34d399;
}

.holo-core {
    position: absolute;
    inset: 22%;
    display: grid;
    place-items: center;
    transform-style: preserve-3d;
}

.core-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(121, 238, 255, 0.48);
    box-shadow: 0 0 28px rgba(56, 232, 255, 0.18);
}

.ring-a {
    inset: 3%;
    animation: orbit-ring 12s linear infinite;
}

.ring-b {
    inset: 20%;
    border-color: rgba(245, 158, 11, 0.5);
    animation: orbit-ring 8s linear infinite reverse;
}

.core-chip {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, #79eeff, #2dd4bf);
    color: #061216;
    font-weight: 900;
    box-shadow: 0 0 46px rgba(56, 232, 255, 0.4);
}

.signal-grid {
    position: absolute;
    left: 1.2rem;
    right: 1.2rem;
    bottom: 1.2rem;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.55rem;
}

.signal-grid span {
    height: 0.5rem;
    border-radius: 999px;
    background: rgba(121, 238, 255, 0.2);
}

.signal-grid span:nth-child(3n + 1) {
    background: rgba(45, 212, 191, 0.45);
}

.profile-panel {
    left: 0;
    top: 6%;
    width: 245px;
    display: grid;
    grid-template-columns: 66px 1fr;
    gap: 0.9rem;
    align-items: center;
    padding: 0.9rem;
    animation: tech-card-float 7s ease-in-out infinite;
}

.profile-panel .avatar-img {
    width: 66px;
    height: 66px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid rgba(121, 238, 255, 0.24);
}

.profile-panel span,
.metric-panel span {
    display: block;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.profile-panel strong,
.metric-panel strong {
    color: var(--text-primary);
    font-size: 1rem;
}

.metric-panel {
    width: 190px;
    padding: 1rem;
    animation: tech-card-float 7s ease-in-out infinite;
}

.metric-one {
    right: 0;
    top: 13%;
    border-color: rgba(245, 158, 11, 0.32);
}

.metric-two {
    left: 5%;
    bottom: 13%;
    animation-delay: -1.8s;
}

.metric-three {
    right: 4%;
    bottom: 8%;
    border-color: rgba(45, 212, 191, 0.32);
    animation-delay: -3s;
}

.project-visual,
.gear-media {
    background:
        linear-gradient(90deg, rgba(121, 238, 255, 0.12) 1px, transparent 1px),
        linear-gradient(0deg, rgba(121, 238, 255, 0.08) 1px, transparent 1px),
        linear-gradient(135deg, #071014, #0d2b30 52%, #0b171c);
    background-size: 36px 36px, 36px 36px, 100% 100%;
}

.code-visual {
    background:
        linear-gradient(90deg, rgba(245, 158, 11, 0.12) 1px, transparent 1px),
        linear-gradient(0deg, rgba(121, 238, 255, 0.08) 1px, transparent 1px),
        linear-gradient(135deg, #071014, #172016 55%, #0b171c);
    background-size: 36px 36px, 36px 36px, 100% 100%;
}

.gear-title {
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    letter-spacing: 0;
}

.footer,
body.dark .footer {
    background: rgba(7, 16, 20, 0.92);
}

@keyframes tech-panel-float {
    0%, 100% { transform: translate(-50%, -50%) rotateX(58deg) rotateZ(-34deg) translateY(0); }
    50% { transform: translate(-50%, -50%) rotateX(58deg) rotateZ(-34deg) translateY(-16px); }
}

@keyframes tech-card-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
    }

    .tech-hero-visual {
        min-height: 520px;
        width: min(100%, 620px);
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .tech-hero-visual {
        order: 1;
        min-height: 470px;
    }

    .main-panel {
        width: min(78vw, 360px);
    }

    .profile-panel {
        left: 4%;
        top: 5%;
    }

    .metric-panel {
        width: 168px;
    }

    .metric-one {
        right: 3%;
    }
}

@media (max-width: 480px) {
    .tech-hero-visual {
        min-height: 420px;
    }

    .main-panel {
        width: 300px;
    }

    .profile-panel {
        width: 210px;
        grid-template-columns: 54px 1fr;
    }

    .profile-panel .avatar-img {
        width: 54px;
        height: 54px;
    }

    .metric-panel {
        width: 145px;
        padding: 0.8rem;
    }

    .metric-two {
        left: 0;
        bottom: 12%;
    }

    .metric-three {
        right: 0;
        bottom: 4%;
    }
}

/* --- Premium Scroll Motion --- */
#scroll-progress {
    height: 3px;
    background:
        linear-gradient(90deg, #79eeff, #2dd4bf 52%, #f59e0b);
    box-shadow:
        0 0 18px rgba(56, 232, 255, 0.9),
        0 0 34px rgba(45, 212, 191, 0.32);
}

#scroll-progress::after {
    content: '';
    position: absolute;
    top: -5px;
    right: -7px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #f4fbff;
    box-shadow:
        0 0 16px rgba(244, 251, 255, 0.9),
        0 0 34px rgba(56, 232, 255, 0.82);
}

.interactive-bg {
    transform: translate3d(0, calc(var(--scroll-y, 0px) * -0.012), 0);
    transition: filter 0.35s ease;
}

.header {
    transform: translateY(0);
}

body.scrolling-down .header.scrolled {
    transform: translateY(-18px);
}

body.scrolling-up .header.scrolled {
    transform: translateY(0);
}

.about-section,
.skills-section,
.projects-section,
.gear-hero-section,
.gear-list-section,
.setup-flow-section,
.contact-section,
.feedback-section {
    position: relative;
    overflow: hidden;
}

.about-section::before,
.skills-section::before,
.projects-section::before,
.gear-hero-section::before,
.gear-list-section::before,
.setup-flow-section::before,
.contact-section::before,
.feedback-section::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background:
        linear-gradient(90deg, transparent, rgba(121, 238, 255, 0.8), rgba(45, 212, 191, 0.45), transparent);
    transform: scaleX(0);
    transform-origin: left center;
    opacity: 0;
    transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
}

.section-in-view::before {
    transform: scaleX(1);
    opacity: 1;
}

.section-header {
    transform: translateY(14px);
    opacity: 0.78;
    transition:
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.8s ease;
}

.section-in-view .section-header {
    transform: translateY(0);
    opacity: 1;
}

.section-divider {
    width: 92px;
    height: 2px;
    background:
        linear-gradient(90deg, transparent, #79eeff, #f59e0b, transparent);
    box-shadow: 0 0 18px rgba(56, 232, 255, 0.48);
}

.reveal {
    opacity: 0;
    transform: translateY(28px) scale(0.99);
    filter: blur(5px);
    transition:
        opacity 0.4s ease,
        transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        filter 0.4s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

.reveal .reveal-child {
    opacity: 0;
    filter: blur(4px);
    transition:
        opacity 0.3s ease var(--reveal-delay, 0ms),
        filter 0.3s ease var(--reveal-delay, 0ms);
}

.reveal.active .reveal-child {
    opacity: 1;
    filter: blur(0);
}

@media (max-width: 768px) {
    .reveal {
        transform: translateY(12px) scale(0.995);
        filter: none;
        transition:
            opacity 0.28s ease,
            transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .reveal.active {
        filter: none;
    }
    
    .reveal .reveal-child {
        filter: none;
        transition: opacity 0.22s ease var(--reveal-delay, 0ms);
    }
    
    .reveal.active .reveal-child {
        filter: none;
    }
}

.project-card,
.gear-card,
.skill-card,
.stat-card,
.timeline-item,
.flow-steps div {
    transform-origin: 50% 60%;
}

.project-card::after,
.gear-card::after,
.skill-card::after,
.setup-film::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(115deg, transparent 0 38%, rgba(255, 255, 255, 0.16) 48%, transparent 58% 100%);
    transform: translateX(-120%);
    opacity: 0;
    transition:
        transform 0.85s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.5s ease;
}

.project-card:hover::after,
.gear-card:hover::after,
.skill-card:hover::after,
.setup-film:hover::after {
    transform: translateX(120%);
    opacity: 1;
}

.hero-terminal,
.tech-panel,
.project-card,
.gear-card,
.skill-card,
.setup-film {
    will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
    .interactive-bg,
    .header,
    .section-header,
    .reveal,
    .reveal .reveal-child,
    .about-section::before,
    .skills-section::before,
    .projects-section::before,
    .gear-hero-section::before,
    .gear-list-section::before,
    .setup-flow-section::before,
    .contact-section::before,
    .feedback-section::before {
        transform: none;
        transition: none;
        filter: none;
    }

    .reveal,
    .reveal .reveal-child {
        opacity: 1;
    }
}

/* --- Cinematic Scroll Director --- */
body::before,
body::after {
    content: '';
    position: fixed;
    left: 0;
    right: 0;
    z-index: 998;
    height: 12vh;
    pointer-events: none;
}

body::before {
    top: 0;
    background: linear-gradient(180deg, rgba(7, 16, 20, 0.92), transparent);
}

body::after {
    bottom: 0;
    background: linear-gradient(0deg, rgba(7, 16, 20, 0.88), transparent);
}

.scroll-hud {
    position: fixed;
    left: clamp(1rem, 2.2vw, 2rem);
    top: 50%;
    z-index: 999;
    width: 168px;
    transform: translateY(-50%);
    padding: 0.85rem;
    border-left: 1px solid rgba(121, 238, 255, 0.44);
    color: var(--text-primary);
    pointer-events: none;
    opacity: 0.86;
    mix-blend-mode: screen;
}

.scroll-hud::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 0.85rem;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #79eeff;
    box-shadow: 0 0 18px rgba(121, 238, 255, 0.9);
}

.scroll-hud-kicker,
.scroll-hud-title {
    display: block;
    letter-spacing: 0;
}

.scroll-hud-kicker {
    color: #79eeff;
    font-size: 0.66rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 0.28rem;
}

.scroll-hud-title {
    font-size: 0.78rem;
    line-height: 1.28;
    color: rgba(244, 251, 255, 0.86);
}

.scroll-hud-bar {
    display: block;
    height: 2px;
    margin-top: 0.75rem;
    background: rgba(121, 238, 255, 0.12);
    overflow: hidden;
}

.scroll-hud-bar span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #79eeff, #f59e0b);
    box-shadow: 0 0 14px rgba(121, 238, 255, 0.72);
}

.hero-section,
.about-section,
.skills-section,
.projects-section,
.gear-hero-section,
.gear-list-section,
.setup-flow-section,
.contact-section,
.feedback-section {
    min-height: min(980px, 100vh);
}

.reveal > .container,
.gear-hero-section.reveal > .container,
.setup-flow-section.reveal > .container {
    transform:
        translate3d(0, var(--section-shift, 0px), 0)
        scale(var(--section-scale, 1));
    transition:
        transform 0.18s linear,
        filter 0.45s ease;
}

.reveal.section-focus > .container,
.gear-hero-section.section-focus > .container,
.setup-flow-section.section-focus > .container {
    filter: saturate(1.08) contrast(1.03);
}

.reveal::after,
.gear-hero-section::after,
.setup-flow-section::after,
.contact-section::after,
.feedback-section::after {
    content: attr(data-scene);
    position: absolute;
    right: clamp(1rem, 6vw, 5rem);
    top: clamp(4rem, 10vw, 7rem);
    z-index: 0;
    color: transparent;
    -webkit-text-stroke: 1px rgba(121, 238, 255, 0.08);
    font-size: clamp(5rem, 15vw, 15rem);
    line-height: 0.8;
    font-weight: 900;
    letter-spacing: 0;
    pointer-events: none;
    opacity: 0;
    transform: translateX(48px) scale(0.9);
    transition:
        opacity 0.7s ease,
        transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.section-focus::after,
.gear-hero-section.section-focus::after,
.setup-flow-section.section-focus::after,
.contact-section.section-focus::after {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.section-focus .section-title,
.section-focus .gear-title {
    text-shadow:
        0 0 22px rgba(121, 238, 255, 0.2),
        0 0 56px rgba(45, 212, 191, 0.12);
}

.section-focus .section-divider {
    animation: section-pulse-line 1.6s ease-in-out infinite;
}

.section-focus .project-visual::before,
.section-focus .gear-media::before,
.section-focus .setup-film::before {
    animation-duration: 4.8s;
}

.section-focus .project-card,
.section-focus .gear-card,
.section-focus .skill-card,
.section-focus .stat-card,
.section-focus .timeline-item,
.section-focus .flow-steps div {
    box-shadow:
        0 26px 86px rgba(0, 0, 0, 0.3),
        0 0 36px rgba(56, 232, 255, 0.1);
}

.section-focus .project-card:nth-child(2),
.section-focus .gear-card:nth-child(2),
.section-focus .skill-card:nth-child(2) {
    border-color: rgba(245, 158, 11, 0.28);
}

.about-section.section-focus,
.skills-section.section-focus,
.projects-section.section-focus,
.gear-hero-section.section-focus,
.gear-list-section.section-focus,
.setup-flow-section.section-focus,
.contact-section.section-focus,
.feedback-section.section-focus {
    background:
        radial-gradient(circle at calc(var(--section-progress, 0.5) * 100%) 18%, rgba(121, 238, 255, 0.13), transparent 28rem),
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.04)),
        rgba(7, 16, 20, 0.78);
}

@keyframes section-pulse-line {
    0%, 100% {
        box-shadow: 0 0 14px rgba(56, 232, 255, 0.36);
        transform: scaleX(0.86);
    }
    50% {
        box-shadow: 0 0 34px rgba(245, 158, 11, 0.36);
        transform: scaleX(1.1);
    }
}

@media (max-width: 1024px) {
    .scroll-hud {
        top: auto;
        bottom: 1rem;
        left: 1rem;
        transform: none;
        width: 154px;
        background: rgba(7, 16, 20, 0.44);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
}

@media (max-width: 640px) {
    body::before,
    body::after {
        height: 8vh;
    }

    .scroll-hud {
        display: none;
    }

    .reveal > .container,
    .gear-hero-section.reveal > .container,
    .setup-flow-section.reveal > .container {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    body::before,
    body::after,
    .scroll-hud,
    .reveal::after,
    .gear-hero-section::after,
    .setup-flow-section::after,
    .contact-section::after {
        display: none;
    }

    .reveal > .container,
    .gear-hero-section.reveal > .container,
    .setup-flow-section.reveal > .container {
        transform: none;
        filter: none;
    }
}

/* --- Programmatic Coding Lofi Player --- */
.lofi-player {
    margin-top: 2rem;
    padding: 1.2rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(56, 189, 248, 0.2);
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-width: 420px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.lofi-player:hover {
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: var(--shadow-glow);
}

.player-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.player-status {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.lofi-player.playing .player-status {
    color: #38bdf8;
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
}

.audio-bars {
    display: flex;
    gap: 3px;
    align-items: flex-end;
    height: 14px;
}

.audio-bars span {
    width: 2.5px;
    height: 2px;
    background-color: var(--accent-blue);
    border-radius: 1px;
    transition: height 0.15s ease;
}

.lofi-player.playing .audio-bars span {
    animation: bounce-bars 0.8s ease infinite alternate;
}

.lofi-player.playing .audio-bars span:nth-child(1) { animation-delay: 0.1s; }
.lofi-player.playing .audio-bars span:nth-child(2) { animation-delay: 0.3s; }
.lofi-player.playing .audio-bars span:nth-child(3) { animation-delay: 0.5s; }
.lofi-player.playing .audio-bars span:nth-child(4) { animation-delay: 0.2s; }
.lofi-player.playing .audio-bars span:nth-child(5) { animation-delay: 0.4s; }

@keyframes bounce-bars {
    0% { height: 2px; }
}

.player-title {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.player-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.2rem;
}

#player-play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--accent-blue);
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transition: var(--transition);
}

#player-play-btn:hover {
    transform: scale(1.08);
    background: var(--primary-blue-hover);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.5);
}

#player-play-btn svg {
    transition: var(--transition);
}

.player-mode {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.mode-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}

.mode-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.mode-btn.active {
    background: rgba(56, 189, 248, 0.15);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

/* --- M-TP YouTube Music Station --- */
.mtp-station {
    margin-top: 2rem;
    max-width: 460px;
    width: 100%;
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(121, 238, 255, 0.2);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025)) padding-box,
        linear-gradient(135deg, rgba(121, 238, 255, 0.34), rgba(245, 158, 11, 0.18)) border-box;
    box-shadow: var(--shadow-glow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.mtp-station .player-status {
    color: #79eeff;
    text-shadow: 0 0 12px rgba(121, 238, 255, 0.42);
}

.mtp-station .audio-bars span {
    animation: bounce-bars 0.8s ease infinite alternate;
}

.mtp-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    margin: 0.85rem 0 0.9rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(121, 238, 255, 0.22);
    background: #000;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.mtp-frame img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
    filter: saturate(1.05) contrast(1.02);
    transition: transform 0.45s ease, filter 0.45s ease;
}

.mtp-frame video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: contain;
    background: #000;
}

.mtp-frame:has(video)::after {
    display: none;
}

.mtp-launcher:hover img {
    transform: scale(1.04);
    filter: saturate(1.2) contrast(1.08);
}

.mtp-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.52)),
        radial-gradient(circle at 50% 50%, rgba(121, 238, 255, 0.12), transparent 40%);
    pointer-events: none;
}

.mtp-play-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
}

.mtp-play-overlay span {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, #79eeff, #2dd4bf);
    box-shadow:
        0 0 28px rgba(121, 238, 255, 0.62),
        0 14px 34px rgba(0, 0, 0, 0.34);
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.mtp-play-overlay span::before {
    content: '';
    position: absolute;
    left: 28px;
    top: 21px;
    border-left: 19px solid #061216;
    border-top: 13px solid transparent;
    border-bottom: 13px solid transparent;
}

.mtp-play-overlay:hover span {
    transform: scale(1.08);
    box-shadow:
        0 0 42px rgba(121, 238, 255, 0.82),
        0 18px 42px rgba(0, 0, 0, 0.38);
}

.mtp-youtube-link,
.mtp-source-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    margin-bottom: 0.85rem;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.28);
    background: rgba(245, 158, 11, 0.1);
    color: #f8fafc;
    font-size: 0.78rem;
    font-weight: 800;
    font-family: inherit;
    text-decoration: none;
}

button.mtp-youtube-link {
    cursor: pointer;
}

.mtp-source-link {
    margin-left: 0.45rem;
    border-color: rgba(121, 238, 255, 0.22);
    background: rgba(121, 238, 255, 0.08);
}

.mtp-youtube-link:hover,
.mtp-source-link:hover {
    border-color: rgba(245, 158, 11, 0.56);
    background: rgba(245, 158, 11, 0.18);
    transform: translateY(-2px);
}

.mtp-source-link:hover {
    border-color: rgba(121, 238, 255, 0.52);
    background: rgba(121, 238, 255, 0.14);
}

/* --- Hobbies Section --- */
.hobbies-section {
    position: relative;
    min-height: min(900px, 100vh);
    padding: 6rem 0 7rem;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.035)),
        rgba(7, 16, 20, 0.72);
}

.hobbies-section .container {
    max-width: 1320px;
}

.hobbies-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.75rem;
    align-items: stretch;
}

.music-stations {
    display: grid;
    grid-template-columns: repeat(2, minmax(360px, 1fr));
    gap: 1.6rem;
}

.hobbies-copy .section-title {
    text-align: center;
}

.hobbies-copy p {
    color: var(--text-secondary);
    line-height: 1.85;
    font-size: 1.05rem;
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
}

.hobbies-section .mtp-station {
    max-width: none;
    margin-top: 0;
    min-width: 0;
    padding: 1.35rem;
}

.hobbies-section .player-title {
    min-height: 2.15rem;
    margin-top: 0.85rem;
    margin-bottom: 0.15rem;
    font-size: clamp(1.1rem, 1.6vw, 1.35rem);
}

.hobbies-section .mtp-frame {
    margin: 1rem 0 1.05rem;
}

.hobbies-section .mtp-youtube-link,
.hobbies-section .mtp-source-link {
    min-height: 38px;
    margin-right: 0.45rem;
    margin-bottom: 0.95rem;
    padding: 0.55rem 0.85rem;
    font-size: 0.8rem;
}

.hobbies-section .mtp-source-link {
    margin-left: 0;
}

.hobbies-section::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background:
        linear-gradient(90deg, transparent, rgba(121, 238, 255, 0.8), rgba(45, 212, 191, 0.45), transparent);
    transform: scaleX(0);
    transform-origin: left center;
    opacity: 0;
    transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
}

.hobbies-section.section-in-view::before {
    transform: scaleX(1);
    opacity: 1;
}

.hobbies-section::after {
    content: attr(data-scene);
    position: absolute;
    right: clamp(1rem, 6vw, 5rem);
    top: clamp(4rem, 10vw, 7rem);
    z-index: 0;
    color: transparent;
    -webkit-text-stroke: 1px rgba(121, 238, 255, 0.08);
    font-size: clamp(5rem, 15vw, 15rem);
    line-height: 0.8;
    font-weight: 900;
    letter-spacing: 0;
    pointer-events: none;
    opacity: 0;
    transform: translateX(48px) scale(0.9);
    transition:
        opacity 0.7s ease,
        transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.hobbies-section.section-focus::after {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.hobbies-section.reveal > .container {
    transform:
        translate3d(0, var(--section-shift, 0px), 0)
        scale(var(--section-scale, 1));
    transition:
        transform 0.18s linear,
        filter 0.45s ease;
}

.hobbies-section.section-focus > .container {
    filter: saturate(1.08) contrast(1.03);
}

.hobbies-section.section-focus {
    background:
        radial-gradient(circle at calc(var(--section-progress, 0.5) * 100%) 18%, rgba(121, 238, 255, 0.13), transparent 28rem),
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.04)),
        rgba(7, 16, 20, 0.78);
}

@media (max-width: 1024px) {
    .hobbies-grid {
        gap: 2.5rem;
    }

    .music-stations {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .hobbies-copy,
    .hobbies-copy .section-title {
        text-align: center;
    }

    .hobbies-copy p {
        margin: 0 auto;
    }
}

@media (max-width: 640px) {
    .hobbies-section.reveal > .container {
        transform: none;
    }

    .music-stations {
        grid-template-columns: 1fr;
        gap: 1.35rem;
    }

    .hobbies-section .mtp-station {
        padding: 1rem;
    }

    .hobbies-section .mtp-youtube-link,
    .hobbies-section .mtp-source-link {
        width: 100%;
        margin-right: 0;
        justify-content: center;
    }
}

.mtp-track-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    max-height: 13.5rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 0.25rem;
    padding-bottom: 0.1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(121, 238, 255, 0.5) rgba(255, 255, 255, 0.08);
}

.mtp-track-list::-webkit-scrollbar {
    width: 8px;
}

.mtp-track-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
}

.mtp-track-list::-webkit-scrollbar-thumb {
    background: rgba(121, 238, 255, 0.5);
    border-radius: 999px;
}

.mtp-track {
    flex: 1 1 128px;
    min-height: 40px;
    padding: 0.55rem 0.78rem;
    border-radius: 8px;
    border: 1px solid rgba(121, 238, 255, 0.18);
    background: rgba(255, 255, 255, 0.045);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
}

.mtp-track:hover,
.mtp-track.active {
    border-color: rgba(121, 238, 255, 0.62);
    background: rgba(121, 238, 255, 0.14);
    color: #f4fbff;
    transform: translateY(-2px);
}

.mode-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.hidden {
    display: none !important;
}

/* --- Polished Light Mode --- */
body:not(.dark) {
    --bg-primary: #f5fbff;
    --bg-secondary: #eaf5f9;
    --bg-card: rgba(255, 255, 255, 0.84);
    --text-primary: #071922;
    --text-secondary: #294955;
    --text-muted: #5f7882;
    --primary-blue: #067189;
    --primary-blue-hover: #0893ad;
    --accent-blue: #087f99;
    --accent-light: rgba(8, 127, 153, 0.12);
    --border-color: rgba(8, 94, 112, 0.2);
    --shadow-sm: 0 8px 24px rgba(7, 25, 34, 0.08);
    --shadow-md: 0 18px 46px rgba(7, 25, 34, 0.12);
    --shadow-lg: 0 28px 80px rgba(7, 25, 34, 0.16);
    --shadow-glow: 0 0 34px rgba(8, 127, 153, 0.18);
    background:
        linear-gradient(180deg, #f7fcff 0%, #eef8fb 48%, #f6fbff 100%);
    color: var(--text-primary);
}

body:not(.dark)::before {
    background: linear-gradient(180deg, rgba(245, 251, 255, 0.9), transparent);
}

body:not(.dark)::after {
    background: linear-gradient(0deg, rgba(245, 251, 255, 0.86), transparent);
}

body:not(.dark) .interactive-bg {
    background:
        linear-gradient(90deg, rgba(8, 127, 153, 0.075) 1px, transparent 1px),
        linear-gradient(0deg, rgba(8, 127, 153, 0.06) 1px, transparent 1px),
        radial-gradient(circle at 18% 12%, rgba(8, 127, 153, 0.14), transparent 28rem),
        radial-gradient(circle at 78% 28%, rgba(245, 158, 11, 0.12), transparent 24rem),
        linear-gradient(135deg, rgba(247, 252, 255, 0.98), rgba(235, 247, 251, 0.96));
    background-size: 64px 64px, 64px 64px, 100% 100%, 100% 100%, 100% 100%;
}

body:not(.dark) .interactive-bg::before {
    opacity: 0.52;
    background-image:
        linear-gradient(115deg, transparent 0 34%, rgba(8, 127, 153, 0.12) 39%, transparent 44% 100%),
        linear-gradient(65deg, transparent 0 58%, rgba(245, 158, 11, 0.1) 63%, transparent 70% 100%),
        repeating-linear-gradient(90deg, rgba(8, 127, 153, 0.06) 0 1px, transparent 1px 96px);
}

body:not(.dark) .interactive-bg::after {
    display: block;
    width: 28rem;
    height: 28rem;
    left: var(--mouse-x);
    top: var(--mouse-y);
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.72) 0 1px, transparent 2px),
        radial-gradient(circle, rgba(8, 127, 153, 0.24) 0%, rgba(45, 212, 191, 0.13) 32%, rgba(245, 158, 11, 0.06) 48%, transparent 76%);
    box-shadow:
        0 0 52px rgba(8, 127, 153, 0.2),
        0 0 118px rgba(45, 212, 191, 0.13),
        0 0 170px rgba(245, 158, 11, 0.07);
    opacity: 0.78;
    filter: blur(8px);
    transform: translate3d(-50%, -50%, 0);
    mix-blend-mode: multiply;
    animation: cursor-aura 2.8s ease-in-out infinite;
    mask-image: radial-gradient(circle, #000 0 46%, rgba(0, 0, 0, 0.72) 58%, transparent 82%);
    -webkit-mask-image: radial-gradient(circle, #000 0 46%, rgba(0, 0, 0, 0.72) 58%, transparent 82%);
}

body:not(.dark):not(.hero-in-view) .interactive-bg::after {
    opacity: 0.48;
}

body:not(.dark) .header {
    background: rgba(247, 252, 255, 0.82);
    border-bottom-color: rgba(8, 94, 112, 0.16);
    box-shadow: 0 12px 34px rgba(7, 25, 34, 0.08);
}

body:not(.dark) .nav {
    background-color: rgba(247, 252, 255, 0.96);
}

body:not(.dark) .logo,
body:not(.dark) .nav-link,
body:not(.dark) .mobile-nav-toggle span {
    color: var(--text-primary);
}

body:not(.dark) .hero-section {
    background:
        radial-gradient(circle at 64% 20%, rgba(8, 127, 153, 0.12), transparent 28rem),
        linear-gradient(180deg, rgba(8, 127, 153, 0.08), transparent 42%),
        linear-gradient(90deg, rgba(45, 212, 191, 0.08), transparent 42%, rgba(245, 158, 11, 0.08));
}

body:not(.dark) .hero-title {
    background: linear-gradient(135deg, #061216 6%, #087f99 50%, #0f766e 78%, #b45309 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body:not(.dark) .hero-role .typewriter,
body:not(.dark) .section-title,
body:not(.dark) .gear-title,
body:not(.dark) .project-content h3,
body:not(.dark) .gear-content h3,
body:not(.dark) .skill-card h3,
body:not(.dark) .player-title {
    color: var(--text-primary);
}

body:not(.dark) .hero-desc,
body:not(.dark) .about-text p,
body:not(.dark) .project-content p,
body:not(.dark) .gear-content p,
body:not(.dark) .gear-content li,
body:not(.dark) .skill-card p,
body:not(.dark) .hobbies-copy p,
body:not(.dark) .setup-flow p,
body:not(.dark) .contact-info p {
    color: var(--text-secondary);
}

body:not(.dark) .hero-badges span,
body:not(.dark) .skill-tags li,
body:not(.dark) .project-meta span,
body:not(.dark) .gear-kicker {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(8, 127, 153, 0.2);
    color: #075f73;
    box-shadow: 0 8px 20px rgba(7, 25, 34, 0.06);
}

body:not(.dark) .hero-terminal,
body:not(.dark) .skill-card,
body:not(.dark) .project-card,
body:not(.dark) .gear-card,
body:not(.dark) .setup-film,
body:not(.dark) .contact-form,
body:not(.dark) .about-text,
body:not(.dark) .stat-card,
body:not(.dark) .timeline-item,
body:not(.dark) .flow-steps div,
body:not(.dark) .mtp-station,
body:not(.dark) .tech-panel {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(245, 251, 255, 0.72)) padding-box,
        linear-gradient(135deg, rgba(8, 127, 153, 0.32), rgba(45, 212, 191, 0.14), rgba(245, 158, 11, 0.22)) border-box;
    border: 1px solid transparent;
    box-shadow: var(--shadow-md);
}

body:not(.dark) .hero-terminal {
    background:
        linear-gradient(180deg, rgba(5, 18, 24, 0.94), rgba(7, 31, 39, 0.9)) padding-box,
        linear-gradient(135deg, rgba(8, 127, 153, 0.58), rgba(45, 212, 191, 0.22), rgba(245, 158, 11, 0.24)) border-box;
    border-color: transparent;
    color: #ecfeff;
    box-shadow:
        0 22px 58px rgba(7, 25, 34, 0.22),
        0 0 42px rgba(8, 127, 153, 0.22);
}

body:not(.dark) .hero-terminal-top {
    background: rgba(255, 255, 255, 0.075);
    border-bottom-color: rgba(121, 238, 255, 0.18);
}

body:not(.dark) .terminal-title {
    color: rgba(236, 254, 255, 0.78);
}

body:not(.dark) .terminal-log p:nth-child(odd),
body:not(.dark) .terminal-prompt {
    color: #5eead4;
}

body:not(.dark) .terminal-log p:nth-child(even),
body:not(.dark) .terminal-res {
    color: #e6fbff;
}

body:not(.dark) #terminal-input {
    color: #ffffff;
    caret-color: #79eeff;
}

body:not(.dark) .terminal-command-btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(121, 238, 255, 0.22);
    color: rgba(236, 254, 255, 0.86);
}

body:not(.dark) .terminal-command-btn:hover,
body:not(.dark) .terminal-command-btn.active {
    background: rgba(121, 238, 255, 0.18);
    border-color: rgba(121, 238, 255, 0.58);
    color: #ffffff;
}

body:not(.dark) .about-section,
body:not(.dark) .skills-section,
body:not(.dark) .projects-section,
body:not(.dark) .gear-hero-section,
body:not(.dark) .gear-list-section,
body:not(.dark) .setup-flow-section,
body:not(.dark) .hobbies-section,
body:not(.dark) .contact-section,
body:not(.dark) .feedback-section {
    background:
        radial-gradient(circle at calc(var(--section-progress, 0.5) * 100%) 12%, rgba(8, 127, 153, 0.1), transparent 28rem),
        linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(235, 247, 251, 0.78));
}

body:not(.dark) .project-visual,
body:not(.dark) .gear-media {
    background:
        linear-gradient(90deg, rgba(8, 127, 153, 0.12) 1px, transparent 1px),
        linear-gradient(0deg, rgba(8, 127, 153, 0.08) 1px, transparent 1px),
        linear-gradient(135deg, #e7f7fb, #cfeef4 54%, #f7fbff);
    background-size: 36px 36px, 36px 36px, 100% 100%;
}

body:not(.dark) .terminal-lines span,
body:not(.dark) .code-grid span {
    background: rgba(255, 255, 255, 0.76);
    border-color: rgba(8, 127, 153, 0.16);
    color: #0b3040;
}

body:not(.dark) .btn-primary,
body:not(.dark) #scroll-to-top {
    background: linear-gradient(135deg, #087f99, #0f766e);
    color: #ffffff;
    box-shadow: 0 14px 34px rgba(8, 127, 153, 0.24);
}

body:not(.dark) .btn-secondary,
body:not(.dark) .project-actions a,
body:not(.dark) .theme-btn,
body:not(.dark) .social-link {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(8, 94, 112, 0.2);
    color: var(--text-primary);
}

body:not(.dark) .form-group input,
body:not(.dark) .form-group textarea {
    background: rgba(255, 255, 255, 0.84);
    border-color: rgba(8, 94, 112, 0.22);
    color: var(--text-primary);
}

body:not(.dark) .scroll-hud {
    color: var(--text-primary);
    border-left-color: rgba(8, 127, 153, 0.5);
    background: rgba(255, 255, 255, 0.44);
    mix-blend-mode: normal;
}

body:not(.dark) .scroll-hud-title {
    color: rgba(7, 25, 34, 0.86);
}

body:not(.dark) .mtp-track {
    background: rgba(255, 255, 255, 0.76);
    border-color: rgba(8, 127, 153, 0.2);
    color: #294955;
}

body:not(.dark) .mtp-track:hover,
body:not(.dark) .mtp-track.active {
    background: rgba(8, 127, 153, 0.12);
    border-color: rgba(8, 127, 153, 0.58);
    color: #06313d;
}

body:not(.dark) .mtp-youtube-link,
body:not(.dark) .mtp-source-link {
    color: #06313d;
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(8, 127, 153, 0.22);
}

body:not(.dark) .footer {
    background: rgba(247, 252, 255, 0.92);
    border-top-color: rgba(8, 94, 112, 0.16);
}

body:not(.dark) .contact-text a,
body:not(.dark) .contact-text p,
body:not(.dark) .footer-links a {
    color: var(--text-primary);
}

/* ==========================================================================
   AUTH SYSTEM & MODAL STYLES (LOGIN & REGISTER)
   ========================================================================== */

/* Auth header buttons styling */
.auth-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0 1.25rem;
    width: auto;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    background-color: rgba(37, 99, 235, 0.1);
    border: 1.5px solid rgba(37, 99, 235, 0.3);
    color: #2563eb;
    transition: var(--transition);
    height: 40px;
}

.auth-btn:hover {
    background-color: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.4);
    transform: translateY(-2px);
}

body.dark .auth-btn {
    background-color: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.3);
    color: #38bdf8;
}

body.dark .auth-btn:hover {
    background-color: #38bdf8;
    color: #0f172a;
    border-color: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

/* User Profile Menu Dropdown in Header */
.user-menu-wrapper {
    position: relative;
    z-index: 1001;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0 0.8rem 0 0.4rem;
    width: auto;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    height: 40px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #0d9488);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.dropdown-chevron {
    color: var(--text-secondary);
    transition: var(--transition);
}

.user-menu-btn:hover .dropdown-chevron,
.user-menu-wrapper.active .dropdown-chevron {
    transform: rotate(180deg);
    color: #2563eb;
}

body.dark .user-menu-btn:hover .dropdown-chevron,
body.dark .user-menu-wrapper.active .dropdown-chevron {
    color: #38bdf8;
}

.user-menu-btn:hover {
    border-color: #2563eb;
    background-color: rgba(37, 99, 235, 0.05);
}

body.dark .user-menu-btn:hover {
    border-color: #38bdf8;
    background-color: rgba(56, 189, 248, 0.05);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 250px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    animation: slideUpFade 0.25s ease forwards;
    backdrop-filter: blur(10px);
}

.user-dropdown-menu.show {
    display: flex;
}

.dropdown-header {
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0.5rem 0.75rem 0.5rem;
}

.dropdown-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.dropdown-email {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
    word-break: break-all;
}

.dropdown-role-badge {
    align-self: flex-start;
    font-size: 0.7rem;
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    font-weight: 700;
    margin-top: 0.5rem;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

body.dark .dropdown-role-badge {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 0.5rem 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
    width: 100%;
}

.dropdown-item:hover {
    background-color: rgba(239, 68, 68, 0.08);
    color: #ef4444;
}

.dropdown-item svg {
    color: currentColor;
}

/* Modal Overlay Styling */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.auth-modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.auth-modal-container {
    background: var(--bg-primary);
    border: 1.5px solid var(--border-color);
    width: 90%;
    max-width: 440px;
    border-radius: 20px;
    padding: 2.2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    transform: translateY(30px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: thin;
}

.auth-modal-overlay.show .auth-modal-container {
    transform: translateY(0);
}

body.dark .auth-modal-container {
    background: rgba(15, 34, 58, 0.92);
    border-color: rgba(56, 189, 248, 0.2);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 30px rgba(56, 189, 248, 0.05);
}

.auth-modal-close-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.auth-modal-close-btn:hover {
    color: #2563eb;
    background-color: rgba(255, 255, 255, 0.05);
    transform: rotate(90deg);
}

body.dark .auth-modal-close-btn:hover {
    color: #38bdf8;
}

/* Tabs inside Modal */
.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--bg-secondary);
    padding: 0.3rem;
    border-radius: 30px;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.auth-tab-btn {
    background: none;
    border: none;
    padding: 0.65rem 1rem;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.auth-tab-btn.active {
    background: #2563eb;
    color: #ffffff;
}

body.dark .auth-tab-btn.active {
    background: #38bdf8;
    color: #0f172a;
}

.auth-tab-btn:hover:not(.active) {
    color: var(--text-primary);
}

/* Form panels toggling */
.auth-form-panel {
    display: none;
}

.auth-form-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.auth-form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-form-header h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.auth-form-header p {
    color: var(--text-secondary);
    font-size: 0.88rem;
}

/* Form Inputs with icons */
.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-wrapper svg {
    position: absolute;
    left: 14px;
    color: var(--text-secondary);
    transition: var(--transition);
    pointer-events: none;
}

.input-icon-wrapper input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.8rem;
    border-radius: 12px;
    background-color: var(--bg-secondary);
    border: 1.5px solid var(--border-color);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.input-icon-wrapper input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.15);
}

body.dark .input-icon-wrapper input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.input-icon-wrapper input:focus + svg {
    color: #2563eb;
}

body.dark .input-icon-wrapper input:focus + svg {
    color: #38bdf8;
}

.auth-form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* Block Button */
.btn-block {
    width: 100%;
    justify-content: center;
    padding: 0.9rem;
    font-size: 1rem;
    border-radius: 12px;
    margin-top: 1rem;
}

.auth-form-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.auth-form-footer a {
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
}

body.dark .auth-form-footer a {
    color: #38bdf8;
}

.auth-form-footer a:hover {
    text-decoration: underline;
}

/* Custom Checkbox */
.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    height: 18px;
    width: 18px;
    background-color: var(--bg-secondary);
    border: 1.5px solid var(--border-color);
    border-radius: 4px;
    transition: var(--transition);
}

.checkbox-container:hover input ~ .checkmark {
    border-color: #2563eb;
}

body.dark .checkbox-container:hover input ~ .checkmark {
    border-color: #38bdf8;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #2563eb;
    border-color: #2563eb;
}

body.dark .checkbox-container input:checked ~ .checkmark {
    background-color: #38bdf8;
    border-color: #38bdf8;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

body.dark .checkbox-container input:checked ~ .checkmark:after {
    border-color: #0f172a;
}

/* Delete Button on Feedback Cards */
.feedback-delete-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 6px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-delete-btn:hover {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #10b981;
    background-color: rgba(16, 185, 129, 0.1);
    padding: 0.15rem 0.45rem;
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    vertical-align: middle;
}

/* Animations */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive auth menu */
@media (max-width: 640px) {
    .auth-btn-text {
        display: none;
    }
    .auth-btn {
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
    .user-menu-btn {
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
    .user-menu-btn .dropdown-chevron {
        display: none;
    }
    .auth-modal-container {
        padding: 1.75rem;
    }
}

/* Footer Admin Button styling */
.footer-admin {
    margin-top: 1rem;
}

.footer-admin-btn {
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.footer-admin-btn:hover {
    color: #ef4444; /* Admin alert red color */
    border-color: rgba(239, 68, 68, 0.4);
    background-color: rgba(239, 68, 68, 0.05);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.08);
}

body.dark .footer-admin-btn:hover {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.5);
    background-color: rgba(239, 68, 68, 0.1);
}

/* Feedback Admin Reply Bubble */
.feedback-admin-reply {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.04);
    border-left: 3px solid #ef4444;
    border-top: 1px solid rgba(239, 68, 68, 0.08);
    border-right: 1px solid rgba(239, 68, 68, 0.08);
    border-bottom: 1px solid rgba(239, 68, 68, 0.08);
    margin-left: 1.5rem;
    animation: fadeIn 0.3s ease;
}

body:not(.dark) .feedback-admin-reply {
    background: rgba(239, 68, 68, 0.02);
}

.reply-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
    position: relative;
}

.reply-avatar {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border-radius: 50%;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
}

.reply-meta {
    display: flex;
    flex-direction: column;
}

.reply-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

.reply-date {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.reply-content {
    font-size: 0.88rem;
    line-height: 1.4;
    color: var(--text-primary);
    margin: 0;
}

.reply-delete-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.reply-delete-btn:hover {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
}

/* Reply inputs / forms */
.reply-action-area {
    margin-top: 1rem;
    margin-left: 1.5rem;
}

.btn-sm {
    padding: 0.35rem 0.75rem !important;
    font-size: 0.8rem !important;
    border-radius: 6px !important;
    height: auto !important;
    width: auto !important;
    display: inline-flex !important;
    align-items: center;
}

.reply-textarea {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    background-color: var(--bg-secondary);
    border: 1.5px solid var(--border-color);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.88rem;
    resize: vertical;
    transition: var(--transition);
}

.reply-textarea:focus {
    outline: none;
    border-color: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.15);
}

body.dark .reply-textarea:focus {
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.25);
}

/* User avatar images */
.user-avatar img,
.feedback-card-avatar img,
.reply-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
