/* ==================== RESET ==================== */
*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}

:root {
    --bg: #0a192f;
    --bg-light: #112240;
    --bg-lighter: #1d3461;
    --green: #64ffda;
    --green-dim: rgba(100, 255, 218, 0.1);
    --slate: #8892b0;
    --slate-light: #a8b2d1;
    --white: #e6f1ff;
    --white-bright: #ccd6f6;
    --navy-shadow: rgba(2, 12, 27, 0.7);
    --transition: 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
    --font-main: 'Space Grotesk', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

html {
    scroll-behavior: smooth;
    font-size: 62.5%;
}

body {
    font-family: var(--font-main);
    font-size: 1.6rem;
    line-height: 1.6;
    color: var(--slate);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

::selection {
    background: var(--green-dim);
    color: var(--green);
}

a {
    color: var(--green);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--green);
}

.green { color: var(--green); }

.container {
    max-width: 110rem;
    margin: 0 auto;
    padding: 0 2.4rem;
}

/* ==================== NAVIGATION ==================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 25, 47, 0.85);
    
    transition: box-shadow var(--transition), padding var(--transition);
}

.nav.scrolled {
    box-shadow: 0 10px 30px -10px var(--navy-shadow);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 7rem;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 3rem;
    font-weight: 700;
    color: var(--green);
    z-index: 200;
}

.logo-b {
    color: var(--green);
    opacity: 0.6;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 1.3rem;
    color: var(--slate-light);
    padding: 1rem 1.6rem;
    transition: color var(--transition);
}

.nav-link:hover {
    color: var(--green);
}

.nav-num {
    color: var(--green);
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

.btn-outline-sm {
    font-family: var(--font-mono);
    font-size: 1.3rem;
    color: var(--green);
    border: 1px solid var(--green);
    border-radius: 4px;
    padding: 0.8rem 1.6rem;
    margin-left: 1.6rem;
    transition: all var(--transition);
}

.btn-outline-sm:hover {
    background: var(--green-dim);
}

/* Burger */
.burger {
    display: none;
    width: 3rem;
    height: 2.4rem;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 101;
    padding: 0;
    position: relative;
}

.burger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--green);
    border-radius: 2px;
    transition: all var(--transition);
    transform-origin: center;
    position: absolute;
    left: 0;
}

.burger span:nth-child(1) { top: 6px; }
.burger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.burger span:nth-child(3) { bottom: 6px; }

.burger.active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.burger.active span:nth-child(2) {
    opacity: 0;
}

.burger.active span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* ==================== HERO ==================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 12rem 0 8rem;
}

.hero .container {
    max-width: 100rem;
}

.hero-hi {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--green);
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeUp 0.5s ease forwards;
}

.hero-name {
    font-size: clamp(4rem, 8vw, 7rem);
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.8rem;
    letter-spacing: -0.02em;
    opacity: 0;
    animation: fadeUp 0.5s 0.1s ease forwards;
}

.hero-sub {
    font-size: clamp(3.5rem, 6vw, 6rem);
    font-weight: 600;
    color: var(--slate);
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeUp 0.5s 0.2s ease forwards;
}

.hero-desc {
    max-width: 54rem;
    font-size: 1.7rem;
    line-height: 1.8;
    margin-bottom: 4rem;
    opacity: 0;
    animation: fadeUp 0.5s 0.3s ease forwards;
}

.hero-btns {
    display: flex;
    gap: 1.6rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeUp 0.5s 0.4s ease forwards;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 1.4rem;
    padding: 1.4rem 2.8rem;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-primary {
    color: var(--green);
    border-color: var(--green);
    background: transparent;
}

.btn-primary:hover {
    background: var(--green-dim);
}

.btn-outline {
    color: var(--slate-light);
    border-color: var(--slate);
    background: transparent;
}

.btn-outline:hover {
    border-color: var(--green);
    color: var(--green);
}

/* ==================== SECTIONS ==================== */
.section {
    padding: 10rem 0;
    max-width: 100rem;
    margin: 0 auto;
    padding-left: 2.4rem;
    padding-right: 2.4rem;
}

.section-heading {
    font-size: clamp(2.4rem, 4vw, 3.2rem);
    font-weight: 600;
    color: var(--white-bright);
    margin-bottom: 4rem;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.section-heading::after {
    content: '';
    display: block;
    height: 1px;
    background: var(--bg-lighter);
    width: 100%;
    max-width: 30rem;
    margin-left: 2rem;
}

.heading-num {
    font-family: var(--font-mono);
    font-size: 2rem;
    color: var(--green);
    margin-right: 1.2rem;
    font-weight: 400;
}

/* ==================== ABOUT ==================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 28rem;
    gap: 5rem;
    align-items: start;
}

.about-text p {
    font-size: 1.6rem;
    margin-bottom: 1.6rem;
    line-height: 1.7;
}

.about-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-top: 1.6rem;
}

.about-list li {
    font-family: var(--font-mono);
    font-size: 1.3rem;
    color: var(--slate);
}

.about-list .green {
    margin-right: 0.8rem;
}

.photo-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
}

.photo-placeholder {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: block;
    background: var(--bg-light);
    border-radius: 4px;
    overflow: hidden;
    transition: all var(--transition);
}

.photo-placeholder::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(100, 255, 218, 0.15);
    mix-blend-mode: multiply;
    transition: all var(--transition);
    z-index: 3;
    pointer-events: none;
}

.photo-wrapper:hover .photo-placeholder::after {
    background: transparent;
}

.photo-wrapper:hover .photo-placeholder {
    background: var(--bg-light);
    transform: translate(-4px, -4px);
}

/* Code editor frame */
.code-frame {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.code-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 1.2rem;
    background: var(--bg);
    flex-shrink: 0;
}

.dot {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
}

.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.code-title {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    color: var(--slate);
    margin-left: 0.8rem;
}

.code-body {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.code-body img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.1);
    transition: filter var(--transition);
}

.photo-wrapper:hover .code-body img {
    filter: grayscale(0%) contrast(1);
}

.code-block {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    line-height: 1.8;
    color: var(--slate-light);
    padding: 2rem;
    margin: 0;
    white-space: pre;
    overflow: hidden;
}

.code-block .ln {
    color: var(--slate);
    opacity: 0.4;
    margin-right: 1.6rem;
    user-select: none;
}

.code-block .kw { color: #c792ea; }
.code-block .str { color: #c3e88d; }
.code-block .bool { color: #ffcb6b; }
.code-block .fn { color: #82aaff; }

.photo-wrapper:hover .code-block {
    color: var(--white-bright);
}

.photo-bg {
    position: absolute;
    top: 1.6rem;
    left: 1.6rem;
    width: 100%;
    height: 100%;
    border: 2px solid var(--green);
    border-radius: 4px;
    z-index: 1;
    transition: all var(--transition);
}

.photo-wrapper:hover .photo-bg {
    top: 1.2rem;
    left: 1.2rem;
}

/* ==================== SKILLS ==================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.6rem;
}

.skill-card {
    background: var(--bg-light);
    border-radius: 4px;
    padding: 2.4rem;
    transition: all var(--transition);
    border: 1px solid transparent;
}

.skill-card:hover {
    transform: translateY(-4px);
    border-color: var(--green);
    box-shadow: 0 20px 40px rgba(2, 12, 27, 0.5);
}

.skill-icon {
    width: 4rem;
    height: 4rem;
    color: var(--green);
    margin-bottom: 1.6rem;
}

.skill-icon svg {
    width: 100%;
    height: 100%;
}

.skill-card h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--white-bright);
    margin-bottom: 1.6rem;
}

.skill-card ul {
    list-style: none;
}

.skill-card li {
    font-family: var(--font-mono);
    font-size: 1.3rem;
    color: var(--slate);
    padding: 0.5rem 0;
    padding-left: 1.6rem;
    position: relative;
}

.skill-card li::before {
    content: '\25B8';
    position: absolute;
    left: 0;
    color: var(--green);
    font-size: 1.2rem;
}

/* ==================== PROJECTS ==================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.6rem;
}

.project {
    background: var(--bg-light);
    border-radius: 4px;
    padding: 2.8rem;
    transition: all var(--transition);
    border: 1px solid transparent;
    cursor: default;
}

.project:hover {
    transform: translateY(-6px);
    border-color: var(--green);
    box-shadow: 0 20px 40px rgba(2, 12, 27, 0.5);
}

.project.featured {
    border-color: rgba(100, 255, 218, 0.2);
}

.project.featured:hover {
    border-color: var(--green);
}

.project-top {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.folder-icon {
    width: 3.6rem;
    height: 3.6rem;
    color: var(--green);
}

.folder-icon svg {
    width: 100%;
    height: 100%;
}

.project-label {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--slate);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--bg-lighter);
    border-radius: 3px;
}

.free-tag {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--bg);
    background: var(--green);
    padding: 0.2rem 0.8rem;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: auto;
}

.project-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--white-bright);
    margin-bottom: 1.2rem;
    transition: color var(--transition);
}

.project:hover .project-title {
    color: var(--green);
}

.project-desc {
    font-size: 1.4rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    list-style: none;
}

.project-tech li {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    color: var(--slate);
}

/* ==================== CONTACT ==================== */
.contact-section {
    text-align: center;
    max-width: 62rem;
    margin: 0 auto;
    padding: 10rem 2.4rem;
}

.contact-num {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--green);
    margin-bottom: 2rem;
}

.contact-title {
    font-size: clamp(3.6rem, 5vw, 5rem);
    font-weight: 600;
    color: var(--white-bright);
    margin-bottom: 2.4rem;
}

.contact-desc {
    font-size: 1.6rem;
    line-height: 1.7;
    margin-bottom: 4rem;
    max-width: 54rem;
    margin-left: auto;
    margin-right: auto;
}

.contact-btn {
    font-size: 1.5rem;
    padding: 1.8rem 3.2rem;
}

/* ==================== FOOTER ==================== */
.footer {
    padding: 3rem 2.4rem;
    text-align: center;
}

.footer-inner {
    max-width: 110rem;
    margin: 0 auto;
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 2.4rem;
    margin-bottom: 2rem;
}

.footer-socials a {
    color: var(--slate);
    transition: color var(--transition), transform var(--transition);
}

.footer-socials a:hover {
    color: var(--green);
    transform: translateY(-3px);
}

.footer-socials svg {
    width: 2rem;
    height: 2rem;
}

.footer-email {
    font-family: var(--font-mono);
    font-size: 1.3rem;
    color: var(--slate);
    display: block;
    margin-bottom: 2rem;
}

.footer-email:hover {
    color: var(--green);
}

.footer-line {
    width: 1px;
    height: 10rem;
    background: var(--bg-lighter);
    margin: 0 auto 2rem;
}

.footer-credit {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    color: var(--slate);
    margin-bottom: 0.4rem;
}

/* ==================== SIDE BARS ==================== */
.side-bar {
    position: fixed;
    bottom: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.side-left {
    left: 4rem;
}

.side-right {
    right: 4rem;
}

.side-bar a {
    color: var(--slate);
    padding: 1rem;
    transition: all var(--transition);
}

.side-bar a:hover {
    color: var(--green);
    transform: translateY(-3px);
}

.side-bar svg {
    width: 2rem;
    height: 2rem;
}

.side-line {
    width: 1px;
    height: 10rem;
    background: var(--slate);
    margin-top: 1.6rem;
}

.side-email {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    writing-mode: vertical-rl;
    letter-spacing: 0.1em;
    line-height: 1.4;
    text-align: center;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(2rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(2rem);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ==================== RESPONSIVE ==================== */
@media (max-width: 85em) {
    .side-bar {
        display: none;
    }

    .section {
        max-width: 100%;
    }
}

@media (max-width: 70em) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 55em) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-photo {
        max-width: 26rem;
        margin: 0 auto;
    }

    .section-heading::after {
        display: none;
    }
}

@media (max-width: 48em) {
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 39em) {
    .burger {
        display: flex;
        z-index: 200;
    }

    .nav-menu {
        position: fixed;
        inset: 0;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        background: var(--bg-light);
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 150;
    }

    .nav-menu.open {
        transform: translateX(0);
    }

    .nav-link {
        font-size: 2rem;
    }

    .btn-outline-sm {
        margin-left: 0;
        margin-top: 1rem;
        font-size: 1.6rem;
        padding: 1.2rem 2.4rem;
    }

    .hero {
        padding: 10rem 0 6rem;
    }

    .hero-btns {
        flex-direction: column;
    }

    .hero-btns .btn {
        width: 100%;
    }

    .about-list {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 6rem 2rem;
    }
}