/* ═══════════════════════════════════════════════════
   ADVANCED PORTFOLIO — STYLESHEET
   Midnight Gold Luxury Theme
   ═══════════════════════════════════════════════════ */

/* ── CSS Custom Properties ─────────────────────── */
:root {
    /* Colors */
    --bg-primary: #0b0e18;
    --bg-secondary: #101827;
    --bg-card: rgba(255, 255, 255, 0.025);
    --bg-glass: rgba(255, 255, 255, 0.04);
    --border-glass: rgba(212, 162, 58, 0.12);

    --text-primary: #f2ece3;
    --text-secondary: #a8a08e;
    --text-muted: #6e6856;

    --accent-primary: #d4a23a;
    /* Gold   */
    --accent-secondary: #e8a87c;
    /* Rose Gold */
    --accent-tertiary: #c0392b;
    /* Deep Red  */

    --gradient-main: linear-gradient(135deg, #d4a23a 0%, #e8a87c 100%);
    --gradient-hover: linear-gradient(135deg, #e6b84d 0%, #f0bb8f 100%);
    --gradient-text: linear-gradient(135deg, #d4a23a 0%, #e8a87c 50%, #d4a23a 100%);

    /* Spacing */
    --section-padding: 100px 0;
    --container-width: 1200px;

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);

    /* Shadows */
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.55);
    --shadow-glow: 0 0 40px rgba(212, 162, 58, 0.12);
}

/* ── Reset & Base ──────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

::selection {
    background: var(--accent-primary);
    color: #fff;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Utility ───────────────────────────────────── */
.gradient-text {
    background: var(--gradient-text);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    to {
        background-position: 200% center;
    }
}

.glass-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.section {
    padding: var(--section-padding);
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--accent-primary);
    display: block;
    margin-bottom: 8px;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 12px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto;
}

/* ── Scroll Progress Bar ───────────────────────── */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: var(--gradient-main);
    z-index: 10001;
    transition: width 0.05s linear;
    box-shadow: 0 0 10px rgba(212, 162, 58, 0.5);
}

/* ── Preloader ─────────────────────────────────── */
.preloader {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.6s, visibility 0.6s;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.preloader-circle {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-glass);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.preloader-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ── Navbar ────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 20px 0;
    transition: all 0.4s var(--ease);
}

.navbar.scrolled {
    padding: 12px 0;
    background: rgba(11, 14, 24, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: color 0.3s;
}

.logo-bracket {
    color: var(--accent-primary);
}

.nav-menu {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: color 0.3s, background 0.3s;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: rgba(212, 162, 58, 0.1);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--accent-primary);
    border-radius: 2px;
}

.nav-cta {
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    background: var(--gradient-main);
    color: #fff;
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 162, 58, 0.3);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Hero ──────────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 120px 24px 240px;
}

.hero-particles {
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* Aurora Mesh Background */
.hero-aurora {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.aurora-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.18;
    animation: auroraFloat 12s ease-in-out infinite;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #d4a23a, transparent 70%);
    top: -10%;
    left: 10%;
    animation-delay: 0s;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #e8a87c, transparent 70%);
    top: 30%;
    right: -5%;
    animation-delay: -4s;
}

.blob-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #d4a23a, transparent 70%);
    bottom: -5%;
    left: 40%;
    animation-delay: -8s;
}

@keyframes auroraFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(40px, -30px) scale(1.1);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }

    75% {
        transform: translate(30px, 40px) scale(1.05);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    font-size: 0.85rem;
    color: var(--accent-secondary);
    border: 1px solid rgba(232, 168, 124, 0.25);
    border-radius: 999px;
    background: rgba(232, 168, 124, 0.06);
    margin-bottom: 28px;
    animation: fadeInDown 0.8s var(--ease);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-secondary);
    border-radius: 50%;
    animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.4);
    }
}

.hero-title {
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s var(--ease);
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    color: var(--text-secondary);
    margin-bottom: 24px;
    min-height: 2em;
    animation: fadeInUp 0.8s 0.2s var(--ease) both;
}

.typed-text {
    color: var(--accent-primary);
    font-weight: 600;
}

.typed-cursor {
    color: var(--accent-primary);
    animation: blink 0.8s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.hero-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 36px;
    animation: fadeInUp 0.8s 0.4s var(--ease) both;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 56px;
    animation: fadeInUp 0.8s 0.6s var(--ease) both;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.35s var(--ease);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.35s;
}

.btn-primary {
    background: var(--gradient-main);
    color: #fff;
    box-shadow: 0 4px 20px rgba(212, 162, 58, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(212, 162, 58, 0.4);
}

.btn-primary:hover::before {
    background: var(--gradient-hover);
    opacity: 1;
}

.btn-primary span,
.btn-primary i {
    position: relative;
    z-index: 1;
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-primary);
    transform: translateY(-3px);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    gap: 48px;
    justify-content: center;
    animation: fadeInUp 0.8s 0.8s var(--ease) both;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-suffix {
    font-size: 1.6rem;
    font-weight: 700;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Scroll Indicator */
.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    animation: fadeInUp 1s 1s var(--ease) both;
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s;
}

.scroll-indicator:hover {
    color: var(--accent-primary);
}

.scroll-mouse {
    width: 24px;
    height: 38px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 6px;
}

.scroll-wheel {
    width: 3px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 3px;
    animation: scrollWheel 2s ease infinite;
}

@keyframes scrollWheel {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(12px);
    }
}

/* ── Infinite Tech Marquee ────────────────────── */
.hero-marquee-container {
    position: absolute;
    bottom: 120px;
    width: 100%;
    overflow: hidden;
    background: rgba(11, 14, 24, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid var(--border-glass);
    border-bottom: 1px solid var(--border-glass);
    padding: 12px 0;
    z-index: 2;
    animation: fadeInUp 1s 1.2s var(--ease) both;
}

.hero-marquee {
    display: flex;
    width: max-content;
    animation: scroll-marquee 25s linear infinite;
}

.marquee-content {
    display: flex;
    align-items: center;
    gap: 48px;
    padding: 0 24px;
}

.marquee-content span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.marquee-content i {
    font-size: 1.4rem;
    color: var(--accent-primary);
    opacity: 0.8;
}

@keyframes scroll-marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ── Animations ────────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.reveal-left {
    transform: translateX(-40px);
}

.reveal.reveal-right {
    transform: translateX(40px);
}

.reveal.visible {
    opacity: 1;
    transform: translate(0);
}

/* Staggered reveals for grid children */
.reveal-stagger>.reveal:nth-child(1) {
    transition-delay: 0s;
}

.reveal-stagger>.reveal:nth-child(2) {
    transition-delay: 0.1s;
}

.reveal-stagger>.reveal:nth-child(3) {
    transition-delay: 0.2s;
}

.reveal-stagger>.reveal:nth-child(4) {
    transition-delay: 0.3s;
}

.reveal-stagger>.reveal:nth-child(5) {
    transition-delay: 0.4s;
}

.reveal-stagger>.reveal:nth-child(6) {
    transition-delay: 0.5s;
}

/* 3D Tilt Card Effect */
.tilt-card {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.tilt-card .tilt-inner {
    transition: transform 0.15s var(--ease);
    transform-style: preserve-3d;
}

.tilt-card:hover .tilt-shine {
    opacity: 1;
}

.tilt-shine {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg,
            rgba(212, 162, 58, 0.08) 0%,
            transparent 60%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

/* Magnetic Button Hover */
.btn-magnetic {
    transition: transform 0.2s var(--ease);
}

/* ── About ─────────────────────────────────────── */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 60px;
    align-items: center;
}

.image-wrapper {
    position: relative;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}

.image-frame {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid var(--border-glass);
    z-index: 2;
}

.image-placeholder {
    aspect-ratio: 3/4;
    background: linear-gradient(135deg, rgba(212, 162, 58, 0.1), rgba(232, 168, 124, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-placeholder i {
    font-size: 6rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.image-decoration {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent-primary);
    border-radius: 20px;
    top: 20px;
    left: 20px;
    z-index: 1;
    opacity: 0.3;
}

.image-dots {
    position: absolute;
    width: 80px;
    height: 80px;
    background-image: radial-gradient(var(--accent-secondary) 1.5px, transparent 1.5px);
    background-size: 12px 12px;
    bottom: -20px;
    right: -20px;
    z-index: 0;
    opacity: 0.5;
}

/* Tech Orbit Ring */
.tech-orbit {
    position: absolute;
    inset: -40px;
    z-index: 3;
    pointer-events: none;
}

.orbit-ring {
    width: 100%;
    height: 100%;
    position: relative;
    animation: orbitSpin 20s linear infinite;
}

.orbit-icon {
    position: absolute;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    color: var(--accent-primary);
    font-size: 1rem;
    animation: orbitSpinReverse 20s linear infinite;
    box-shadow: var(--shadow-sm);
}

/* Position each icon around the ring */
.orbit-icon:nth-child(1) {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.orbit-icon:nth-child(2) {
    top: 25%;
    right: 0;
}

.orbit-icon:nth-child(3) {
    bottom: 25%;
    right: 0;
}

.orbit-icon:nth-child(4) {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.orbit-icon:nth-child(5) {
    bottom: 25%;
    left: 0;
}

.orbit-icon:nth-child(6) {
    top: 25%;
    left: 0;
}

@keyframes orbitSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes orbitSpinReverse {
    to {
        transform: rotate(-360deg);
    }
}

.about-heading {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.4;
}

.about-text {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 0.98rem;
}

.about-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 28px 0 32px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.detail-item i {
    color: var(--accent-primary);
    width: 18px;
    text-align: center;
}

.detail-item strong {
    color: var(--text-primary);
}

/* ── Skills ────────────────────────────────────── */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
}

.skill-category {
    padding: 32px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.skill-category:hover {
    border-color: rgba(212, 162, 58, 0.2);
    box-shadow: var(--shadow-glow);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.category-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--gradient-main);
    font-size: 1.2rem;
    color: #fff;
}

.category-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
}

.skill-bars {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.skill-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.skill-percent {
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent-primary);
}

.skill-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    width: 0;
    background: var(--gradient-main);
    border-radius: 4px;
    transition: width 1.2s var(--ease);
}

/* ── Experience Timeline ───────────────────────── */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
}

.timeline-item {
    display: flex;
    justify-content: flex-end;
    padding-right: calc(50% + 40px);
    position: relative;
    margin-bottom: 48px;
}

.timeline-item.right {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: calc(50% + 40px);
}

.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: var(--bg-primary);
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    font-size: 0.85rem;
    z-index: 2;
}

.timeline-card {
    padding: 28px;
    max-width: 400px;
    transition: transform 0.3s var(--ease), box-shadow 0.3s;
}

.timeline-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.timeline-period {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--accent-secondary);
    background: rgba(232, 168, 124, 0.1);
    padding: 4px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.timeline-role {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.timeline-company {
    font-size: 0.95rem;
    color: var(--accent-primary);
    font-weight: 500;
    margin-bottom: 12px;
}

.timeline-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 6px;
    background: rgba(212, 162, 58, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(212, 162, 58, 0.15);
}

/* ── Projects ──────────────────────────────────── */
.project-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    font-size: 0.88rem;
    font-weight: 500;
    font-family: inherit;
    background: var(--bg-glass);
    color: var(--text-secondary);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s var(--ease);
}

.filter-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

.filter-btn.active {
    background: var(--gradient-main);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(212, 162, 58, 0.25);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
}

.project-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.4s var(--ease), box-shadow 0.4s, border-color 0.4s;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: rgba(212, 162, 58, 0.2);
    box-shadow: var(--shadow-glow);
}

.project-card.hidden {
    display: none;
}

.project-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}

.project-card:hover .project-image img {
    transform: scale(1.08);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(11, 14, 24, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s var(--ease);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-links {
    display: flex;
    gap: 16px;
}

.project-link {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gradient-main);
    color: #fff;
    font-size: 1.1rem;
    transform: translateY(20px);
    transition: transform 0.4s var(--ease), box-shadow 0.3s;
}

.project-card:hover .project-link {
    transform: translateY(0);
}

.project-link:hover {
    box-shadow: 0 4px 20px rgba(212, 162, 58, 0.35);
}

.project-info {
    padding: 24px;
}

.project-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.project-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tech-tag {
    font-size: 0.72rem;
    font-family: 'JetBrains Mono', monospace;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(232, 168, 124, 0.08);
    color: var(--accent-secondary);
    border: 1px solid rgba(232, 168, 124, 0.15);
}

/* ── Testimonials ──────────────────────────────── */
.testimonial-carousel {
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s var(--ease);
}

.testimonial-card {
    min-width: 100%;
    padding: 48px 40px;
    text-align: center;
    flex-shrink: 0;
}

.testimonial-quote {
    color: var(--accent-primary);
    font-size: 2rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.testimonial-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 650px;
    margin: 0 auto 28px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
}

.author-info h4 {
    font-size: 1rem;
    font-weight: 600;
}

.author-info span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 28px;
}

.carousel-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s var(--ease);
}

.carousel-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.carousel-dots {
    display: flex;
    gap: 8px;
}

.carousel-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.carousel-dots .dot.active {
    background: var(--accent-primary);
    transform: scale(1.3);
}

/* ── Contact ───────────────────────────────────── */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 48px;
    align-items: start;
}

.contact-info h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.4;
}

.contact-info>p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 0.95rem;
}

.contact-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 28px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    transition: border-color 0.3s;
}

.contact-card:hover {
    border-color: rgba(212, 162, 58, 0.25);
}

.contact-card-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--gradient-main);
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}

.contact-card h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.contact-card span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: all 0.3s var(--ease);
}

.social-link:hover {
    color: #fff;
    background: var(--gradient-main);
    border-color: transparent;
    transform: translateY(-4px);
}

/* ── Terminal Easter Egg ───────────────────────── */
.terminal-section {
    padding-top: 60px;
}

.terminal-container {
    max-width: 800px;
    margin: 0 auto;
    background: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.terminal-header {
    background: #2d2d2d;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.5);
    position: relative;
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

.t-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.t-btn.close {
    background: #ff5f56;
}

.t-btn.minimize {
    background: #ffbd2e;
}

.t-btn.maximize {
    background: #27c93f;
}

.terminal-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #a0a0a0;
    text-align: center;
    flex-grow: 1;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.terminal-body {
    padding: 24px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    color: #e0e0e0;
    min-height: 350px;
    max-height: 450px;
    overflow-y: auto;
    background: #1e1e1e;
}

.terminal-line {
    margin-bottom: 8px;
    line-height: 1.5;
    min-height: 1.5em;
    /* Prevents layout collapse when text is empty during typewriter effect */
}

.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.terminal-prompt {
    color: #27c93f;
    white-space: nowrap;
}

.terminal-input {
    background: transparent;
    border: none;
    color: #e0e0e0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    flex-grow: 1;
    outline: none;
    caret-color: #27c93f;
}

.terminal-output {
    color: #61afef;
    margin-bottom: 16px;
    white-space: pre-wrap;
    word-break: break-word;
}

.terminal-output.error {
    color: #e06c75;
}


/* Contact Form */
.contact-form {
    padding: 40px;
}

.form-group {
    position: relative;
    margin-bottom: 28px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px 0 8px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-primary);
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-glass);
    outline: none;
    transition: border-color 0.3s;
    resize: vertical;
}

.form-group label {
    position: absolute;
    top: 16px;
    left: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: all 0.3s var(--ease);
}

.form-group input:focus~label,
.form-group input:not(:placeholder-shown)~label,
.form-group textarea:focus~label,
.form-group textarea:not(:placeholder-shown)~label {
    top: -4px;
    font-size: 0.75rem;
    color: var(--accent-primary);
}

.form-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-main);
    transition: width 0.4s var(--ease);
}

.form-group input:focus~.form-line,
.form-group textarea:focus~.form-line {
    width: 100%;
}

/* ── Footer ────────────────────────────────────── */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-glass);
}

.footer-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.footer-logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.3rem;
    font-weight: 700;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ── Back To Top ───────────────────────────────── */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--gradient-main);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s var(--ease);
    z-index: 999;
    box-shadow: 0 4px 20px rgba(212, 162, 58, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(212, 162, 58, 0.4);
}

/* ── Toast ─────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 28px;
    border-radius: 14px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
    font-weight: 500;
    z-index: 10000;
    transition: transform 0.5s var(--ease);
    backdrop-filter: blur(12px);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast.error {
    background: rgba(244, 63, 94, 0.15);
    border-color: rgba(244, 63, 94, 0.3);
    color: var(--accent-tertiary);
}

/* ═══════════════ RESPONSIVE ═══════════════ */

@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-image {
        order: -1;
    }

    .image-wrapper {
        max-width: 300px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item,
    .timeline-item.right {
        padding-left: 72px;
        padding-right: 0;
        justify-content: flex-start;
    }

    .timeline-dot {
        left: 20px;
        transform: translateX(-50%);
    }

    .timeline-card {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 72px 0;
    }

    .hero {
        padding-top: 100px;
        padding-bottom: 200px;
        /* Space for the marquee */
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 100px 32px 32px;
        gap: 0;
        transition: right 0.4s var(--ease);
        border-left: 1px solid var(--border-glass);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-cta {
        display: none;
    }

    .hero-stats {
        gap: 28px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .about-details {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 28px 20px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

    .section-title {
        font-size: 1.7rem;
    }

    .hero-marquee-container {
        bottom: 80px;
    }

    .marquee-content {
        gap: 32px;
    }

    .marquee-content span {
        font-size: 0.85rem;
    }

    .marquee-content i {
        font-size: 1.1rem;
    }

}