@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;700&family=Kulim+Park:ital,wght@0,200;0,300;0,400;0,600;0,700;1,200;1,300;1,400;1,600;1,700&family=Silkscreen:wght@400;700&family=Ubuntu+Sans+Mono:ital,wght@0,400..700;1,400..700&display=swap');

:root {
    --bg-dark: #070709;
    --card-bg: rgba(13, 14, 20, 0.45);
    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(0, 240, 255, 0.3);
    --neon-cyan: #00f0ff;
    --neon-cyan-glow: rgba(0, 240, 255, 0.15);
    --text-muted: #8e909a;
    --text-light: #f3f4f6;
    
    /* Code Highlighting Colors */
    --syntax-keyword: #ff7b72;
    --syntax-class: #79c0ff;
    --syntax-variable: #ffa657;
    --syntax-string: #a5d6ff;
    --syntax-function: #d2a8ff;
}

body {
    background-color: var(--bg-dark) !important;
    background-image: radial-gradient(circle at 50% 30%, #0d1224 0%, #050508 100%) !important;
    color: var(--text-light);
    font-family: 'Kulim Park', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.back_cover {
    background-color: transparent !important;
    inset: 0;
    position: fixed;
    z-index: -2;
}

/* Nav header adjustment for cohesive dark mode */
.container {
    background-color: rgba(7, 7, 9, 0.8) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

nav {
    margin-bottom: 1rem !important;
}

/* Content wrappers */
.content_wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    background-color: transparent !important;
}

.content_container {
    width: 85% !important;
    max-width: 1200px;
    background-color: transparent !important;
    border: none !important;
    margin: 2rem auto 0 auto !important;
    padding: 1.5rem 1rem !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

h1.title {
    font-family: 'Silkscreen', sans-serif;
    font-size: clamp(1.8rem, 3.5vw, 3rem) !important;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    text-transform: lowercase;
    position: relative;
    letter-spacing: -0.05em;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

h1.title::after {
    content: "()";
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
}

/* GitHub redirect banner styling */
.github_redirect {
    background: linear-gradient(90deg, rgba(0, 240, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem 2rem !important;
    width: 85%;
    max-width: 1200px;
    margin: 1rem auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-sizing: border-box;
}

.github_redirect > a > img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #ffffff;
    padding: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.github_redirect:hover > a > img {
    transform: rotate(360deg) scale(1.1);
    box-shadow: 0 0 20px var(--neon-cyan);
}

.github_redirect > p {
    font-family: 'Ubuntu Sans Mono', monospace !important;
    font-size: clamp(0.8rem, 1.2vw, 1rem) !important;
    color: var(--text-muted) !important;
    margin: 0 !important;
    line-height: 1.5;
}

.github_redirect > p strong {
    color: var(--neon-cyan);
}

/* Project main grid */
.body_wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}

.body_grid_block {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    width: 85% !important;
    max-width: 1200px;
    gap: 2rem !important;
    margin: 0 auto !important;
}

/* The ultimate terminal window mock */
.terminal_card {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-align: left !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(16px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    position: relative;
}

.terminal_card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 50%, rgba(0, 240, 255, 0) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    transition: all 0.4s ease;
}

.terminal_card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover) !important;
    box-shadow: 0 15px 40px rgba(0, 240, 255, 0.08), 0 0 1px var(--neon-cyan);
}

.terminal_card:hover::before {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.35) 0%, rgba(255, 255, 255, 0.02) 60%, rgba(0, 240, 255, 0.2) 100%);
}

/* Terminal Header */
.terminal_header {
    background-color: rgba(18, 20, 28, 0.6);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.circle_wrapper {
    display: flex;
    gap: 6px;
    margin: 0 !important;
}

.element_mac_circles {
    width: 11px !important;
    height: 11px !important;
    border-radius: 50% !important;
    margin: 0 !important;
}

.red { background-color: #ff5f56 !important; }
.yellow { background-color: #ffbd2e !important; }
.green { background-color: #27c93f !important; }

.terminal_tab {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(8, 8, 12, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    padding: 0.35rem 0.8rem;
    margin-right: auto;
    margin-left: 1.25rem;
    position: relative;
    top: 5px;
}

.tab_icon {
    font-size: 14px !important;
    color: var(--neon-cyan) !important;
    margin: 0 !important;
}

.tab_title {
    font-family: 'Fira Code', 'Ubuntu Sans Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-light);
    letter-spacing: 0.02em;
}

/* Terminal Body Layout */
.terminal_body {
    display: flex;
    padding: 1.25rem;
    font-family: 'Fira Code', 'Ubuntu Sans Mono', monospace;
    font-size: clamp(0.75rem, 1.2vw, 0.9rem);
    line-height: 1.6;
    overflow-x: auto;
}

.line_numbers {
    display: flex;
    flex-direction: column;
    color: rgba(255, 255, 255, 0.15);
    text-align: right;
    padding-right: 1.25rem;
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    user-select: none;
}

.line_numbers span {
    min-width: 15px;
}

.code_content {
    padding-left: 1.25rem;
    flex-grow: 1;
    color: #e6edf3;
}

.code_line {
    margin: 0;
    white-space: pre-wrap;
}

.indent_1 {
    padding-left: 1.5rem;
}

.indent_2 {
    padding-left: 3rem;
}

/* Syntax Highlighting */
.code_keyword {
    color: var(--syntax-keyword);
    font-weight: bold;
}

.code_class {
    color: var(--syntax-class);
}

.code_variable {
    color: var(--syntax-variable);
}

.code_string {
    color: var(--syntax-string);
}

.code_function {
    color: var(--syntax-function);
}

.code_link {
    color: var(--neon-cyan);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.code_link:hover {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.8);
}

.redirect_arrow {
    font-size: 14px !important;
    color: inherit !important;
    margin: 0 !important;
    transition: transform 0.2s ease;
}

.code_link:hover .redirect_arrow {
    transform: translate(2px, -2px);
}

/* Secondary projects layout (Shell log styling) */
.others_proj_content {
    background-color: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    width: 85% !important;
    max-width: 1200px;
    margin: 3rem auto !important;
    padding: 1.5rem !important;
    box-sizing: border-box;
    text-align: left !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(16px);
}

.others_proj_header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.others_proj_title {
    font-family: 'Silkscreen', sans-serif;
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.others_proj_title span.neon-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
    animation: pulse 2s infinite;
}

.others_grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.others_content {
    background-color: rgba(8, 8, 12, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.03) !important;
    border-radius: 8px !important;
    padding: 1.25rem !important;
    margin: 0 !important;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    color: var(--text-light) !important;
    transition: all 0.3s ease;
}

.others_content:hover {
    border-color: rgba(0, 240, 255, 0.15) !important;
    background-color: rgba(0, 240, 255, 0.01) !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateX(4px);
}

.others_content > span.material-symbols-outlined {
    font-size: 28px !important;
    color: var(--neon-cyan) !important;
    margin: 0 !important;
    padding: 0.5rem;
    background: rgba(0, 240, 255, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.others_content:hover > span.material-symbols-outlined {
    background: var(--neon-cyan);
    color: #070709 !important;
    box-shadow: 0 0 10px var(--neon-cyan);
}

.others_content .content_wrap {
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 4px;
}

.subcontent_title {
    font-family: 'Fira Code', 'Ubuntu Sans Mono', monospace !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    margin: 0 !important;
}

.subcontent_subtitle {
    font-family: 'Kulim Park', sans-serif !important;
    font-size: 0.85rem !important;
    color: var(--text-muted) !important;
    margin: 0 !important;
    line-height: 1.4;
    text-align: left !important;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 240, 255, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(0, 240, 255, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 240, 255, 0); }
}

/* Media Queries */
@media screen and (max-width: 968px) {
    .body_grid_block {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .others_grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .github_redirect {
        padding: 1rem 1.25rem !important;
        gap: 1rem;
    }
}