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

/* ─────────────────────────────────────────
   CSS Variables
───────────────────────────────────────── */
:root {
    --bg: #0f172a;
    --surface: #1e293b;
    --border: #334155;
    --lime: #a3e635;
    --lime-glow: rgba(163, 230, 53, .25);
    --pink: #f472b6;
    --text: #f1f5f9;
    --muted: #94a3b8;
    --mono: 'JetBrains Mono', monospace;
    --sans: 'Inter', sans-serif;
    --ease: all .3s cubic-bezier(.4, 0, .2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    background-image:
        linear-gradient(rgba(51, 65, 85, .12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(51, 65, 85, .12) 1px, transparent 1px);
    background-size: 50px 50px;
    color: var(--text);
    font-family: var(--sans);
    line-height: 1.6;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

img {
    display: block;
    max-width: 100%;
}

/* ─────────────────────────────────────────
   Project thumbnail watermark
───────────────────────────────────────── */
.watermark-wrap {
    position: relative;
    display: block;
    line-height: 0;
}

.watermark-wrap::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    max-width: 250px;
    max-height: 250px;
    transform: translate(-50%, -50%) rotate(-25deg);
    border: 6px dashed #a9e617bd;
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
}

.watermark-wrap::after {
    content: 'SiamBase';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-25deg);
    font-family: var(--mono);
    font-size: 24px;
    font-weight: 700;
    color: #a9e617bd;
    letter-spacing: 0.25em;
    pointer-events: none;
    white-space: nowrap;
    z-index: 2;
    text-shadow: none;
}

@media screen and (max-width: 728px) {
    .watermark-wrap::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 100%;
        height: 100%;
        max-width: 150px;
        max-height: 150px;
        transform: translate(-50%, -50%) rotate(-25deg);
        border: 6px dashed #a9e617bd;
        border-radius: 50%;
        pointer-events: none;
        z-index: 2;
    }

    .watermark-wrap::after {
        content: 'SiamBase';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(-25deg);
        font-family: var(--mono);
        font-size: 16px;
        font-weight: 700;
        color: #a9e617bd;
        letter-spacing: 0.25em;
        pointer-events: none;
        white-space: nowrap;
        z-index: 2;
        text-shadow: none;
    }

}

.watermark-wrap img {
    width: 100%;
    display: block;
}

/* ─────────────────────────────────────────
   Utility
───────────────────────────────────────── */
.wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ─────────────────────────────────────────
   Navbar
───────────────────────────────────────── */
.navbar {
    position: fixed;
    inset-block-start: 0;
    width: 100%;
    z-index: 100;
    background: rgba(15, 23, 42, .82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.navbar .wrap {
    height: 68px;
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--mono);
    font-weight: 700;
    font-size: 1.25rem;
    white-space: nowrap;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--lime);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    color: #000;
    font-size: 1rem;
    font-weight: 800;
}

.logo-text {
    color: #fff;
}

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

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: .875rem;
    font-weight: 500;
    color: var(--muted);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--lime);
}

.nav-socials {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-socials a {
    color: var(--muted);
    font-size: 1rem;
}

.nav-socials a:hover {
    color: var(--lime);
}

/* ─────────────────────────────────────────
   Hero
───────────────────────────────────────── */
.hero {
    padding: 7rem 0 4rem;
}

.hero .wrap {
    display: flex;
    align-items: center;
    gap: 4rem;
}

/* LEFT — hexagon photo */
.hero-photo {
    flex-shrink: 0;
    position: relative;
    width: 360px;
    height: 420px;
}

.hex-clip {
    width: 100%;
    height: 100%;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: var(--surface);
    overflow: hidden;
    border: 3px solid rgba(163, 230, 53, .3);
    box-shadow: 0 0 60px var(--lime-glow);
}

.hex-clip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hex-badge {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 56px;
    background: var(--lime);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    font-weight: 800;
    font-size: .85rem;
    color: #000;
    box-shadow: 0 8px 24px var(--lime-glow);
}

/* RIGHT — text content */
.hero-content {
    flex: 1;
    min-width: 0;
}

.hero-tag {
    font-family: var(--mono);
    font-size: .9rem;
    color: var(--muted);
    margin-bottom: .75rem;
}

.hero-tag .pink {
    color: var(--pink);
}

.hero-title {
    font-family: var(--mono);
    font-size: clamp(2.2rem, 3.5vw, 3.4rem);
    font-weight: 700;
    line-height: 1.12;
    margin-bottom: 1.25rem;
}

.hero-title .lime {
    color: var(--lime);
}

.hero-desc {
    font-family: var(--mono);
    font-size: .875rem;
    color: var(--muted);
    max-width: 540px;
    margin-bottom: 1.75rem;
    line-height: 1.7;
}

.hero-desc .pink {
    color: var(--pink);
}

/* Tech icons row */
.tech-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.75rem;
    flex-wrap: nowrap;
    overflow: hidden;
}

.tech-row .t-icon {
    width: 42px;
    height: 42px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    flex-shrink: 0;
    transition: var(--ease);
}

.tech-row .t-icon:hover {
    border-color: var(--lime);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px var(--lime-glow);
}

.tech-row .t-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Infinite marquee strip */
.marquee-wrap {
    overflow: hidden;
    width: 100%;
    /* margin-bottom: 2rem; */
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
    display: flex;
    gap: 1rem;
    width: max-content;
    animation: marquee 28s linear infinite;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.m-icon {
    width: 44px;
    height: 44px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px;
    flex-shrink: 0;
    transition: var(--ease);
}

.m-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.s-icon {
    width: 110px;
    height: 110px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px;
    flex-shrink: 0;
    transition: var(--ease);
}

.s-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Buttons */
.hero-btns {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.btn-lime {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--lime);
    color: #000;
    font-weight: 700;
    font-size: .875rem;
    padding: .7rem 1.6rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: var(--ease);
}

.btn-lime:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--lime-glow);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    font-weight: 600;
    font-size: .875rem;
    padding: .7rem 1.6rem;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--ease);
}

.btn-ghost:hover {
    border-color: var(--lime);
    color: var(--lime);
}

/* ─────────────────────────────────────────
   Stats Bar
───────────────────────────────────────── */
.stats-bar {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
}

.stats-bar .wrap {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    text-align: center;
}

.stat-icon {
    font-size: 1.1rem;
    color: var(--lime);
    margin-bottom: .4rem;
}

.stat-num {
    font-family: var(--mono);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text);
}

.stat-num span {
    color: var(--lime);
}

.stat-label {
    font-size: .8rem;
    color: var(--muted);
    margin-top: .2rem;
}

/* ─────────────────────────────────────────
   Projects Section
───────────────────────────────────────── */
.projects-section {
    padding-bottom: 6rem;
}

.section-heading {
    font-family: var(--mono);
    font-size: 1.75rem;
    margin-bottom: 2.5rem;
}

.section-heading .lime {
    color: var(--lime);
}

.project-card {
    display: flex;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    transition: var(--ease);
}

.project-card:hover {
    border-color: var(--lime);
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .4);
}

.project-thumb {
    width: 45%;
    flex-shrink: 0;
    overflow: hidden;
    min-height: 280px;
}

.project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--ease);
}

.project-card:hover .project-thumb img {
    transform: scale(1.06);
}

.project-body {
    flex: 1;
    padding: 2.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-cat {
    font-family: var(--mono);
    font-size: .7rem;
    color: var(--lime);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: .75rem;
}

.project-body h3 {
    font-family: var(--mono);
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
}

.project-meta {
    width: 100%;
    margin-bottom: 1.5rem;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    padding: .6rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
    font-size: .875rem;
}

.meta-row span:first-child {
    color: var(--muted);
}

.meta-row span:last-child {
    font-weight: 600;
}

.link-lime {
    font-family: var(--mono);
    font-size: .8rem;
    font-weight: 700;
    color: var(--lime);
}

.link-lime:hover {
    text-decoration: underline;
}

/* ─────────────────────────────────────────
   Footer / Contact
───────────────────────────────────────── */
footer {
    border-top: 1px solid var(--border);
    padding: 5rem 0 3rem;
    text-align: center;
}

footer h2 {
    font-family: var(--mono);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

footer h2 .lime {
    color: var(--lime);
}

footer p {
    color: var(--muted);
    margin-bottom: 2rem;
}

.footer-copy {
    margin-top: 3rem;
    font-family: var(--mono);
    font-size: .75rem;
    color: var(--border);
}

/* ─────────────────────────────────────────
   Blinking cursor
───────────────────────────────────────── */
.blink {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: var(--lime);
    margin-left: 2px;
    vertical-align: middle;
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: 0
    }
}

/* ─────────────────────────────────────────
   flicker cursor
───────────────────────────────────────── */
@keyframes flicker {
    0% {
        color: transparent
    }

    50% {
        color: white
    }

    to {
        color: transparent
    }
}

.flicker {
    animation: flicker 1s infinite
}

.flickering {
    animation-duration: 3s;
    animation-iteration-count: infinite;
    animation-name: flickering;
    animation-timing-function: linear
}

@keyframes flickering {
    0% {
        transform: scale(.9)
    }

    50% {
        transform: scale(1.3)
    }

    to {
        transform: scale(.9)
    }
}

/* ─────────────────────────────────────────
   Responsive
───────────────────────────────────────── */
@media (max-width: 900px) {
    .hero .wrap {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-photo {
        width: 240px;
        height: 280px;
        align-self: center;
    }

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

    .project-card {
        flex-direction: column;
    }

    .project-thumb {
        width: 100%;
        min-height: 220px;
    }

    .nav-links {
        display: none;
    }
}


/* ─────────────────────────────────────────
   Orbit Rings (Skills section)
───────────────────────────────────────── */
.orbit-container {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 110px;
    height: 110px;
    pointer-events: none;
}

.orbit-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(163, 230, 53, 0.35);
    animation: orbit-spin 6s linear infinite;
}

.orbit-ring.inner {
    inset: 22px;
    border-color: rgba(163, 230, 53, 0.5);
    animation-duration: 4s;
    animation-direction: reverse;
}

.orbit-dot {
    position: absolute;
    width: 7px;
    height: 7px;
    background: var(--lime);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    margin: -3.5px 0 0 -3.5px;
    animation: orbit-dot-outer 6s linear infinite;
}

.orbit-dot-inner {
    position: absolute;
    width: 5px;
    height: 5px;
    background: rgba(163, 230, 53, 0.7);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    margin: -2.5px 0 0 -2.5px;
    animation: orbit-dot-inner 4s linear infinite reverse;
}

.orbit-center {
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(163, 230, 53, 0.4);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes orbit-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes orbit-dot-outer {
    from {
        transform: rotate(0deg) translateY(-50px);
    }

    to {
        transform: rotate(360deg) translateY(-50px);
    }
}

@keyframes orbit-dot-inner {
    from {
        transform: rotate(0deg) translateY(-28px);
    }

    to {
        transform: rotate(360deg) translateY(-28px);
    }
}

/* ─────────────────────────────────────────
   Marquee — Skills section (2 rows)
───────────────────────────────────────── */
.marquee-outer {
    overflow: hidden;
    width: 100%;
    margin-bottom: 12px;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-outer .marquee-track {
    animation: marquee-ltr 20s linear infinite;
}

.marquee-outer .marquee-track.reverse {
    animation: marquee-rtl 24s linear infinite;
}

@keyframes marquee-ltr {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

@keyframes marquee-rtl {
    from {
        transform: translateX(-50%);
    }

    to {
        transform: translateX(0);
    }
}

.marquee-outer .marquee-track:hover {
    animation-play-state: paused;
}