/* --- CSS Variables --- */
:root {
    /* Colors */
    --bg-main: #0d1117;
    --bg-secondary: #161b22;
    --bg-glass: rgba(22, 27, 34, 0.7);
    --border-glass: rgba(255, 255, 255, 0.1);
    
    --text-primary: #c9d1d9;
    --text-secondary: #8b949e;
    
    --accent-blue: #58a6ff;
    --accent-purple: #bc8cff;
    --accent-green: #3fb950;
    --accent-red: #ff7b72;
    --accent-yellow: #d2a8ff; /* syntax matching */
    
    /* Syntax highlighting colors */
    --syntax-keyword: #ff7b72;
    --syntax-variable: #79c0ff;
    --syntax-string: #a5d6ff;
    --syntax-punct: #c9d1d9;
    --syntax-tag: #7ee787;

    /* Fonts */
    --font-ui: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Spacing & Utilities */
    --container-max: 1100px;
    --border-radius: 12px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* --- Background Effects --- */
.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    background: 
        radial-gradient(circle at 15% 50%, rgba(88, 166, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(188, 140, 255, 0.08) 0%, transparent 50%);
    filter: blur(60px);
}

.code-bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    opacity: 0.02;
    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 fill='%23c9d1d9' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* --- Glassmorphism --- */
.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 1rem 0;
    border-top: none;
    border-left: none;
    border-right: none;
    border-radius: 0;
}

.nav-content {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.2rem;
}

.keyword { color: var(--syntax-keyword); }
.variable { color: var(--syntax-variable); }
.string { color: var(--syntax-string); }
.syntax-punct { color: var(--syntax-punct); }
.syntax-tag { color: var(--syntax-tag); }

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.nav-links a:hover {
    color: var(--accent-blue);
    text-shadow: 0 0 8px rgba(88, 166, 255, 0.4);
}

/* --- Layout --- */
main {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    min-height: 100vh;
    padding: 100px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-title {
    font-family: var(--font-mono);
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

/* --- Hero Section --- */
.hero {
    align-items: center;
    text-align: center;
}

.terminal-window {
    width: 100%;
    max-width: 700px;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 2rem;
    text-align: left;
}

.terminal-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-glass);
}

.dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.terminal-title {
    flex-grow: 1;
    text-align: center;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-right: 44px; /* balance out the dots width */
}

.terminal-body {
    padding: 2rem;
    font-family: var(--font-mono);
}

.command {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.prompt {
    color: var(--accent-green);
    margin-right: 0.5rem;
}

.glitch-text {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 2rem;
    position: relative;
    font-family: var(--font-ui);
    letter-spacing: -1px;
}

.typing-text {
    font-size: 1.5rem;
    color: var(--accent-blue);
    font-weight: 400;
    min-height: 2.2rem;
}

.cursor {
    animation: blink 1s step-end infinite;
}

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

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-icon {
    font-size: 2rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.social-icon:hover {
    color: var(--text-primary);
    transform: translateY(-3px);
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.2));
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    font-size: 2rem;
    color: var(--text-secondary);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    60% { transform: translateY(-7px); }
}

/* --- Timeline / Experience --- */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 7px;
    height: 100%;
    width: 2px;
    background: var(--border-glass);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-dot {
    position: absolute;
    top: 5px;
    left: -2rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-blue);
    border: 3px solid var(--bg-main);
    box-shadow: 0 0 10px rgba(88, 166, 255, 0.5);
    z-index: 1;
}

.timeline-content {
    padding: 1.5rem;
    border-radius: var(--border-radius);
}

.card-hover {
    transition: var(--transition);
}

.card-hover:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4);
}

.timeline-header {
    margin-bottom: 1rem;
}

.timeline-header h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
}

.timeline-header .company {
    color: var(--accent-purple);
}

.timeline-header .date {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    font-family: var(--font-mono);
}

.timeline-details {
    padding-left: 1.2rem;
    list-style-type: disc;
    color: var(--text-secondary);
}

.timeline-details li {
    margin-bottom: 0.5rem;
}

.highlight {
    color: var(--text-primary);
    font-weight: 500;
}

/* --- Projects Grid --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    position: relative;
    padding: 2rem;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: var(--transition);
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    z-index: 0;
    transition: var(--transition);
    filter: grayscale(80%) blur(4px);
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-blue);
    box-shadow: 0 10px 30px rgba(88, 166, 255, 0.2);
}

.project-card:hover::before {
    opacity: 0.3;
    filter: grayscale(0%) blur(0px);
    transform: scale(1.05);
}

.project-card h3 {
    position: relative;
    z-index: 1;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.project-card p {
    position: relative;
    z-index: 1;
    color: var(--text-primary); /* brightened text for legibility */
    flex-grow: 1;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.project-links {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 1rem;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
}

.store-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.store-btn.ios:hover i { color: #fff; }
.store-btn.android:hover i { color: #3ddc84; }

/* --- Skills Section --- */
.skills-container {
    padding: 2.5rem;
    border-radius: var(--border-radius);
}

.skills-group-title {
    font-family: var(--font-mono);
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skill-tag {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background: rgba(88, 166, 255, 0.1);
    color: var(--accent-blue);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    border: 1px solid rgba(88, 166, 255, 0.2);
    transition: var(--transition);
    cursor: default;
}

.skill-tag:hover {
    background: rgba(88, 166, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 166, 255, 0.2);
}

.skill-tag.alt {
    background: rgba(188, 140, 255, 0.1);
    color: var(--accent-purple);
    border-color: rgba(188, 140, 255, 0.2);
}

.skill-tag.alt:hover {
    background: rgba(188, 140, 255, 0.2);
    box-shadow: 0 4px 12px rgba(188, 140, 255, 0.2);
}

.divider {
    height: 1px;
    background: var(--border-glass);
    margin: 2.5rem 0;
}

/* --- Contact Section --- */
.contact-terminal {
    max-width: 600px;
    margin: 0 auto;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.contact-body {
    text-align: center;
    padding: 3rem 2rem;
}

.comment {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-style: italic;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-method {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid var(--border-glass);
    font-family: var(--font-ui);
    font-size: 1.1rem;
    color: var(--text-primary);
}

.contact-method i {
    font-size: 1.5rem;
    color: var(--accent-blue);
}

.contact-method:hover {
    background: rgba(255, 255, 255, 0.08);
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: var(--accent-blue);
    color: var(--bg-main);
    border: none;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.action-btn:hover {
    background: #79c0ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(88, 166, 255, 0.4);
}

.copy-feedback {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--accent-green);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.copy-feedback.show {
    opacity: 1;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border-glass);
    margin-top: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* --- Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-up {
    animation: fadeInUp 1s ease forwards;
    opacity: 0;
    animation-delay: 1.5s; /* After typing effect roughly */
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* simple mobile fallback: hide links or make menu */
    }
    
    .glitch-text {
        font-size: 2rem;
    }
    
    .typing-text {
        font-size: 1.2rem;
    }
    
    .terminal-body {
        padding: 1.5rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .timeline-header h3 {
        font-size: 1.1rem;
    }
    
    .contact-method {
        flex-direction: column;
        gap: 0.5rem;
    }
}
