* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Share Tech Mono', monospace;
    background: #1e1e1e;
    color: #d4d4d4;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Code editor overlay effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(
            90deg,
            rgba(0, 122, 204, 0.02) 0%,
            transparent 1px
        ),
        linear-gradient(
            180deg,
            rgba(0, 122, 204, 0.02) 0%,
            transparent 1px
        );
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.3;
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.98; }
}

/* Code editor window */
.terminal-overlay {
    width: 95%;
    max-width: 1200px;
    height: 90vh;
    background: #252526;
    border: 1px solid #3c3c3c;
    border-radius: 8px;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
    animation: editorBoot 2s ease-out;
    overflow: hidden;
}

@keyframes editorBoot {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    50% {
        opacity: 0.5;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Code editor header */
.terminal-header {
    background: linear-gradient(135deg, #2d2d30, #383838);
    padding: 10px 15px;
    border-bottom: 1px solid #3c3c3c;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 7px 7px 0 0;
    position: relative;
}

.terminal-header::before {
    content: '/* portfolio.js */';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: #6a9955;
    font-style: italic;
}

.terminal-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9rem;
    color: #007acc;
    position: relative;
}

.terminal-title::before {
    content: '1  ';
    color: #858585;
    margin-right: 8px;
}

/* Removed titleGlow animation for cleaner code editor look */

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

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

.minimize { background: #ffbd2e; }
.maximize { background: #28ca42; }
.close { background: #ff5f56; }

.control:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px currentColor;
}

/* Main container */
.container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    height: calc(100% - 60px);
    padding: 20px;
    overflow: hidden;
}

/* Profile section */
.profile {
    border-right: 1px solid #3c3c3c;
    padding-right: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    animation: slideInLeft 1.5s ease-out;
    position: relative;
}

.profile::before {
    content: '// User Profile Object';
    position: absolute;
    top: -25px;
    left: 0;
    font-size: 0.7rem;
    color: #6a9955;
    font-style: italic;
}

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

.profile-frame {
    position: relative;
    align-self: center;
    margin-bottom: 10px;
}

.photo {
    width: 120px;
    height: 120px;
    border: 2px solid #007acc;
    border-radius: 8px;
    object-fit: cover;
    filter: none;
    position: relative;
    z-index: 2;
    background: #2d2d30;
    loading: lazy;
    max-width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Removed photoScan animation for cleaner look */

.scan-line {
    display: none;
}

@keyframes scanMove {
    0% { top: 0; opacity: 1; }
    100% { top: 120px; opacity: 0; }
}

.profile h1 {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
    color: #569cd6;
    position: relative;
}

.profile h1::before {
    content: 'const ';
    color: #569cd6;
}

.profile h1::after {
    content: ' = {';
    color: #d4d4d4;
}

/* Enhanced glitch effect */
.glitch {
    position: relative;
    animation: glitch 4s infinite;
}

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

.glitch::before {
    animation: glitch-1 0.3s infinite;
    color: #ff0000;
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.3s infinite;
    color: #0000ff;
    z-index: -2;
}

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

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

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

/* Syntax highlighting for role */
.typewriter {
    overflow: hidden;
    border-right: 2px solid #569cd6;
    white-space: nowrap;
    animation: typing 4s steps(25, end), blink-caret 0.75s step-end infinite;
    font-size: 0.8rem;
    color: #ce9178;
    text-align: center;
    position: relative;
}

.typewriter::before {
    content: '  role: "';
    color: #9cdcfe;
}

.typewriter::after {
    content: '",';
    color: #d4d4d4;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #569cd6; }
}

.blink {
    animation: blink 1.5s linear infinite;
    font-size: 0.7rem;
    color: #dcdcaa;
    text-align: center;
    position: relative;
}

.blink::before {
    content: '  experience: "';
    color: #9cdcfe;
}

.blink::after {
    content: '",';
    color: #d4d4d4;
}

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

.status {
    font-size: 0.7rem;
    text-align: center;
    color: #6a9955;
    position: relative;
}

.status::before {
    content: '  status: "';
    color: #9cdcfe;
}

.status::after {
    content: '"}\A// End of object';
    color: #d4d4d4;
    white-space: pre;
}

.online {
    color: #4ec9b0;
    animation: pulse 2s ease-in-out infinite;
}

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

/* Social media section with syntax styling */
.social-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #3c3c3c;
    position: relative;
}

.social-section::before {
    content: '// Social Links Array';
    position: absolute;
    top: -5px;
    left: 0;
    font-size: 0.7rem;
    color: #6a9955;
    font-style: italic;
}

.social-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    color: #569cd6;
    text-align: center;
    margin-bottom: 15px;
    position: relative;
}

.social-title::before {
    content: 'const ';
    color: #569cd6;
}

.social-title::after {
    content: ' = [';
    color: #d4d4d4;
}

.social-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid #3c3c3c;
    border-left: 3px solid #007acc;
    text-decoration: none;
    color: #9cdcfe;
    font-size: 0.6rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    border-radius: 3px;
}

.social-link::before {
    content: '{ ';
    color: #d4d4d4;
}

.social-link::after {
    content: ' }';
    color: #d4d4d4;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 0, 0.3), transparent);
    transition: left 0.5s;
}

.social-link:hover {
    background: rgba(0, 122, 204, 0.1);
    border-left-color: #569cd6;
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(0, 122, 204, 0.2);
}

.social-icon {
    font-size: 0.8rem;
}

/* Content section */
.content {
    display: flex;
    flex-direction: column;
    gap: 25px;
    overflow-y: auto;
    padding-right: 10px;
    animation: slideInRight 1.5s ease-out 0.5s both;
}

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

.section {
    margin-bottom: 20px;
}

.pixel-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #569cd6;
    position: relative;
    padding-left: 20px;
}

.pixel-title::before {
    content: '// ';
    position: absolute;
    left: 0;
    color: #6a9955;
}

/* Code block styling with syntax highlighting */
.code-block {
    background: #1e1e1e;
    border: 1px solid #3c3c3c;
    border-left: 3px solid #007acc;
    padding: 15px;
    border-radius: 4px;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.code-block::before {
    content: '1';
    position: absolute;
    left: -25px;
    top: 15px;
    color: #858585;
    font-size: 0.8rem;
    width: 20px;
    text-align: right;
}

.code-line {
    font-family: 'Share Tech Mono', monospace;
    color: #d4d4d4;
    margin-bottom: 10px;
    position: relative;
    padding-left: 30px;
}

.code-line::before {
    content: 'const techStack';
    color: #569cd6;
    position: absolute;
    left: 0;
}

/* Technology tags with syntax highlighting */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-left: 20px;
    position: relative;
}

.tags::before {
    content: '= [';
    position: absolute;
    left: -20px;
    color: #d4d4d4;
}

.tags::after {
    content: '];';
    position: absolute;
    right: -15px;
    color: #d4d4d4;
}

.pixel-tag {
    background: #2d2d30;
    color: #ce9178;
    padding: 4px 8px;
    font-size: 0.6rem;
    border: 1px solid #3c3c3c;
    border-radius: 3px;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.pixel-tag::before {
    content: '"';
    color: #ce9178;
}

.pixel-tag::after {
    content: '"';
    color: #ce9178;
}

.pixel-tag.backend { border-color: #f92672; color: #f92672; }
.pixel-tag.frontend { border-color: #66d9ef; color: #66d9ef; }
.pixel-tag.database { border-color: #a6e22e; color: #a6e22e; }
.pixel-tag.devops { border-color: #fd971f; color: #fd971f; }
.pixel-tag.ai { border-color: #ae81ff; color: #ae81ff; }

.pixel-tag:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 122, 204, 0.3);
    background: #383838;
}

/* Projects grid layout */
.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
}

/* Project boxes with syntax styling */
.pixel-box {
    border: 1px solid #3c3c3c;
    border-left: 4px solid #007acc;
    padding: 15px;
    background: #252526;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.pixel-box::before {
    content: '// Project Object';
    position: absolute;
    top: -5px;
    left: 15px;
    font-size: 0.6rem;
    color: #6a9955;
    background: #252526;
    padding: 0 5px;
}

.pixel-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 122, 204, 0.2);
    border-left-color: #569cd6;
    background: #2d2d30;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.6rem;
}

/* Project status icons styling */
.project-status {
    color: #4ec9b0;
    font-weight: bold;
    position: relative;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.project-status::before {
    content: 'status: "';
    color: #9cdcfe;
}

.project-status::after {
    content: '",';
    color: #d4d4d4;
}

.project-date {
    color: #6a9955;
    position: relative;
}

.project-date::before {
    content: 'year: ';
    color: #9cdcfe;
}

.pixel-box h3 {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #dcdcaa;
    position: relative;
}

.pixel-box h3::before {
    content: 'name: "';
    color: #9cdcfe;
}

.pixel-box h3::after {
    content: '",';
    color: #d4d4d4;
}

.project-desc {
    font-size: 0.7rem;
    color: #ce9178;
    margin-bottom: 10px;
    position: relative;
}

.project-desc::before {
    content: 'tech: "';
    color: #9cdcfe;
}

.project-desc::after {
    content: '",';
    color: #d4d4d4;
}

.project-stats {
    display: flex;
    gap: 15px;
    font-size: 0.6rem;
}

.stat {
    color: #b5cea8;
    padding: 2px 6px;
    background: rgba(45, 45, 48, 0.8);
    border: 1px solid #3c3c3c;
    border-radius: 3px;
    position: relative;
    font-family: 'Share Tech Mono', monospace;
}

/* Terminal footer with code syntax */
.terminal-footer {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #3c3c3c;
    position: relative;
}

.terminal-footer::before {
    content: '// End of file';
    position: absolute;
    top: -5px;
    left: 0;
    font-size: 0.6rem;
    color: #6a9955;
    background: #252526;
    padding: 0 5px;
}

.command-line {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
}

.command-line::before {
    content: '$ ';
    color: #569cd6;
    margin-right: 5px;
}

.prompt {
    color: #9cdcfe;
}

.cursor {
    animation: blink 1s linear infinite;
    color: #d4d4d4;
}

/* Scrollbar styling for code editor theme */
.content::-webkit-scrollbar {
    width: 8px;
}

.content::-webkit-scrollbar-track {
    background: #1e1e1e;
}

.content::-webkit-scrollbar-thumb {
    background: #3c3c3c;
    border-radius: 4px;
}

.content::-webkit-scrollbar-thumb:hover {
    background: #007acc;
}

/* Responsive design */
@media (max-width: 1024px) {
    .container {
        grid-template-columns: 280px 1fr;
        gap: 15px;
        padding: 15px;
    }
    
    .terminal-overlay {
        width: 98%;
        height: 95vh;
    }
    
    .profile {
        padding-right: 15px;
    }
}

/* Responsive projects layout */
@media (max-width: 768px) {
    .projects {
        grid-template-columns: 1fr;
        max-height: 50vh;
    }
    
    .project-status {
        font-size: 0.55rem;
    }
}
    
    .container {
        grid-template-columns: 1fr;
        gap: 15px;
        height: auto;
        padding: 10px;
    }
    
    .profile {
        border-right: none;
        border-bottom: 1px solid #3c3c3c;
        padding-right: 0;
        padding-bottom: 15px;
        margin-bottom: 15px;
    }
    
    .content {
        overflow-y: visible;
        max-height: none;
        padding: 15px;
    }
    
    .terminal-overlay {
        height: auto;
        min-height: 90vh;
        width: 98%;
        overflow: visible;
    }
    
    .social-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    
    .photo {
        width: 100px;
        height: 100px;
    }
    
    .scan-line {
        animation-duration: 1.5s;
    }
}

@media (max-width: 480px) {
    body {
        padding: 5px;
    }
    
    .terminal-overlay {
        width: 100%;
        height: auto;
        min-height: 95vh;
        border-radius: 4px;
        margin: 0;
    }
    
    .container {
        padding: 10px;
        gap: 10px;
    }
    
    .profile {
        padding-bottom: 10px;
        margin-bottom: 10px;
    }
    
    .content {
        padding: 10px;
    }
    
    .photo {
        width: 80px;
        height: 80px;
    }
    
    .profile h1 {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    .pixel-title {
        font-size: 0.8rem;
        margin-bottom: 10px;
    }
    
    .social-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4px;
    }
    
    .social-link {
        font-size: 0.6rem;
        padding: 4px;
        gap: 4px;
    }
    
    .pixel-tag {
        font-size: 0.5rem;
        padding: 2px 4px;
        margin: 1px;
    }
    
    .terminal-header {
        padding: 6px 10px;
    }
    
    .terminal-title {
        font-size: 0.7rem;
    }
    
    .section {
        margin-bottom: 15px;
    }
    
    .projects {
        grid-template-columns: 1fr;
        max-height: 50vh;
        gap: 10px;
    }
    
    .project-status {
        font-size: 0.55rem;
    }
    
    .pixel-box {
        padding: 10px;
    }
    
    .typewriter {
        font-size: 0.7rem;
    }
    
    .blink {
        font-size: 0.6rem;
    }
}