@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #0d0d0d;
    --text-color: #ffffff;
    --text-muted: #e0e0e0;
    --accent-color: #ffbf00;
    /* Amber */
    --accent-glow: rgba(255, 191, 0, 0.3);
    --secondary-bg: #151515;
    --card-bg: rgba(25, 25, 25, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-subtle: 0 12px 40px rgba(0, 0, 0, 0.5);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-rim: rgba(255, 255, 255, 0.05);

    /* Hyprland Theme */
    --gap-size: 16px;
    --border-radius: 16px;
    --active-border: var(--accent-color);
    --inactive-border: rgba(255, 255, 255, 0.1);
    --bar-bg: rgba(15, 15, 15, 0.9);
    --bar-height: 44px;
}

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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    line-height: 1.8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

section {
    padding: 120px 10%;
    /* Slightly more top padding */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Centered content for standard sections */
#about,
#projects-preview,
#projects-page,
#projects-finished,
#projects-wip,
#experience-page,
#featured,
#contact {
    justify-content: center;
}

h1,
h2,
h3,
h4 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-color);
    letter-spacing: -0.02em;
    font-weight: 700;
}

.container {
    max-width: 1000px;
    width: 100%;
    margin-left: 0;
    /* Default to left for terminal feel */
}

/* Center containers for specific pages/sections if needed */
#about .container,
#projects-preview .container,
#projects-page .container,
#projects-finished .container,
#projects-wip .container,
#experience-page .container,
#featured .container,
#contact .container {
    margin: 0 auto;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--accent-color);
    margin-bottom: 40px;
    font-weight: 700;
    width: 60px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 8px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-family: 'JetBrains Mono', monospace;
}

/* Minimalist Dark Card */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 50px;
    box-shadow: var(--shadow-subtle);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--glass-rim) 0%, transparent 100%);
    pointer-events: none;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    border-color: var(--accent-color);
    background: rgba(40, 40, 40, 0.8);
}

/* Base Components */
.btn {
    padding: 12px 28px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: inline-block;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--accent-color);
    color: #fff;
    border: none;
}

.btn-primary:hover {
    background: #e6ac00;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--accent-glow);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-outline:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-2px);
}

/* Header/Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 15, 15, 0.75);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}

.logo span {
    color: var(--accent-color);
}

/* Desktop Nav */
nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

nav a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
    transition: var(--transition);
    letter-spacing: 0.02em;
}

nav a:hover {
    color: var(--accent-color);
}

nav a.btn-frame {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 4px;
    color: #fff;
}

nav a.btn-frame:hover {
    border-color: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-glow);
    background: rgba(230, 126, 34, 0.05);
}

/* Mobile Hamburger */
.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 2000;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    margin: 5px 0;
    transition: var(--transition);
}

@media (max-width: 1024px) {
    header {
        padding: 20px 3%;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(15, 15, 15, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        display: flex;
        justify-content: center;
        align-items: center;
        transition: 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    }

    nav.active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    nav a {
        font-size: 1.2rem;
    }
}

/* Hero Section - Top Left Shifted */
.hero {
    justify-content: flex-start;
    /* Move block up */
    padding-top: 200px;
    /* Offset from header */
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    font-weight: 700;
}

.hero h1 span#typed-name {
    color: var(--accent-color);
}

.cursor {
    display: inline-block;
    width: 12px;
    height: 3px;
    background-color: var(--accent-color);
    margin-left: 5px;
    vertical-align: bottom;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.hero p {
    font-size: 1.15rem;
    max-width: 600px;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

/* Grid Layouts */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

/* Animations */
/* Intense Origami/Hinge Unfold Animation */

/* Ensure smooth snapping */
html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

main {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
}

/* Override existing child animations */
section>* {
    opacity: 1;
    /* Reset opacity on children so parent handles visibility */
}

/* Full Page Sections */
section {
    min-height: 100vh;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Center content vertically */
    align-items: center;

    /* Simple fade now */
    opacity: 0;
    transition: opacity 1s ease-out;
    will-change: opacity;
}

/* Active state - "unfolded" */
section.active {
    opacity: 1;
}

/* Logic for children remains simple */
section.active>* {
    animation: none;
    /* Disable previous animation entirely */
}

/* Social Icons */
.social-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 30px;
}

.social-icon {
    color: #fff;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--secondary-bg);
}

.social-icon:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--accent-glow);
}

.social-icon svg {
    width: 22px;
    height: 22px;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Footer */
/* Dashboard Layout */
.dashboard-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 24px;
    padding: 100px 5% 60px;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 80px);
    /* 80px is approx header + footer */
    align-content: center;
}

.dashboard-hero {
    grid-column: span 3;
    display: flex;
    align-items: center;
    gap: 60px;
    margin-bottom: 40px;
    padding: 60px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    border-radius: 20px;
}

.hero-info {
    flex: 1;
}

.hero-info h1 {
    font-size: 4rem;
    margin-bottom: 15px;
    line-height: 1.1;
}

.it-tagline {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.08em;
    margin-bottom: 25px;
    display: block;
    font-family: 'JetBrains Mono', monospace;
}

.dashboard-tile {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    min-height: 250px;
}

.dashboard-tile:hover {
    transform: translateY(-8px);
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.05);
}

.dashboard-tile h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-tile p {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 0.95rem;
}

.tile-icon {
    font-size: 1.2rem;
    color: var(--accent-color);
}

@media (max-width: 1024px) {
    .dashboard-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-hero {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        grid-template-columns: 1fr;
        padding-top: 120px;
    }

    .dashboard-hero {
        grid-column: span 1;
        flex-direction: column;
        padding: 40px 30px;
        text-align: center;
    }

    .hero-info h1 {
        font-size: 2.5rem;
    }

    .hero-image img {
        max-width: 250px;
    }
}

/* Sidebar and Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.contact-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--glass-border);
    z-index: 2000;
    padding: 60px 40px;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.contact-sidebar.active {
    transform: translateX(-400px);
}

.sidebar-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.sidebar-close:hover {
    color: var(--accent-color);
    transform: rotate(90deg);
}

.sidebar-content h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--accent-color);
}

.sidebar-item {
    margin-bottom: 35px;
}

.sidebar-item h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-color);
    margin-bottom: 12px;
    font-weight: 600;
}

.sidebar-item a {
    font-size: 1.1rem;
    color: white;
    text-decoration: none;
    transition: var(--transition);
    display: block;
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-weight: 500;
}

.sidebar-item a:hover {
    background: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--accent-glow);
}

@media (max-width: 480px) {
    .contact-sidebar {
        width: 100%;
        right: -100%;
    }

    .contact-sidebar.active {
        transform: translateX(-100%);
    }
}

footer {
    padding: 60px 10%;
    text-align: center;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.2);
}

footer .container {
    margin: 0 auto;
    text-align: center;
}

/* Dashboard Layout */
.dashboard-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 30px;
    padding: 120px 5% 60px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    align-content: center;
}

.dashboard-hero {
    grid-column: span 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    margin-bottom: 30px;
    padding: 60px;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(24px);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-subtle);
}

.hero-info h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
    line-height: 1.2;
}

.it-tagline {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
    display: block;
    text-transform: uppercase;
}

.dashboard-tile {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
}

.dashboard-tile h2 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-tile p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

@media (max-width: 1024px) {
    .dashboard-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-hero {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        grid-template-columns: 1fr;
        padding-top: 100px;
    }

    .dashboard-hero {
        grid-column: span 1;
        flex-direction: column;
        text-align: center;
        padding: 40px 20px;
    }

    .hero-info h1 {
        font-size: 2.5rem;
    }
}