/* ==========================================================================
   DESIGN SYSTEM & VARIABLES (DARK THEME - DEFAULT)
   ========================================================================== */
:root {
    /* Color Palette - Coolors */
    /* 0d1b2a (deep navy), 1b263b (dark slate), 415a77 (steel blue), 778da9 (cool blue-gray), e0e1dd (off-white) */
    --bg-darker: #0d1b2a;
    --bg-dark: #1b263b;
    --bg-card: rgba(27, 38, 59, 0.45);

    --primary: #778da9;
    --primary-glow: rgba(119, 141, 169, 0.4);
    --secondary: #415a77;
    --secondary-glow: rgba(65, 90, 119, 0.35);
    --accent: #e0e1dd;
    --accent-glow: rgba(224, 225, 221, 0.35);

    --text-main: #e0e1dd;
    --text-muted: #778da9;
    --text-dark: #415a77;

    /* Glassmorphism Styles */
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-glow-border: rgba(119, 141, 169, 0.25);
    --glass-hover-bg: rgba(255, 255, 255, 0.06);
    --glass-hover-border: rgba(255, 255, 255, 0.18);

    /* Blob colors */
    --blob-1-color: #1b263b;
    --blob-2-color: #415a77;
    --blob-3-color: #778da9;

    /* Fonts - Syne / Plus Jakarta Sans */
    --font-heading: 'Syne', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'Fira Code', monospace;

    /* Transitions */
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   LIGHT THEME OVERRIDES
   ========================================================================== */
[data-theme="light"] {
    --bg-darker: #e0e1dd;
    --bg-dark: #f0f0ed;
    --bg-card: rgba(255, 255, 255, 0.7);

    --primary: #1b263b;
    --primary-glow: rgba(27, 38, 59, 0.15);
    --secondary: #415a77;
    --secondary-glow: rgba(65, 90, 119, 0.15);
    --accent: #0d1b2a;
    --accent-glow: rgba(13, 27, 42, 0.15);

    --text-main: #0d1b2a;
    --text-muted: #415a77;
    --text-dark: #778da9;

    /* Glassmorphism Styles */
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-border: rgba(13, 27, 42, 0.08);
    --glass-glow-border: rgba(27, 38, 59, 0.2);
    --glass-hover-bg: rgba(255, 255, 255, 0.65);
    --glass-hover-border: rgba(13, 27, 42, 0.18);

    /* Blob colors */
    --blob-1-color: #778da9;
    --blob-2-color: #e0e1dd;
    --blob-3-color: #415a77;
}

/* ==========================================================================
   RESET, BASE STYLES & FLUID AUTO-SCALING
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    /* Fluid font: 14px at 320px viewport, scales to 18px at 1920px (1080p), ~22px at 2560px (2K), ~28px at 3840px (4K) */
    font-size: clamp(14px, 0.3125vw + 10px, 28px);
    background-color: var(--bg-darker);
    overflow-x: hidden;
    transition: background-color 0.4s ease;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-darker);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.4s ease, color 0.4s ease;
}

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

ul {
    list-style: none;
}

/* ==========================================================================
   TYPOGRAPHY WEIGHTS & HANDWRITTEN ACCENT
   ========================================================================== */
.font-light {
    font-weight: 300 !important;
}

.font-normal {
    font-weight: 400 !important;
}

.font-medium {
    font-weight: 500 !important;
}

.font-semibold {
    font-weight: 600 !important;
}

.font-bold {
    font-weight: 700 !important;
}

.font-black {
    font-weight: 800 !important;
}

.handwritten {
    font-family: 'Caveat', cursive;
    font-size: 1.3em;
    font-weight: 700;
    color: var(--primary);
    display: inline-block;
    transform: rotate(-2deg);
    margin: 0 4px;
    letter-spacing: normal;
    text-transform: none;
    font-style: italic;
    transition: color 0.4s ease;
}

[data-theme="light"] .handwritten {
    color: var(--secondary);
}

/* ==========================================================================
   SCROLLBAR & SELECTION
   ========================================================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: rgba(119, 141, 169, 0.2);
    border-radius: 4px;
}

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

::selection {
    background: var(--primary-glow);
    color: var(--text-main);
}

/* ==========================================================================
   DYNAMIC GLASS BACKGROUND & BLOB EFFECTS
   ========================================================================== */
.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    width: 50vw;
    height: 50vw;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.15;
    mix-blend-mode: normal;
    pointer-events: none;
    transition: background 0.5s ease;
}

.blob-1 {
    top: -10%;
    right: -10%;
    background: radial-gradient(circle, var(--blob-1-color) 0%, transparent 70%);
    animation: float-blob-1 25s infinite alternate ease-in-out;
}

.blob-2 {
    bottom: -10%;
    left: -10%;
    background: radial-gradient(circle, var(--blob-2-color) 0%, transparent 70%);
    animation: float-blob-2 20s infinite alternate ease-in-out;
}

.blob-3 {
    top: 40%;
    left: 50%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, var(--blob-3-color) 0%, transparent 70%);
    animation: float-blob-3 30s infinite alternate ease-in-out;
}

#canvas-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

#cursor-glow {
    display: none;
}

/* Pencil sketch cursor trail canvas */
#cursor-trail-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999998;
    pointer-events: none;
    display: block;
}

/* Contrast pointer dot */
.cursor-dot {
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 99999999;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
    opacity: 0;
    transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                height 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.cursor-dot.hovered {
    width: 50px;
    height: 50px;
}

@keyframes float-blob-1 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(-10%, 15%) scale(1.1);
    }
}

@keyframes float-blob-2 {
    0% {
        transform: translate(0, 0) scale(1.1);
    }

    100% {
        transform: translate(15%, -10%) scale(0.9);
    }
}

@keyframes float-blob-3 {
    0% {
        transform: translate(-20%, -10%) scale(0.95);
    }

    100% {
        transform: translate(10%, 10%) scale(1.05);
    }
}

/* ==========================================================================
   LAYOUT CONTAINERS & UTILITIES
   ========================================================================== */
.container {
    width: 100%;
    max-width: 120rem;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 4.5vw, 6rem);
}

.section {
    padding: 8rem 0 4rem;
    position: relative;
    z-index: 2;
}

.text-gradient {
    background: linear-gradient(135deg, var(--text-main) 0%, var(--primary) 60%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-glow {
    text-shadow: 0 0 30px var(--primary-glow);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.2rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--primary);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: border-color 0.4s ease, color 0.4s ease;
}

[data-theme="light"] .badge {
    background: rgba(27, 38, 59, 0.03);
    color: var(--primary);
}

/* ==========================================================================
   GLASSMORPHISM BASE CLASS
   ========================================================================== */
.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-radius: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.03),
            transparent);
    transform: skewX(-25deg);
    transition: 0.75s ease;
    pointer-events: none;
    z-index: 1;
}

.glass:hover::before {
    left: 125%;
}

.glass:hover {
    background: var(--glass-hover-bg);
    border-color: var(--glass-hover-border);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.25), 0 0 25px var(--primary-glow);
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    background: radial-gradient(800px circle at var(--x, 0px) var(--y, 0px), rgba(255, 255, 255, 0.03), transparent 40%);
    z-index: 2;
}

.glass:hover .card-glow {
    opacity: 1;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.85rem 2.2rem;
    border-radius: 9999px; /* oval */
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-normal);
    border: 1px solid var(--glass-border);
    outline: none;
    overflow: hidden;
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.btn i {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, rgba(119, 141, 169, 0.25) 0%, rgba(65, 90, 119, 0.45) 100%);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, rgba(119, 141, 169, 0.45) 0%, rgba(65, 90, 119, 0.65) 100%);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 30px var(--primary-glow);
}

.btn-primary:hover i {
    color: var(--accent); /* colorize inner icon on hover */
    transform: scale(1.15) translateX(3px);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

[data-theme="light"] .btn-glass {
    background: rgba(13, 27, 42, 0.04);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2), 0 0 15px var(--primary-glow);
}

.btn-glass:hover i {
    color: var(--primary); /* colorize inner icon on hover */
    transform: scale(1.15) rotate(15deg);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    box-shadow: 0 0 10px rgba(119, 141, 169, 0.05);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--bg-darker);
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
    transform: translateY(-2px);
}

.btn-outline:hover i {
    color: var(--bg-darker);
    transform: scale(1.15) translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1.5rem;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1.5rem 0;
    transition: var(--transition-normal);
}

.header.scrolled {
    padding: 1rem 0;
    background: rgba(13, 27, 42, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .header.scrolled {
    background: rgba(224, 225, 221, 0.8);
    border-bottom: 1px solid rgba(13, 27, 42, 0.05);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.logo-img {
    height: 2.5rem;
    width: auto;
    object-fit: contain;
    display: block;
    transition: var(--transition-fast);
    filter: drop-shadow(0 0 6px var(--primary-glow));
}

.logo:hover .logo-img {
    transform: scale(1.05);
    filter: drop-shadow(0 0 12px var(--primary));
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.5rem 2rem;
    border-radius: 9999px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

[data-theme="light"] .nav {
    background: rgba(13, 27, 42, 0.02);
    border: 1px solid rgba(13, 27, 42, 0.05);
}

.nav-link {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: var(--transition-fast);
    transform: translateX(-50%);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-main);
}

.nav-link.active::after {
    width: 80%;
}

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

/* Theme Toggle Button Style */
.theme-toggle-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.05rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition-normal);
    outline: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.theme-toggle-btn:hover {
    border-color: var(--primary);
    transform: scale(1.05);
    background: var(--glass-hover-bg);
}

/* Hamburger Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 110;
}

.mobile-toggle .bar {
    width: 100%;
    height: 2px;
    background-color: var(--text-main);
    border-radius: 4px;
    transition: var(--transition-fast);
}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--bg-darker);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
}

.mobile-menu.active {
    right: 0;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.mobile-link {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-muted);
}

.mobile-link:hover,
.mobile-link.active {
    color: var(--primary);
}

.mobile-btn {
    margin-top: 1rem;
}

/* Toggle Animation */
.mobile-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 8rem;
    padding-bottom: 2rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

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

.hero-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-top: 1rem;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    min-height: 2.7rem;
}

.typewriter::after {
    content: '|';
    animation: blink 0.75s step-end infinite;
    color: var(--primary);
}

@keyframes blink {

    from,
    to {
        color: transparent
    }

    50% {
        color: var(--primary);
    }
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}

/* Constellation Vector Monogram Avatar Styles */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-container {
    position: relative;
    width: 20rem;
    height: 20rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.ring-1 {
    width: 110%;
    height: 110%;
    border: 1px dashed var(--primary-glow);
    animation: rotate-ring 40s linear infinite;
}

.ring-2 {
    width: 120%;
    height: 120%;
    border: 1px solid rgba(65, 90, 119, 0.15);
    animation: rotate-ring-reverse 50s linear infinite;
}

.ring-3 {
    width: 100%;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.monogram-avatar {
    width: 17.5rem;
    height: 17.5rem;
    border-radius: 50%;
    background: radial-gradient(135deg, var(--bg-card) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 2px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2), inset 0 0 30px rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

/* Constellation Nodes and Wireframes (Non-AI Art Vector) */
.constellation-nodes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.node {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    animation: pulse-node 3s infinite alternate ease-in-out;
}

.n-1 {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.n-2 {
    top: 30%;
    left: 80%;
    animation-delay: 0.7s;
}

.n-3 {
    top: 75%;
    left: 30%;
    animation-delay: 1.4s;
}

.n-4 {
    top: 70%;
    left: 75%;
    animation-delay: 2.1s;
}

.constellation-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    stroke: var(--primary-glow);
    stroke-width: 1px;
    fill: none;
    pointer-events: none;
}

.orbit-path {
    stroke: rgba(255, 255, 255, 0.02);
    stroke-dasharray: 4 8;
    animation: rotate-ring 60s linear infinite;
    transform-origin: center;
}

@keyframes pulse-node {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }

    100% {
        transform: scale(1.6);
        opacity: 1;
    }
}

.monogram-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    user-select: none;
    z-index: 3;
}

.monogram-text {
    font-family: var(--font-heading);
    font-size: 5.5rem;
    font-weight: 800;
    letter-spacing: -0.06em;
    background: linear-gradient(135deg, var(--text-main) 0%, var(--primary) 70%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.monogram-sub {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.35em;
    color: var(--text-muted);
    margin-top: 0.5rem;
    text-transform: uppercase;
    font-weight: 600;
}

.avatar-photo-wrapper {
    width: 17.5rem;
    height: 17.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 30px var(--primary-glow);
    z-index: 2;
    position: relative;
    transition: var(--transition-normal);
    animation: avatar-float 6s ease-in-out infinite;
}

.avatar-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.avatar-container:hover .avatar-photo-wrapper {
    border-color: var(--primary);
    box-shadow: 0 25px 60px var(--primary-glow), 0 0 40px var(--primary-glow);
    transform: scale(1.04);
}

.avatar-container:hover .avatar-photo {
    transform: scale(1.06);
}

@keyframes avatar-float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    33% {
        transform: translateY(-10px) rotate(1deg);
    }
    66% {
        transform: translateY(-5px) rotate(-1deg);
    }
}

@keyframes rotate-ring {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes rotate-ring-reverse {
    0% {
        transform: rotate(360deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

/* Scroll Down Link */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) translateX(-50%);
    }

    40% {
        transform: translateY(-10px) translateX(-50%);
    }

    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

/* ==========================================================================
   SECTION HEADER COMMON
   ========================================================================== */
.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   ABOUT SECTION
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: clamp(2rem, 4vw, 5rem);
    align-items: stretch;
}

.intro-card {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.intro-card h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.intro-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.intro-card p strong {
    color: var(--text-main);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-item {
    text-align: center;
}

.stat-num {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-lbl {
    font-size: 0.8rem;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.about-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.about-subcard {
    padding: 2.25rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.icon-box {
    width: 3rem;
    height: 3rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.icon-box.red-glow {
    color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.icon-box.blue-glow {
    color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.icon-box.purple-glow {
    color: var(--secondary);
    box-shadow: 0 0 20px var(--secondary-glow);
}

.icon-box.green-glow {
    color: var(--secondary);
    box-shadow: 0 0 20px var(--secondary-glow);
}

.about-subcard h4 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.about-subcard p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* ==========================================================================
   SKILLS SECTION
   ========================================================================== */
.skills-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.skills-tabs {
    display: flex;
    padding: 0.5rem;
    border-radius: 9999px; /* oval container */
    margin-bottom: 3rem;
    justify-content: space-between;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 1rem 0;
    cursor: pointer;
    border-radius: 9999px; /* oval buttons */
    transition: var(--transition-normal);
}

.tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary-glow) 0%, var(--secondary-glow) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

.tab-pane {
    display: none;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.tab-pane.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.skill-card {
    padding: 1.75rem 2rem;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
}

.skill-name {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.skill-perc {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--primary);
}

.progress-bar {
    width: 100%;
    height: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 99px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.progress {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    box-shadow: 0 0 10px var(--primary-glow);
    transition: width 1s cubic-bezier(0.1, 0.8, 0.3, 1);
    width: 0;
}

.text-yellow,
.text-cyan,
.text-blue,
.text-green,
.text-orange,
.text-pink {
    color: var(--primary) !important;
}

/* ==========================================================================
   PROJECTS SECTION
   ========================================================================== */
.project-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 4rem;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: var(--transition-normal);
}

.filter-btn:hover {
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.2);
}

.filter-btn.active {
    background: var(--primary);
    color: var(--bg-darker);
    border-color: var(--primary);
    font-weight: 600;
    box-shadow: 0 0 15px var(--primary-glow);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(1.5rem, 3vw, 4rem);
}

.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-img-wrapper {
    position: relative;
    height: 12.5rem;
    overflow: hidden;
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}

.project-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.1);
    transition: var(--transition-normal);
}

.system-bg {
    background: linear-gradient(135deg, rgba(13, 27, 42, 0.8) 0%, rgba(27, 38, 59, 0.8) 100%);
}

.ai-bg {
    background: linear-gradient(135deg, rgba(27, 38, 59, 0.8) 0%, rgba(65, 90, 119, 0.8) 100%);
}

.web-bg {
    background: linear-gradient(135deg, rgba(65, 90, 119, 0.8) 0%, rgba(119, 141, 169, 0.8) 100%);
}

.project-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(13, 27, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-main);
}

.project-info {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-info h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.project-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    color: var(--text-muted);
}

.project-links {
    display: flex;
    gap: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.25rem;
}

.project-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.project-link:hover {
    color: var(--primary);
}

.project-card:hover .project-img-placeholder {
    transform: scale(1.08);
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: clamp(2rem, 4vw, 5rem);
    align-items: stretch;
}

.contact-info-panel {
    padding: 3rem;
    display: flex;
    flex-direction: column;
}

.contact-info-panel h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.contact-info-panel p {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-size: 1.05rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: auto;
}

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

.contact-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--primary);
}

.detail-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-value {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
}

a.detail-value:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 3rem;
}

.social-btn {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-muted);
}

.social-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-3px);
}

/* Contact Form Styling */
.contact-form-panel {
    padding: 3rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.85rem 1.2rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-main);
    outline: none;
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 0 15px var(--primary-glow);
}

.form-status-message {
    margin-top: 1.5rem;
    text-align: center;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    display: none;
}

.form-status-message.success {
    color: #778da9;
}

[data-theme="light"] .form-status-message.success {
    color: #415a77;
}

.form-status-message.error {
    color: #ff4a5a;
}

/* ==========================================================================
   FOOTER SECTION
   ========================================================================== */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem 0;
    background: var(--bg-darker);
    position: relative;
    z-index: 2;
    transition: background-color 0.4s ease;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-dark);
    font-size: 0.9rem;
}

/* ==========================================================================
   ANIMATIONS & ENTRANCE EFFECTS
   ========================================================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .hero-content {
        align-items: center;
    }

    .hero-title {
        font-size: 3.2rem;
    }

    .hero-visual {
        order: -1;
    }

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

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

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

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .section {
        padding: 5rem 0 3rem;
    }

    .header {
        padding: 1rem 0;
    }

    .nav {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .nav-actions .header-cta {
        display: none;
    }

    .hero-title {
        font-size: 2.8rem;
    }

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

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

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer-bottom {
    border-top: 1px solid var(--glass-border);
    padding: 2rem 0;
    margin-top: 4rem;
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 2rem;
    font-size: 0.88rem;
    color: var(--text-muted);
}

[data-theme="light"] .footer-bottom {
    background: rgba(255, 255, 255, 0.3);
}