/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

:root {
    /* Color Palette */
    --primary-bg: #0a0a0a;
    --secondary-bg: #111111;
    --tertiary-bg: #1a1a1a;
    --accent-bg: #0d1117;
    
    --neon-green: #00ff41;
    --neon-blue: #00d4ff;
    --neon-purple: #8b5cf6;
    --neon-red: #ff0040;
    --neon-yellow: #ffff00;
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    
    --border-color: #333333;
    --border-accent: #00ff41;
    
    /* Typography */
    --font-mono: 'JetBrains Mono', monospace;
    --font-display: 'Orbitron', monospace;
    
    /* Spacing */
    --section-padding: 150px 0;
    --container-padding: 0 40px;
    
    /* Animations */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

html {
    scroll-behavior: smooth;
}

/* Offset for fixed terminal header (50px) + navbar (60px) */
section[id] {
    scroll-margin-top: 115px;
}

body {
    font-family: var(--font-mono);
    background: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
}

/* Terminal Header */
.terminal-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--secondary-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

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

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
}

.control.close { background: var(--neon-red); }
.control.minimize { background: var(--neon-yellow); }
.control.maximize { background: var(--neon-green); }

.terminal-title {
    font-family: var(--font-mono);
    color: var(--neon-green);
    font-size: 14px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    background: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 999;
    transition: var(--transition-normal);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--neon-green);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
    font-size: 16px;
}

.theme-toggle:hover {
    background: var(--neon-green);
    color: var(--primary-bg);
    box-shadow: 0 0 15px var(--neon-green);
    transform: scale(1.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.nav-logo .logo-text {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
    text-transform: lowercase;
}

.nav-link:hover {
    color: var(--neon-green);
    text-shadow: 0 0 5px var(--neon-green);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--neon-green);
    transition: var(--transition-fast);
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--neon-green);
    margin: 3px 0;
    transition: var(--transition-fast);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--secondary-bg) 100%);
    position: relative;
    overflow: hidden;
    padding-top: 110px;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.terminal-prompt {
    font-family: var(--font-mono);
    font-size: 18px;
    margin-bottom: 40px;
    color: var(--neon-green);
}

.prompt-user {
    color: var(--neon-blue);
}

.typing-text {
    color: var(--text-primary);
}

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

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

.hero-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 30px;
}

.title-line {
    display: block;
    background: linear-gradient(45deg, var(--neon-green), var(--neon-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 255, 65, 0.5);
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 50px;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    gap: 50px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

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

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--neon-green);
    text-shadow: 0 0 20px var(--neon-green);
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-buttons {
    display: flex;
    gap: 25px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border: 2px solid;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: transparent;
    border-color: var(--neon-green);
    color: var(--neon-green);
}

.btn-primary:hover {
    background: var(--neon-green);
    color: var(--primary-bg);
    box-shadow: 0 0 20px var(--neon-green);
}

.btn-secondary {
    background: transparent;
    border-color: var(--neon-blue);
    color: var(--neon-blue);
}

.btn-secondary:hover {
    background: var(--neon-blue);
    color: var(--primary-bg);
    box-shadow: 0 0 20px var(--neon-blue);
}

.hero-visual {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.matrix-rain {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-family="monospace" font-size="10" fill="%2300ff41" opacity="0.1">01010101</text></svg>');
    animation: matrixMove 20s linear infinite;
}

@keyframes matrixMove {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

.hacker-silhouette {
    position: relative;
    z-index: 2;
}

.glitch-text {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 900;
    color: var(--neon-green);
    text-shadow: 0 0 20px var(--neon-green);
    position: relative;
    animation: glitch 2s infinite;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch-text::before {
    animation: glitch-1 0.5s infinite;
    color: var(--neon-red);
    z-index: -1;
}

.glitch-text::after {
    animation: glitch-2 0.5s infinite;
    color: var(--neon-blue);
    z-index: -2;
}

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

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

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

/* Section Styles */
section {
    padding: var(--section-padding);
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 80px;
    display: flex;
    align-items: center;
    gap: 25px;
}

.title-number {
    color: var(--neon-green);
    font-size: 1.5rem;
}

/* About Section */
.about {
    background: var(--secondary-bg);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
    align-items: start;
}

.terminal-window {
    background: var(--tertiary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.terminal-header-small {
    background: var(--accent-bg);
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
}

.terminal-title-small {
    color: var(--text-secondary);
    font-size: 14px;
}

.terminal-content {
    padding: 30px;
    font-family: var(--font-mono);
}

.terminal-line {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.prompt {
    color: var(--neon-green);
    font-weight: 600;
    flex-shrink: 0;
}

.output {
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.profile-card {
    background: var(--tertiary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 20px;
    position: relative;
    overflow: hidden;
    border: 3px solid var(--neon-green);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 50%;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--neon-green);
    animation: scan 2s linear infinite;
    z-index: 2;
    opacity: 0.7;
}

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

.profile-info h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--neon-green);
}

.profile-info p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--neon-green);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--neon-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

/* Medium Section */
.medium-section {
    background: var(--primary-bg);
}

.medium-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.medium-card {
    background: var(--tertiary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 60px 50px;
    text-align: center;
    max-width: 700px;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.medium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-green), var(--neon-blue));
    transition: var(--transition-normal);
}

.medium-card:hover::before {
    left: 0;
}

.medium-card:hover {
    border-color: var(--neon-green);
    box-shadow: 0 10px 40px rgba(0, 255, 65, 0.15);
    transform: translateY(-5px);
}

.medium-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--neon-green), var(--neon-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 2.5rem;
    color: var(--primary-bg);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.3);
}

.medium-card h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--neon-green);
    margin-bottom: 20px;
}

.medium-card p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 35px;
}

.medium-card .btn {
    display: inline-flex;
    margin: 0 auto;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 50px;
}

.skill-category {
    background: var(--tertiary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 40px;
    transition: var(--transition-normal);
}

.skill-category:hover {
    border-color: var(--neon-green);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.1);
}

.category-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 30px;
    color: var(--neon-green);
    display: flex;
    align-items: center;
    gap: 12px;
}

.skill-item {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-icon {
    color: var(--neon-green);
    font-size: 0.75rem;
    flex-shrink: 0;
}

.skill-name {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

/* Projects Section */
.projects {
    background: var(--secondary-bg);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 30px;
}

.project-card {
    background: var(--tertiary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: var(--neon-green);
    transition: var(--transition-normal);
}

.project-card:hover::before {
    left: 0;
}

.project-card:hover {
    border-color: var(--neon-green);
    box-shadow: 0 10px 30px rgba(0, 255, 65, 0.1);
    transform: translateY(-5px);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.project-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--neon-green);
    margin-bottom: 0;
}

.project-links {
    display: flex;
    gap: 10px;
}

.project-link {
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: var(--transition-fast);
}

.project-link:hover {
    color: var(--neon-green);
    transform: scale(1.1);
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

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

.tech-tag {
    background: var(--accent-bg);
    color: var(--neon-blue);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.tech-tag:hover {
    background: var(--neon-blue);
    color: var(--primary-bg);
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--tertiary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition-normal);
}

.contact-item:hover {
    border-color: var(--neon-green);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.1);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--neon-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-bg);
    font-size: 1.2rem;
}

.contact-details h3 {
    color: var(--neon-green);
    margin-bottom: 5px;
}

.contact-details p {
    color: var(--text-secondary);
}

.hacker-form {
    background: var(--tertiary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--neon-green);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: var(--accent-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--neon-green);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: var(--tertiary-bg);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-green), var(--neon-blue), var(--neon-purple));
    animation: footerGlow 3s ease-in-out infinite alternate;
}

@keyframes footerGlow {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.footer-main {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    align-items: start;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-logo .logo-text {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green);
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-section h4 {
    color: var(--neon-green);
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: 20px;
    position: relative;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--neon-green);
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
    font-size: 0.9rem;
}

.footer-section ul li a:hover {
    color: var(--neon-green);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: var(--accent-bg);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: var(--transition-normal);
    text-decoration: none;
}

.social-link:hover {
    background: var(--neon-green);
    color: var(--primary-bg);
    border-color: var(--neon-green);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
    transform: translateY(-3px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 20px;
}

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

.footer-copyright p {
    margin: 0 0 5px 0;
}

.heart {
    color: var(--neon-red);
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

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

.techpro-link {
    color: var(--neon-blue);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-fast);
    position: relative;
}

.techpro-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--neon-blue);
    transition: var(--transition-fast);
}

.techpro-link:hover {
    color: var(--neon-green);
}

.techpro-link:hover::after {
    width: 100%;
    background: var(--neon-green);
}

/* ═══════════════════════════════════════
   RESPONSIVE — full rewrite
═══════════════════════════════════════ */

/* Base: prevent any horizontal overflow */
*, *::before, *::after {
    max-width: 100%;
}

img, video, canvas, svg {
    max-width: 100%;
    height: auto;
}

/* ── Tablet (≤ 1024px) ── */
@media (max-width: 1024px) {
    :root {
        --section-padding: 100px 0;
        --container-padding: 0 30px;
    }

    .hero-container {
        gap: 50px;
    }

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

    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

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

    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-links {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ── Tablet portrait / large mobile (≤ 768px) ── */
@media (max-width: 768px) {
    :root {
        --section-padding: 70px 0;
        --container-padding: 0 18px;
    }

    /* ── Nav ── */
    .hamburger { display: flex; }

    .nav-logo .logo-text { font-size: 20px; }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 110px;
        flex-direction: column;
        background: var(--secondary-bg);
        width: 100%;
        text-align: center;
        transition: var(--transition-normal);
        box-shadow: 0 10px 27px rgba(0,0,0,0.4);
        padding: 10px 0 20px;
        gap: 0;
        border-bottom: 1px solid var(--border-color);
        max-height: calc(100vh - 110px);
        overflow-y: auto;
        z-index: 998;
    }

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

    .nav-link {
        display: block;
        padding: 12px 20px;
        font-size: 0.95rem;
    }

    /* ── Hero ── */
    .hero {
        padding-top: 120px;
        min-height: auto;
        padding-bottom: 60px;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 35px;
    }

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

    .hero-description {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
        gap: 12px;
    }

    .hero-stats {
        justify-content: center;
        gap: 20px;
        flex-wrap: wrap;
    }

    .stat-number { font-size: 2rem; }

    .hero-visual { height: 240px; }

    .glitch-text { font-size: 2.2rem; }

    .terminal-prompt { font-size: 13px; }

    /* ── Section titles ── */
    .section-title {
        font-size: 1.7rem;
        margin-bottom: 40px;
        gap: 12px;
        flex-wrap: wrap;
    }

    /* ── About ── */
    .about-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .terminal-content {
        padding: 16px;
        font-size: 0.82rem;
        overflow-x: auto;
    }

    .terminal-line {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 5px;
        word-break: break-word;
    }

    .output {
        word-break: break-word;
        overflow-wrap: anywhere;
        flex: 1;
        min-width: 0;
    }

    .profile-card { padding: 25px 15px; }

    /* ── Medium ── */
    .medium-card {
        padding: 40px 25px;
    }

    .medium-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }

    .medium-card h3 {
        font-size: 1.6rem;
    }

    .medium-card p {
        font-size: 1rem;
    }

    /* ── Skills ── */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .skill-category { padding: 22px 18px; }

    .category-title { font-size: 1.1rem; }

    /* ── Certifications ── */
    .certifications-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cert-preview { height: 180px; }

    /* ── Hall of Fame ── */
    #hall-of-fame .skills-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 12px !important;
    }

    /* ── Timeline ── */
    .timeline-container::before { left: 14px; }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 40px;
        margin-right: 0;
        text-align: left;
        padding-left: 0;
        padding-right: 0;
        width: calc(100% - 40px);
    }

    .timeline-marker {
        left: 14px;
        top: 16px;
        width: 16px;
        height: 16px;
    }

    .timeline-content { padding: 16px; }

    .timeline-content h3 { font-size: 1rem; }
    .timeline-content h4 { font-size: 0.9rem; margin-bottom: 8px; }
    .timeline-content p  { font-size: 0.85rem; }

    /* ── Testimonials ── */
    .testimonial-card { padding: 20px 12px; }

    .feedback-image-wrap { max-height: 380px; }

    .testimonial-nav { gap: 12px; margin-top: 20px; }

    /* ── Contact ── */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .contact-item {
        padding: 14px;
        gap: 12px;
    }

    .contact-details p {
        font-size: 0.82rem;
        word-break: break-all;
        overflow-wrap: anywhere;
    }

    .hacker-form { padding: 18px; }

    .form-group input,
    .form-group textarea {
        font-size: 0.9rem;
    }

    /* ── Footer ── */
    .footer-main {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 25px;
        text-align: center;
    }

    .footer-section h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .social-links { justify-content: center; }

    /* ── Modals ── */
    .cert-modal { padding: 12px; }
    .cert-modal-inner { max-width: 100%; }

    .success-modal-inner { padding: 30px 20px; }
}

/* ── Small mobile (≤ 480px) ── */
@media (max-width: 480px) {
    :root {
        --section-padding: 55px 0;
        --container-padding: 0 14px;
    }

    /* ── Nav ── */
    .nav-logo .logo-text { font-size: 17px; }

    .theme-toggle { width: 34px; height: 34px; font-size: 14px; }

    /* ── Hero ── */
    .hero { padding-top: 115px; }

    .hero-title { font-size: 1.75rem; line-height: 1.25; }

    .hero-description { font-size: 0.88rem; }

    .stat-number { font-size: 1.8rem; }
    .stat-label  { font-size: 0.7rem; letter-spacing: 0; }

    .hero-stats { gap: 12px; }

    .btn {
        padding: 11px 16px;
        font-size: 0.82rem;
        gap: 7px;
    }

    .hero-visual { height: 180px; }
    .glitch-text { font-size: 1.8rem; }

    /* ── Section titles ── */
    .section-title {
        font-size: 1.35rem;
        margin-bottom: 30px;
        gap: 10px;
    }

    .title-number { font-size: 1rem; }

    /* ── About ── */
    .terminal-content { font-size: 0.78rem; padding: 12px; }

    .profile-card { padding: 20px 12px; }

    .profile-image { width: 100px; height: 100px; }

    .profile-info h3 { font-size: 1.2rem; }

    /* ── Skills ── */
    .skill-category { padding: 18px 14px; }

    .skill-name { font-size: 0.88rem; }

    /* ── Medium ── */
    .medium-card {
        padding: 30px 18px;
    }

    .medium-icon {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
        margin-bottom: 20px;
    }

    .medium-card h3 {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }

    .medium-card p {
        font-size: 0.88rem;
        margin-bottom: 25px;
    }

    /* ── Hall of Fame ── */
    #hall-of-fame .skills-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    /* ── Certifications ── */
    .certifications-grid { grid-template-columns: 1fr; }

    .cert-preview { height: 150px; }

    .cert-card .cert-content { padding: 14px; }

    .cert-content h3 { font-size: 1.1rem; }

    .cert-name  { font-size: 0.85rem; }
    .cert-issuer { font-size: 0.8rem; }
    .cert-date  { font-size: 0.75rem; }

    /* ── Timeline ── */
    .timeline-container::before { left: 10px; }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 30px;
        width: calc(100% - 30px);
    }

    .timeline-marker {
        left: 10px;
        width: 13px;
        height: 13px;
    }

    .timeline-content { padding: 13px; }

    /* ── Testimonials ── */
    .feedback-image-wrap { max-height: 260px; }

    .testimonial-prev,
    .testimonial-next { width: 38px; height: 38px; }

    /* ── Contact ── */
    .contact-icon {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
        flex-shrink: 0;
    }

    .contact-details h3 { font-size: 0.88rem; }

    .contact-details p { font-size: 0.78rem; }

    .hacker-form { padding: 14px; }

    /* ── Footer ── */
    .footer { padding: 35px 0 18px; }

    .footer-logo .logo-text { font-size: 1.4rem; }

    .footer-tagline { font-size: 0.82rem; }

    .footer-copyright { font-size: 0.78rem; }

    .footer-credit { font-size: 0.78rem; }

    /* ── Modals ── */
    .cert-modal { padding: 8px; }

    .cert-modal-title {
        font-size: 0.75rem;
        padding: 9px 12px;
    }

    .cert-modal-close { font-size: 1.5rem; top: 8px; right: 10px; }

    .success-modal-inner { padding: 25px 16px; }

    .success-modal-inner h3 { font-size: 1.2rem; }

    .success-modal-inner p { font-size: 0.85rem; }

    .success-icon { font-size: 2.5rem; }
}

/* ── Very small (≤ 360px) ── */
@media (max-width: 360px) {
    :root {
        --container-padding: 0 10px;
    }

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

    .section-title { font-size: 1.2rem; }

    .btn { padding: 10px 13px; font-size: 0.78rem; }

    #hall-of-fame .skills-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .nav-logo .logo-text { font-size: 15px; }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--neon-green);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neon-blue);
}

/* Selection Styling */
::selection {
    background: var(--neon-green);
    color: var(--primary-bg);
}

/* Loading Animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-text {
    font-family: var(--font-mono);
    color: var(--neon-green);
    font-size: 1.2rem;
    animation: loadingPulse 1.5s infinite;
}

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

/* Hall of Fame grid */
.hof-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)) !important;
    gap: 20px !important;
}

.hof-grid .skill-category {
    padding: 25px 15px !important;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.hof-grid .skill-category img {
    height: 38px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.8;
    transition: opacity 0.3s;
}

.hof-grid .skill-category img:hover { opacity: 1; }

.hof-grid .skill-category i {
    font-size: 1.8rem;
    color: var(--neon-green);
    opacity: 0.8;
    transition: opacity 0.3s;
}

.hof-grid .skill-category i:hover { opacity: 1; }

.hof-grid .skill-category span {
    color: var(--text-secondary);
    font-size: 0.82rem;
}
.certifications {
    background: var(--secondary-bg);
}

#hall-of-fame {
    background: var(--primary-bg);
}

#hall-of-fame .skill-category img {
    max-width: 100%;
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 30px;
}

.cert-card {
    background: var(--tertiary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.cert-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: var(--neon-green);
    transition: var(--transition-normal);
}

.cert-card:hover::before {
    left: 0;
}

.cert-card:hover {
    border-color: var(--neon-green);
    box-shadow: 0 10px 30px rgba(0, 255, 65, 0.1);
    transform: translateY(-5px);
}

.cert-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, var(--neon-green), var(--neon-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--primary-bg);
    font-size: 1.5rem;
}

.cert-content h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--neon-green);
    margin-bottom: 10px;
}

.cert-name {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 8px;
}

.cert-issuer {
    color: var(--neon-blue);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.cert-date {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 15px;
}

.cert-badge {
    display: inline-block;
    background: var(--neon-green);
    color: var(--primary-bg);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Timeline Section */
.timeline {
    background: var(--primary-bg);
}

.timeline-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--neon-green);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    display: flex;
    align-items: center;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: auto;
    margin-left: 0;
    text-align: right;
    padding-right: 50px;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: auto;
    margin-right: 0;
    text-align: left;
    padding-left: 50px;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    top: 20px;
    width: 20px;
    height: 20px;
    background: var(--neon-green);
    border: 4px solid var(--primary-bg);
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 0 20px var(--neon-green);
}

.timeline-content {
    background: var(--tertiary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    width: 45%;
    max-width: 100%;
    transition: var(--transition-normal);
    box-sizing: border-box;
}

.timeline-content:hover {
    border-color: var(--neon-green);
    box-shadow: 0 5px 20px rgba(0, 255, 65, 0.1);
}

.timeline-date {
    color: var(--neon-blue);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.timeline-content h3 {
    color: var(--neon-green);
    font-family: var(--font-display);
    margin-bottom: 5px;
}

.timeline-content h4 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.timeline-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 15px;
}

.timeline-achievements {
    list-style: none;
    padding: 0;
}

.timeline-achievements li {
    color: var(--text-secondary);
    margin-bottom: 5px;
    position: relative;
    padding-left: 20px;
}

.timeline-achievements li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: var(--neon-green);
    font-size: 0.8rem;
}

/* Blog Section */
.blog {
    background: var(--secondary-bg);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 30px;
}

.blog-card {
    background: var(--tertiary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition-normal);
}

.blog-card:hover {
    border-color: var(--neon-green);
    box-shadow: 0 10px 30px rgba(0, 255, 65, 0.1);
    transform: translateY(-5px);
}

.blog-image {
    height: 200px;
    background: linear-gradient(135deg, var(--neon-green), var(--neon-blue));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.blog-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.8);
    color: var(--neon-green);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.blog-date {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.8);
    color: var(--text-secondary);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
}

.blog-content {
    padding: 25px;
}

.blog-content h3 {
    color: var(--neon-green);
    font-family: var(--font-display);
    margin-bottom: 15px;
    line-height: 1.3;
}

.blog-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.blog-tag {
    background: var(--accent-bg);
    color: var(--neon-blue);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.blog-tag:hover {
    background: var(--neon-blue);
    color: var(--primary-bg);
}

.blog-link {
    color: var(--neon-green);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.blog-link:hover {
    color: var(--neon-blue);
    transform: translateX(5px);
}

/* Testimonials Section */
.testimonials {
    background: var(--primary-bg);
}

.testimonials-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

.testimonial-card {
    background: var(--tertiary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    opacity: 0;
    transform: translateX(50px);
    transition: var(--transition-slow);
    position: absolute;
    width: 100%;
    left: 0;
    top: 0;
    pointer-events: none;
    visibility: hidden;
}

.testimonial-card.active {
    opacity: 1;
    transform: translateX(0);
    position: relative;
    pointer-events: auto;
    visibility: visible;
}

.testimonial-content {
    position: relative;
}

.quote-icon {
    color: var(--neon-green);
    font-size: 2rem;
    margin-bottom: 20px;
}

.testimonial-content p {
    color: var(--text-primary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.author-info h4 {
    color: var(--neon-green);
    margin-bottom: 5px;
}

.author-info p {
    color: var(--text-secondary);
    margin: 0;
    font-style: normal;
    font-size: 0.9rem;
}

.rating {
    color: var(--neon-yellow);
    font-size: 1.2rem;
}

.testimonial-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.testimonial-prev,
.testimonial-next {
    background: transparent;
    border: 2px solid var(--neon-green);
    color: var(--neon-green);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
}

.testimonial-prev:hover,
.testimonial-next:hover {
    background: var(--neon-green);
    color: var(--primary-bg);
    box-shadow: 0 0 20px var(--neon-green);
}

/* Light Theme */
.light-theme {
    --primary-bg: #ffffff;
    --secondary-bg: #f8f9fa;
    --tertiary-bg: #ffffff;
    --accent-bg: #e9ecef;
    
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    
    --border-color: #dee2e6;
    --border-accent: #00ff41;
}

.light-theme .terminal-header,
.light-theme .navbar {
    background: rgba(248, 249, 250, 0.95);
    border-bottom-color: var(--border-color);
}

.light-theme .terminal-window,
.light-theme .profile-card,
.light-theme .skill-category,
.light-theme .project-card,
.light-theme .cert-card,
.light-theme .blog-card,
.light-theme .testimonial-card,
.light-theme .timeline-content {
    background: var(--tertiary-bg);
    border-color: var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mb-4 { margin-bottom: 40px; }

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mt-4 { margin-top: 40px; }

.hidden { display: none; }
.visible { display: block; }

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

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

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Certificate Preview */
.cert-preview {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    background: var(--accent-bg);
}

.cert-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.cert-preview-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: var(--neon-green);
    font-size: 0.85rem;
    font-weight: 600;
}

.cert-preview-overlay i {
    font-size: 1.6rem;
}

.cert-preview:hover img {
    transform: scale(1.05);
}

.cert-preview:hover .cert-preview-overlay {
    opacity: 1;
}

.cert-card {
    padding: 0;
    overflow: hidden;
}

.cert-card .cert-content {
    padding: 20px 25px;
}

/* Certificate Modal */
.cert-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(6px);
}

.cert-modal.open {
    display: flex;
}

.cert-modal-inner {
    position: relative;
    max-width: 900px;
    width: 100%;
    background: var(--tertiary-bg);
    border: 1px solid var(--neon-green);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0, 255, 65, 0.2);
}

.cert-modal-inner img {
    width: 100%;
    display: block;
    max-height: 80vh;
    object-fit: contain;
    background: #fff;
}

.cert-modal-title {
    padding: 14px 20px;
    color: var(--neon-green);
    font-family: var(--font-display);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
    margin: 0;
}

.cert-modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: transparent;
    border: none;
    color: var(--neon-green);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    z-index: 1;
    transition: color 0.2s ease;
}

.cert-modal-close:hover {
    color: var(--neon-red);
}

/* Feedback image testimonials */
.feedback-image-wrap {
    position: relative;
    width: 100%;
    max-height: 480px;
    overflow: hidden;
    border-radius: 6px;
    cursor: pointer;
    background: var(--accent-bg);
}

.feedback-image-wrap img {
    width: 100%;
    display: block;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.feedback-image-wrap:hover img {
    transform: scale(1.02);
}

.feedback-image-wrap .cert-preview-overlay {
    border-radius: 6px;
}

.feedback-image-wrap:hover .cert-preview-overlay {
    opacity: 1;
}

/* Form result message */
.form-result {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 5px;
    font-size: 0.9rem;
    display: none;
}

.form-result:not(:empty) {
    display: block;
}

.form-result--success {
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid var(--neon-green);
    color: var(--neon-green);
}

.form-result--error {
    background: rgba(255, 0, 64, 0.1);
    border: 1px solid var(--neon-red);
    color: var(--neon-red);
}

/* Success Modal */
.success-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(6px);
}

.success-modal.open {
    display: flex;
}

.success-modal-inner {
    background: var(--tertiary-bg);
    border: 1px solid var(--neon-green);
    border-radius: 12px;
    padding: 50px 40px;
    text-align: center;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 0 40px rgba(0, 255, 65, 0.2);
    animation: modalPop 0.3s ease;
}

@keyframes modalPop {
    from { transform: scale(0.85); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

.success-icon {
    font-size: 3.5rem;
    color: var(--neon-green);
    margin-bottom: 20px;
    animation: successPulse 1.5s ease infinite;
}

@keyframes successPulse {
    0%, 100% { text-shadow: 0 0 10px var(--neon-green); }
    50%       { text-shadow: 0 0 30px var(--neon-green); }
}

.success-modal-inner h3 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--neon-green);
    margin-bottom: 12px;
}

.success-modal-inner p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
}

/* ═══════════════════════════════════════
   ENTRANCE ANIMATIONS
═══════════════════════════════════════ */

/* Base keyframes */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeRight {
    from { opacity: 0; transform: translateX(50px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes neonFlicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        text-shadow: 0 0 10px var(--neon-green), 0 0 30px var(--neon-green);
        opacity: 1;
    }
    20%, 24%, 55% {
        text-shadow: none;
        opacity: 0.7;
    }
}

@keyframes borderGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(0,255,65,0.2); }
    50%       { box-shadow: 0 0 20px rgba(0,255,65,0.5), 0 0 40px rgba(0,255,65,0.2); }
}

@keyframes typewriterCaret {
    0%, 100% { border-right-color: var(--neon-green); }
    50%       { border-right-color: transparent; }
}

/* ── Scroll-triggered base class ── */
.anim {
    opacity: 0;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.anim.anim--up     { transform: translateY(40px); }
.anim.anim--down   { transform: translateY(-30px); }
.anim.anim--left   { transform: translateX(-50px); }
.anim.anim--right  { transform: translateX(50px); }
.anim.anim--zoom   { transform: scale(0.88); }

.anim.in-view {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* Stagger delays */
.anim-d1 { transition-delay: 0.1s; }
.anim-d2 { transition-delay: 0.2s; }
.anim-d3 { transition-delay: 0.3s; }
.anim-d4 { transition-delay: 0.4s; }
.anim-d5 { transition-delay: 0.5s; }
.anim-d6 { transition-delay: 0.6s; }

/* ── Hero ── */
.terminal-prompt  { animation: fadeDown 0.7s ease 0.2s both; }
.hero-title       { animation: fadeUp   0.8s ease 0.4s both; }
.hero-description { animation: fadeUp   0.7s ease 0.6s both; }
.hero-stats       { animation: fadeUp   0.7s ease 0.75s both; }
.hero-buttons     { animation: fadeUp   0.7s ease 0.9s both; }
.hero-visual      { animation: fadeRight 0.9s ease 0.5s both; }

/* ── Navbar ── */
.terminal-header  { animation: fadeDown 0.5s ease both; }
.navbar           { animation: fadeDown 0.6s ease 0.1s both; }

/* ── Section titles ── */
.section-title {
    animation: none; /* handled by JS observer */
}

/* ── Profile card ── */
.profile-card {
    animation: zoomIn 0.7s ease both;
}

/* ── Skill categories — stagger via JS ── */
.skill-category {
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.6s ease;
}

/* ── Cert cards ── */
.cert-card {
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.6s ease;
}

/* ── Hall of Fame items ── */
.hof-grid .skill-category {
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.4s ease, opacity 0.5s ease;
}

/* ── Timeline ── */
.timeline-content {
    transition: border-color 0.3s ease, box-shadow 0.3s ease, opacity 0.7s ease, transform 0.7s ease;
}

/* ── Contact items ── */
.contact-item {
    transition: border-color 0.3s ease, box-shadow 0.3s ease, opacity 0.6s ease, transform 0.6s ease;
}

/* ── Neon flicker on logo ── */
.nav-logo .logo-text {
    animation: neonFlicker 6s ease-in-out 2s infinite;
}

/* ── Glow pulse on profile image ── */
.profile-image {
    animation: borderGlow 3s ease-in-out infinite;
}

/* ── Stat numbers glow on count ── */
.stat-number {
    transition: text-shadow 0.3s ease;
}

/* ── Button hover lift ── */
.btn {
    transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.btn:hover {
    transform: translateY(-3px);
}

.btn:active {
    transform: translateY(0);
}

/* ── Nav link active indicator ── */
.nav-link.active {
    color: var(--neon-green);
    text-shadow: 0 0 8px var(--neon-green);
}

/* ── Cert card hover lift ── */
.cert-card:hover {
    transform: translateY(-6px);
}

/* ── HOF card hover ── */
.hof-grid .skill-category:hover {
    transform: translateY(-4px) scale(1.04);
    border-color: var(--neon-green);
    box-shadow: 0 0 20px rgba(0,255,65,0.15);
}

/* ── Reduce motion for accessibility ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
