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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Space Grotesk", sans-serif;
    color: #2a2a22;
    background: #e8e4dc;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Film grain overlay */
.grain {
    position: fixed;
    inset: 0;
    z-index: 100;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px;
}

/* Scroll progress bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: #2a2a22;
    z-index: 50;
    transition: width 0.1s linear;
}

/* ───── HEADER ───── */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 30;
    padding: 1.6rem 2.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    mix-blend-mode: difference;
    transition: padding 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-header.scrolled {
    padding: 1rem 2.4rem;
}

.wordmark {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: #fff;
}

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

.nav-links a {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #fff;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links a:hover::after {
    width: 100%;
}

/* ───── REVEAL SYSTEM ───── */
[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal="scale"] {
    transform: scale(0.96) translateY(12px);
}

[data-reveal="slide-left"] {
    transform: translateX(-30px);
}

[data-reveal="slide-right"] {
    transform: translateX(30px);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0) scale(1) translateX(0);
}

[data-reveal][data-delay="1"] { transition-delay: 0.1s; }
[data-reveal][data-delay="2"] { transition-delay: 0.2s; }
[data-reveal][data-delay="3"] { transition-delay: 0.3s; }
[data-reveal][data-delay="4"] { transition-delay: 0.4s; }
[data-reveal][data-delay="5"] { transition-delay: 0.5s; }
[data-reveal][data-delay="6"] { transition-delay: 0.6s; }
[data-reveal][data-delay="7"] { transition-delay: 0.7s; }

/* ───── HERO ───── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 2rem 2rem;
    position: relative;
}

.hero-inner {
    text-align: center;
    max-width: 860px;
    will-change: transform, opacity;
}

.hero-label {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #8a8474;
    margin-bottom: 2rem;
}

.hero-quote {
    font-family: "Instrument Serif", serif;
    font-size: clamp(2.8rem, 7vw, 6.5rem);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: #2a2a22;
}

.hero-quote .word {
    display: inline-block;
    margin-right: 0.12em;
    opacity: 0;
    transform: translateY(50px) rotateX(15deg);
    animation: wordReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-quote .word:nth-child(1) { animation-delay: 0.15s; }
.hero-quote .word:nth-child(2) { animation-delay: 0.25s; }
.hero-quote .word:nth-child(3) { animation-delay: 0.38s; }
.hero-quote .word:nth-child(4) { animation-delay: 0.50s; }
.hero-quote .word:nth-child(5) { animation-delay: 0.60s; }
.hero-quote .word:nth-child(6) { animation-delay: 0.70s; }
.hero-quote .word:nth-child(7) { animation-delay: 0.82s; }

@keyframes wordReveal {
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

.hero-quote em {
    font-style: italic;
    color: #9a9488;
}

.hero-quote strong {
    font-weight: 400;
    font-style: italic;
}

.hero-scroll-hint {
    margin-top: 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    animation: arrowBounce 2s ease-in-out infinite;
}

.scroll-arrow {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.scroll-arrow:first-child {
    opacity: 0.7;
}

.hero-scroll-hint:hover .scroll-arrow {
    opacity: 1;
}

@keyframes arrowBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* ───── SECTION SHARED ───── */
.section-count {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: #9a9488;
    display: block;
    margin-bottom: 0.4rem;
}

.section-title {
    font-family: "Instrument Serif", serif;
    font-size: clamp(2rem, 4vw, 3.6rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    color: #2a2a22;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #2a2a22;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].revealed .section-title::after {
    width: 100%;
}

/* ───── JOURNAL CTA ───── */
.journal-cta {
    padding: 0 2.4rem 1.6rem;
}

.journal-cta-inner {
    max-width: 980px;
    margin: 0 auto;
    border: 1px solid rgba(42, 42, 34, 0.12);
    border-radius: 12px;
    background: rgba(42, 42, 34, 0.03);
    padding: 0.95rem 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.journal-cta-text {
    font-size: 0.8rem;
    color: #6e695e;
    letter-spacing: 0.02em;
}

.journal-cta-link {
    display: inline-block;
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #2a2a22;
    border: 1px solid rgba(42, 42, 34, 0.2);
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    transition: background 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.journal-cta-link:hover {
    background: rgba(42, 42, 34, 0.06);
    border-color: rgba(42, 42, 34, 0.35);
    transform: translateY(-2px);
}

/* ───── PROJECTS — FEATURED + MODAL ───── */
.projects-section {
    padding: 3vh 2.4rem 8vh;
}

.projects-inner {
    max-width: 860px;
    margin: 0 auto;
}

.projects-header {
    margin-bottom: 2rem;
}

.featured-card {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    border: 1px solid rgba(42, 42, 34, 0.1);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.3);
    cursor: default;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 60px rgba(42, 42, 34, 0.09);
}

.project-img {
    width: 100%;
    aspect-ratio: 16/10;
    border-radius: 6px;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.5s ease;
}

.featured-card .project-img {
    aspect-ratio: unset;
    height: 100%;
    min-height: 300px;
    border-radius: 0;
    border-right: 1px solid rgba(42, 42, 34, 0.08);
}

.featured-card:hover .project-img {
    transform: none;
    box-shadow: none;
}

.project-info {
    padding: 1rem 0.2rem;
}

.featured-card .project-info {
    padding: 2rem 1.8rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #8a8474;
    margin-bottom: 0.9rem;
}

.status-dot-live {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #5c8a5e;
    box-shadow: 0 0 0 0 rgba(92, 138, 94, 0.4);
    animation: livePulse 2.5s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(92, 138, 94, 0.4); }
    50% { box-shadow: 0 0 0 5px rgba(92, 138, 94, 0); }
}

.project-num {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: #9a9488;
}

.project-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2a2a22;
    margin-top: 0.3rem;
}

.project-info p {
    font-size: 0.82rem;
    color: #6e695e;
    margin-top: 0.25rem;
    line-height: 1.5;
    max-width: 320px;
}

.project-meta {
    display: flex;
    gap: 0.8rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.project-meta span {
    font-size: 0.68rem;
    font-weight: 500;
    color: #8a8474;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.lang-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.repo-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.7rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #2a2a22;
    text-decoration: none;
    border: 1px solid rgba(42, 42, 34, 0.16);
    border-radius: 999px;
    padding: 0.38rem 0.75rem;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.repo-link:hover {
    background: rgba(42, 42, 34, 0.05);
    border-color: rgba(42, 42, 34, 0.34);
    transform: translateY(-1px);
}

.repo-link:focus-visible {
    outline: 2px solid rgba(42, 42, 34, 0.45);
    outline-offset: 2px;
}

/* View all button */
.view-all-btn {
    display: inline-block;
    margin-top: 1.2rem;
    padding: 0.7rem 1.6rem;
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: #2a2a22;
    background: transparent;
    border: 1px solid rgba(42, 42, 34, 0.2);
    border-radius: 100px;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

.view-all-btn:hover {
    background: rgba(42, 42, 34, 0.06);
    border-color: rgba(42, 42, 34, 0.4);
    transform: translateY(-2px);
}

/* ───── PROJECTS MODAL ───── */
.projects-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(42, 42, 34, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

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

.projects-modal {
    background: #e8e4dc;
    border-radius: 16px;
    width: min(92vw, 1200px);
    max-height: 88vh;
    overflow-y: auto;
    padding: 2.4rem 3rem;
    transform: translateY(30px) scale(0.96);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    scrollbar-width: thin;
    scrollbar-color: rgba(42, 42, 34, 0.15) transparent;
}

.projects-modal-overlay.active .projects-modal {
    transform: translateY(0) scale(1);
}

.modal-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.modal-top h2 {
    font-family: "Instrument Serif", serif;
    font-size: 1.8rem;
    font-weight: 400;
    color: #2a2a22;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(42, 42, 34, 0.15);
    background: transparent;
    color: #2a2a22;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.modal-close:hover {
    background: rgba(42, 42, 34, 0.06);
    transform: scale(1.1);
}

.modal-subtitle {
    font-size: 0.72rem;
    color: #8a8474;
    letter-spacing: 0.03em;
    margin-bottom: 1.8rem;
}

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

.modal-card {
    transform: none;
    border: 1px solid rgba(42, 42, 34, 0.1);
    border-radius: 12px;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.28);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.35s ease,
                border-color 0.35s ease,
                background 0.35s ease;
}

.modal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(42, 42, 34, 0.08);
    border-color: rgba(42, 42, 34, 0.2);
    background: rgba(255, 255, 255, 0.45);
}

.modal-card .project-img {
    aspect-ratio: 16/10;
    border-radius: 8px;
}

.modal-card:hover .project-img {
    transform: scale(1.01);
    box-shadow: 0 10px 24px rgba(42, 42, 34, 0.12);
}

.modal-card .project-info {
    padding: 0.8rem 0.45rem 0.35rem;
}

.modal-card .project-info p {
    min-height: 2.4em;
}

/* ───── CONNECT ───── */
.connect-section {
    padding: 7vh 2.4rem 5vh;
}

.connect-inner {
    max-width: 980px;
    margin: 0 auto;
}

.connect-header {
    margin-bottom: 1.4rem;
}

.connect-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
    gap: 1rem;
    align-items: start;
}

.connect-stack {
    display: grid;
    gap: 1rem;
}

/* Discord Lanyard card */
.discord-card {
    background: rgba(42, 42, 34, 0.04);
    border: 1px solid rgba(42, 42, 34, 0.08);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.7rem;
    transition: background 0.3s ease, border-color 0.3s ease,
                transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s ease;
}

.discord-card:hover {
    background: rgba(42, 42, 34, 0.06);
    border-color: rgba(42, 42, 34, 0.14);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(42, 42, 34, 0.06);
}

.discord-left {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex: 1;
    min-width: 180px;
}

.discord-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #c8c0b4;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}

.discord-username {
    font-weight: 600;
    font-size: 0.9rem;
    color: #2a2a22;
    display: block;
}

.discord-tag {
    font-size: 0.68rem;
    color: #8a8474;
    display: block;
}

.discord-right {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.discord-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #747f8d;
    flex-shrink: 0;
}

.discord-status-dot.online { background: #3ba55d; animation: dotPulse 2s ease-in-out infinite; }
.discord-status-dot.idle { background: #faa81a; }
.discord-status-dot.dnd { background: #ed4245; }
.discord-status-dot.offline { background: #747f8d; }

@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(59, 165, 93, 0.4); }
    50% { box-shadow: 0 0 0 4px rgba(59, 165, 93, 0); }
}

.discord-status-text {
    font-size: 0.66rem;
    font-weight: 500;
    color: #8a8474;
    text-transform: capitalize;
}

.discord-activity {
    width: 100%;
    font-size: 0.72rem;
    color: #6e695e;
    font-style: italic;
    padding-top: 0.3rem;
    border-top: 1px solid rgba(42, 42, 34, 0.06);
    display: none;
}

.discord-activity.has-activity {
    display: block;
}

/* Hackatime card */
.hackatime-card {
    background: rgba(42, 42, 34, 0.04);
    border: 1px solid rgba(42, 42, 34, 0.08);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    transition: background 0.3s ease, border-color 0.3s ease,
                transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s ease;
}

.hackatime-card:hover {
    background: rgba(42, 42, 34, 0.06);
    border-color: rgba(42, 42, 34, 0.14);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(42, 42, 34, 0.06);
}

.hackatime-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.45rem;
}

.hackatime-label {
    font-weight: 600;
    font-size: 0.75rem;
    color: #2a2a22;
}

.hackatime-range {
    font-size: 0.56rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #9a9488;
}

.hackatime-total {
    font-family: "Instrument Serif", serif;
    font-size: clamp(1.45rem, 2.6vw, 2.1rem);
    font-weight: 400;
    color: #2a2a22;
    letter-spacing: -0.02em;
    margin-bottom: 0.55rem;
}

.hackatime-langs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.hackatime-lang {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.62rem;
    font-weight: 500;
    color: #6e695e;
}

.hackatime-lang .lang-dot {
    width: 6px;
    height: 6px;
}

.hackatime-bar {
    width: 100%;
    height: 3px;
    border-radius: 2px;
    background: rgba(42, 42, 34, 0.06);
    margin-bottom: 0.55rem;
    overflow: hidden;
    display: flex;
}

.hackatime-bar-seg {
    height: 100%;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Social links grid */
.socials-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    border: 1px solid rgba(42,42,34,0.1);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(42, 42, 34, 0.02);
}

.social-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 0.9rem;
    text-decoration: none;
    color: #2a2a22;
    border-bottom: 1px solid rgba(42,42,34,0.1);
    border-right: 1px solid rgba(42,42,34,0.1);
    transition: padding-left 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                color 0.2s ease,
                background 0.3s ease;
}

.social-link:nth-child(2n) {
    border-right: none;
}

.social-link:nth-last-child(-n+2) {
    border-bottom: none;
}

.social-link:hover {
    padding-left: 1.2rem;
    color: #6a6458;
    background: rgba(42, 42, 34, 0.05);
}

.social-link .social-name {
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.social-link .social-arrow {
    font-size: 0.86rem;
    opacity: 0.45;
    transform: translateX(0);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-link:hover .social-arrow {
    opacity: 1;
    transform: translateX(3px);
}

/* ───── FOOTER ───── */
.site-footer {
    padding: 4rem 2.4rem;
    text-align: center;
}

.site-footer p {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: #8a8474;
}

.hackathons {
    padding: 11vh 2.4rem 5vh;
    position: relative;
}

.hackathons::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: clamp(72px, 16vh, 180px);
    transform: translateY(-65%);
    background: linear-gradient(180deg, rgba(232, 228, 220, 0) 0%, #e8e4dc 82%);
    pointer-events: none;
    z-index: 0;
}

.hackathons-inner {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hackathons-header {
    margin-bottom: 2rem;
}

.hackathons-sub {
    font-size: 0.82rem;
    color: #8a8474;
    margin-top: 0.4rem;
    font-style: italic;
    font-family: "Instrument Serif", serif;
}

.hackathon-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.4rem;
    align-items: start;
}

.hackathon-card {
    border: 1px solid rgba(42, 42, 34, 0.1);
    border-radius: 14px;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s ease,
                background 0.3s ease,
                border-color 0.3s ease;
}

.hackathon-card::before {
    content: attr(data-num);
    position: absolute;
    top: -0.5rem;
    right: 0.8rem;
    font-family: "Instrument Serif", serif;
    font-size: 5.5rem;
    font-weight: 400;
    color: rgba(42, 42, 34, 0.045);
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

.hackathon-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(42, 42, 34, 0.08);
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(42, 42, 34, 0.16);
}

.hcard-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}

.hackathon-badge {
    display: inline-block;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #e8e4dc;
    background: #2a2a22;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.3s ease;
    flex-shrink: 0;
}

.hackathon-card:hover .hackathon-badge {
    transform: scale(1.04);
    box-shadow: 0 2px 12px rgba(42, 42, 34, 0.15);
}

.hcard-date {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #9a9488;
    text-transform: uppercase;
    margin-top: 0.1rem;
}

.hcard-title {
    font-family: "Instrument Serif", serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: #2a2a22;
    margin: 0 0 0.2rem;
    line-height: 1.2;
}

.hcard-project {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: #8a8474;
    margin-bottom: 0.65rem;
}

.hcard-desc {
    font-size: 0.86rem;
    color: #6e695e;
    line-height: 1.65;
    margin-bottom: 1rem;
    flex: 1;
}

.hackathon-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.8rem;
}

.hackathon-tags span {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: #8a8474;
    background: rgba(42, 42, 34, 0.05);
    border: 1px solid rgba(42, 42, 34, 0.08);
    padding: 0.18rem 0.5rem;
    border-radius: 4px;
    transition: background 0.2s ease, color 0.2s ease;
}

.hackathon-tags span a {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.hackathon-tags span a:hover {
    color: #2a2a22;
    text-decoration-color: #2a2a22;
}

.hackathon-card:hover .hackathon-tags span {
    background: rgba(42, 42, 34, 0.08);
    color: #6a6458;
}

.hackathon-link {
    display: inline-flex;
    align-items: center;
    margin-top: auto;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #2a2a22;
    text-decoration: none;
    border: 1px solid rgba(42, 42, 34, 0.16);
    border-radius: 999px;
    padding: 0.38rem 0.75rem;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.hackathon-link:hover {
    background: rgba(42, 42, 34, 0.05);
    border-color: rgba(42, 42, 34, 0.34);
    transform: translateY(-1px);
}

.hackathon-link:focus-visible {
    outline: 2px solid rgba(42, 42, 34, 0.45);
    outline-offset: 2px;
}

.inline-link {
    color: #2a2a22;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    text-decoration-color: rgba(42, 42, 34, 0.35);
    transition: text-decoration-color 0.2s ease, color 0.2s ease;
}

.inline-link:hover {
    color: #0f0f0c;
    text-decoration-color: rgba(42, 42, 34, 0.8);
}

/* ───── MOBILE ───── */
@media (max-width: 768px) {
    .site-header {
        padding: 1.2rem 1.4rem;
    }

    .nav-links {
        gap: 0.7rem;
    }

    .nav-links a {
        font-size: 0.66rem;
        letter-spacing: 0.08em;
    }

    .hero {
        padding: 1.4rem;
    }

    .hero-quote {
        font-size: clamp(2.4rem, 10vw, 3.8rem);
    }

    .hero-scroll-hint {
        margin-top: 3rem;
    }

    .projects-section {
        padding: 2vh 1.4rem 6vh;
    }

    .journal-cta {
        padding: 0 1.4rem 1.2rem;
    }

    .journal-cta-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.65rem;
        padding: 0.85rem 0.95rem;
    }

    .connect-section {
        padding: 5vh 1.4rem 3vh;
    }

    .connect-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .connect-stack {
        gap: 0.85rem;
    }

    .discord-card {
        padding: 1rem;
    }

    .hackatime-card {
        padding: 1rem;
    }

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

    .social-link {
        border-right: none;
    }

    .social-link:nth-last-child(-n+2) {
        border-bottom: 1px solid rgba(42,42,34,0.1);
    }

    .social-link:last-child {
        border-bottom: none;
    }

    .social-link .social-name {
        font-size: 0.72rem;
    }

    .site-footer {
        padding: 3rem 1.4rem;
    }

    .hackathons {
        padding: 8vh 1.4rem 3vh;
    }

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

    .featured-card {
        grid-template-columns: 1fr;
    }

    .featured-card .project-img {
        min-height: 220px;
    }

    /* Modal mobile */
    .projects-modal {
        width: 96vw;
        padding: 1.6rem 1.2rem;
        border-radius: 12px;
        max-height: 90vh;
    }

    .modal-projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .modal-card {
        transform: none;
    }

    .modal-card:hover {
        transform: translateY(-4px);
    }

    .modal-top h2 {
        font-size: 1.4rem;
    }
}

/* ───── SMALL PHONES ───── */
@media (max-width: 480px) {
    .projects-section {
        padding: 2vh 1rem 4vh;
    }

    .journal-cta {
        padding: 0 1rem 1rem;
    }

    .journal-cta-inner {
        padding: 0.8rem 0.85rem;
    }

    .journal-cta-link {
        font-size: 0.64rem;
        padding: 0.4rem 0.75rem;
    }

    .project-info h3 {
        font-size: 1rem;
    }

    .project-info p {
        font-size: 0.78rem;
    }

    .hero-quote {
        font-size: clamp(2rem, 9vw, 3rem);
    }

    .section-title {
        font-size: clamp(1.6rem, 7vw, 2.2rem);
    }

    .connect-section {
        padding: 5vh 1rem 4vh;
    }

    .connect-header {
        margin-bottom: 1rem;
    }

    .social-link {
        padding: 0.75rem 0.8rem;
    }

    .hackathons {
        padding: 7vh 1rem 4vh;
    }

    .hackathon-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .hackathon-card {
        padding: 1.5rem;
    }

    .projects-modal {
        padding: 1.2rem 1rem;
    }

    .modal-projects-grid {
        gap: 1.6rem;
    }
}

/* ───── LARGE SCREENS ───── */
@media (min-width: 1200px) {
    .modal-projects-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.8rem 3.2rem;
    }
}
