@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* --- CUSTOM PROPERTIES --- */
:root {
    --bg-primary: #030712;
    --bg-secondary: #0b1329;
    --bg-tertiary: #111a2e;
    --bg-glass: rgba(11, 19, 41, 0.7);
    --border-glass: rgba(255, 255, 255, 0.08);
    
    --accent-cyan: #00b4d8;
    --accent-blue: #02569b;
    --accent-green: #10b981;
    --accent-purple: #8b5cf6;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --font-sans: 'Outfit', sans-serif;
    --font-mono: 'Fira Code', monospace;
    
    --shadow-main: 0 20px 40px -15px rgba(2, 6, 23, 0.7);
    --glow-cyan: 0 0 25px rgba(0, 180, 216, 0.25);
    --glow-green: 0 0 25px rgba(16, 185, 129, 0.25);
    --glow-purple: 0 0 25px rgba(139, 92, 246, 0.25);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --spotlight-color: rgba(0, 180, 216, 0.08);
}

/* --- BASE & UTILITIES --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 180, 216, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.02) 0%, transparent 40%);
    background-attachment: fixed;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border: 2px solid var(--bg-primary);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
}

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

.accent-text {
    color: var(--accent-cyan);
    font-family: var(--font-mono);
}

/* --- GLASS CONTAINER --- */
.glass-panel {
    background: radial-gradient(600px circle at var(--mouse-x, 0) var(--mouse-y, 0), var(--spotlight-color), transparent 40%), var(--bg-glass);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    box-shadow: var(--shadow-main);
}

/* --- HEADER / NAVIGATION --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-bottom: 1px solid transparent;
}

.header.scrolled {
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

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

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

.logo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--accent-cyan);
    object-fit: cover;
}

/* --- ABOUT AVATAR FRAME --- */
.about-avatar-wrap {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0,0,0,0.4), var(--glow-cyan);
    border: 3px solid var(--accent-cyan);
    margin-bottom: 16px;
    flex-shrink: 0;
}
.about-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}
.about-avatar-wrap:hover img {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    position: relative;
    padding: 8px 0;
}

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

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

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

.hire-btn {
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    background: transparent;
    cursor: pointer;
    font-family: var(--font-mono);
}

.hire-btn:hover {
    background: rgba(0, 180, 216, 0.08);
    box-shadow: var(--glow-cyan);
    transform: translateY(-2px);
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-glass);
    padding: 24px;
    z-index: 99;
    flex-direction: column;
    gap: 20px;
}

.mobile-menu.open {
    display: flex;
}

/* --- HERO SECTION --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    padding-top: 120px;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    width: 100%;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    max-width: 460px;
}

.hero-previews {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 32px;
    flex-shrink: 0;
}

.hero-tag {
    font-size: 1rem;
    margin-bottom: 16px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 8px;
}

.hero-subtitle {
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    color: var(--text-secondary);
    line-height: 1.2;
    margin-bottom: 24px;
}

.hero-desc {
    max-width: 540px;
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 48px;
}

.btn {
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent-cyan);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: #0096c7;
    box-shadow: var(--glow-cyan);
    transform: translateY(-3px);
}

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

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

.hero-stats {
    display: flex;
    gap: 48px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
}

.stat-number::after {
    content: '+';
    color: var(--accent-cyan);
}

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

/* --- FLUTTER DEVICE SIMULATOR --- */
.simulator-pane {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    position: relative;
    width: 100%;
}

.phone-mockup {
    width: 290px;
    height: 580px;
    background: #010103;
    border-radius: 40px;
    border: 10px solid #1f2937;
    box-shadow: 0px 25px 50px -12px rgba(0, 0, 0, 0.9), var(--glow-cyan);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.phone-mockup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 130px;
    height: 25px;
    background: #1f2937;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    z-index: 20;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #0d1527;
    color: #fff;
    display: flex;
    flex-direction: column;
    font-family: var(--font-sans);
    position: relative;
}

.phone-status-bar {
    height: 36px;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.phone-app-bar {
    height: 56px;
    background: var(--accent-blue);
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.phone-app-bar i {
    font-size: 1.1rem;
}

.phone-app-title {
    font-weight: 600;
    font-size: 1rem;
}

.phone-body {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 20px;
}

.simulator-btn {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    border: none;
    padding: 12px 24px;
    border-radius: 24px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: var(--transition);
}

.simulator-btn:hover {
    transform: scale(1.05);
}

.simulator-fab {
    position: absolute;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-cyan);
    color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.simulator-fab:hover {
    transform: translateY(-3px) scale(1.05);
}

.simulator-counter {
    font-size: 4rem;
    font-weight: 800;
    color: var(--accent-cyan);
    line-height: 1;
}

.simulator-theme-indicator {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    font-size: 0.85rem;
    border: 1px solid var(--border-glass);
}

.phone-screen.light-mode {
    background: #f8fafc;
    color: #0f172a;
}
.phone-screen.light-mode .simulator-theme-indicator {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #cbd5e1;
}
.phone-screen.light-mode .phone-status-bar {
    color: #64748b;
}

/* --- PREMIUM CODE VIEWER WINDOW --- */
.code-viewer-container {
    width: 100%;
    background: #010409;
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-main);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.code-viewer-container:hover {
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

.code-viewer-header {
    background: #0d1117;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-glass);
}

.code-viewer-dots {
    display: flex;
    gap: 6px;
}

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

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

.code-viewer-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.code-viewer {
    width: 100%;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    padding: 20px;
    background: transparent;
    overflow: auto;
    text-align: left;
    max-height: 480px;
}

.code-keyword { color: #ff7b72; }
.code-class { color: #79c0ff; }
.code-string { color: #a5d6ff; }
.code-comment { color: #8b949e; }
.code-num { color: #d2a8ff; }

.simulator-tabs {
    display: flex;
    gap: 8px;
    background: var(--bg-secondary);
    padding: 6px;
    border-radius: 12px;
    border: 1px solid var(--border-glass);
}

.sim-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.sim-tab.active {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    font-weight: 600;
}

/* --- SECTION GENERAL --- */
.section {
    padding: 100px 0;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 60px;
}

.section-num {
    font-family: var(--font-mono);
    color: var(--accent-cyan);
    font-size: 1.5rem;
    font-weight: 500;
}

.section-title {
    font-size: 2.2rem;
    white-space: nowrap;
}

.section-line {
    height: 1px;
    background: var(--border-glass);
    flex: 1;
}

/* --- ABOUT & TERMINAL --- */
.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: start;
}

.about-bio {
    display: flex;
    flex-direction: column;
    gap: 20px;
    font-size: 1.1rem;
}

.about-highlight {
    color: var(--accent-cyan);
    font-weight: 600;
}

/* TERMINAL COMPONENT */
.terminal-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.8);
    border: 1px solid var(--border-glass);
}

.terminal-header {
    background: #161b22;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-glass);
}

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

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

.term-close { background: #ff5f56; }
.term-min { background: #ffbd2e; }
.term-max { background: #27c93f; }

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

.terminal-body {
    background: #0d1117;
    height: 320px;
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #c9d1d9;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.terminal-output {
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.5;
}

.terminal-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.term-prompt {
    color: var(--accent-green);
    font-weight: 600;
}

.term-input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.term-input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    flex: 1;
    position: relative;
    z-index: 2;
    padding: 0;
}

.term-ghost {
    position: absolute;
    left: 0;
    top: 0;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0.45;
    pointer-events: none;
    white-space: pre;
    z-index: 1;
    line-height: inherit;
}

.terminal-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.term-badge {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
}

.term-badge:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

/* --- SKILLS MATRIX --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.skill-card {
    padding: 24px;
    background: radial-gradient(400px circle at var(--mouse-x, 0) var(--mouse-y, 0), var(--spotlight-color), transparent 45%), var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-cyan);
    box-shadow: var(--shadow-main);
}

.skill-card:hover::before {
    background: var(--accent-cyan);
}

.skill-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: rgba(0, 180, 216, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
    font-size: 1.5rem;
    transition: var(--transition);
}

.skill-card:hover .skill-icon-wrap {
    background: var(--accent-cyan);
    color: var(--bg-primary);
}

.skill-info h3 {
    font-size: 1.15rem;
    margin-bottom: 4px;
}

.skill-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- PORTFOLIO --- */
.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    padding: 10px 24px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.project-card {
    background: radial-gradient(500px circle at var(--mouse-x, 0) var(--mouse-y, 0), var(--spotlight-color), transparent 45%), var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: var(--transition);
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-cyan);
    box-shadow: 0 20px 40px -15px rgba(0, 180, 216, 0.15);
}

.project-img-container {
    height: 110px;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid var(--border-glass);
}

.project-folder-icon {
    font-size: 2.6rem;
    color: var(--accent-cyan);
    opacity: 0.6;
    transition: var(--transition);
}

.project-card:hover .project-folder-icon {
    transform: scale(1.1);
    opacity: 0.9;
}

.project-badges {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
}

.project-badge {
    background: rgba(3, 7, 18, 0.65);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-glass);
    color: var(--accent-cyan);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 500;
}

.project-details {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.project-title {
    font-size: 1.1rem;
    line-height: 1.3;
}

.project-card:hover .project-title {
    color: var(--accent-cyan);
}

.project-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-tags {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 12px;
}

.project-tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* --- EXPERIENCE (TIMELINE) --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 32px;
    border-left: 2px solid var(--border-glass);
}

.timeline-item {
    position: relative;
    margin-bottom: 56px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -42px;
    top: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 3px solid var(--accent-cyan);
    transition: var(--transition);
    box-shadow: 0 0 0 6px var(--bg-primary);
}

.timeline-item:hover .timeline-dot {
    background: var(--accent-cyan);
    box-shadow: 0 0 15px var(--accent-cyan);
}

.timeline-content {
    background: radial-gradient(400px circle at var(--mouse-x, 0) var(--mouse-y, 0), var(--spotlight-color), transparent 45%), var(--bg-glass);
    border: 1px solid var(--border-glass);
    padding: 24px;
    border-radius: 12px;
    transition: var(--transition);
}

.timeline-content:hover {
    border-color: var(--border-glass);
    background: var(--bg-tertiary);
    transform: translateX(5px);
}

.timeline-header-wrap {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.timeline-role {
    font-size: 1.25rem;
    margin-bottom: 2px;
}

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

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

/* --- CONTACT --- */
.contact-panel {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    padding: 60px 40px;
}

.contact-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.contact-desc {
    font-size: 1.1rem;
    margin-bottom: 40px;
}

/* --- FOOTER --- */
.footer {
    border-top: 1px solid var(--border-glass);
    padding: 48px 0;
    text-align: center;
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 20px;
}

.social-link {
    font-size: 1.3rem;
    color: var(--text-secondary);
}

.social-link:hover {
    color: var(--accent-cyan);
    transform: translateY(-3px);
}

.footer-credits {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* --- MODAL --- */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 24px;
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    max-width: 680px;
    width: 100%;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 90vh;
    overflow-y: auto;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px;
    border-bottom: 1px solid var(--border-glass);
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close-btn:hover {
    color: var(--accent-cyan);
}

.modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-features-list {
    margin-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-features-list li {
    color: var(--text-secondary);
}

.modal-tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.modal-tech-tag {
    background: rgba(0, 180, 216, 0.1);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 180, 216, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.modal-screenshot-wrap {
    margin-top: 10px;
}

.modal-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-cyan);
    color: var(--bg-primary);
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
}

.modal-action-btn:hover {
    background: #0096c7;
    box-shadow: var(--glow-cyan);
}

/* --- RESPONSIVENESS --- */
@media (max-width: 1024px) {
    .hero-grid {
        flex-direction: column;
        justify-content: center;
        gap: 60px;
    }
    
    .hero-content {
        align-items: center;
        text-align: center;
        max-width: 600px;
    }
    
    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-previews {
        flex-shrink: 1;
        width: 100%;
        justify-content: center;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-grid {
        gap: 48px;
    }
    
    .hero-previews {
        flex-direction: column;
        width: 100%;
        gap: 32px;
    }
    
    .simulator-pane, .code-viewer-container {
        width: 100%;
        max-width: 100%;
    }
    
    .phone-mockup {
        width: 270px;
        height: 540px;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .nav-menu {
        display: none;
    }
    
    .menu-btn {
        display: block;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .timeline-header-wrap {
        flex-direction: column;
        gap: 4px;
    }
    
    .contact-panel {
        padding: 40px 20px;
    }
}

/* --- DYNAMIC TRANSITION FOR THEMES --- */
body {
    transition: background-color 0.5s ease, color 0.3s ease, border-color 0.3s ease;
}

/* --- THEME DEFINITIONS --- */

/* Retro-Hacker Matrix Theme */
body.theme-matrix {
    --bg-primary: #000000;
    --bg-secondary: #080808;
    --bg-tertiary: #121212;
    --bg-glass: rgba(5, 5, 5, 0.9);
    --border-glass: rgba(0, 255, 65, 0.2);
    
    --accent-cyan: #00ff41; /* Neo green */
    --accent-blue: #004d00; /* Dark moss green */
    --accent-green: #00ff41;
    --accent-purple: #008f11;
    
    --text-primary: #00ff41;
    --text-secondary: #00d43b;
    --text-muted: #007f20;
    
    --spotlight-color: rgba(0, 255, 65, 0.12);
    --glow-cyan: 0 0 25px rgba(0, 255, 65, 0.3);
    --glow-green: 0 0 25px rgba(0, 255, 65, 0.3);
    
    --font-sans: 'Fira Code', monospace;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 255, 65, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 255, 65, 0.04) 0%, transparent 40%);
}

/* Vampire Dracula Theme */
body.theme-dracula {
    --bg-primary: #1e1e2e;
    --bg-secondary: #181825;
    --bg-tertiary: #313244;
    --bg-glass: rgba(24, 24, 37, 0.75);
    --border-glass: rgba(189, 147, 249, 0.15);
    
    --accent-cyan: #ff79c6; /* Dracula Pink */
    --accent-blue: #6272a4; /* Slate Blue */
    --accent-green: #50fa7b; /* Neon Green */
    --accent-purple: #bd93f9; /* Dracula Purple */
    
    --text-primary: #f8f8f2;
    --text-secondary: #cba6f7; /* Soft Lavender */
    --text-muted: #6272a4;
    
    --spotlight-color: rgba(255, 121, 198, 0.1);
    --glow-cyan: 0 0 25px rgba(255, 121, 198, 0.25);
    --glow-green: 0 0 25px rgba(80, 250, 123, 0.25);
    
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(189, 147, 249, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 121, 198, 0.04) 0%, transparent 40%);
}

/* Neon Cyberpunk Theme */
body.theme-cyberpunk {
    --bg-primary: #12002b; /* Cyber purple-black */
    --bg-secondary: #1a003c;
    --bg-tertiary: #2e0057;
    --bg-glass: rgba(26, 0, 60, 0.85);
    --border-glass: rgba(255, 0, 127, 0.25);
    
    --accent-cyan: #ff007f; /* Cyber Pink */
    --accent-blue: #00f0ff; /* Neon Blue-Cyan */
    --accent-green: #ffea00; /* Neon Yellow */
    --accent-purple: #8b5cf6;
    
    --text-primary: #ffffff;
    --text-secondary: #00f0ff;
    --text-muted: #ff007f;
    
    --spotlight-color: rgba(255, 0, 127, 0.15);
    --glow-cyan: 0 0 25px rgba(255, 0, 127, 0.3);
    --glow-green: 0 0 25px rgba(0, 240, 255, 0.3);
    
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255, 0, 127, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 240, 255, 0.05) 0%, transparent 40%);
}

