:root {
    /* Engineering / Schematic Palette */
    --bg-dark: #0a0a0a;
    --bg-panel: #141414;
    --bg-card: #1a1a1a;

    --primary: #FFC107;
    /* Amber/Gold */
    --secondary: #FF5722;
    /* Deep Orange */
    --accent: #607D8B;
    /* Blue Grey */
    --error: #F44336;
    /* Red */

    --text-main: #e0e0e0;
    --text-dim: #888888;

    --font-main: 'Space Grotesk', sans-serif;
    --font-code: 'Consolas', 'Monaco', 'Courier New', monospace;

    --glow-primary: 0 0 10px rgba(255, 193, 7, 0.3), 0 0 20px rgba(255, 193, 7, 0.1);
    --glow-secondary: 0 0 10px rgba(255, 87, 34, 0.3), 0 0 20px rgba(255, 87, 34, 0.1);

    --border-thin: 1px solid rgba(255, 255, 255, 0.1);
    --border-neon: 1px solid var(--primary);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: default;
    /* Custom cursor logic handled via JS or specific elements */
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* Canvas Background */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.4;
    pointer-events: none;
}

/* Typography & Utilities */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
}

a {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 40px 0;
    position: relative;
}

.bg-darker {
    background: rgba(255, 255, 255, 0.02);
}

.highlight {
    color: var(--primary);
    text-shadow: 0 0 5px var(--primary);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 193, 7, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 15px 0;
    background: rgba(5, 5, 5, 0.95);
    border-bottom: 1px solid rgba(255, 193, 7, 0.3);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-code);
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    text-shadow: var(--glow-primary);
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    font-family: var(--font-code);
    font-size: 0.9rem;
    color: var(--text-dim);
    position: relative;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    text-shadow: 0 0 8px var(--primary);
}

.nav-links a::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    color: var(--primary);
    overflow: hidden;
    transition: width 0.3s ease;
    border-right: 2px solid var(--primary);
    white-space: nowrap;
}

.nav-links a:hover::before {
    width: 100%;
}

.hamburger {
    display: none;
    color: var(--primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
    align-items: center;
}

.code-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 193, 7, 0.1);
    padding: 5px 15px;
    border-radius: 4px;
    border: 1px solid rgba(255, 193, 7, 0.3);
    margin-bottom: 20px;
    font-family: var(--font-code);
    font-size: 0.9rem;
    color: var(--primary);
}

.code-bracket {
    color: var(--secondary);
    margin: 0 5px;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 10px;
    position: relative;
}

/* Glitch Effect - REMOVED/TONED DOWN */
.glitch {
    position: relative;
    color: #fff;
    /* Clean text, no glitch */
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.3);
}

/* Removed Glitch pseudo-elements */
.glitch::before,
.glitch::after {
    display: none;
    content: none;
}

.subtitle {
    font-size: 1.8rem;
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
}

.terminal-header {
    background: #1a1a1a;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #333;
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

.terminal-buttons span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.close {
    background: #ff5f56;
}

.minimize {
    background: #ffbd2e;
}

.maximize {
    background: #27c93f;
}

.terminal-title {
    margin-left: auto;
    margin-right: auto;
    font-family: var(--font-code);
    font-size: 0.9rem;
    color: #888;
}

.terminal-body {
    padding: 30px;
    font-family: var(--font-code);
    color: var(--text-main);
}

.prompt {
    color: var(--accent);
    margin-right: 10px;
}

.cmd {
    color: var(--primary);
}

.output {
    margin-top: 10px;
    color: #ccc;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.stat-item:hover {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.1);
}

.stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-dim);
    text-transform: uppercase;
}

/* Timeline (Experience) */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
}

.timeline-item {
    position: relative;
    padding-left: 40px;
    margin-bottom: 30px;
}

.timeline-marker {
    position: absolute;
    left: -6px;
    top: 0;
    width: 14px;
    height: 14px;
    background: var(--bg-dark);
    border: 2px solid var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
    z-index: 1;
}

.timeline-item.current .timeline-marker {
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary), 0 0 30px var(--primary);
}

.timeline-content {
    background: var(--bg-card);
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--primary);
    transition: var(--transition);
}

.timeline-item:hover .timeline-content {
    transform: translateX(10px);
    border-color: rgba(255, 193, 7, 0.3);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.timeline-header h3 {
    font-size: 1.4rem;
    color: #fff;
}

.timeline-header h4 {
    color: var(--text-dim);
    font-weight: 400;
    margin-bottom: 10px;
}

.date-badge {
    display: inline-block;
    background: rgba(255, 193, 7, 0.1);
    color: var(--primary);
    padding: 2px 8px;
    font-size: 0.8rem;
    font-family: var(--font-code);
    margin-bottom: 10px;
    border-radius: 2px;
}

.tech-stack {
    margin: 15px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    font-size: 0.8rem;
    padding: 2px 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-dim);
    font-family: var(--font-code);
}

.project-list {
    list-style: none;
    margin-top: 15px;
}

.project-list li {
    margin-bottom: 8px;
    font-size: 0.95rem;
    position: relative;
    padding-left: 15px;
}

.project-list li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--secondary);
    font-family: var(--font-code);
}

/* Education Grid */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.edu-card {
    background: var(--bg-card);
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.edu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.edu-card:hover::before {
    transform: scaleX(1);
}

.edu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.edu-icon {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 20px;
}

.edu-year {
    font-family: var(--font-code);
    color: var(--primary);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

/* Skills */
.skills-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.skill-category h3 {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
}

.skill-category h3 i {
    color: var(--primary);
}

.skill-bar-container {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.skill-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0;
    /* Animated via JS */
    animation: fillBar 1.5s ease-out forwards;
    position: relative;
}

@keyframes fillBar {
    to {
        width: var(--width);
    }
}

.skill-bar span {
    position: absolute;
    right: 5px;
    top: -20px;
    font-size: 0.7rem;
    color: var(--primary);
    font-family: var(--font-code);
    opacity: 0;
    animation: fadeIn 0.5s 1.5s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.tech-cloud {
    margin-top: 60px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.tech-cloud span {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-family: var(--font-code);
    font-size: 0.9rem;
    transition: var(--transition);
}

.tech-cloud span:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.2);
    transform: scale(1.1);
}

/* Portfolio */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    filter: grayscale(80%);
}

.gallery-item:hover img {
    transform: scale(1.1);
    filter: grayscale(0%);
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .overlay {
    transform: translateY(0);
}

.overlay h3 {
    color: var(--primary);
    font-family: var(--font-code);
    font-size: 1.1rem;
}

.overlay p {
    font-size: 0.9rem;
    color: #ccc;
}

/* Contact */
.contact-terminal {
    background: #000;
    border: 1px solid var(--primary);
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.1);
}

.contact-content {
    padding: 40px;
    text-align: center;
}

.contact-methods {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-family: var(--font-code);
    transition: var(--transition);
}

.contact-btn:hover {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
}

/* Footer */
footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-family: var(--font-code);
    font-size: 0.9rem;
    color: var(--text-dim);
}

.status-ok {
    color: var(--accent);
    font-weight: bold;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

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

/* Responsive */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
        border-left: none;
        border-top: 3px solid var(--secondary);
        padding-left: 0;
        padding-top: 20px;
    }

    .cta-buttons {
        justify-content: center;
    }

    .skills-wrapper {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        padding-left: 50px;
    }

    .timeline-marker {
        left: 14px;
    }

    .hamburger {
        display: block;
    }

    .nav-links {
        display: none;
        /* Handled by JS */
    }
}

/* Layout Switcher Dropdown */
.layout-switcher {
    position: relative;
}

.layout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px !important; /* Smaller padding to fit better */
    background: rgba(255, 193, 7, 0.1); /* --primary with alpha */
    border: 1px solid rgba(255, 193, 7, 0.3); /* --primary with alpha */
    border-radius: 4px;
    color: var(--text-dim);
}

.layout-btn:hover {
    background: rgba(255, 193, 7, 0.2);
    border-color: var(--primary);
    color: var(--primary);
}

.layout-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: var(--bg-card);
    border: var(--border-thin);
    border-radius: 4px;
    min-width: 200px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1001; /* Above navbar */
}

.layout-switcher:hover .layout-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.layout-dropdown a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-dim);
    text-decoration: none;
    transition: var(--transition);
    border-bottom: var(--border-thin);
}

.layout-dropdown a:last-child {
    border-bottom: none;
}

.layout-dropdown a:hover {
    background: rgba(255, 193, 7, 0.1);
    color: var(--primary);
    padding-left: 24px;
}

.layout-dropdown a.active {
    background: rgba(255, 193, 7, 0.15);
    color: var(--primary);
    font-weight: 600;
}

.layout-dropdown a i {
    width: 16px;
    text-align: center;
}
