/* ==========================================
   OTMOROJENI.SPACE - PORTFOLIO DESIGN SYSTEM
   Dark Neon & Glassmorphism Code Aesthetic
   v2.0 — Enhanced Visual Effects
   ========================================== */

/* --- CSS Variables & Theme System --- */
:root {
    /* Color Palette - Dark Mode Default */
    --bg-dark: #090d16;
    --bg-card: rgba(18, 26, 44, 0.65);
    --bg-card-hover: rgba(26, 38, 64, 0.8);
    --bg-terminal: #0d1322;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(139, 92, 246, 0.3);

    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    /* Accent Colors */
    --accent-purple: #8b5cf6;
    --accent-cyan: #06b6d4;
    --accent-blue: #3b82f6;
    --accent-green: #10b981;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
    --gradient-glow: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, rgba(6, 182, 212, 0.05) 50%, transparent 70%);

    /* Fonts */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --font-mono: 'Fira Code', monospace;

    /* Spacing & Layout */
    --container-max: 1200px;
    --nav-height: 75px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    /* Transitions & Shadows */
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --shadow-glow: 0 0 25px rgba(139, 92, 246, 0.25);

    /* Cursor */
    --cursor-size: 20px;
}

/* Light Theme Variables & Specific Adjustments */
[data-theme="light"] {
    --bg-dark: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;
    --bg-terminal: #0d1322;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-glow: rgba(139, 92, 246, 0.4);

    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;

    --shadow-glass: 0 4px 20px rgba(15, 23, 42, 0.07);
}

[data-theme="light"] .bg-grid {
    background-image: 
        linear-gradient(to right, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
}

[data-theme="light"] .contact-item {
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .filter-btn {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-secondary);
}

[data-theme="light"] .filter-btn:hover,
[data-theme="light"] .filter-btn.active {
    color: #ffffff;
}

[data-theme="light"] .btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

[data-theme="light"] .social-quick-links a {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .project-tools-hover {
    background: rgba(241, 245, 249, 0.98);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .timeline-item {
    border-left-color: var(--accent-purple);
}

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

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* --- Particle Canvas Layer --- */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0.4;
}

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

ul {
    list-style: none;
}

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

/* Helper to prevent awkward text breaking */
.nobreak {
    white-space: nowrap;
}

/* --- Top Scroll Progress Bar --- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--gradient-primary);
    width: 0%;
    z-index: 1001;
    box-shadow: 0 0 10px var(--accent-purple), 0 0 20px rgba(139, 92, 246, 0.2);
    transition: width 0.1s ease-out;
}

.scroll-progress::after {
    content: '';
    position: absolute;
    right: 0;
    top: -2px;
    width: 7px;
    height: 7px;
    background: var(--accent-cyan);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--accent-cyan);
}

/* --- Scroll Reveal Animations --- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children reveals */
.reveal-on-scroll.revealed:nth-child(2) { transition-delay: 0.08s; }
.reveal-on-scroll.revealed:nth-child(3) { transition-delay: 0.16s; }
.reveal-on-scroll.revealed:nth-child(4) { transition-delay: 0.24s; }
.reveal-on-scroll.revealed:nth-child(5) { transition-delay: 0.32s; }
.reveal-on-scroll.revealed:nth-child(6) { transition-delay: 0.40s; }
.reveal-on-scroll.revealed:nth-child(7) { transition-delay: 0.48s; }
.reveal-on-scroll.revealed:nth-child(8) { transition-delay: 0.56s; }
.reveal-on-scroll.revealed:nth-child(9) { transition-delay: 0.64s; }
.reveal-on-scroll.revealed:nth-child(10) { transition-delay: 0.72s; }

/* Slide-in from left (for alternating reveals) */
.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* Slide-in from right */
.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* Scale-in reveal */
.reveal-scale {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* --- Background Glow Effects (Zero-Cost Radial Gradients) --- */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -2;
    pointer-events: none;
}

.bg-glow {
    position: fixed;
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.4;
}

.bg-glow-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.25) 0%, transparent 70%);
    top: -150px;
    left: -150px;
}

.bg-glow-2 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.2) 0%, transparent 70%);
    bottom: -150px;
    right: -150px;
}

/* --- Utilities & Glassmorphism --- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-glass);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.glass-card:hover {
    border-color: var(--border-glow);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* Animated gradient border on hover */
.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, transparent, var(--accent-purple), var(--accent-cyan), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

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

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.6rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 0 35px rgba(139, 92, 246, 0.5), 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-purple);
}

.btn-outline {
    background: transparent;
    color: var(--accent-cyan);
    border: 1px solid var(--accent-cyan);
}

.btn-outline:hover {
    background: rgba(6, 182, 212, 0.1);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}

/* --- Header & Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    background: rgba(9, 13, 22, 0.92);
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.navbar.nav-hidden {
    transform: translateY(-100%);
}

.navbar.nav-scrolled {
    background: rgba(9, 13, 22, 0.92);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .navbar {
    background: rgba(248, 250, 252, 0.8);
}

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

.brand-logo {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    white-space: nowrap;
}

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

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    padding: 0.4rem 0;
    white-space: nowrap;
}

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

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

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

.theme-toggle, .mobile-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
}

.theme-toggle:hover {
    border-color: var(--accent-purple);
    color: var(--accent-purple);
}

.sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: block; color: #f59e0b; }

.mobile-toggle {
    display: none;
}

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

.section-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3.5rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    white-space: nowrap;
}

.title-number {
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.section-line {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--border-glow), transparent);
}

/* --- Hero Section --- */
.hero-section {
    padding-top: calc(var(--nav-height) + 4rem);
    min-height: 92vh;
    display: flex;
    align-items: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--accent-green);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    white-space: nowrap;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-green);
    box-shadow: 0 0 10px var(--accent-green);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 4.5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
    word-break: keep-all;
}

.typing-container {
    font-family: var(--font-mono);
    font-size: 1.35rem;
    color: var(--accent-cyan);
    margin-bottom: 1.5rem;
    min-height: 2.2rem;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.cursor {
    animation: blink 1s infinite;
    color: var(--accent-purple);
}

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

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

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-quick-links {
    display: flex;
    gap: 1.2rem;
}

.social-quick-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.social-quick-links a:hover {
    color: var(--text-primary);
    border-color: var(--accent-cyan);
    transform: translateY(-4px) rotate(-5deg);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.35);
}

/* --- Expanded Terminal Component --- */
.hero-terminal {
    background: var(--bg-terminal) !important;
    border: 1px solid rgba(139, 92, 246, 0.35);
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55);
    width: 100%;
    position: relative;
}

/* CRT scanline effect */
.hero-terminal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 10;
}

.terminal-expanded {
    min-height: 420px;
}

.terminal-header {
    background: rgba(0, 0, 0, 0.45);
    padding: 0.9rem 1.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red { background-color: #ff5f56; }
.dot-yellow { background-color: #ffbd2e; }
.dot-green { background-color: #27c93f; }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.terminal-body {
    padding: 1.4rem;
    font-family: var(--font-mono);
    font-size: 0.92rem;
    min-height: 350px;
    max-height: 420px;
    overflow-y: auto;
}

.terminal-line {
    margin-bottom: 0.5rem;
}

.term-prompt { color: var(--accent-cyan); font-weight: 600; }
.term-cmd { color: var(--text-primary); }
.term-hl { color: var(--accent-purple); font-weight: 600; }

.terminal-output {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    white-space: pre-wrap;
    line-height: 1.6;
}

.term-json {
    color: #a7f3d0;
}

.json-key { color: var(--accent-cyan); }
.json-str { color: #fde047; }
.json-num { color: #f472b6; }

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

#terminal-input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.92rem;
    width: 100%;
}

/* --- About Section --- */
.about-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 2.5rem;
}

.about-avatar-card {
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.avatar-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
    margin-bottom: 1.5rem;
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-purple);
    z-index: 2;
    position: relative;
}

.avatar-glow {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: var(--gradient-primary);
    filter: blur(15px);
    opacity: 0.6;
    z-index: 1;
}

.avatar-info h3 {
    font-size: 1.6rem;
    margin-bottom: 0.2rem;
}

.tagline {
    color: var(--accent-cyan);
    font-weight: 500;
    margin-bottom: 0.8rem;
}

.location-tag {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.about-text-card {
    padding: 2.5rem;
}

.about-text-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.about-text-card p {
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
}

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

.stat-item {
    text-align: center;
    padding: 1rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.stat-item:hover {
    background: rgba(139, 92, 246, 0.06);
    transform: translateY(-3px);
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--accent-purple);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- Skills Section --- */
.skills-filter {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
    background: var(--gradient-primary);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-glow);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

/* Glowing corner accent on skill cards */
.skill-card::after {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent-purple);
    filter: blur(25px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.skill-card:hover::after {
    opacity: 0.3;
}

.skill-icon {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.skill-card:hover .skill-icon {
    transform: scale(1.25) rotate(-5deg);
}

.python-color { color: #3776ab; }
.java-color { color: #f89820; }
.linux-color { color: #f59e0b; }
.postgres-color { color: #336791; }
.docker-color { color: #2496ed; }
.api-color { color: #8b5cf6; }
.cs-color { color: #239120; }
.git-color { color: #f05032; }
.html-color { color: #e34f26; }

.skill-info h4 {
    font-size: 1.2rem;
    margin-bottom: 0.4rem;
}

.skill-info p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
}

.skill-badge {
    align-self: flex-start;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-purple);
    border: 1px solid rgba(139, 92, 246, 0.3);
    font-weight: 600;
}

/* --- Projects Section (Centered PC + Hover Tool Flyout) --- */
.projects-grid-centered {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2.5rem;
}

.projects-grid-centered .project-card {
    flex: 1 1 400px;
    max-width: 480px;
    position: relative;
    overflow: hidden;
    padding: 0;
}

.project-card-inner {
    padding: 2.2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.project-folder {
    font-size: 2.2rem;
    color: var(--accent-cyan);
}

.project-links a {
    font-size: 1.3rem;
    color: var(--text-secondary);
}

.project-links a:hover {
    color: var(--accent-purple);
}

.project-title {
    font-size: 1.45rem;
    margin-bottom: 0.8rem;
}

.project-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

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

.project-tags span {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

/* Hover Flyout Tool Icons Bar */
.project-tools-hover {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(13, 19, 34, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.9rem 1.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border-glow);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 5;
}

.project-card:hover .project-tools-hover {
    transform: translateY(0);
}

.tool-label {
    font-size: 0.78rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tool-icons-list {
    display: flex;
    gap: 1.2rem;
}

.tool-icon {
    font-size: 1.35rem;
    color: var(--accent-cyan);
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.2s ease;
    cursor: pointer;
}

.tool-icon:hover {
    color: var(--accent-purple);
    transform: translateY(-3px) scale(1.2) !important;
}

.project-card:hover .tool-icon {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover .tool-icon:nth-child(1) { transition-delay: 0.05s; }
.project-card:hover .tool-icon:nth-child(2) { transition-delay: 0.1s; }
.project-card:hover .tool-icon:nth-child(3) { transition-delay: 0.15s; }
.project-card:hover .tool-icon:nth-child(4) { transition-delay: 0.2s; }

/* --- Education & Timeline --- */
.education-timeline {
    position: relative;
    max-width: 850px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.timeline-item {
    padding: 2.2rem;
    position: relative;
    border-left: 3px solid var(--accent-purple);
}

.timeline-dot {
    position: absolute;
    top: 2.2rem;
    left: -9px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--accent-purple);
    box-shadow: 0 0 10px var(--accent-purple);
}

.timeline-dot-highlight {
    background: var(--accent-cyan) !important;
    box-shadow: 0 0 12px var(--accent-cyan) !important;
}

.timeline-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.12);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.4rem;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timeline-header h3 {
    font-size: 1.45rem;
}

.degree {
    color: var(--accent-cyan);
    font-weight: 500;
}

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

.timeline-body {
    color: var(--text-secondary);
}

/* --- Contacts Section Layout --- */
.contact-card {
    padding: 3rem;
    max-width: 850px;
    margin: 0 auto;
}

.contact-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    text-align: center;
}

.contact-content p {
    text-align: center;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
}

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

.contact-row-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.contact-row-bottom {
    display: flex;
    justify-content: center;
}

.contact-item-center {
    width: 100%;
    max-width: 420px;
}

.contact-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    min-width: 0;
}

.contact-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.contact-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.contact-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-value {
    font-size: 0.84rem;
}

.btn-icon-copy {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    margin-left: auto;
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-icon-copy:hover {
    color: var(--accent-cyan);
}

/* --- Footer --- */
.footer {
    padding: 2.5rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: var(--gradient-primary);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

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

.footer a {
    color: var(--accent-purple);
    transition: var(--transition);
}

.footer a:hover {
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

/* --- Back To Top Button --- */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    border: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 500;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.6);
}

/* --- Toast Notification --- */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-terminal);
    border: 1px solid var(--accent-green);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    z-index: 2000;
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast i {
    color: var(--accent-green);
    font-size: 1.2rem;
}

/* --- Premium Mobile Optimization --- */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 768px) {
    .container {
        padding: 0 1.25rem;
    }

    .section {
        padding: 4.5rem 0;
    }

    .hero-section {
        padding-top: calc(var(--nav-height) + 2rem);
    }

    .status-badge {
        margin-top: 0.6rem;
        margin-bottom: 1.2rem;
        font-size: 0.8rem;
    }

    .section-header {
        margin-bottom: 2rem;
        flex-wrap: wrap;
    }

    .section-title {
        white-space: normal;
        font-size: clamp(1.4rem, 6vw, 1.8rem);
        line-height: 1.25;
        word-break: break-word;
    }

    .section-line {
        display: none; /* Hide decorative line on narrow screens to prevent text overflow */
    }

    .mobile-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        right: -100%;
        width: 85%;
        max-width: 320px;
        height: calc(100vh - var(--nav-height));
        background: var(--bg-dark);
        border-left: 1px solid var(--border-color);
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        transition: var(--transition);
        padding: 2rem;
    }

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

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

    .hero-description, .about-text-card p, .contact-content p {
        font-size: 1rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .glass-card {
        padding: 1.5rem 1.25rem;
    }

    .about-text-card {
        padding: 1.5rem 1.25rem;
    }

    .contact-card {
        padding: 1.8rem 1.25rem;
    }

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

    .contact-row-top {
        grid-template-columns: 1fr;
    }
    
    .email-value {
        font-size: 0.8rem;
    }

    .timeline-item {
        padding: 1.5rem 1rem 1.5rem 1.25rem;
        border-left: 2px solid var(--accent-purple);
    }

    .timeline-dot {
        left: -8px;
        width: 13px;
        height: 13px;
    }

    .terminal-body {
        padding: 1rem 0.8rem;
        font-size: 0.82rem;
    }

    /* Mobile hover tools bar always accessible */
    .projects-grid-centered .project-card {
        flex: 1 1 100%;
    }

    .project-tools-hover {
        transform: translateY(0);
        position: relative;
        background: rgba(13, 19, 34, 0.7);
        border-top: 1px solid var(--border-color);
        margin-top: 1.2rem;
        border-radius: var(--radius-sm);
        padding: 0.8rem 1.2rem;
    }

    .tool-icon {
        opacity: 1;
        transform: translateY(0);
    }
}
