:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f9f9f9;
    --text-primary: #111111;
    --text-secondary: #444444;
    --accent-color: #2D2D2D;
    --code-green: #3da47a;
    --code-blue: #4271ae;
    --code-red: #c82829;
    --terminal-bg: #282c34;
    --font-mono: 'JetBrains Mono', monospace;
    --border-color: #eaeaea;
}

[data-theme="dark"] {
    --bg-primary: #1e1e1e;
    --bg-secondary: #252526;
    --text-primary: #d4d4d4;
    --text-secondary: #a0a0a0;
    --accent-color: #569cd6;
    --code-green: #6A9955;
    --code-blue: #569CD6;
    --code-red: #F14C4C;
    --terminal-bg: #1e1e1e;
    --border-color: #333333;
}

body {
    font-family: var(--font-mono);
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: var(--font-mono);
}

/* Terminal Header */
.terminal-header {
    background: var(--terminal-bg);
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    max-width: 90%; /* Limit width on larger screens */
    width: calc(100% - 30px); /* Ensure margins on smaller screens */
    margin: 15px auto;
}

.term-buttons {
    display: flex;
    gap: 8px;
    margin-right: 16px;
}

.term-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.term-btn.close {
    background-color: #FF5F56;
}

.term-btn.minimize {
    background-color: #FFBD2E;
}

.term-btn.expand {
    background-color: #27C93F;
}

.term-title {
    color: #999;
    font-size: 0.85rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    height: 100vh;
    width: 100%;
    padding-top: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    padding-top: 0;
}

.hero-background {
    display: none;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-top: 0.5rem;
    color: var(--accent-color);
}

.terminal-prompt {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-mono);
}

.prompt-user {
    color: var(--code-green);
}

.prompt-at {
    color: var(--text-secondary);
}

.prompt-host {
    color: var(--code-blue);
}

.prompt-colon, .prompt-path {
    color: var(--text-secondary);
}

.prompt-cmd {
    color: var(--text-primary);
}

.sublabel {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Section Styling */
.section-title {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--code-blue);
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border-color);
}

/* Link Cards */
.links-section {
    overflow: visible;
    padding: 80px 20px;
    position: relative;
    z-index: 2;
}

#links-container {
    position: relative;
    z-index: 1;
}

.link-card {
    border: 1px solid var(--border-color);
    box-shadow: none;
    transition: all 0.2s ease;
    background-color: var(--bg-primary);
    position: relative;
    overflow: visible; /* Allow shadow and transform to be visible */
}

.link-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    z-index: 10; /* Higher z-index to ensure it's on top when hovered */
}

/* Tech Stack Section */
.tech-stack {
    padding: 60px 20px;
    text-align: center;
    background-color: var(--bg-secondary);
}

.tech-icons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 20px;
}

.tech-icon {
    font-size: 2.5rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.tech-icon:hover {
    color: var(--accent-color);
    transform: translateY(-5px);
}

/* Bio Section Customization */
.bio {
    padding: 80px 20px;
}

.terminal-output {
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 30px;
    font-family: var(--font-mono);
    position: relative;
    overflow: hidden; /* Contain the typing animation */
}

.terminal-output:before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--code-green);
}

.typing-effect {
    overflow: visible; /* Allow text to be fully visible */
    white-space: nowrap;
    border-right: 2px solid var(--accent-color);
    width: 0;
    animation: typing 3s steps(50, end) forwards, blink-caret 0.75s step-end infinite;
    padding-right: 4px; /* Add space for cursor */
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--accent-color); }
}

.code-btn {
    background-color: var(--bg-secondary);
    color: var(--accent-color);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-transform: none;
    letter-spacing: normal;
}

.code-btn:hover {
    background-color: var(--accent-color);
    color: var(--bg-primary);
    border-color: var(--accent-color);
}

/* Footer Customization */
footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 60px 20px 30px;
}

.footer-content {
    font-family: var(--font-mono);
}

.footer-status {
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-indicator.online {
    background-color: var(--code-green);
}

.code-link {
    position: relative;
    padding: 0 5px;
    text-decoration: none;
    color: var(--accent-color);
}

.code-link:before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.code-link:hover:before {
    width: 100%;
}

.code-comment {
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-style: italic;
}

/* View Toggle Customization */
.view-toggle {
    margin-bottom: 30px;
}

.view-toggle button {
    font-family: var(--font-mono);
    padding: 6px 12px;
    font-size: 0.85rem;
}

.view-toggle button.active {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .terminal-header {
        max-width: 95%;
        padding: 10px 12px;
    }
    
    .term-title {
        font-size: 0.75rem;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .terminal-prompt {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
    
    .tech-icons {
        gap: 20px;
    }
    
    .tech-icon {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .terminal-header {
        margin: 8px auto;
    }
    
    .hero-content {
        padding-top: 40px;
    }
    
    .terminal-prompt {
        font-size: 0.75rem;
    }
    
    .sublabel {
        font-size: 0.7rem;
    }
    
    .social-links {
        gap: 12px;
    }
    
    .section-title {
        font-size: 0.9rem;
    }
    
    .typing-effect {
        font-size: 0.9rem;
    }
    
    /* Ensure terminal output doesn't overflow on mobile */
    .terminal-output {
        padding: 15px;
        word-break: break-word;
    }
}

/* Fix for iOS Safari 100vh issue - improved */
@supports (-webkit-touch-callout: none) {
    .hero {
        height: -webkit-fill-available;
        min-height: -webkit-fill-available;
    }
}

/* Additional responsive fixes for hero */
@media (max-height: 700px) {
    .hero {
        padding-top: 80px;
    }
    
    .hero-content {
        transform: scale(0.9);
    }
}
