/* ========================================
   CSS Variables - Theme System
======================================== */
:root,
:root[data-terminal-theme="green"] {
    --background: hsl(120 10% 3%);
    --foreground: hsl(120 100% 65%);

    --card: hsl(120 10% 6%);
    --card-foreground: hsl(120 100% 65%);

    --primary: hsl(120 100% 50%);
    --primary-foreground: hsl(120 10% 3%);

    --secondary: hsl(120 10% 10%);
    --secondary-foreground: hsl(120 100% 65%);

    --muted: hsl(120 10% 12%);
    --muted-foreground: hsl(120 40% 45%);

    --destructive: hsl(0 84% 60%);
    --terminal-amber: hsl(45 100% 50%);
    
    --border: hsl(120 30% 15%);

    --phosphor-glow: 120 100% 50%;
    --terminal-hue: 120;

    --scanline-opacity: 0.12;
    --flicker-intensity: 0.03;

    --shadow-glow: 0 0 20px hsla(120, 100%, 50%, 0.4);
    --shadow-text: none;
}

:root[data-terminal-theme="amber"] {
    --background: hsl(30 15% 4%);
    --foreground: hsl(45 100% 60%);

    --card: hsl(30 15% 7%);
    --card-foreground: hsl(45 100% 60%);

    --primary: hsl(45 100% 50%);
    --primary-foreground: hsl(30 15% 4%);

    --secondary: hsl(30 15% 12%);
    --secondary-foreground: hsl(45 100% 60%);

    --muted: hsl(30 15% 15%);
    --muted-foreground: hsl(45 40% 45%);

    --destructive: hsl(0 84% 60%);
    --terminal-amber: hsl(45 100% 50%);

    --border: hsl(45 30% 18%);

    --phosphor-glow: 45 100% 50%;
    --terminal-hue: 45;

    --shadow-glow: 0 0 20px hsla(45, 100%, 50%, 0.4);
    --shadow-text: none;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--background);
    color: var(--foreground);
    font-family: 'Fira Code', 'VT323', monospace;
    text-shadow: none;
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'VT323', monospace;
    text-shadow: none;
}

a {
    color: inherit;
    text-decoration: none;
}

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

::selection {
    background: var(--primary);
    color: var(--primary-foreground);
}

/* ========================================
   CRT Effects
======================================== */
#root {
    position: relative;
}

#root::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        hsla(0, 0%, 0%, var(--scanline-opacity)) 2px,
        hsla(0, 0%, 0%, var(--scanline-opacity)) 4px
    );
    pointer-events: none;
    z-index: 9999;
    animation: crt-flicker 0.1s infinite;
}

@keyframes crt-flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: calc(1 - var(--flicker-intensity)); }
}

#root::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        hsl(var(--phosphor-glow) / 0.02) 80%,
        hsl(var(--phosphor-glow) / 0.05) 100%
    );
    pointer-events: none;
    z-index: 9998;
}

/* ========================================
   Layout & Container
======================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 6rem 0;
    position: relative;
}

.section-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ========================================
   Matrix Rain Canvas
======================================== */
#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.3;
}

/* ========================================
   Navigation
======================================== */
#navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: hsl(var(--phosphor-glow) / 0.02);
    backdrop-filter: blur(8px);
    border-bottom: 2px solid hsl(var(--phosphor-glow) / 0.3);
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo-text {
    font-family: 'VT323', monospace;
    font-size: 1.5rem;
    color: var(--primary);
    text-shadow: none;
}

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid hsl(var(--phosphor-glow) / 0.4);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s;
}

.theme-toggle:hover {
    border-color: var(--primary);
    background: hsl(var(--phosphor-glow) / 0.1);
}

.theme-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--muted-foreground);
    opacity: 0.4;
    transition: all 0.3s;
}

.theme-dot.active {
    opacity: 1;
}

#green-dot.active {
    background: hsl(120 100% 50%);
    box-shadow: 0 0 6px hsl(120 100% 50%);
}

#amber-dot.active {
    background: hsl(45 100% 50%);
    box-shadow: 0 0 6px hsl(45 100% 50%);
}

.nav-desktop {
    display: none;
    align-items: center;
    gap: 0.25rem;
}

@media (min-width: 768px) {
    .nav-desktop {
        display: flex;
    }
}

.nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    color: var(--muted-foreground);
    transition: color 0.3s;
}

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

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

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

.nav-index {
    color: var(--primary);
    opacity: 0.5;
}

.mobile-menu-btn {
    display: block;
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    transition: color 0.3s;
}

.mobile-menu-btn:hover {
    color: var(--foreground);
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }
}

.hidden {
    display: none !important;
}

.mobile-nav {
    padding: 1rem 1.5rem;
    border-top: 2px solid hsl(var(--phosphor-glow) / 0.3);
    animation: fadeIn 0.3s ease-out;
}

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

.mobile-nav-link {
    display: block;
    padding: 0.75rem 0;
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    color: var(--muted-foreground);
    transition: color 0.3s;
}

.mobile-nav-link:hover {
    color: var(--primary);
}

/* ========================================
   Terminal Window
======================================== */
.terminal-window {
    border: 2px solid hsl(var(--primary) / 0.5);
    background: var(--card);
    box-shadow: 
        inset 0 0 50px hsl(var(--primary) / 0.05),
        0 0 20px hsl(var(--primary) / 0.2);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-bottom: 2px solid hsl(var(--primary) / 0.3);
    background: var(--secondary);
}

.terminal-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
}

.terminal-dot.destructive {
    background: var(--destructive);
}

.terminal-dot.amber {
    background: var(--terminal-amber);
}

.terminal-dot.primary {
    background: var(--primary);
}

.terminal-title {
    margin-left: 0.75rem;
    font-size: 0.75rem;
    color: var(--muted-foreground);
    font-family: 'Fira Code', monospace;
}

.terminal-content {
    padding: 1.5rem;
    font-family: 'Fira Code', monospace;
}

.terminal-content.small {
    padding: 1rem;
}

/* ========================================
   Hero Section
======================================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 4rem;
}

.bg-grid-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(hsl(var(--phosphor-glow) / 0.05) 1px, transparent 1px),
        linear-gradient(90deg, hsl(var(--phosphor-glow) / 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.5;
}

.circuit-pattern {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg stroke='%2300ff00' stroke-opacity='0.08' stroke-width='1'%3E%3Cpath d='M30 0v20M30 40v20M0 30h20M40 30h20M10 10l10 10M40 40l10 10M10 50l10-10M40 20l10-10'/%3E%3Ccircle cx='30' cy='30' r='3'/%3E%3Ccircle cx='30' cy='10' r='2'/%3E%3Ccircle cx='30' cy='50' r='2'/%3E%3Ccircle cx='10' cy='30' r='2'/%3E%3Ccircle cx='50' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.scanline-effect {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.scanline {
    width: 100%;
    height: 2px;
    background: hsl(var(--phosphor-glow) / 0.2);
    animation: scanline 8s linear infinite;
}

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

.hero-container {
    position: relative;
    z-index: 10;
    max-width: 56rem;
    width: 100%;
}

.hero-terminal {
    animation: scaleIn 0.8s ease-out;
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.hero-terminal .terminal-content {
    padding: 1.5rem 2rem;
}

@media (min-width: 768px) {
    .hero-terminal .terminal-content {
        padding: 2rem;
    }
}

.boot-sequence {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.boot-line {
    min-height: 1.25rem;
}

.separator {
    border-top: 1px solid hsl(var(--phosphor-glow) / 0.2);
    margin: 1rem 0;
}

.command-line {
    color: var(--muted-foreground);
}

.profile-section {
    margin-top: 1rem;
}

.profile-output {
    padding: 1rem 0;
}

.profile-flex {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

@media (min-width: 640px) {
    .profile-flex {
        flex-direction: row;
        align-items: flex-start;
    }
}

.profile-photo-container {
    flex-shrink: 0;
    order: -1;
}

@media (min-width: 640px) {
    .profile-photo-container {
        order: 1;
    }
}

.profile-photo {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    border: 2px solid hsl(var(--phosphor-glow) / 0.5);
    overflow: hidden;
}

@media (min-width: 640px) {
    .profile-photo {
        width: 6rem;
        height: 6rem;
    }
}

@media (min-width: 768px) {
    .profile-photo {
        width: 8rem;
        height: 8rem;
    }
}

@media (min-width: 1024px) {
    .profile-photo {
        width: 10rem;
        height: 10rem;
    }
}

.animate-border-glow {
    animation: borderGlow 2s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% {
        box-shadow: 0 0 15px hsl(var(--phosphor-glow) / 0.3), 0 0 30px hsl(var(--phosphor-glow) / 0.1);
        border-color: hsl(var(--phosphor-glow) / 0.5);
    }
    50% {
        box-shadow: 0 0 25px hsl(var(--phosphor-glow) / 0.6), 0 0 50px hsl(var(--phosphor-glow) / 0.3), 0 0 80px hsl(var(--phosphor-glow) / 0.1);
        border-color: hsl(var(--phosphor-glow) / 0.8);
    }
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.5s;
}

.profile-img:hover {
    filter: grayscale(0%);
}

.profile-info {
    flex: 1;
    text-align: center;
}

@media (min-width: 640px) {
    .profile-info {
        text-align: left;
    }
}

.ascii-name {
    display: none;
    color: hsl(var(--phosphor-glow) / 0.6);
    font-size: 4px;
    line-height: 1;
    font-family: 'Fira Code', monospace;
    margin-bottom: 1rem;
    white-space: pre;
}

@media (min-width: 640px) {
    .ascii-name {
        display: block;
        font-size: 6px;
    }
}

@media (min-width: 768px) {
    .ascii-name {
        font-size: 8px;
    }
}

.animate-glitch-occasional {
    animation: glitchOccasional 8s ease-in-out infinite;
}

@keyframes glitchOccasional {
    0%, 90%, 100% {
        transform: translate(0);
        text-shadow: none;
        opacity: 1;
    }
    91% {
        transform: translate(-2px, 1px);
        text-shadow: 2px 0 hsla(0, 100%, 50%, 0.7), -2px 0 hsla(180, 100%, 50%, 0.7);
        opacity: 0.9;
    }
    92% {
        transform: translate(2px, -1px);
        text-shadow: -2px 0 hsla(0, 100%, 50%, 0.7), 2px 0 hsla(180, 100%, 50%, 0.7);
        opacity: 1;
    }
    93% {
        transform: translate(-1px, 2px);
        text-shadow: 1px 0 hsla(0, 100%, 50%, 0.5), -1px 0 hsla(180, 100%, 50%, 0.5);
        opacity: 0.95;
    }
    94% {
        transform: translate(1px, -2px);
        text-shadow: -1px 0 hsla(0, 100%, 50%, 0.7), 1px 0 hsla(180, 100%, 50%, 0.7);
        opacity: 1;
    }
    95% {
        transform: translate(0);
        text-shadow: none;
        opacity: 1;
    }
}

.mobile-name {
    display: block;
    font-family: 'VT323', monospace;
    font-size: 3rem;
    color: var(--primary);
    letter-spacing: 0.1em;
}

@media (min-width: 640px) {
    .mobile-name {
        display: none;
    }
}

@media (min-width: 768px) {
    .mobile-name {
        font-size: 4.5rem;
    }
}

@media (min-width: 1024px) {
    .mobile-name {
        font-size: 6rem;
    }
}

.phosphor-glow {
    text-shadow: none;
}

/* Ensure section titles never glow (especially on mobile) */
.section-title.phosphor-glow {
    text-shadow: none !important;
    filter: none !important;
}

.role-section {
    margin-top: 1rem;
}

.role-output {
    font-size: 1.25rem;
    color: var(--foreground);
    margin-top: 0.5rem;
}

@media (min-width: 768px) {
    .role-output {
        font-size: 1.5rem;
    }
}

.about-section {
    padding-top: 1rem;
}

.about-output {
    color: var(--muted-foreground);
    margin-top: 0.5rem;
    line-height: 1.75;
    max-width: 42rem;
}

.stats-section {
    padding-top: 1.5rem;
}

.stats-output {
    margin-top: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    text-align: center;
}

.stat-card {
    padding: 1rem;
}

.stat-value {
    font-size: 1.5rem;
    font-family: 'VT323', monospace;
    color: var(--primary);
}

@media (min-width: 768px) {
    .stat-value {
        font-size: 1.875rem;
    }
}

.stat-label {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin-top: 0.25rem;
}

.retro-border {
    border: 2px solid hsl(var(--primary) / 0.5);
    box-shadow: 
        0 0 0 1px hsl(var(--primary) / 0.2),
        inset 0 0 30px hsl(var(--primary) / 0.03);
}

.commands-section {
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 640px) {
    .commands-section {
        flex-direction: row;
        justify-content: center;
    }
}

.retro-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.2s;
    text-shadow: none;
}

.retro-button:hover {
    background: var(--primary);
    color: var(--primary-foreground);
    box-shadow: 
        0 0 20px hsl(var(--phosphor-glow) / 0.5),
        inset 0 0 20px hsl(var(--phosphor-glow) / 0.2);
}

.retro-button.full-width {
    width: 100%;
}

.btn-icon {
    width: 1rem;
    height: 1rem;
}

.cursor-section {
    padding-top: 1rem;
}

.blink-cursor {
    animation: blink 1s step-end infinite;
    color: var(--primary);
}

@keyframes blink {
    50% { opacity: 0; }
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted-foreground);
    animation: fadeIn 0.5s ease-out;
}

.scroll-text {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
}

.scroll-arrow {
    color: var(--primary);
    animation: bounce 1.5s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* ========================================
   Text Utilities
======================================== */
.text-primary {
    color: var(--primary);
}

.text-muted {
    color: var(--muted-foreground);
}

.text-foreground {
    color: var(--foreground);
}

.terminal-amber {
    color: var(--terminal-amber);
}

.opacity-30 {
    opacity: 0.3;
}

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

.mt-4 {
    margin-top: 1rem;
}

/* ========================================
   Section Headers
======================================== */
.section-header {
    margin-bottom: 3rem;
    text-align: center;
}

.section-cmd {
    font-family: 'Fira Code', monospace;
    color: var(--muted-foreground);
    margin-bottom: 0.5rem;
}

.section-title {
    font-family: 'VT323', monospace;
    font-size: 2.25rem;
    text-align: center;
    color: var(--primary);
    text-shadow: none;
    filter: none;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 3rem;
    }
}

/* ========================================
   About Section
======================================== */
.about-section-content {
    padding-top: 6rem;
}

.about-terminal {
    max-width: 56rem;
    width: 100%;
}

.about-terminal .terminal-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.bio-content {
    margin-top: 0.5rem;
    color: var(--foreground);
    line-height: 1.75;
    border-left: 2px solid hsl(var(--phosphor-glow) / 0.3);
    padding-left: 1rem;
}

.about-highlight {
    animation: slideIn 0.4s ease-out;
}

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

.highlight-output {
    color: var(--foreground);
    margin-top: 0.25rem;
    padding-left: 1rem;
    border-left: 2px solid hsl(var(--phosphor-glow) / 0.2);
}

.terminal-cursor {
    padding-top: 1rem;
}

/* ========================================
   Blog Section
======================================== */
.blog-posts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 56rem;
    width: 100%;
}

.blog-post {
    cursor: pointer;
    text-decoration: none;
}

.blog-post .terminal-window {
    transition: all 0.3s;
}

.blog-post:hover .terminal-window {
    border-color: var(--primary);
}

.blog-post-content {
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .blog-post-content {
        flex-direction: row;
        align-items: flex-start;
    }
}

.blog-post-id {
    font-family: 'VT323', monospace;
    font-size: 1.5rem;
    color: var(--primary);
}

.blog-post-body {
    flex: 1;
}

.blog-post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.blog-tag {
    color: var(--terminal-amber);
}

.blog-post-title {
    font-size: 1.125rem;
    color: var(--foreground);
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

@media (min-width: 768px) {
    .blog-post-title {
        font-size: 1.25rem;
    }
}

.blog-post:hover .blog-post-title {
    color: var(--primary);
}

.blog-post-preview {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.blog-post-action {
    color: var(--primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.blog-post:hover .blog-post-action {
    opacity: 1;
}

.blog-view-all {
    margin-top: 2rem;
    text-align: center;
}

/* ========================================
   Expertise Section
======================================== */
.skills-terminal {
    max-width: 80rem;
    width: 100%;
    margin-bottom: 3rem;
}

.skills-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1rem 0;
}

.skill-item {
    animation: slideIn 0.4s ease-out;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.skill-name {
    color: var(--foreground);
}

.skill-percentage {
    color: var(--primary);
}

.skill-bar {
    height: 1.5rem;
    background: var(--secondary);
    border: 1px solid hsl(var(--phosphor-glow) / 0.4);
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}

.skill-fill {
    height: 100%;
    background: linear-gradient(90deg, 
        hsl(var(--phosphor-glow) / 0.6) 0%, 
        hsl(var(--phosphor-glow) / 0.9) 50%, 
        var(--primary) 100%
    );
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.skill-fill::after {
    display: none;
}

.skill-blocks {
    display: none;
}

.skills-complete {
    padding-top: 1rem;
}

.certifications-section {
    max-width: 80rem;
    width: 100%;
}

.certs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .certs-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.cert-item {
    padding: 0.75rem;
    text-align: center;
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    color: var(--foreground);
    transition: all 0.3s;
}

.cert-item:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* ========================================
   Contact Section
======================================== */
.contact-grid {
    display: grid;
    gap: 2rem;
    max-width: 64rem;
    width: 100%;
}

@media (min-width: 1024px) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-form-terminal {
    height: fit-content;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 0.25rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--secondary);
    border: 2px solid hsl(var(--phosphor-glow) / 0.3);
    color: var(--foreground);
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.3s;
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--primary);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--muted-foreground);
}

.form-textarea {
    resize: none;
    min-height: 6rem;
}

.form-success {
    text-align: center;
    padding: 2rem 0;
}

.success-title {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

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

.social-link {
    display: block;
    padding: 0.5rem 0;
    transition: color 0.3s;
}

.social-link:hover {
    color: var(--primary);
}

.services-list {
    list-style: none;
    font-size: 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* ========================================
   Footer
======================================== */
.footer {
    padding: 1.5rem 0;
    border-top: 2px solid hsl(var(--phosphor-glow) / 0.3);
    font-family: 'Fira Code', monospace;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .footer-info {
        flex-direction: row;
        justify-content: center;
    }
}

.footer-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 0.5rem;
    height: 0.5rem;
    background: var(--primary);
}

.footer-bottom {
    margin-top: 1.5rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    position: relative;
}

.footer-ascii {
    display: none;
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: var(--primary);
    white-space: pre;
}

@media (min-width: 768px) {
    .footer-ascii {
        display: block;
    }
}

.scroll-top-btn {
    position: absolute;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    color: var(--primary);
    border: 1px solid hsl(var(--phosphor-glow) / 0.5);
    background: transparent;
    cursor: pointer;
    transition: background 0.2s;
}

.scroll-top-btn:hover {
    background: hsl(var(--phosphor-glow) / 0.2);
}

/* ========================================
   Blog Page Styles
======================================== */
.blog-page {
    padding-top: 6rem;
    min-height: 100vh;
}

.blog-page-header {
    margin-bottom: 2rem;
    max-width: 56rem;
    width: 100%;
}

.blog-page-header-row {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.blog-page-header-row .back-link {
    position: absolute;
    left: 0;
}

.blog-page-header {
    position: relative;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted-foreground);
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--primary);
}

.blog-page-posts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 56rem;
    width: 100%;
}

/* ========================================
   Blog Article Page Styles
======================================== */
.article-page {
    padding-top: 6rem;
    padding-bottom: 4rem;
    min-height: 100vh;
}

.article-container {
    max-width: 56rem;
    width: 100%;
}

.article-header {
    margin-bottom: 2rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.article-title {
    font-family: 'VT323', monospace;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .article-title {
        font-size: 2.5rem;
    }
}

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

.article-content {
    color: var(--foreground);
    line-height: 1.8;
}

.article-content h1,
.article-content h2,
.article-content h3 {
    color: var(--primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content h2 {
    font-size: 1.5rem;
    border-bottom: 1px solid hsl(var(--phosphor-glow) / 0.3);
    padding-bottom: 0.5rem;
}

.article-content h3 {
    font-size: 1.25rem;
}

.article-content p {
    margin-bottom: 1rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content strong {
    color: var(--primary);
}

.article-content hr {
    border: none;
    border-top: 1px solid hsl(var(--phosphor-glow) / 0.3);
    margin: 2rem 0;
}

.article-content em {
    color: var(--muted-foreground);
}

/* ========================================
   Responsive Adjustments
======================================== */
@media (max-width: 640px) {
    .container {
        padding: 0 1rem;
    }
    
    .section {
        padding: 4rem 0;
    }
    
    .hero-terminal .terminal-content {
        padding: 1rem;
    }
    
    .stats-grid {
        gap: 0.5rem;
    }
    
    .stat-card {
        padding: 0.75rem 0.5rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    /* Remove all neon glow effects on mobile */
    * {
        text-shadow: none !important;
    }
    
    .phosphor-glow,
    .nav-logo-text,
    .section-title,
    .mobile-name,
    .desktop-name,
    .text-primary,
    .nav-link,
    .mobile-nav-link,
    .blog-card-title,
    .blog-card h3,
    h1, h2, h3, h4, h5, h6 {
        text-shadow: none !important;
        filter: none !important;
    }
}
