/* Matrix Hacker Theme with Falling Characters */

/* Root variables for Matrix/Hacker theming */
:root {
    --matrix-primary: #00ff41;
    --matrix-secondary: #00d4ff;
    --matrix-dark: #0d0208;
    --matrix-darker: #000000;
    --glow-green: rgba(0, 255, 65, 0.6);
    --glow-cyan: rgba(0, 212, 255, 0.6);
    --glow-strong: rgba(0, 255, 65, 0.9);
    --card-bg: rgba(0, 20, 10, 0.85);
    --text-light: rgba(0, 255, 65, 0.95);
    --text-muted: rgba(0, 255, 65, 0.6);
    --border-glow: rgba(0, 255, 65, 0.3);
}

/* Matrix Rain Canvas */
#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.15;
}

/* Global styles */
body {
    background: linear-gradient(135deg, #000000 0%, #0a0e27 50%, #001a0d 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    color: var(--matrix-primary);
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, rgba(0, 255, 65, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 212, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Scanline effect */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 255, 65, 0.03) 0px,
        transparent 2px,
        transparent 4px
    );
    pointer-events: none;
    z-index: 999;
    animation: scanline 8s linear infinite;
}

@keyframes scanline {
    0% { transform: translateY(0); }
    100% { transform: translateY(100px); }
}

/* Typography */
h1, h2 {
    font-family: "Courier New", monospace;
    font-weight: 700;
    color: var(--matrix-primary);
    text-shadow:
        0 0 10px var(--glow-green),
        0 0 20px var(--glow-green),
        0 0 30px var(--glow-green);
    letter-spacing: 2px;
}

h5, h4, p, button, a, label {
    font-family: "Courier New", monospace;
}

/* Terminal cursor effect */
.terminal-cursor::after {
    content: '▮';
    animation: blink 1s step-end infinite;
    color: var(--matrix-primary);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Enhanced navbar */
.navbar-enhanced {
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.95) !important;
    border-bottom: 2px solid var(--matrix-primary);
    box-shadow: 0 0 20px var(--glow-green);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.brand-glow {
    transition: all 0.3s ease;
}

.brand-glow:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 15px var(--glow-green));
}

.logo-container {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--matrix-primary), var(--matrix-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 20px var(--glow-green),
        inset 0 0 10px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    border: 2px solid var(--matrix-primary);
}

.logo-container:hover {
    box-shadow:
        0 0 40px var(--glow-strong),
        inset 0 0 15px rgba(0, 0, 0, 0.7);
    transform: rotate(360deg);
}

.logo-icon {
    font-size: 1.5rem;
    color: var(--matrix-darker);
    font-weight: bold;
}

.nav-link-enhanced {
    position: relative;
    color: var(--matrix-primary) !important;
    font-weight: 600;
    padding: 0.5rem 1rem !important;
    border-radius: 5px;
    transition: all 0.3s ease;
    margin: 0 0.25rem;
    border: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-link-enhanced::before {
    content: '>';
    position: absolute;
    left: 5px;
    opacity: 0;
    transition: all 0.3s ease;
}

.nav-link-enhanced:hover::before,
.nav-link-enhanced.active::before {
    opacity: 1;
    left: 10px;
}

.nav-link-enhanced:hover {
    color: var(--matrix-secondary) !important;
    background: rgba(0, 255, 65, 0.1);
    border-color: var(--matrix-primary);
    box-shadow:
        0 0 15px var(--glow-green),
        inset 0 0 10px rgba(0, 255, 65, 0.1);
    padding-left: 1.5rem !important;
}

/* Hacker buttons */
.glow-button {
    position: relative;
    overflow: hidden;
    border-radius: 5px !important;
    box-shadow:
        0 0 20px var(--glow-green),
        inset 0 0 10px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--matrix-primary), var(--matrix-secondary)) !important;
    border: 2px solid var(--matrix-primary) !important;
    color: var(--matrix-darker) !important;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.glow-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.glow-button:hover::before {
    left: 100%;
}

.glow-button:hover {
    box-shadow:
        0 0 40px var(--glow-strong),
        inset 0 0 15px rgba(0, 0, 0, 0.7);
    transform: translateY(-2px);
}

.glow-button-outline {
    border: 2px solid var(--matrix-primary) !important;
    color: var(--matrix-primary) !important;
    border-radius: 5px !important;
    background: rgba(0, 0, 0, 0.7) !important;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
}

.glow-button-outline:hover {
    background: var(--matrix-primary) !important;
    color: var(--matrix-darker) !important;
    box-shadow:
        0 0 25px var(--glow-green),
        inset 0 0 10px rgba(0, 0, 0, 0.5);
    transform: translateY(-2px);
}

/* Enhanced intro section */
.intro-enhanced {
    padding: 4rem 0;
    position: relative;
}

.intro-card {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    border: 2px solid var(--matrix-primary);
    box-shadow:
        0 0 30px var(--glow-green),
        inset 0 0 20px rgba(0, 255, 65, 0.05);
    position: relative;
    overflow: hidden;
}

.intro-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent,
        var(--matrix-primary),
        var(--matrix-secondary),
        var(--matrix-primary),
        transparent);
    animation: borderFlow 3s linear infinite;
}

@keyframes borderFlow {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.profile-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.profile-image-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
}

.profile-glow {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: conic-gradient(from 0deg,
        var(--matrix-primary),
        var(--matrix-secondary),
        var(--matrix-primary));
    border-radius: 50%;
    animation: rotate 4s linear infinite;
    z-index: 1;
    filter: blur(10px);
}

.profile-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: var(--matrix-primary);
    background: rgba(0, 0, 0, 0.95);
    width: 130px;
    height: 130px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow:
        0 0 30px var(--glow-green),
        inset 0 0 20px rgba(0, 255, 65, 0.1);
    border: 2px solid var(--matrix-primary);
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.intro-title {
    background: linear-gradient(135deg, var(--matrix-primary), var(--matrix-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% {
        filter: drop-shadow(0 0 5px var(--glow-green));
    }
    100% {
        filter: drop-shadow(0 0 25px var(--glow-strong));
    }
}

.intro-subtitle {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: var(--text-muted);
}

/* Enhanced project cards */
.category-title {
    color: var(--matrix-primary);
    border-bottom: 3px solid var(--matrix-primary) !important;
    position: relative;
    padding-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100px;
    height: 3px;
    background: var(--matrix-secondary);
    border-radius: 2px;
    animation: slideRight 2s ease-in-out infinite;
}

@keyframes slideRight {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(50px); }
}

.project-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--border-glow);
    position: relative;
    overflow: hidden;
    background: var(--card-bg);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.2);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(0, 255, 65, 0.1) 0%,
        rgba(0, 212, 255, 0.1) 50%,
        rgba(0, 255, 65, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

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

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.7),
        0 0 40px var(--glow-green),
        inset 0 0 30px rgba(0, 255, 65, 0.1);
    border-color: var(--matrix-primary);
}

.card-overlay {
    background: linear-gradient(135deg,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 20, 10, 0.8) 50%,
        rgba(0, 0, 0, 0.9) 100%);
    z-index: 2;
}

.card-content {
    z-index: 3;
}

.project-icon {
    font-size: 2.5rem;
    color: var(--matrix-primary);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.project-card:hover .project-icon {
    opacity: 1;
    transform: scale(1.2) rotate(5deg);
    text-shadow: 0 0 20px var(--glow-green);
    filter: drop-shadow(0 0 15px var(--glow-green));
}

.project-title {
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
    color: var(--matrix-primary);
}

.project-card:hover .project-title {
    color: var(--matrix-secondary);
    text-shadow: 0 0 25px var(--glow-cyan);
}

.project-arrow {
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    color: var(--matrix-primary);
}

.project-card:hover .project-arrow {
    opacity: 1;
    transform: translateX(0);
    animation: arrowBlink 1s ease-in-out infinite;
}

@keyframes arrowBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Enhanced skill cards */
.skill-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 2rem;
    border: 2px solid var(--border-glow);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    height: 100%;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.2);
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 15px 30px rgba(0, 0, 0, 0.5),
        0 0 30px var(--glow-green),
        inset 0 0 20px rgba(0, 255, 65, 0.1);
    border-color: var(--matrix-primary);
}

.skill-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--matrix-primary), var(--matrix-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--matrix-darker);
    margin-bottom: 1rem;
    box-shadow: 0 0 20px var(--glow-green);
    transition: all 0.3s ease;
    border: 2px solid var(--matrix-primary);
}

.skill-card:hover .skill-icon {
    transform: scale(1.1) rotate(360deg);
    box-shadow: 0 0 35px var(--glow-strong);
}

.skill-description {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Enhanced contact section */
.contact-enhanced {
    padding: 4rem 0;
    position: relative;
}

.contact-card {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    border: 2px solid var(--matrix-primary);
    border-radius: 10px;
    padding: 3rem;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 40px var(--glow-green),
        inset 0 0 30px rgba(0, 255, 65, 0.05);
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent,
        var(--matrix-primary),
        var(--matrix-secondary),
        var(--matrix-primary),
        transparent);
    animation: borderFlow 3s linear infinite;
}

.contact-icon {
    font-size: 3rem;
    color: var(--matrix-primary);
    animation: pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px var(--glow-green));
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px var(--glow-green));
    }
    50% {
        transform: scale(1.15);
        filter: drop-shadow(0 0 35px var(--glow-strong));
    }
}

.contact-title {
    background: linear-gradient(135deg, var(--matrix-primary), var(--matrix-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-control-enhanced {
    background: rgba(0, 0, 0, 0.7) !important;
    border: 2px solid var(--border-glow) !important;
    border-radius: 5px !important;
    padding: 15px 20px 15px 45px !important;
    color: var(--matrix-primary) !important;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    font-family: "Courier New", monospace;
}

.form-control-enhanced:focus {
    background: rgba(0, 0, 0, 0.9) !important;
    border-color: var(--matrix-primary) !important;
    box-shadow:
        0 0 25px var(--glow-green),
        inset 0 0 15px rgba(0, 255, 65, 0.1) !important;
    color: var(--matrix-primary) !important;
}

.form-control-enhanced::placeholder {
    color: var(--text-muted);
}

.input-icon {
    color: var(--matrix-primary);
}

/* Enhanced social buttons */
.social-button {
    display: inline-block;
    position: relative;
    cursor: pointer;
    width: 4rem;
    height: 4rem;
    border: 2px solid var(--matrix-primary);
    padding: 0;
    text-decoration: none;
    text-align: center;
    color: var(--matrix-primary);
    font-size: 1.5rem;
    font-weight: normal;
    line-height: 3.5rem;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 0.5rem 0.5rem;
    box-shadow: 0 0 15px var(--glow-green);
    background: rgba(0, 0, 0, 0.8);
}

.social-button:hover {
    transform: translateY(-5px) scale(1.15);
    box-shadow: 0 0 40px var(--glow-strong);
    background: var(--matrix-primary);
    color: var(--matrix-darker);
}

/* Project detail enhancements */
.video-container {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 1rem;
    border: 2px solid var(--matrix-primary);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 30px var(--glow-green);
}

.project-info-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 2rem;
    border: 2px solid var(--border-glow);
    backdrop-filter: blur(10px);
    height: 100%;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.2);
}

.project-badge {
    background: linear-gradient(135deg, var(--matrix-primary), var(--matrix-secondary));
    color: var(--matrix-darker);
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 700;
    border: 1px solid var(--matrix-primary);
    box-shadow: 0 0 10px var(--glow-green);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--matrix-darker);
    border-left: 1px solid var(--matrix-primary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--matrix-primary), var(--matrix-secondary));
    border-radius: 5px;
    border: 1px solid var(--matrix-primary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--matrix-primary);
    box-shadow: 0 0 10px var(--glow-green);
}

/* Glitch effect on hover for titles */
.glitch-effect:hover {
    animation: glitch 0.3s ease-in-out;
}

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

/* Loading animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    animation: fadeInUp 0.8s ease-out;
}

/* Footer */
.footer-enhanced {
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.9);
    border-top: 2px solid var(--matrix-primary);
    box-shadow: 0 0 20px var(--glow-green);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .intro-card, .contact-card {
        padding: 2rem 1rem;
    }

    .profile-image-wrapper {
        width: 120px;
        height: 120px;
    }

    h1, h2 {
        font-size: 1.5rem;
    }
}

/* Custom Cursor with image files */
* {
    cursor: url('../images/cursor-default.png'), auto;
}

a, button, .btn, .clickable:hover {
    cursor: url('../images/cursor-default.png'), pointer;
}


html[data-bs-theme="light"]{
  --bg: #f7f7f5;
  --bg-soft: #efefec;
  --surface: #ffffff;
  --surface-2: #fbfbfa;
  --border: #e3e3df;
  --text: #17181c;
  --text-secondary: #5a5d64;
  --text-muted: #83868d;
  --accent: #12915b;
  --accent-strong: #0d7147;
  --accent-soft: rgba(18, 145, 91, 0.10);
  --accent-2: #2563eb;
  --shadow-sm: 0 1px 2px rgba(20,20,20,0.06);
  --shadow-md: 0 8px 24px rgba(20,20,20,0.08);
  --shadow-lg: 0 20px 45px rgba(20,20,20,0.12);
  --overlay-dark: rgba(10,12,10,0.55);
}

html[data-bs-theme="dark"]{
  --bg: #0a0c0e;
  --bg-soft: #0f1214;
  --surface: #14181b;
  --surface-2: #191d21;
  --border: #262b30;
  --text: #eceeef;
  --text-secondary: #a2a8ad;
  --text-muted: #767d83;
  --accent: #24c979;
  --accent-strong: #1fa866;
  --accent-soft: rgba(36, 201, 121, 0.12);
  --accent-2: #4da3ff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 10px 28px rgba(0,0,0,0.45);
  --shadow-lg: 0 24px 55px rgba(0,0,0,0.55);
  --overlay-dark: rgba(5,7,6,0.62);
}

:root{
  --font-heading: 'Spectral', Georgia, serif;
  --font-body: 'Karla', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Base ---------- */
*{ box-sizing: border-box; }

#matrix-canvas{
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

body{
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.7;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
}

a{ color: var(--accent); text-decoration: none; }
a:hover{ color: var(--accent-strong); }

::selection{ background: var(--accent-soft); color: var(--text); }

h1, h2, h3{ font-family: var(--font-heading); color: var(--text); letter-spacing: -0.01em; }
h1{ font-weight: 600; line-height: 1.15; }
h2{ font-weight: 600; line-height: 1.2; }
h3{ font-weight: 600; }
h4{ font-family: var(--font-body); font-weight: 700; color: var(--text); }
p{ color: var(--text-secondary); }

.section-heading{
  position: relative;
  display: inline-block;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.6rem;
  margin-bottom: 1.5rem;
}
.section-heading::after{
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 46px; height: 2px;
  background: var(--accent);
}

/* ---------- Scroll reveal ---------- */
.reveal{
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.in-view{ opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce){
  .reveal{ opacity: 1; transform: none; transition: none; }
}

/* ---------- Navbar ---------- */
.site-navbar{
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
  z-index: 1030;
}

.brand-mark img{ border-radius: 8px; transition: transform 0.25s var(--ease); }
.brand-mark:hover img{ transform: scale(1.06); }

.site-nav-link{
  color: var(--text-secondary) !important;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0.9rem !important;
  border-radius: var(--radius-sm);
  position: relative;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.site-nav-link:hover{ color: var(--text) !important; background: var(--surface-2); }
.site-nav-link.active{ color: var(--text) !important; }
.site-nav-link.active::after{
  content:'';
  position: absolute;
  left: 0.9rem; right: 0.9rem; bottom: 0.25rem;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.theme-toggle-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  margin-left: 0.5rem;
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.theme-toggle-btn svg{ width: 18px; height: 18px; }
.theme-toggle-btn:hover{ color: var(--accent); border-color: var(--accent); transform: rotate(12deg); }
html[data-bs-theme="dark"] .theme-toggle-btn .icon-moon{ display: none; }
html[data-bs-theme="light"] .theme-toggle-btn .icon-sun{ display: none; }

/* ---------- Buttons ---------- */
.btn-primary-modern{
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #ffffff;
  font-weight: 600;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s var(--ease);
}
.btn-primary-modern:hover{
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline-modern{
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
  padding: 0.65rem 1.3rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn-outline-modern:hover{
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.btn-outline-modern img{ border-radius: 4px; }

/* ---------- Intro ---------- */
#intro{ padding-top: 1.5rem; }
.intro-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 3.5rem 2rem;
}
.profile-photo{
  border: 3px solid var(--surface);
  outline: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  object-fit: cover;
}
.lead-text{ color: var(--text-secondary); }

/* ---------- About ---------- */
.about-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
}
.about-text{ color: var(--text-secondary); }
.about-text strong{ color: var(--text); }

/* ---------- Work / project cards ---------- */
.project-card{
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  min-height: 260px;
}
.project-card:hover{
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.project-overlay{
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, var(--overlay-dark) 100%);
  transition: background-color 0.3s var(--ease);
}
.project-title{ text-shadow: 0 1px 3px rgba(0,0,0,0.4); }
.project-github-link img{ opacity: 0.9; transition: opacity 0.2s var(--ease), transform 0.2s var(--ease); }
.project-github-link:hover img{ opacity: 1; transform: scale(1.08); }
.project-arrow{
  color: #fff;
  font-size: 1.1rem;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.project-card:hover .project-arrow{ opacity: 1; transform: translateX(0); }

/* ---------- Tech section ---------- */
.tech-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.6rem 1.4rem;
  height: 100%;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.tech-card:hover{
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}
.tech-card h4{ font-size: 1.05rem; }
.tech-list li{
  color: var(--text-secondary);
  padding: 0.3rem 0;
  border-bottom: 1px dashed var(--border);
  position: relative;
  padding-left: 1.1rem;
}
.tech-list li:last-child{ border-bottom: none; }
.tech-list li::before{
  content: '';
  position: absolute;
  left: 0; top: 0.85rem;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Info / "Else" cards ---------- */
.info-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.info-card:hover{
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}
.info-icon{
  font-size: 1.4rem;
  color: var(--accent);
  background: var(--accent-soft);
  width: 46px; height: 46px;
  min-width: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
}
.info-card p{ font-size: 0.95rem; margin-bottom: 0.4rem; }
.info-link{ font-weight: 600; }

/* ---------- Contact ---------- */
.contact-enhanced{ padding: 4rem 0; }
.contact-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-md);
}
.contact-icon-wrapper{ margin-bottom: 0.5rem; }
.contact-icon{
  font-size: 2.2rem;
  color: var(--accent);
  background: var(--accent-soft);
  width: 72px; height: 72px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.contact-title{ color: var(--text); }
.contact-subtitle{ color: var(--text-secondary); }

.input-wrapper{ position: relative; margin-bottom: 1.1rem; }
.input-icon{
  position: absolute;
  left: 16px; top: 18px;
  color: var(--text-muted);
}
.textarea-icon{ top: 16px; }
.form-control-enhanced{
  background: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  padding: 14px 16px 14px 44px !important;
  color: var(--text) !important;
  font-family: var(--font-body);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.form-control-enhanced:focus{
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-soft) !important;
}
.form-control-enhanced::placeholder{ color: var(--text-muted); }

.send-button{ min-width: 180px; }

/* ---------- Project detail page ---------- */
.project-media-card, .project-details-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  height: 100%;
  box-shadow: var(--shadow-sm);
}
.iframe-wrapper{ border-radius: var(--radius-md); overflow: hidden; }
.iframe-wrapper iframe{ width: 100%; max-width: 100%; border-radius: var(--radius-md); }
.project-detail-heading{ font-family: var(--font-heading); }
.project-desc{ color: var(--text-secondary); }
.github-link span{ color: var(--text); }

/* ---------- Footer ---------- */
.site-footer{ margin-top: 3rem; }
.site-footer .border-top{ border-color: var(--border) !important; }
.footer-text{ color: var(--text-secondary); font-size: 0.9rem; }
.footer-social{ display: inline-flex; opacity: 0.75; transition: opacity 0.2s var(--ease), transform 0.2s var(--ease); }
.footer-social:hover{ opacity: 1; transform: translateY(-2px); }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar{ width: 10px; }
::-webkit-scrollbar-track{ background: var(--bg); }
::-webkit-scrollbar-thumb{ background: var(--border); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover{ background: var(--text-muted); }

/* ---------- Responsive ---------- */
@media (max-width: 991px){
  .navbar-nav{ padding: 1rem 0; gap: 0.4rem; }
  .theme-toggle-btn{ margin-left: 0; margin-top: 0.4rem; }
}

@media (max-width: 768px){
  .intro-card, .about-card{ padding: 2.2rem 1.4rem; }
  .contact-card{ padding: 2rem 1.3rem; }
  h1.display-5, h1.display-6{ font-size: 2rem; }
  .project-card{ min-height: 220px; }
  .iframe-wrapper iframe{ height: 260px; }
}

@media (max-width: 480px){
  .intro-card, .about-card{ padding: 1.8rem 1.1rem; }
  .contact-card{ padding: 1.6rem 1rem; }
  .info-card{ padding: 1.2rem; }
  .input-wrapper .form-control-enhanced{ padding-left: 40px !important; }
}

html[data-bs-theme="light"] h1,
html[data-bs-theme="light"] h2 {
  text-shadow: none !important;
  letter-spacing: normal !important;
}

html[data-bs-theme="dark"] h1,
html[data-bs-theme="dark"] h2 {
  text-shadow: 0 0 10px var(--glow-green), 0 0 20px var(--glow-green), 0 0 30px var(--glow-green) !important;
  letter-spacing: 2px !important;
}