@import url('https://fonts.googleapis.com/css2?family=Gaegu:wght@400;700&family=Nunito:ital,wght@0,400;0,600;0,800;1,400&display=swap');

:root {
    --cream:    #fdf6e3;
    --paper:    #fffbf0;
    --ink:      #2b2118;
    --muted:    #7a6a58;
    --orange:   #f97316;
    --yellow:   #fbbf24;
    --pink:     #f472b6;
    --blue:     #60a5fa;
    --green:    #4ade80;
    --red:      #f87171;
    --doodle:   'Gaegu', cursive;
    --body:     'Nunito', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--body);
    background-color: var(--cream);
    color: var(--ink);
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(43,33,24,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(43,33,24,0.04) 1px, transparent 1px);
    background-size: 32px 32px;
}

* { position: relative; z-index: 1; }

h1, h2, h3, h4, h5 { font-family: var(--doodle); line-height: 1.15; }

p, li, label, td, th {
    font-family: var(--body);
    font-size: 0.95rem;
    line-height: 1.7;
}

a {
    color: var(--orange);
    text-decoration: underline wavy var(--orange);
    text-underline-offset: 3px;
    transition: color 0.15s;
}
a:hover { color: var(--pink); text-decoration-color: var(--pink); }

.navbar {
    background: var(--paper) !important;
    border-bottom: 2px solid var(--ink);
    padding: 1rem 2rem;
    box-shadow: 0 3px 0 var(--yellow);
}

.navbar-brand {
    font-family: var(--doodle);
    font-size: 1.5rem;
    color: var(--ink) !important;
    text-decoration: none !important;
    display: inline-block;
    transform: rotate(-1deg);
    transition: transform 0.2s;
}
.navbar-brand:hover { transform: rotate(1.5deg) scale(1.05); }

.nav-link {
    font-family: var(--body);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--muted) !important;
    padding: 0.3rem 0.9rem !important;
    border-radius: 999px;
    transition: background 0.15s, color 0.15s;
    text-decoration: none !important;
}
.nav-link:hover { background: var(--yellow); color: var(--ink) !important; }

.hero-section {
    background: linear-gradient(160deg, #fff7e6 0%, #fce7f3 50%, #e0f2fe 100%) !important;
    height: auto !important;
    min-height: 80vh;
    display: flex;
    align-items: center;
    border-bottom: 2px solid var(--ink);
    padding: 5rem 0;
    text-align: left !important;
}

.hero-section .container { text-align: left; }

.hero-section h1 {
    color: var(--ink) !important;
    font-size: clamp(3rem, 9vw, 7rem);
    margin-bottom: 0.25rem;
    animation: wobbleIn 0.7s ease both;
}

.hero-section h1::after {
    content: '';
    display: block;
    height: 6px;
    width: 55%;
    background: var(--orange);
    border-radius: 999px;
    margin-top: 0.25rem;
    transform: rotate(-1.5deg);
}

.hero-section .lead {
    font-family: var(--body);
    font-size: 1.1rem;
    color: var(--muted);
    font-style: italic;
    text-align: left !important;
    opacity: 0;
    animation: wobbleIn 0.7s 0.12s ease both;
    animation-fill-mode: both;
}

.hero-section .btn-primary {
    opacity: 0;
    animation: wobbleIn 0.7s 0.24s ease both;
    animation-fill-mode: both;
}

@keyframes wobbleIn {
    0%   { opacity: 0; transform: translateY(25px) rotate(-2deg); }
    60%  { transform: translateY(-5px) rotate(1deg); }
    100% { opacity: 1; transform: translateY(0) rotate(0); }
}

#about {
    background: var(--paper);
    border-bottom: 2px solid var(--ink);
}

#about h2, #about h2.text-primary { color: var(--ink) !important; }

#about h2::after {
    content: '';
    display: block;
    height: 4px;
    width: 70px;
    background: var(--pink);
    border-radius: 999px;
    margin-top: 0.4rem;
    transform: rotate(-1deg);
}

#about p { color: var(--muted); }

#about .img-fluid {
    border: 3px solid var(--ink) !important;
    border-radius: 12px !important;
    box-shadow: 6px 6px 0 var(--ink) !important;
    transform: rotate(1.5deg);
    transition: transform 0.3s, box-shadow 0.3s;
}
#about .img-fluid:hover {
    transform: rotate(-1.5deg) scale(1.02);
    box-shadow: 8px 8px 0 var(--orange) !important;
}

#projects {
    background: var(--cream) !important;
    color: var(--ink) !important;
    border-bottom: 2px solid var(--ink);
}

#projects h2, #projects h2.text-primary {
    color: var(--ink) !important;
    text-align: left !important;
    margin-bottom: 2rem !important;
}

.project-card {
    background: var(--paper) !important;
    border: 2px solid var(--ink) !important;
    border-radius: 12px !important;
    box-shadow: 5px 5px 0 var(--ink) !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-5px) rotate(0.4deg) !important;
    box-shadow: 8px 8px 0 var(--orange) !important;
}

.row.g-4 .col-md-4:nth-child(1) .project-card { border-top: 5px solid var(--orange) !important; }
.row.g-4 .col-md-4:nth-child(2) .project-card { border-top: 5px solid var(--pink)   !important; }
.row.g-4 .col-md-4:nth-child(3) .project-card { border-top: 5px solid var(--blue)   !important; }

.project-card .card-img-top {
    border-bottom: 2px solid var(--ink);
    aspect-ratio: 16/9;
    object-fit: cover;
}

.project-card .card-body { padding: 1.25rem; }

.project-card .card-title {
    font-family: var(--doodle);
    font-size: 1.45rem;
    color: var(--ink);
    margin-bottom: 0.4rem;
}

.project-card .card-text { color: var(--muted); font-size: 0.88rem; }

#experience {
    background: var(--paper);
    border-bottom: 2px solid var(--ink);
}

#experience h2, #experience h2.text-primary {
    color: var(--ink) !important;
}

#experience h2::after {
    content: '';
    display: block;
    height: 4px;
    width: 70px;
    background: var(--blue);
    border-radius: 999px;
    margin-top: 0.4rem;
    transform: rotate(-1deg);
}

.experience-timeline {
    position: relative;
    padding-left: 2rem;
}

/* The vertical line */
.experience-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 8px;
    bottom: 0;
    width: 2px;
    background: repeating-linear-gradient(
        to bottom,
        var(--ink) 0px,
        var(--ink) 6px,
        transparent 6px,
        transparent 12px
    );
}

.experience-item {
    position: relative;
    margin-bottom: 2.5rem;
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.experience-item:last-child { margin-bottom: 0; }

.experience-dot {
    position: absolute;
    left: -2rem;
    top: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--yellow);
    border: 2px solid var(--ink);
    box-shadow: 2px 2px 0 var(--ink);
    flex-shrink: 0;
    z-index: 2;
    transition: background 0.2s, transform 0.2s;
}

.experience-item:hover .experience-dot {
    background: var(--orange);
    transform: scale(1.2);
}

.experience-content {
    background: var(--cream);
    border: 2px solid var(--ink);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    box-shadow: 4px 4px 0 var(--ink);
    flex: 1;
    transition: box-shadow 0.2s, transform 0.2s;
}

.experience-item:hover .experience-content {
    box-shadow: 6px 6px 0 var(--orange);
    transform: translateY(-2px);
}

.experience-title {
    font-family: var(--doodle);
    font-size: 1.3rem;
    color: var(--ink);
}

.experience-date {
    font-family: var(--body);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--paper);
    background: var(--ink);
    border-radius: 999px;
    padding: 0.2em 0.85em;
    white-space: nowrap;
    margin-top: 2px;
}

.experience-company {
    font-family: var(--body);
    font-weight: 800;
    font-size: 0.82rem;
    color: var(--orange);
    margin: 0.2rem 0 0.5rem;
    text-decoration: none !important;
}

.experience-desc {
    font-family: var(--body);
    color: var(--muted);
    font-size: 0.88rem;
    margin: 0;
}

#education {
    background: var(--cream);
    border-bottom: 2px solid var(--ink);
}

#education h2, #education h2.text-primary { color: var(--ink) !important; }

#education h2::after {
    content: '';
    display: block;
    height: 4px;
    width: 70px;
    background: var(--green);
    border-radius: 999px;
    margin-top: 0.4rem;
    transform: rotate(-1deg);
}

.education-dot { background: var(--green) !important; }
.experience-item:hover .education-dot { background: var(--blue) !important; }

#contact {
    background: linear-gradient(160deg, #fff7e6 0%, #fce7f3 60%, #e0f2fe 100%);
    border-bottom: 2px solid var(--ink);
    text-align: left;
}

#contact h2, #contact h2.text-primary {
    color: var(--ink) !important;
    text-align: left !important;
}

#contact h2::after {
    content: '';
    display: block;
    height: 4px;
    width: 70px;
    background: var(--green);
    border-radius: 999px;
    margin-top: 0.4rem;
    transform: rotate(-1deg);
}

.contact-sub {
    color: var(--muted);
    font-size: 1rem;
    margin-bottom: 1.75rem;
}

.contact-email-btn {
    font-family: var(--body) !important;
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    word-break: break-all;
}

.btn-primary {
    background: var(--orange) !important;
    border: 2px solid var(--ink) !important;
    border-radius: 999px !important;
    color: #fff !important;
    font-family: var(--body) !important;
    font-weight: 800 !important;
    font-size: 0.9rem !important;
    padding: 0.65rem 2rem !important;
    box-shadow: 3px 3px 0 var(--ink) !important;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s !important;
    text-decoration: none !important;
}
.btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 5px 5px 0 var(--ink) !important;
    background: var(--pink) !important;
}

.btn-outline-primary {
    background: transparent !important;
    border: 2px solid var(--ink) !important;
    border-radius: 999px !important;
    color: var(--ink) !important;
    font-family: var(--body) !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    padding: 0.5rem 1.4rem !important;
    box-shadow: 3px 3px 0 var(--ink) !important;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s !important;
    text-decoration: none !important;
}
.btn-outline-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 5px 5px 0 var(--orange) !important;
    border-color: var(--orange) !important;
    background: var(--yellow) !important;
    color: var(--ink) !important;
}

.display-4, .display-4.text-primary, h1.text-primary {
    font-family: var(--doodle) !important;
    color: var(--ink) !important;
    font-size: clamp(2rem, 6vw, 3.5rem) !important;
}

.breadcrumb { background: transparent; padding: 0; }
.breadcrumb-item a { color: var(--orange); text-decoration: none; }
.breadcrumb-item.active { color: var(--muted); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--muted); }

section h2.h3 {
    font-family: var(--doodle);
    font-size: 1.9rem;
    color: var(--ink);
    border-bottom: 3px dashed var(--yellow);
    padding-bottom: 0.3rem;
    margin-bottom: 1.25rem !important;
}

.h3.text-primary, .text-primary { color: var(--ink) !important; }
.h5.text-muted { color: var(--muted) !important; font-style: italic; }
.lead { font-family: var(--body); color: var(--ink); font-size: 1rem; line-height: 1.8; }

ul li { color: var(--muted); margin-bottom: 0.4rem; }
ul li strong { color: var(--ink); }

.table-responsive {
    border: 2px solid var(--ink);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 4px 4px 0 var(--ink);
}

.table { color: var(--ink) !important; border-color: rgba(43,33,24,0.12) !important; margin: 0; }

.table thead.table-light th, .table-light th {
    background: var(--yellow) !important;
    color: var(--ink) !important;
    border-color: rgba(43,33,24,0.12) !important;
    font-weight: 700;
}

.table td, .table th {
    border-color: rgba(43,33,24,0.1) !important;
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
}

.table-hover tbody tr:hover td { background: #fff9e6 !important; }

.badge {
    font-family: var(--body) !important;
    font-weight: 700 !important;
    font-size: 0.78rem !important;
    border-radius: 999px !important;
    padding: 0.4em 1em !important;
    border: 2px solid var(--ink) !important;
    box-shadow: 2px 2px 0 var(--ink);
}

.badge.bg-primary   { background: var(--blue)   !important; color: var(--ink) !important; }
.badge.bg-secondary { background: #e5e7eb        !important; color: var(--ink) !important; }
.badge.bg-info      { background: #bae6fd        !important; color: var(--ink) !important; }
.badge.bg-warning   { background: var(--yellow)  !important; color: var(--ink) !important; }
.badge.bg-success   { background: var(--green)   !important; color: var(--ink) !important; }
.badge.bg-danger    { background: var(--red)     !important; color: var(--ink) !important; }
.badge.bg-dark      { background: var(--ink)     !important; color: var(--paper) !important; }

.accordion-item {
    background: var(--paper);
    border: 2px solid var(--ink) !important;
    border-radius: 10px !important;
    margin-bottom: 8px;
    overflow: hidden;
    box-shadow: 3px 3px 0 var(--ink);
}

.accordion-button {
    background: var(--paper) !important;
    color: var(--ink) !important;
    font-family: var(--doodle);
    font-size: 1.15rem;
    border-radius: 8px !important;
    box-shadow: none !important;
}

.accordion-button:not(.collapsed) {
    background: var(--yellow) !important;
    color: var(--ink) !important;
}

.accordion-body {
    background: var(--cream);
    border-top: 2px solid var(--ink);
}

.img-fluid.rounded, .img-fluid.rounded.shadow-sm {
    border: 2px solid var(--ink) !important;
    border-radius: 10px !important;
    box-shadow: 5px 5px 0 var(--ink) !important;
}

code {
    background: var(--yellow);
    color: var(--ink);
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 0.82rem;
    border: 1px solid var(--ink);
}

.roadmap-sub {
    font-family: var(--body);
    font-style: italic;
    color: var(--muted);
    font-size: 1rem;
    margin-bottom: 3rem;
}

.roadmap-quarter {
    margin-bottom: 3rem;
}

.roadmap-quarter-label {
    font-family: var(--doodle);
    font-size: 1.5rem;
    color: var(--ink);
    border-left: 4px solid var(--yellow);
    padding-left: 0.85rem;
    margin-bottom: 1.25rem;
    display: inline-block;
}

.roadmap-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    padding-left: 1rem;
}

.roadmap-card {
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 12px;
    padding: 1.1rem 1.25rem 1.25rem;
    box-shadow: 4px 4px 0 var(--ink);
    transition: transform 0.2s, box-shadow 0.2s;
}

.roadmap-card:hover {
    transform: translateY(-3px) rotate(0.3deg);
    box-shadow: 6px 6px 0 var(--orange);
}

/* left border color per status */
.status-done       { border-left: 5px solid var(--green) !important; }
.status-inprogress { border-left: 5px solid var(--orange) !important; }
.status-planned    { border-left: 5px solid var(--blue) !important; }
.status-idea       { border-left: 5px solid var(--pink) !important; }

.roadmap-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}

.roadmap-status-badge {
    font-family: var(--body);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-done       .roadmap-status-badge { color: #16a34a; }
.status-inprogress .roadmap-status-badge { color: var(--orange); }
.status-planned    .roadmap-status-badge { color: #2563eb; }
.status-idea       .roadmap-status-badge { color: #db2777; }

.roadmap-tag {
    font-family: var(--body);
    font-size: 0.68rem;
    font-weight: 800;
    border-radius: 999px;
    padding: 0.15em 0.75em;
    border: 1.5px solid var(--ink);
    box-shadow: 1px 1px 0 var(--ink);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tag-web     { background: #bae6fd; color: var(--ink); }
.tag-project { background: var(--yellow); color: var(--ink); }
.tag-learn   { background: #d9f99d; color: var(--ink); }

.roadmap-card-title {
    font-family: var(--doodle);
    font-size: 1.25rem;
    color: var(--ink);
    margin: 0 0 0.35rem;
}

.roadmap-card-desc {
    font-family: var(--body);
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.6;
}

/* legend */
.roadmap-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: center;
    margin-top: 3rem;
    padding: 1rem 1.25rem;
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 12px;
    box-shadow: 3px 3px 0 var(--ink);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--body);
    font-size: 0.8rem;
    color: var(--muted);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--ink);
    display: inline-block;
    flex-shrink: 0;
}

.dot-done       { background: var(--green); }
.dot-inprogress { background: var(--orange); }
.dot-planned    { background: var(--blue); }
.dot-idea       { background: var(--pink); }

footer, .footer {
    background: var(--ink) !important;
    color: var(--cream) !important;
    font-family: var(--doodle);
    font-size: 1rem;
}
footer a, .footer a { color: var(--yellow) !important; }

.bg-light    { background: var(--cream) !important; }
.text-dark   { color: var(--ink) !important; }
.text-muted  { color: var(--muted) !important; }
.shadow, .shadow-sm { box-shadow: 4px 4px 0 var(--ink) !important; }

@media (max-width: 768px) {
    .hero-section { min-height: 70vh; padding: 4rem 0; }
    .experience-date { margin-top: 6px; }
}