/* Core Variables */
:root {
    --bg-color: #ffffff;
    --text-primary: #000000;
    --text-secondary: #000000;

    --accent-color: #000000;
    --accent-light: #e0e0e0;

    --font-heading: 'Space Mono', monospace;
    --font-body: 'JetBrains Mono', monospace;

    --grid-size: 40px;
    --grid-color: rgba(0, 0, 0, 0.08);
}

/* Dark Mode Overrides */
body.dark-mode {
    --bg-color: #000000;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --accent-light: #1a1a1a;
    --grid-color: rgba(255, 255, 255, 0.08);
}

/* Custom Scrollbar Styles */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-left: 2px solid var(--text-primary);
}

::-webkit-scrollbar-thumb {
    background-color: var(--text-primary);
    border: 2px solid var(--bg-color);
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-secondary);
}

/* For Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--text-primary) var(--bg-color);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    max-width: 100vw;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100vh;
}

/* Grid Background & Magnetic Effect */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image:
        radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(0, 0, 0, 0.05) 0%, transparent 25%),
        linear-gradient(to right, var(--grid-color) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px);
    background-size: 100% 100%, var(--grid-size) var(--grid-size), var(--grid-size) var(--grid-size);
    z-index: -1;
    pointer-events: none;
    transition: background-image 0.2s ease;
}

/* Typography Base */
h1,
h2,
h3,
h4,
h5,
h6,
.nav-logo {
    font-family: var(--font-heading);
    text-transform: uppercase;
}

/* Navigation Structure */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(1rem, 2vw, 1.5rem) clamp(1rem, 5vw, 4rem);
    border-bottom: 2px solid var(--text-primary);
    background-color: var(--bg-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: bold;
}

.icon-terminal {
    background: var(--text-primary);
    color: var(--bg-color);
    padding: 2px 6px;
    font-size: 0.9rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: color 0.2s;
}

.nav-links a.active,
.nav-links a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}


.button-hire {
    background-color: var(--text-primary);
    color: var(--bg-color);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: bold;
    font-size: 0.9rem;
    border: 2px solid var(--text-primary);
    transition: all 0.2s ease;
}

.button-hire:hover {
    background-color: var(--bg-color);
    color: var(--text-primary);
}

/* UI Components */
.border {
    border: 2px solid var(--text-primary);
}

.shadow {
    box-shadow: 6px 6px 0px 0px var(--text-primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shadow-hover:hover {
    transform: translate(2px, 2px);
    box-shadow: 4px 4px 0px 0px var(--text-primary);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 5vw, 4rem);
    position: relative;
    z-index: 5;
}

/* --- Hero Section --- */
.hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    min-height: calc(100vh - 100px);
    padding: 2rem 0;
    gap: clamp(2rem, 5vw, 4rem);
}

.hero-content {
    flex: 1 1 500px;
    max-width: 100%;
}

.indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-family: var(--font-body);
    font-weight: bold;
    font-size: 0.85rem;
    background-color: var(--bg-color);
    margin-bottom: 2rem;
}

.dot {
    width: 8px;
    height: 8px;
    background-color: #00ff00;
    /* Retro green terminal light */
    border-radius: 50%;
    animation: blink 2s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.heading-main {
    font-size: clamp(3rem, 5vw, 6rem);
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -1px;
}

.highlight {
    background-color: var(--text-primary);
    color: var(--bg-color);
    padding: 0 0.5rem;
    display: inline-block;
}

.blink {
    animation: textBlink 1s step-end infinite;
}

@keyframes textBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.bio {
    margin-bottom: 3rem;
}

.bio p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.actions {
    display: flex;
    gap: 1.5rem;
}

.button-primary {
    background-color: var(--text-primary);
    color: var(--bg-color);
    text-decoration: none;
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    font-weight: bold;
    border: 2px solid var(--text-primary);
}

.button-secondary {
    background-color: var(--bg-color);
    color: var(--text-primary);
    text-decoration: none;
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    font-weight: bold;
    border: 2px solid var(--text-primary);
}

.portrait-frame {
    width: 400px;
    height: 500px;
    background-color: var(--bg-color);
    position: relative;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.frame-inner {
    width: 100%;
    height: 100%;
    background: radial-gradient(#aaa 1.5px, transparent 1.5px);
    background-size: 6px 6px;
    background-color: var(--bg-color);
    position: relative;
    border: 2px solid var(--text-primary);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.portrait {
    width: 90%;
    height: 110%;
    object-fit: contain;
    object-position: bottom;
    position: absolute;
    bottom: -5%;
    filter: grayscale(100%) contrast(150%);
    mix-blend-mode: multiply;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.portrait-frame:hover .portrait {
    width: 100%;
    height: 100%;
    bottom: 0%;
}

.hero-image-caption {
    position: absolute;
    bottom: -10px;
    left: -20px;
    background-color: var(--text-primary);
    color: var(--bg-color);
    padding: 0.4rem 0.8rem;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 10;
    border: 2px solid var(--bg-color);
}

/* Frame grid styling for hero image borders */
.portrait-frame::before,
.portrait-frame::after {
    content: '';
    position: absolute;
    background-color: var(--text-primary);
}

.frame-crosshair {
    position: absolute;
    width: 40px;
    height: 40px;
}

.frame-crosshair.top-right {
    top: -20px;
    right: -20px;
    background:
        linear-gradient(var(--text-primary), var(--text-primary)) center/2px 100% no-repeat,
        linear-gradient(var(--text-primary), var(--text-primary)) center/100% 2px no-repeat;
}

/* --- Shared Section Styles --- */
.section {
    padding: 6rem 0;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.header-square {
    width: 24px;
    height: 24px;
    background-color: var(--text-primary);
}

.section-title {
    font-size: 2.5rem;
    letter-spacing: -1px;
}

.header-line {
    flex: 1;
    height: 2px;
    background-color: var(--text-primary);
}

/* --- About Section --- */
.about-grid {
    display: flex;
    gap: 4rem;
    align-items: flex-start;
}

.about-text {
    flex: 1;
    border-left: 2px solid var(--text-primary);
    padding-left: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.text-block {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.icon-arrow {
    background-color: var(--text-primary);
    color: var(--bg-color);
    padding: 2px 8px;
    font-family: var(--font-heading);
    font-weight: bold;
    font-size: 1rem;
}

.text-block p {
    font-size: 1.1rem;
    line-height: 1.6;
}

/* --- Tech Stack --- */
.tech-stack {
    flex: 1;
    position: relative;
    padding: 3rem 2rem 2rem;
    background-color: var(--bg-color);
}

.stack-label {
    position: absolute;
    top: -12px;
    left: 20px;
    background-color: var(--bg-color);
    padding: 0 10px;
    border: 2px solid var(--text-primary);
    font-family: var(--font-heading);
    font-weight: bold;
    font-size: 0.9rem;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skill-tag {
    padding: 0.5rem 1rem;
    font-family: var(--font-heading);
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    cursor: default;
}

.skill-tag:hover {
    background-color: var(--text-primary);
    color: var(--bg-color);
}

/* --- Projects Section --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.project-card {
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-img-placeholder {
    height: 250px;
    background-color: var(--text-primary);
    position: relative;
    border-bottom: 2px solid var(--text-primary);
    overflow: hidden;
}

/* Faux terminal lines for placeholder image */
.project-img-placeholder::before {
    content: "root@server:~$ ./startup.sh\n[OK] Loading modules...\n[OK] Establishing connection...\n[OK] System Ready.";
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: var(--bg-color);
    font-family: var(--font-body);
    font-size: 0.8rem;
    white-space: pre-wrap;
    opacity: 0.7;
}

.img-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--bg-color);
    padding: 2px 8px;
    font-family: var(--font-heading);
    font-weight: bold;
    font-size: 0.8rem;
}

.project-info {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.project-title {
    font-size: 1.5rem;
}

.project-icon {
    font-size: 1.5rem;
}

.project-desc {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    flex: 1;
}

.project-links {
    display: flex;
    gap: 1.5rem;
    border-top: 2px dashed var(--text-primary);
    padding-top: 1.5rem;
}

.project-link {
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: bold;
    transition: opacity 0.2s;
}

.project-link:hover {
    opacity: 0.5;
}

/* --- Resume Section --- */
.resume-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5rem;
    position: relative;
    z-index: 20; /* Ensure header is above parallax data */
    background: var(--bg-color); /* Add background to avoid transparency issues with data layers */
}

.resume-title {
    font-size: 4rem;
    letter-spacing: -2px;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

/* Base Timeline Line */
.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--text-primary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    margin-bottom: 3rem;
}

.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--bg-color);
    border: 4px solid var(--text-primary);
    top: 30px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item.left .timeline-dot {
    left: -10px;
}

.timeline-content {
    padding: 2rem;
    background-color: var(--bg-color);
    position: relative;
}

.timeline-icon {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.timeline-role {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.timeline-date {
    display: inline-block;
    background-color: var(--text-primary);
    color: var(--bg-color);
    padding: 0.25rem 0.5rem;
    font-family: var(--font-body);
    font-weight: bold;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.timeline-org {
    color: var(--text-secondary);
    font-family: var(--font-heading);
    margin-bottom: 1rem;
}

.timeline-divider {
    border: 0;
    height: 1px;
    background-color: var(--text-primary);
    margin: 1rem 0;
}

.timeline-desc {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- Contact Section --- */
.contact-grid {
    display: flex;
    gap: 4rem;
    align-items: stretch;
}

.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.contact-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    letter-spacing: -2px;
}

.contact-tagline {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 3rem;
    max-width: 90%;
}

.contact-details {
    margin-bottom: 4rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-body);
}

.contact-icon {
    font-size: 1.25rem;
}

.contact-item a {
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: bold;
}

.contact-item a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.social-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-primary);
    background-color: var(--bg-color);
    font-family: var(--font-heading);
    font-weight: bold;
}

.social-icon:hover {
    background-color: var(--text-primary);
    color: var(--bg-color);
}

.contact-form-container {
    flex: 1;
}

.contact-form {
    background-color: var(--text-primary);
    color: var(--bg-color);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-family: var(--font-heading);
    font-weight: bold;
    font-size: 0.9rem;
}

.input-field {
    background-color: transparent;
    border: 1px solid var(--accent-light);
    padding: 1rem;
    color: var(--bg-color);
    font-family: var(--font-body);
    font-size: 1rem;
    resize: vertical;
}

.input-field::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--font-body);
}

.input-field:focus {
    outline: none;
    border-color: var(--bg-color);
    background-color: rgba(255, 255, 255, 0.05);
}

.button-submit {
    background-color: var(--bg-color);
    color: var(--text-primary);
    padding: 1rem;
    font-family: var(--font-heading);
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.2s ease;
}

.btn-submit:hover {
    background-color: var(--accent-light);
}

/* --- Core Modules Section --- */
.section-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 3rem;
}

.title-group {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2rem;
}

.heading-section {
    font-size: 3rem;
    font-weight: bold;
    font-family: var(--font-heading);
    line-height: 1;
}

.subtitle {
    font-family: var(--font-body);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.divider {
    flex-grow: 1;
    height: 4px;
    background-color: var(--text-primary);
    margin-top: 1.5rem;
}

.grid-flow {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.card {
    padding: 2rem;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
}

.icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.card-text {
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.6;
    flex: 1;
}

/* --- Selected Projects Section --- */
.projects-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
}

.projects-title {
    font-size: 2.5rem;
    font-family: var(--font-heading);
}

.view-all-link {
    font-family: var(--font-body);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.view-all-link:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.view-all-link span {
    display: inline-block;
    transition: transform 0.2s ease;
}

.view-all-link:hover span {
    transform: translateX(6px);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-color);
}

.project-cover {
    height: 250px;
    background-color: #111;
    color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 0.9rem;
    position: relative; /* Base for disclaimer */
    overflow: hidden;
}

.image-disclaimer {
    position: absolute;
    bottom: 4px;
    right: 8px;
    color: var(--text-primary);
    opacity: 0.3;
    font-size: 0.55rem;
    font-family: var(--font-body);
    text-transform: uppercase;
    text-align: right;
    pointer-events: none;
    letter-spacing: 0.05em;
}

.border-bottom {
    border-bottom: 4px solid var(--text-primary);
}

.project-details {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.project-header h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
}

.project-year {
    font-family: var(--font-body);
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
}

.project-tags {
    font-family: var(--font-body);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.project-btn {
    font-family: var(--font-heading);
    font-weight: bold;
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--text-primary);
    display: inline-block;
    transition: all 0.2s ease;
    background: var(--bg-color);
}

.project-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0px 0px var(--text-primary);
}

.project-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

/* --- Big Dark Footer (Home) --- */
.home-big-footer {
    background-color: var(--text-primary);
    color: var(--bg-color);
    padding: 4rem 2rem 2rem 2rem;
    width: 100%;
}

.home-footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4rem;
}

.home-footer-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--bg-color);
}

.home-footer-desc {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.home-footer-email {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--bg-color);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.home-footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.home-footer-icons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.footer-btn-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-color) !important;
    color: var(--bg-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

.footer-btn-icon:hover {
    background-color: var(--bg-color);
    color: var(--text-primary);
}

.home-footer-links {
    display: flex;
    gap: 1.5rem;
}

.home-footer-links a {
    color: var(--bg-color);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.home-footer-links a:hover {
    text-decoration: line-through;
}

.home-footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    font-family: var(--font-body);
    font-size: 0.8rem;
    text-transform: uppercase;
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

/* --- Status Footer (About) --- */
.status-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 4px solid var(--text-primary);
    padding: 1.5rem 0;
    margin-top: 4rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status-left {
    display: flex;
    gap: 2rem;
}

/* --- Footer Section --- */
.footer {
    width: 100%;
    border-top: 2px dashed var(--text-primary);
    padding: 2rem 0;
    margin-top: 4rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.heart-icon {
    color: #ff0000;
}

.coffee-icon {
    font-size: 1.1em;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-link {
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: bold;
    transition: opacity 0.2s ease;
}

.social-link:hover {
    opacity: 0.5;
}

/* --- Secret Section Styles --- */
.secret-trigger-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.secret-trigger {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.7rem;
    opacity: 0.3;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.secret-trigger:hover {
    opacity: 1;
    border-color: var(--text-primary);
    text-shadow: 2px 2px var(--accent-light);
}

#secret-section {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0; /* Padding will be added to the container inside to avoid transition jumps */
    background-color: #050505;
    border-top: 4px solid var(--text-primary);
    position: relative;
    transition: max-height 1.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.8s ease;
}

#secret-section.active {
    max-height: 5000px;
    opacity: 1;
    padding: 6rem 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.gallery-card {
    position: relative;
    aspect-ratio: 4/5;
    background-color: #111;
    overflow: hidden;
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(120%);
    transition: all 0.5s ease;
}

.gallery-card:hover img {
    filter: grayscale(0%) contrast(100%);
    transform: scale(1.05);
}

.pinterest-container {
    margin-top: 6rem;
    display: flex;
    justify-content: center;
    border: 2px solid var(--text-primary);
    padding: 2rem;
    background: #000;
}

/* Glitch Animations */
@keyframes glitch-init {
    0% { transform: translate(0); }
    20% { transform: translate(-5px, 5px); }
    40% { transform: translate(-5px, -5px); }
    60% { transform: translate(5px, 5px); }
    80% { transform: translate(5px, -5px); }
    100% { transform: translate(0); }
}

.glitch-text {
    position: relative;
    display: inline-block;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #050505;
}

.glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -2px 0 #00fff9, 2px 2px #ff00c1;
    animation: glitch-anim2 1s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(31px, 9999px, 94px, 0); }
    20% { clip: rect(62px, 9999px, 42px, 0); }
    40% { clip: rect(16px, 9999px, 78px, 0); }
    60% { clip: rect(58px, 9999px, 11px, 0); }
    80% { clip: rect(87px, 9999px, 5px, 0); }
    100% { clip: rect(21px, 9999px, 83px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(65px, 9999px, 100px, 0); }
    20% { clip: rect(30px, 9999px, 20px, 0); }
    40% { clip: rect(10px, 9999px, 80px, 0); }
    60% { clip: rect(40px, 9999px, 30px, 0); }
    80% { clip: rect(80px, 9999px, 10px, 0); }
    100% { clip: rect(20px, 9999px, 90px, 0); }
}

/* --- Hobby Skill Tree --- */
.skill-tree {
    background-color: var(--bg-color);
}

.skill-group {
    margin-bottom: 1.5rem;
}

.skill-meter-label {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.skill-val {
    color: var(--text-secondary);
}

.skill-bar {
    height: 12px;
    background-color: #eee;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    background-color: var(--text-primary);
    width: 0;
    transition: width 2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}



/* --- Music Player --- */
.music-player {
    font-family: 'JetBrains Mono', monospace;
}

.player-btn {
    background: #222;
    color: #00ff00;
    padding: 0.4rem 1rem;
    cursor: pointer;
    font-size: 0.8rem;
}

.player-btn:hover {
    background: #333;
}

.scrolling-text {
    display: inline-block;
    padding-left: 100%;
    animation: scroll-left 15s linear infinite;
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.v-bar {
    flex: 1;
    background-color: #00ff00;
    height: 10%;
}

.visualizer.playing .v-bar {
    animation: visualizer-anim 1s ease-in-out infinite alternate;
}

.visualizer.playing .v-bar:nth-child(2) { animation-delay: 0.1s; }
.visualizer.playing .v-bar:nth-child(3) { animation-delay: 0.2s; }
.visualizer.playing .v-bar:nth-child(4) { animation-delay: 0.3s; }
.visualizer.playing .v-bar:nth-child(5) { animation-delay: 0.4s; }
.visualizer.playing .v-bar:nth-child(6) { animation-delay: 0.5s; }
.visualizer.playing .v-bar:nth-child(7) { animation-delay: 0.6s; }
.visualizer.playing .v-bar:nth-child(8) { animation-delay: 0.7s; }

@keyframes visualizer-anim {
    0% { height: 10%; }
    100% { height: 100%; }
}

/* --- Advanced Enhancements --- */

/* 1. System Activity Feed */
#activity-feed {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 280px;
    max-height: 200px;
    background: rgba(0, 0, 0, 0.85);
    color: #00ff00;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    padding: 10px;
    border: 1px solid #00ff00;
    z-index: 9999;
    overflow-y: hidden;
    pointer-events: none;
    display: flex;
    flex-direction: column-reverse;
    gap: 4px;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.15);
    text-transform: uppercase;
}

.log-entry {
    opacity: 0;
    animation: log-fade-in 0.3s forwards;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes log-fade-in {
    from { opacity: 0; transform: translateX(-15px); }
    to { opacity: 1; transform: translateX(0); }
}

/* 2. CRT Scanline Overlay */
#crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: 
        radial-gradient(circle, rgba(18, 16, 16, 0) 40%, rgba(0, 0, 0, 0.25) 100%),
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), 
        linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 100%, 100% 4px, 4px 100%;
    z-index: 10000;
    pointer-events: none;
    display: none;
}

#crt-overlay::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 0%, rgba(32, 128, 32, 0.1) 50%, rgba(18, 16, 16, 0) 100%);
    background-size: 100% 200%;
    z-index: 10001;
    animation: crt-scanline 8s linear infinite;
    pointer-events: none;
}

body.crt-active #crt-overlay {
    display: block;
}

body.crt-active {
    animation: crt-flicker 0.15s infinite;
    text-shadow: 1px 0 rgba(255,0,0,0.3), -1px 0 rgba(0,0,255,0.3);
    filter: contrast(1.1) brightness(1.1) saturate(1.1);
    overflow: hidden; /* Prevent scrolling when CRT is active to avoid artifacts */
}

@keyframes crt-scanline {
    0% { background-position: 0 -100%; }
    100% { background-position: 0 100%; }
}

@keyframes crt-flicker {
    0% { opacity: 0.99; }
    50% { opacity: 1; }
    100% { opacity: 0.98; }
}

/* 3. Command Terminal Overlay */
#terminal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.96);
    z-index: 10001;
    display: none;
    flex-direction: column;
    padding: clamp(1.5rem, 5vw, 4rem);
    color: #00ff00;
    font-family: 'JetBrains Mono', monospace;
    box-sizing: border-box;
}

#terminal-overlay.active {
    display: flex;
}

.terminal-header {
    border-bottom: 2px solid #00ff00;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    font-family: 'Space Mono', monospace;
}

#terminal-output {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

.terminal-input-line {
    display: flex;
    gap: 15px;
    align-items: center;
    background: #111;
    padding: 10px;
    border: 1px solid #333;
}

#terminal-input {
    background: transparent;
    border: none;
    color: #00ff00;
    font-family: inherit;
    font-size: 1.1rem;
    flex-grow: 1;
    outline: none;
    padding: 0;
    caret-color: #00ff00;
}

/* Custom terminal scrollbar */
#terminal-output::-webkit-scrollbar {
    width: 6px;
}
#terminal-output::-webkit-scrollbar-track {
    background: rgba(0,255,0,0.05);
}
#terminal-output::-webkit-scrollbar-thumb {
    background: #00ff00;
}

/* 4. ASCII Canvas (Hidden) */
#ascii-canvas {
    display: none;
}


/* --- Scrollytelling & Parallax --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal.reveal-left {
    transform: translateX(-40px);
}
.reveal.reveal-right {
    transform: translateX(40px);
}
.reveal.revealed.reveal-left,
.reveal.revealed.reveal-right {
    transform: translateX(0);
}

/* Parallax Decor */
.parallax-data {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1; /* Above background, below content */
    overflow: hidden;
}

.deco-text {
    position: absolute;
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: rgba(0, 0, 0, 0.08); /* Increased visibility */
    white-space: pre;
    line-height: 1.1;
    text-transform: uppercase;
    will-change: transform;
    font-weight: bold;
    letter-spacing: 0.1em;
}

.section-narrative {
    position: relative;
    z-index: 10;
}

/* Navbar Theme Toggle */
.theme-toggle-btn {
    background: var(--text-primary);
    color: var(--bg-color);
    border: 1px solid var(--text-primary);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 1.5rem;
    transition: all 0.2s ease;
    border-radius: 4px;
    padding: 0;
}

.theme-toggle-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.theme-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 0 var(--text-primary);
}

.theme-toggle-btn:hover svg {
    transform: rotate(15deg);
}

body.dark-mode .theme-toggle-btn {
    box-shadow: 0 4px 0 rgba(255,255,255,0.2);
}

/* --- Scrollytelling & Reveals --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    transform: translateX(-50px);
}

.reveal-right {
    transform: translateX(50px);
}

.reveal-glitch.revealed {
    animation: glitch-in 0.6s ease-out forwards;
}

@keyframes glitch-in {
    0% { opacity: 0; transform: skewX(20deg) scaleY(1.5); }
    20% { opacity: 1; transform: skewX(-20deg) scaleY(1); }
    40% { transform: skewX(10deg); }
    60% { transform: skewX(-5deg); }
    100% { transform: skewX(0); }
}

/* Custom "Glitch" Reveal for major headers */
.reveal-glitch.revealed {
    animation: glitch-in 0.6s ease-out forwards;
}

/* --- RESPONSIVE DESIGN (GLOBAL) --- */
@media (max-width: 1200px) {
    .container {
        padding: 0 2rem;
        max-width: 100%;
        overflow-x: hidden;
    }
}

@media (max-width: 1024px) {
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        justify-content: center;
        min-height: auto;
        padding-top: 5rem;
        gap: 2rem;
    }
    .hero-content {
        max-width: 100%;
        flex: none;
    }
    .indicator {
        justify-content: center;
    }
    .projects-grid, .grid-flow {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        text-align: center;
    }
    .nav-links {
        gap: 0.8rem;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    .nav-links a {
        font-size: 0.75rem;
    }
    .button-hire {
        width: 100%;
        text-align: center;
        padding: 0.5rem;
    }
    .hero-title {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }
    .photo-grid {
        grid-template-columns: 1fr;
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .about-grid {
        flex-direction: column;
        gap: 2rem;
    }
    .project-links {
        flex-wrap: wrap;
        gap: 1rem;
    }
    .terminal-header {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }
    #terminal-overlay {
        padding: 1rem;
        width: 100vw;
        height: 100vh;
        left: 0;
        top: 0;
    }
    .deco-text {
        font-size: 0.6rem;
        opacity: 0.05;
        white-space: normal;
        max-width: 100vw;
        display: none; /* Hide decorative scrollytelling text on mobile to prevent overflow */
    }
    .timeline::after, .timeline::before {
        left: 0;
    }
    .timeline-item {
        width: 100%;
        padding-left: 2rem !important;
        padding-right: 0 !important;
        left: 0 !important;
    }
    .timeline-dot {
        left: -10px !important;
    }
    .footer-inner {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .nav-links {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        width: 100%;
    }
    .nav-logo {
        font-size: 1rem;
    }
    .hero-image-box {
        width: 100%;
        aspect-ratio: 1;
    }
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .project-card {
        width: 100%;
    }
}


.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .photo-grid {
        grid-template-columns: 1fr;
    }
}
.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--accent-light);
    border: 1px solid var(--text-primary);
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-color);
    font-size: 0.65rem;
    font-weight: bold;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.music-player {
    transition: transform 0.3s ease;
}

.music-player:hover {
    transform: translateY(-5px);
}

#player-status {
    letter-spacing: 1px;
    font-weight: bold;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .hobby-skill-tree .grid-flow {
        grid-template-columns: 1fr;
    }
}




