/* File: css/style.css */

/* --- RESET & BASE STYLES --- */
:root {
    --bg-color: #0F172A;
    --text-color: #E2E8F0;
    --accent-blue: #38BDF8;
    --accent-green: #4ADE80;
    --code-bg: #1E293B;
    --font-main: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
    scroll-behavior: smooth;
    padding-top: 80px; /* Push content down so it's not hidden behind fixed header */
}
html { scroll-padding-top: 100px; } /* Offset for anchor links */

/* --- TYPOGRAPHY --- */
h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; }
.mono { font-family: var(--font-mono); }
.green { color: var(--accent-green); }
.blue { color: var(--accent-blue); }

/* --- LAYOUT UTILS --- */
.container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }

/* --- STICKY NAVIGATION BAR (FIXED ALIGNMENT) --- */
.sticky-header {
    display: block; /* Ensures outer wrapper doesn't flex */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
    padding: 0;
}

/* The inner container handles the Flexbox alignment */
.sticky-header .container {
    display: flex;
    justify-content: space-between; /* Pushes Logo left, Nav right */
    align-items: center;
    padding: 1rem 20px;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.logo { font-weight: 700; font-size: 1.2rem; color: #fff; text-decoration: none; font-family: var(--font-mono); }
.logo span { color: var(--accent-green); }

nav ul { display: flex; list-style: none; gap: 2rem; align-items: center; }
.nav-link { color: #94A3B8; text-decoration: none; font-size: 0.95rem; transition: color 0.2s; }
.nav-link:hover { color: #fff; }

.btn-download { border: 1px solid var(--accent-blue); color: var(--accent-blue); padding: 0.5rem 1rem; border-radius: 4px; font-size: 0.9rem; text-decoration: none; font-weight: 600; transition: all 0.2s; }
.btn-download:hover { background: rgba(56, 189, 248, 0.1); box-shadow: 0 0 10px rgba(56, 189, 248, 0.2); }

/* --- HERO & TERMINAL --- */
.hero { min-height: 85vh; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: left; padding: 2rem 0; }
.terminal-window { background: var(--code-bg); border: 1px solid #334155; border-radius: 8px; padding: 2rem; width: 100%; max-width: 700px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); position: relative; }
.terminal-header { position: absolute; top: 15px; left: 15px; display: flex; gap: 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.red { background: #EF4444; }
.yellow { background: #F59E0B; }
.green-dot { background: #10B981; }
.command-line { margin-bottom: 1.5rem; font-size: 1.1rem; }
.output { animation: fadeIn 2s ease-in-out; }
h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.role { font-size: 1.25rem; color: #94A3B8; margin-bottom: 1.5rem; }
.badges { display: flex; gap: 15px; margin-top: 20px; flex-wrap: wrap; }
.badge { background: rgba(56, 189, 248, 0.1); border: 1px solid var(--accent-blue); color: var(--accent-blue); padding: 5px 12px; border-radius: 4px; font-size: 0.85rem; font-weight: 600; transition: all 0.3s ease; cursor: default; }
.badge:hover { background: rgba(56, 189, 248, 0.2); border-color: var(--accent-green); color: var(--accent-green); transform: translateY(-3px); box-shadow: 0 4px 15px rgba(74, 222, 128, 0.15); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
#term-input { background: transparent; border: none; color: #fff; font-family: var(--font-mono); font-size: 1.1rem; outline: none; width: 100%; caret-color: var(--accent-green); }

/* --- IMPROVED TECH STACK (NEW) --- */
.stack-header-wrapper { text-align: center; margin-bottom: 2rem; position: relative; }
.stack-header-wrapper::before { content: ''; position: absolute; top: 50%; left: 0; width: 100%; height: 1px; background: linear-gradient(90deg, transparent, #334155, transparent); z-index: 0; }
.stack-header { display: inline-block; background: var(--bg-color); padding: 0 1.5rem; position: relative; z-index: 1; font-family: var(--font-mono); font-size: 0.95rem; border: 1px solid #334155; border-radius: 50px; color: #E2E8F0; }

.tech-grid { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; }
.tech-card { background: rgba(30, 41, 59, 0.5); border: 1px solid #334155; padding: 0.8rem 1.5rem; border-radius: 8px; display: flex; align-items: center; gap: 10px; transition: all 0.3s ease; cursor: default; min-width: 150px; }
.tech-card i { font-size: 1.2rem; transition: transform 0.3s ease; }
.tech-card span { font-family: var(--font-mono); font-size: 0.9rem; color: #94A3B8; font-weight: 600; }

.tech-card:hover { border-color: var(--accent-green); background: rgba(30, 41, 59, 0.8); transform: translateY(-3px); box-shadow: 0 4px 20px rgba(74, 222, 128, 0.15); }
.tech-card:hover span { color: #fff; }
.tech-card:hover i { transform: scale(1.2) rotate(5deg); }

/* --- EXPERIENCE SECTION --- */
.experience-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-top: 2rem; }
@media (min-width: 768px) { .experience-grid { grid-template-columns: 1fr 1fr; } }
.experience-card { background: #1E293B; border: 1px solid #334155; border-radius: 12px; padding: 2rem; transition: all 0.3s ease; display: flex; flex-direction: column; height: 100%; }
.experience-card:hover { transform: translateY(-5px); border-color: var(--accent-green); box-shadow: 0 10px 30px -10px rgba(74, 222, 128, 0.1); }
.exp-header { margin-bottom: 1.5rem; border-bottom: 1px solid #334155; padding-bottom: 1rem; }
.exp-role { font-size: 1.25rem; color: #fff; font-weight: 700; margin-bottom: 0.25rem; }
.exp-company { color: var(--accent-green); font-family: var(--font-mono); font-weight: bold; font-size: 0.95rem; }
.exp-date { display: block; color: #64748B; font-size: 0.85rem; margin-top: 0.5rem; font-family: var(--font-mono); }
.exp-list { list-style: none; margin: 0; padding: 0; }
.exp-list li { position: relative; padding-left: 1.5rem; margin-bottom: 0.75rem; color: #CBD5E1; font-size: 0.95rem; line-height: 1.6; }
.exp-list li::before { content: '>'; position: absolute; left: 0; color: var(--accent-blue); font-family: var(--font-mono); font-weight: bold; }

/* --- PROJECT SECTION --- */
.section-title { text-align: center; margin: 4rem 0 2rem; font-size: 1.8rem; color: #94A3B8; }
.carousel-container { position: relative; max-width: 1000px; margin: 0 auto; overflow: hidden; border-radius: 12px; border: 1px solid #334155; }
.carousel-track { display: flex; transition: transform 0.5s ease-in-out; width: 100%; }
.project-card { min-width: 100%; margin: 0; position: relative; background: #1E293B; display: flex; flex-direction: column; transition: all 0.3s ease; border: 1px solid transparent; }
.project-card:hover { transform: translateY(-5px); border-color: var(--accent-green); box-shadow: 0 10px 30px -10px rgba(74, 222, 128, 0.1); }
@media (min-width: 768px) { .project-card { flex-direction: row; height: 400px; } }
.card-visual { flex: 1; background-color: #0F172A; background-image: linear-gradient(#1e293b 1px, transparent 1px), linear-gradient(90deg, #1e293b 1px, transparent 1px); background-size: 20px 20px; display: flex; align-items: center; justify-content: center; border-right: 1px solid #334155; min-height: 250px; }
.diagram-placeholder { width: 60%; height: 60%; border: 2px dashed #475569; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #64748B; font-weight: bold; text-align: center; padding: 1rem; }
.card-content { flex: 1; padding: 2rem; display: flex; flex-direction: column; justify-content: center; }
.project-tag { color: var(--accent-blue); font-size: 0.85rem; font-weight: 700; margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.05em; }
.project-title { font-size: 1.5rem; margin-bottom: 1rem; color: #fff; }
.project-desc { color: #94A3B8; margin-bottom: 1.5rem; font-size: 0.95rem; }
.code-snippet { background: #0F172A; border: 1px solid #334155; border-radius: 6px; padding: 1rem; font-family: var(--font-mono); font-size: 0.8rem; color: #A5B4FC; margin-bottom: 1.5rem; overflow-x: auto; }
.btn { display: inline-block; padding: 0.75rem 1.5rem; background: var(--accent-blue); color: #0F172A; font-weight: 700; text-decoration: none; border-radius: 6px; width: fit-content; transition: transform 0.2s; }
.btn:hover { transform: translateY(-2px); filter: brightness(1.1); }
.btn.disabled { background: transparent; border: 1px solid #475569; color: #64748B; cursor: not-allowed; pointer-events: none; }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(15, 23, 42, 0.8); color: var(--accent-blue); border: 1px solid var(--accent-blue); width: 50px; height: 50px; border-radius: 50%; cursor: pointer; z-index: 10; font-size: 1.5rem; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.slider-btn:hover { background: var(--accent-blue); color: #0F172A; }
.prev-btn { left: 20px; }
.next-btn { right: 20px; }

/* --- CERTIFICATIONS SECTION --- */
.cert-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.cert-card { background: #1E293B; border: 1px solid #334155; border-radius: 8px; padding: 1.5rem; display: flex; align-items: center; gap: 1.5rem; text-decoration: none; transition: all 0.3s ease; }
.cert-card:hover { transform: translateY(-3px); border-color: var(--accent-green); box-shadow: 0 10px 30px -10px rgba(74, 222, 128, 0.1); }
.cert-icon { font-size: 2.5rem; color: var(--accent-blue); min-width: 50px; text-align: center; }
.cert-card:hover .verify-link { color: #fff; }
.cert-info h3 { font-size: 1rem; color: #fff; margin-bottom: 0.25rem; line-height: 1.4; }
.cert-info .issuer { font-size: 0.8rem; color: #94A3B8; margin-bottom: 0.5rem; font-family: var(--font-mono); }
.verify-link { font-size: 0.75rem; color: var(--accent-green); font-weight: bold; text-transform: uppercase; letter-spacing: 0.05em; display: flex; align-items: center; gap: 0.5rem; }

/* --- OUTLINE BUTTONS (FOR CERTS & ARCHIVE) --- */
.btn-outline { display: inline-block; padding: 0.75rem 1.5rem; background: transparent; border: 1px solid var(--accent-blue); color: var(--accent-blue); font-weight: 700; text-decoration: none; border-radius: 6px; font-family: var(--font-mono); cursor: pointer; transition: all 0.2s ease; }
.btn-outline:hover { background: rgba(56, 189, 248, 0.1); box-shadow: 0 0 15px rgba(56, 189, 248, 0.2); transform: translateY(-2px); }
.btn-outline.active { border-color: var(--accent-green); color: var(--accent-green); }
.btn-outline.active:hover { background: rgba(74, 222, 128, 0.1); box-shadow: 0 0 15px rgba(74, 222, 128, 0.2); }

/* --- CONTACT & FOOTER --- */
.contact-section { text-align: center; padding: 6rem 0; border-top: 1px solid #334155; margin-top: 4rem; }
.contact-cmd { background: #1E293B; display: inline-block; padding: 1rem 2rem; border-radius: 50px; border: 1px solid #334155; margin-bottom: 2rem; font-family: var(--font-mono); }
.social-links { display: flex; justify-content: center; gap: 2rem; margin-bottom: 2rem; }
.social-link { color: #94A3B8; text-decoration: none; font-size: 1.1rem; transition: color 0.2s; display: flex; align-items: center; gap: 0.5rem; }
.social-link:hover { color: var(--accent-blue); }
footer { text-align: center; padding: 2rem; color: #64748B; font-size: 0.85rem; border-top: 1px solid #1E293B; }
.back-to-top { position: fixed; bottom: 30px; right: 30px; background-color: var(--code-bg); color: var(--accent-green); border: 1px solid var(--accent-green); width: 45px; height: 45px; border-radius: 50%; display: flex; align-items: center; justify-content: center; text-decoration: none; font-size: 1.5rem; font-weight: bold; opacity: 0; pointer-events: none; transition: all 0.3s ease; z-index: 1000; }
.back-to-top.visible { opacity: 1; pointer-events: auto; bottom: 40px; }
.back-to-top:hover { background-color: var(--accent-green); color: #0F172A; transform: translateY(-3px); }

/* ====
   MOBILE RESPONSIVE (≤768px)
   Zero changes to desktop view
   ==== */
@media (max-width: 768px) {

    /* --- HEADER & NAV --- */
    body { padding-top: 60px; }
    html { scroll-padding-top: 70px; }
    .sticky-header .container { padding: 0.75rem 15px; }
    .logo { font-size: 1rem; }
    nav ul { gap: 0.5rem; }
    .nav-link { display: none; }
    .btn-download { display: block; font-size: 0.8rem; padding: 0.4rem 0.8rem; }

    /* --- HERO & TERMINAL --- */
    .hero { min-height: auto; padding: 2rem 0 1rem; }
    .terminal-window { padding: 1.5rem 1rem; }
    .command-line { font-size: 0.85rem; }
    h1 { font-size: 1.6rem; }
    .role { font-size: 1rem; margin-bottom: 1rem; }
    .badges { gap: 8px; }
    .badge { font-size: 0.75rem; padding: 4px 8px; }
    #term-input { font-size: 0.85rem; }

    /* --- TECH STACK --- */
    .tech-grid { gap: 0.6rem; }
    .tech-card { min-width: 120px; padding: 0.6rem 1rem; }
    .tech-card span { font-size: 0.8rem; }
    .tech-card i { font-size: 1rem; }

    /* --- SECTION TITLES --- */
    .section-title { font-size: 1.4rem; margin: 2.5rem 0 1.5rem; }

    /* --- EXPERIENCE --- */
    .experience-card { padding: 1.5rem; }
    .exp-role { font-size: 1.1rem; }
    .exp-list li { font-size: 0.88rem; }

    /* --- PROJECT CAROUSEL --- */
    .carousel-container { border-radius: 8px; }
    .project-card { flex-direction: column !important; height: auto !important; }
    .card-visual { min-height: 180px; border-right: none; border-bottom: 1px solid #334155; }
    .card-content { padding: 1.25rem; }
    .project-title { font-size: 1.2rem; }
    .project-desc { font-size: 0.88rem; margin-bottom: 1rem; }
    .code-snippet { font-size: 0.72rem; padding: 0.75rem; margin-bottom: 1rem; }
    .slider-btn { width: 35px; height: 35px; font-size: 1rem; }
    .prev-btn { left: 8px; }
    .next-btn { right: 8px; }

    /* --- CERTIFICATIONS --- */
    .cert-grid { grid-template-columns: 1fr; gap: 1rem; }
    .cert-card { padding: 1.2rem; gap: 1rem; }
    .cert-icon { font-size: 2rem; min-width: 40px; }
    .cert-info h3 { font-size: 0.92rem; }

    /* --- CONTACT --- */
    .contact-section { padding: 3rem 0; }
    .contact-cmd { padding: 0.75rem 1rem; font-size: 0.75rem; }
    .contact-section h2 { font-size: 1.3rem; }
    .social-links { flex-direction: column; align-items: center; gap: 1rem; }

    /* --- BUTTONS --- */
    .btn { padding: 0.6rem 1.2rem; font-size: 0.9rem; }
    .btn-outline { padding: 0.6rem 1.2rem; font-size: 0.85rem; }

    /* --- FOOTER --- */
    footer { padding: 1.5rem 1rem; font-size: 0.8rem; }
    .back-to-top { width: 38px; height: 38px; font-size: 1.2rem; bottom: 20px; right: 15px; }
    .back-to-top.visible { bottom: 25px; }
}

/* ====
   SMALL PHONES (≤400px)
   ==== */
@media (max-width: 400px) {
    .container { padding: 0 12px; }
    h1 { font-size: 1.35rem; }
    .role { font-size: 0.9rem; }
    .terminal-window { padding: 1.2rem 0.8rem; }
    .tech-card { min-width: 100px; padding: 0.5rem 0.75rem; }
    .tech-card span { font-size: 0.75rem; }
    .experience-card { padding: 1.2rem; }
    .exp-role { font-size: 1rem; }
    .card-visual { min-height: 150px; }
    .contact-cmd { font-size: 0.65rem; word-break: break-all; }
}