:root {
    --bg: #d9e1d9;
    --panel: #eef4ee;
    --panel-2: #dce7dc;
    --border: #56645a;
    --green: #126b35;
    --green-dark: #20834a;
    --text: #101812;
    --muted: #536057;
    --yellow: #8a6800;
    --blue: #176b8a;
    --red: #a32626;
    --black: #182019;
}

* {
    box-sizing: border-box;
}

html {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: clip;
}

body {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;

    background: var(--bg);
    color: var(--text);

    font-family: 'VT323', monospace;
    font-size: 20px;
    line-height: 1.35;

    overflow-x: clip;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;

    background:
            repeating-linear-gradient(
                    to bottom,
                    rgba(255,255,255,.025) 0,
                    rgba(255,255,255,.025) 1px,
                    transparent 1px,
                    transparent 4px
            );

    mix-blend-mode: overlay;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;

    opacity: .22;

    background-image:
            linear-gradient(rgba(101,255,143,.035) 1px, transparent 1px),
            linear-gradient(90deg, rgba(101,255,143,.035) 1px, transparent 1px);

    background-size: 32px 32px;
}

img {
    display: block;
    max-width: 100%;
}

button,
a {
    font: inherit;
}

button {
    color: inherit;
}

a {
    color: inherit;
}

h1,
h2,
h3,
p {
    margin-top: 0;
    max-width: 100%;
}

p {
    overflow-wrap: anywhere;
}

.pixel-font {
    font-family: 'Press Start 2P', monospace;
}

.green {
    color: var(--green);
}

.yellow {
    color: var(--yellow);
}

.blue {
    color: var(--blue);
}

.muted {
    color: var(--muted);
}

.blink {
    animation: blink 1s steps(2, start) infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.float {
    animation: float 3s steps(4) infinite;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.site-main {
    width: 100%;
    max-width: 1152px;
    min-width: 0;

    margin: 0 auto;
    padding: 32px 16px 48px;
}

.site-header {
    width: 100%;
    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;

    margin-bottom: 32px;
}

.site-header > * {
    min-width: 0;
}

.pixel-border {
    width: 100%;
    max-width: 100%;
    min-width: 0;

    border: 4px solid var(--border);

    background: var(--panel);

    box-shadow:
            6px 6px 0 var(--black),
            inset 3px 3px 0 rgba(255,255,255,.04);
}

.pixel-border-green {
    width: 100%;
    max-width: 100%;
    min-width: 0;

    border: 4px solid var(--green-dark);

    background: var(--panel);

    box-shadow:
            6px 6px 0 var(--black),
            inset 3px 3px 0 rgba(101,255,143,.08);
}

.pixel-button {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 0;
    max-width: 100%;

    padding: 9px 12px;
    font-size: 9px;
    line-height: 1.4;
    white-space: nowrap;

    background: var(--panel-2);

    border: 4px solid var(--border);

    box-shadow: 5px 5px 0 var(--black);

    color: var(--text);
    text-decoration: none;

    cursor: pointer;

    transition:
            transform .08s ease,
            box-shadow .08s ease,
            border-color .08s ease,
            color .08s ease;
}

.pixel-button:hover {
    color: var(--green);
    border-color: var(--green-dark);

    transform: translate(2px, 2px);

    box-shadow: 3px 3px 0 var(--black);
}

.pixel-button:active {
    transform: translate(5px, 5px);
    box-shadow: none;
}

.theme-button {
    flex-shrink: 0;
}

.hero {
    width: 100%;
    min-width: 0;

    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);

    gap: 32px;
    align-items: center;
}

.hero-content,
.hero-side {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.terminal {
    width: 100%;
    max-width: 100%;
    min-width: 0;

    padding: 24px;

    overflow-wrap: anywhere;
}

.terminal-top {
    width: 100%;
    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    padding-bottom: 16px;
    margin-bottom: 24px;

    border-bottom: 4px solid var(--border);
}

.terminal-top > * {
    min-width: 0;
}

.online {
    display: flex;
    align-items: center;
    min-width: 0;

    color: var(--green);

    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
}

.status-dot {
    width: 10px;
    height: 10px;
    flex: 0 0 10px;

    margin-right: 8px;

    background: var(--green);

    box-shadow: 0 0 8px var(--green);
}

.window-buttons {
    display: flex;
    flex-shrink: 0;
    gap: 6px;
}

.window-button {
    display: block;

    width: 12px;
    height: 12px;

    border: 2px solid var(--black);
}

.window-button.red {
    background: var(--red);
}

.window-button.yellow {
    background: var(--yellow);
}

.window-button.green {
    background: var(--green);
}

.terminal-path {
    margin-bottom: 8px;
    color: var(--muted);
}

.hero-title {
    margin-bottom: 18px;

    font-family: 'Press Start 2P', monospace;
    font-size: clamp(24px, 4vw, 42px);
    line-height: 1.55;

    overflow-wrap: anywhere;
}

.hero-role {
    margin-bottom: 24px;

    color: var(--green);

    font-family: 'Press Start 2P', monospace;
    font-size: clamp(13px, 2vw, 18px);
    line-height: 1.7;

    position: relative;
    display: inline-block;
}

.typing::before {
    content: "<? $WEB_DEVELOPER = true ?>";
    display: inline-block;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
    vertical-align: bottom;
    animation: typing 5s steps(27, end) infinite;
}

.blink {
    display: inline-block;
    position: absolute;
    left: 0;
    top: 0;
    animation:
            cursor-move 5s steps(27, end) infinite,
            cursor-blink 0.55s steps(1) infinite;
}

@keyframes typing {
    0% {
        width: 0;
    }

    70% {
        width: 27ch;
    }

    85% {
        width: 27ch;
    }

    100% {
        width: 0;
    }
}

@keyframes cursor-move {
    0% {
        left: 0;
    }

    70% {
        left: 27ch;
    }

    85% {
        left: 27ch;
    }

    100% {
        left: 0;
    }
}

@keyframes cursor-blink {
    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

.terminal-line {
    margin-bottom: 14px;
    color: var(--text);

    overflow-wrap: anywhere;
}

.terminal-line::before {
    content: "> ";
    color: var(--green);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;

    margin-top: 26px;
}

.pixel-avatar {
    position: relative;

    width: 100%;
    max-width: 100%;
    min-width: 0;

    padding: 8px;

    background: var(--black);

    border: 4px solid var(--green-dark);

    box-shadow:
            8px 8px 0 var(--black),
            inset 0 0 0 4px #18251d;
}

.pixel-avatar img {
    width: 100%;
    max-width: 100%;
    height: auto;
}

.pixel-corner {
    position: absolute;

    width: 12px;
    height: 12px;

    background: var(--green);
}

.pixel-corner.tl {
    top: -4px;
    left: -4px;
}

.pixel-corner.tr {
    top: -4px;
    right: -4px;
}

.pixel-corner.bl {
    bottom: -4px;
    left: -4px;
}

.pixel-corner.br {
    bottom: -4px;
    right: -4px;
}

.avatar-info {
    position: absolute;

    left: 16px;
    right: 16px;
    bottom: 16px;

    min-width: 0;

    padding: 10px 12px;

    background: rgba(9,13,18,.94);

    border: 2px solid var(--border);
}

.avatar-info-title {
    color: var(--green);

    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
}

.location-box {
    margin-top: 28px;
    padding: 18px;
}

.location-title {
    margin-bottom: 12px;

    color: var(--green);

    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
}

.location-name {
    margin-bottom: 2px;
    font-size: 26px;
}

.location-box {
    position: relative;
    overflow: hidden;
}

.location-art {
    position: absolute;

    right: 0;
    bottom: 0;

    width: 100%;
    height: 100%;

    background-image: url("bukittinggi.png");
    background-repeat: no-repeat;
    background-position: right bottom;
    background-size: contain;

    pointer-events: none;
    z-index: 0;
}

@media (max-width: 700px) {
    .location-art {
        width: 75%;
    }
}

.location-title,
.location-name,
.location-name-country,
.location-box .muted {
    position: relative;
    z-index: 1;
}

.skills {
    width: 100%;
    min-width: 0;

    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 14px;

    margin-top: 28px;
}

.skill {
    min-width: 0;
    padding: 18px 10px;

    text-align: center;

    overflow-wrap: anywhere;
}

.skill-name {
    margin-bottom: 7px;

    font-size: 22px;
    line-height: 1.2;
}

.skill-type {
    color: var(--muted);

    font-size: 13px;
    line-height: 1.2;
}

.content-section {
    width: 100%;
    min-width: 0;

    margin-top: 64px;
}

.section-heading {
    width: 100%;
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 14px;

    margin-bottom: 24px;
}

.section-heading h2 {
    flex: 0 1 auto;

    margin: 0;

    color: var(--green);

    font-family: 'Press Start 2P', monospace;
    font-size: 12px;

    overflow-wrap: anywhere;
}

.section-line {
    flex: 1 1 auto;

    min-width: 20px;
    height: 4px;

    background: var(--border);
}

.section-number {
    flex-shrink: 0;
    color: var(--muted);
}

.about-box {
    padding: 24px;
}

.about-box .terminal-line:last-child {
    margin-bottom: 0;
}

.side-quests {
    width: 100%;
    min-width: 0;

    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 24px;
}

.quest {
    min-width: 0;
    padding: 24px;

    position: relative;
    overflow: hidden;
    overflow-wrap: anywhere;

    background: var(--panel);
}

.quest-icon {
    margin-bottom: 16px;

    font-size: 32px;

    position: relative;
    z-index: 2;

    overflow-wrap: anywhere;
}

.quest-title {
    margin-bottom: 12px;

    color: var(--green);

    font-family: 'Press Start 2P', monospace;
    font-size: 9px;

    position: relative;
    z-index: 2;
}

.quest p {
    margin-bottom: 0;

    position: relative;
    z-index: 2;
}

.garden-art {
    position: absolute;

    right: 0;
    bottom: 0;

    width: 100%;
    height: 100%;

    background-image: url("farming.png");
    background-repeat: no-repeat;
    background-position: right bottom;
    background-size: contain;

    pointer-events: none;
    z-index: 0;
}

.garden-art::after {
    content: "";

    position: absolute;
    inset: 0;

    background: linear-gradient(
            to right,
            var(--panel) 0%,
            var(--panel) 28%,
            color-mix(in srgb, var(--panel) 90%, transparent) 42%,
            color-mix(in srgb, var(--panel) 45%, transparent) 56%,
            transparent 72%
    );

    pointer-events: none;
}

.fishing-art {
    position: absolute;

    right: 0;
    bottom: 0;

    width: 100%;
    height: 100%;

    background-image: url("fishing.png");
    background-repeat: no-repeat;
    background-position: right bottom;
    background-size: contain;

    pointer-events: none;
    z-index: 0;
}

.fishing-art::after {
    content: "";

    position: absolute;
    inset: 0;

    background: linear-gradient(
            to right,
            var(--panel) 0%,
            var(--panel) 28%,
            color-mix(in srgb, var(--panel) 90%, transparent) 42%,
            color-mix(in srgb, var(--panel) 45%, transparent) 56%,
            transparent 72%
    );

    pointer-events: none;
}

.farming-art {
    position: absolute;

    right: 0;
    bottom: 0;

    width: 100%;
    height: 100%;

    background-image: url("duck-farming.png");
    background-repeat: no-repeat;
    background-position: right bottom;
    background-size: contain;

    pointer-events: none;
    z-index: 0;
}

.farming-art::after {
    content: "";

    position: absolute;
    inset: 0;

    background: linear-gradient(
            to right,
            var(--panel) 0%,
            var(--panel) 28%,
            color-mix(in srgb, var(--panel) 90%, transparent) 42%,
            color-mix(in srgb, var(--panel) 45%, transparent) 56%,
            transparent 72%
    );

    pointer-events: none;
}

.socials {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.social {
    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 46px;

    border: 3px solid var(--border);

    background: var(--panel);

    color: var(--muted);

    box-shadow: 4px 4px 0 var(--black);

    transition: .1s;
}

.social:hover {
    color: var(--green);
    border-color: var(--green-dark);

    transform: translate(2px, 2px);

    box-shadow: 2px 2px 0 var(--black);
}

.social svg {
    width: 21px;
    height: 21px;

    fill: currentColor;
}

.site-footer {
    width: 100%;
    min-width: 0;

    margin-top: 80px;
    padding-top: 20px;

    border-top: 4px solid var(--border);

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;
}

.site-footer > * {
    min-width: 0;
}

.footer-status {
    overflow-wrap: anywhere;
}

.modal-backdrop {
    position: fixed;
    inset: 0;

    width: 100%;
    height: 100dvh;

    padding: 12px;

    background: rgba(0,0,0,.82);

    z-index: 1000;

    display: none;

    overflow-x: hidden;
    overflow-y: auto;
}

.modal-backdrop.active {
    display: block;
}

.modal {
    width: 100%;
    max-width: 1000px;
    min-width: 0;

    margin: 0 auto;

    background: var(--bg);

    border: 4px solid var(--green-dark);

    box-shadow: 8px 8px 0 #000;

    box-sizing: border-box;
}

.modal-header {
    width: 100%;
    max-width: 100%;
    min-width: 0;

    padding: 16px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 14px;

    border-bottom: 4px solid var(--green-dark);

    background: var(--panel);

    box-sizing: border-box;
}

.modal-header-info {
    flex: 1 1 auto;

    min-width: 0;
    max-width: 100%;
}

.modal-header-title {
    margin: 0;

    font-size: 24px;
    line-height: 1.25;

    overflow-wrap: anywhere;
}

.modal-close {
    flex: 0 0 auto;
}

.modal-body {
    width: 100%;
    max-width: 100%;
    min-width: 0;

    padding: 16px;

    box-sizing: border-box;
}

.project-grid {
    width: 100%;
    max-width: 100%;
    min-width: 0;

    display: grid;

    grid-template-columns:
                repeat(2, minmax(0, 1fr));

    gap: 20px;
}

.project-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;

    background: var(--panel);

    border: 4px solid var(--border);

    box-shadow: 6px 6px 0 var(--black);

    box-sizing: border-box;

    transition:
            transform .12s steps(2),
            border-color .12s;
}

.project-card:hover {
    transform: translate(-3px, -3px);
    border-color: var(--green-dark);
}

.project-image {
    width: 100%;
    max-width: 100%;
    min-width: 0;

    border-bottom: 4px solid var(--border);

    background: var(--black);

    box-sizing: border-box;
}

.project-image img {
    display: block;

    width: 100%;
    max-width: 100%;
    min-width: 0;

    height: auto;

    aspect-ratio: 16 / 9;

    object-fit: cover;

    filter: saturate(.8) contrast(1.08);
}

.project-content {
    width: 100%;
    max-width: 100%;
    min-width: 0;

    padding: 18px;

    box-sizing: border-box;
}

.project-id {
    margin-bottom: 12px;

    color: var(--green);

    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
}

.project-title {
    margin-bottom: 10px;

    font-size: 26px;
    line-height: 1.2;

    overflow-wrap: anywhere;
}

.project-description {
    margin-bottom: 18px;

    color: var(--muted);

    font-size: 18px;
    line-height: 1.35;

    overflow-wrap: anywhere;
}

.project-open {
    max-width: 100%;
}

.hero-glow {
    position: fixed;

    width: 500px;
    height: 500px;

    border-radius: 50%;

    background: rgba(101,255,143,.035);

    filter: blur(60px);

    pointer-events: none;

    z-index: -1;
}

@media (max-width: 900px) {

    .hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-side {
        max-width: 600px;
        margin: 0 auto;
    }

    .skills {
        grid-template-columns:
                    repeat(2, minmax(0, 1fr));
    }

    .project-grid {
        grid-template-columns:
                    repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {

    body {
        font-size: 18px;
    }

    .site-main {
        padding: 20px 12px 36px;
    }

    .site-header {
        margin-bottom: 24px;
    }

    .site-header .pixel-font {
        font-size: 13px;
    }

    .theme-button {
        padding: 10px 12px;
        font-size: 9px;
    }

    .hero {
        gap: 24px;
    }

    .terminal {
        padding: 16px;
    }

    .terminal-top {
        padding-bottom: 12px;
        margin-bottom: 18px;
    }

    .online {
        font-size: 8px;
    }

    .hero-side {
        display: none;
    }

    .hero-title {
        font-size: 24px;
        line-height: 1.55;
    }

    .hero-role {
        font-size: 12px;
        line-height: 1.7;
    }

    .hero-actions {
        flex-direction: row;
        align-items: center;
        flex-wrap: nowrap;
        gap: 10px;
    }

    .hero-actions .pixel-button {
        flex: 1;
        width: auto;
        min-width: 0;
    }

    .skills {
        grid-template-columns:
                    repeat(2, minmax(0, 1fr));

        gap: 10px;
    }

    .skill {
        padding: 14px 8px;
    }

    .skill-name {
        font-size: 19px;
    }

    .content-section {
        margin-top: 48px;
    }

    .section-heading {
        gap: 10px;
    }

    .section-heading h2 {
        font-size: 9px;
    }

    .section-number {
        font-size: 16px;
    }

    .about-box {
        padding: 16px;
    }

    .side-quests {
        grid-template-columns:
                    minmax(0, 1fr);

        gap: 14px;
    }

    .quest {
        padding: 16px;
    }

    .site-footer {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-top: 60px;
    }

    .modal-backdrop {
        padding: 8px;
    }

    .modal {
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    .modal-header {
        padding: 12px;
        gap: 10px;
    }

    .modal-header .pixel-font {
        font-size: 8px;
    }

    .modal-header-title {
        font-size: 18px;
        line-height: 1.35;
    }

    .modal-body {
        padding: 10px;
    }

    .project-grid {
        width: 100%;
        max-width: 100%;

        grid-template-columns:
                    minmax(0, 1fr);

        gap: 16px;
    }

    .project-card {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .project-content {
        padding: 14px;
    }

    .project-id {
        font-size: 8px;
    }

    .project-title {
        font-size: 22px;
    }

    .project-description {
        font-size: 17px;
    }

    .project-open {
        width: auto;
    }
}

@media (max-width: 360px) {

    .site-main {
        padding-left: 10px;
        padding-right: 10px;
    }

    .site-header {
        gap: 8px;
    }

    .site-header .pixel-font {
        font-size: 10px;
    }

    .theme-button {
        padding: 8px 10px;
        font-size: 8px;
    }

    .terminal {
        padding: 12px;
    }

    .hero-title {
        font-size: 21px;
    }

    .hero-role {
        font-size: 10px;
    }

    .skills {
        gap: 8px;
    }

    .skill-name {
        font-size: 17px;
    }

    .modal-backdrop {
        padding: 6px;
    }

    .modal-header {
        padding: 10px;
    }

    .modal-body {
        padding: 8px;
    }

    .project-content {
        padding: 12px;
    }

    .project-title {
        font-size: 20px;
    }
}

#fishing-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.55;
    z-index: 0;
}

/* ===== CARD ===== */
.about-box {
    position: relative;
    overflow: hidden;
    /* Atas → Kanan → Bawah → Kiri
       bawah CUKUP 20px saja — fisherman udah di dalam canvas */
    padding: 32px 40px 20px 40px;
    min-height: 260px;   /* card nggak terlalu tinggi */
}

/* ===== CANVAS ===== */
.about-box #fishing-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.55;
    z-index: 0;
}

/* ===== TEXT ===== */
.about-box .terminal-line {
    position: relative;
    z-index: 1;
    margin: 0 0 14px 0;
    /* FULL WIDTH — biar 1 baris kalau muat */
}

.about-box .terminal-line:last-child {
    margin-bottom: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
    .about-box {
        padding: 28px 28px 20px 28px;
        min-height: 250px;
    }
}

@media (max-width: 600px) {
    .about-box {
        /* Mobile: butuh ruang bawah karena fisherman di bawah */
        padding: 22px 22px 110px 22px;
        min-height: 300px;
    }
    .about-box .terminal-line {
        /*font-size: 14px;*/
        /*line-height: 1.75;*/
    }
}

@media (max-width: 420px) {
    .about-box {
        padding: 18px 18px 100px 18px;
    }
    .about-box .terminal-line {
        /*font-size: 14px;*/
    }
}

/* ============================================================
   ABOUT PHOTO — hanya muncul di mobile
   ============================================================ */

.about-photo {
    display: none;                 /* default: sembunyi */
}

@media (max-width: 640px) {
    .about-photo {
        display: block;
        position: relative;
        z-index: 1;                /* di atas canvas */

        width: 100%;
        height: 200px;
        margin-bottom: 16px;

        overflow: hidden;
        border: 3px solid var(--border);
        box-shadow: 4px 4px 0 var(--black);

        background: var(--black);
    }

    .about-photo img {
        width: 100%;
        height: 100%;
        object-fit: cover;         /* crop biar pas 100px */
        object-position: center 30%; /* fokus ke area wajah */
        display: block;

        image-rendering: pixelated;
        filter:
                contrast(1.1)
                saturate(1.1)
                brightness(0.98);
    }
}