:root {
    --bg-color: #0a0e14;
    --text-color: #e0e6ed;
    --accent-color: #00ff9c; /* Terminal Green */
    --secondary-accent: #00d9ff; /* Electric Cyan */
    --dim-text: #8b949e;
    --error-color: #ff6b6b;
    --border-color: #30363d;
    --card-bg: #161b22;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --transition-speed: 0.3s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-mono);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Visible keyboard focus everywhere (quality floor, not just the form) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--secondary-accent);
    outline-offset: 3px;
}

/* Screen-reader-only text: used for form <label>s so sighted users still
   see the placeholder-driven layout, but assistive tech gets real labels */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Subtle Scan-line Effect */
body::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg,
    rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 9999;
    pointer-events: none;
    background-size: 100% 4px, 3px 100%;
}

/* Grid Background */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, #1b2129 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    opacity: 0.5;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 14, 20, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 2rem;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--dim-text);
    font-size: 0.9rem;
    transition: color var(--transition-speed);
}

nav a:hover, nav a.active {
    color: var(--accent-color);
}

/* Layout Containers */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem;
}

section {
    margin-bottom: 6rem;
    opacity: 0; /* For scroll animation */
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Typography & Elements */
h1, h2, h3 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.section-label {
    display: block;
    font-size: 0.8rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Hero Section */
.hero {
    text-align: center;
    padding-top: 2rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.cursor {
    display: inline-block;
    width: 10px;
    background-color: var(--accent-color);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.tagline {
    font-size: 1.2rem;
    color: var(--dim-text);
    margin-bottom: 2rem;
}

.badge-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--accent-color);
}

.hero-cta {
    margin-top: 2rem;
}

/* About Section */
.about-text {
    font-size: 1.1rem;
    color: var(--text-color);
    max-width: 700px;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-category h3 {
    font-size: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-accent);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.tag {
    background: #1c2128;
    border: 1px solid var(--border-color);
    padding: 0.2rem 0.6rem;
    font-size: 0.85rem;
    border-radius: 3px;
    /* was var(--transition-strength), a variable that was never defined
       anywhere, so this transition silently did nothing before */
    transition: border-color var(--transition-speed), color var(--transition-speed);
}

.tag:hover {
    border-color: var(--secondary-accent);
    color: var(--secondary-accent);
}

/* Experience Section */
.timeline {
    position: relative;
    padding-left: 2rem;
    border-left: 1px solid var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.45rem;
    top: 0.5rem;
    width: 10px;
    height: 10px;
    background: var(--accent-color);
    border-radius: 50%;
}

.timeline-role {
    font-weight: bold;
    font-size: 1.2rem;
    display: block;
}

.timeline-company {
    /* was declared twice before (dim-text then immediately overridden by
       secondary-accent) - kept the one that was actually visible */
    display: block;
    color: var(--secondary-accent);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.timeline-bullets {
    list-style: none;
}

.timeline-bullets li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.timeline-bullets li::before {
    content: '>';
    position: absolute;
    left: -0.8rem;
    color: var(--accent-color);
}

/* Certifications Grid */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.cert-card {
    background: var(--card-bg);
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-align: center;
}

.cert-name {
    display: block;
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.cert-issuer {
    font-size: 0.75rem;
    color: var(--dim-text);
}

.cert-card--more {
    text-align: center;
    padding: 1rem;
    border: 1px dashed var(--border-color);
    color: var(--dim-text);
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Contact Section */
.contact-block {
    background: #161b22;
    padding: 1.5rem;
    border-radius: 4px;
    border-left: 4px solid var(--accent-color);
    font-family: var(--font-mono);
}

.contact-note {
    font-size: 0.8rem;
    color: var(--dim-text);
    margin-top: 0.75rem;
}

.command-line {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cmd-prompt { color: var(--accent-color); }
.cmd-arg { color: var(--secondary-accent); }

/* Button Styling */
.cta-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all var(--transition-speed);
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.cta-btn:hover {
    background: var(--accent-color);
    color: var(--bg-color);
    box-shadow: 0 0 20px rgba(0, 255, 156, 0.3);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal-overlay.is-open {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    padding: 2rem;
    border: 1px solid var(--accent-color);
    max-width: 450px;
    width: 90%;
    position: relative;
}

.modal-content h2 { color: var(--accent-color); margin-bottom: 1rem;}

.modal-subtext {
    font-size: 0.8rem;
    color: var(--dim-text);
    margin-bottom: 1rem;
}

.privacy-note {
    font-size: 0.7rem;
    color: var(--dim-text);
    margin-top: -0.4rem;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.field {
    display: flex;
    flex-direction: column;
}

input, textarea {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 0.8rem;
    color: var(--text-color);
    font-family: var(--font-mono);
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--secondary-accent);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--dim-text);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
}

.close-modal:hover {
    color: var(--text-color);
}

/* Form status messages - replaces inline style.color assignments from JS */
.status-msg {
    margin-top: 1rem;
    font-size: 0.85rem;
}

.status-msg--info {
    color: var(--accent-color);
}

.status-msg--success {
    color: var(--accent-color);
}

.status-msg--error {
    color: var(--error-color);
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    nav ul { gap: 0.5rem; font-size: 0.7rem; }
    .hero h1 { font-size: 2rem; }
    .container { padding-top: 6rem; }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Utility */
.hidden { display: none; }