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

:root {
    --bg:    #fafaf8;
    --ink:   #111110;
    --muted: #6b6b67;
    --rule:  #e0dedd;
    --hover: #f0f0ec;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.65;
    overflow-x: hidden;
}


.greeting {
    padding: 1.1rem 5%;
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: var(--muted);
    border-bottom: 1px solid var(--rule);
    max-width: 1280px;
    margin: 0 auto;
}

.sec-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 0.6rem;
    margin-bottom: 2.8rem;
}
.sec-head h2 {
    font-family: 'EB Garamond', serif;
    font-size: 1.9rem;
    font-weight: 400;
}
.sec-head a {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--muted);
    text-decoration: none;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 1px;
    transition: color .2s, border-color .2s;
}
.sec-head a:hover { color: var(--ink); border-color: var(--ink); }


.hero {
    display: grid;
    grid-template-columns: 340px 1fr; /* slightly reduced width for the avatar column */
    gap: 4rem;
    align-items: center; /* vertically centers the avatar and text */
    padding: 5rem 5%;
    max-width: 1280px;
    margin: 0 auto;
    border-bottom: 1px solid var(--rule);
}

.pfp-image {
    width: 100%;
    max-width: 280px; /* prevents it from becoming too huge */
    aspect-ratio: 1 / 1; /* forces a perfect square, which becomes a circle */
    object-fit: cover;
    object-position: center 25%; /* shifts crop slightly down to center your face */
    border-radius: 50%; /* makes it a circle */
    display: block;
    margin: 0 auto; /* centers it within the 340px column */
    filter: grayscale(10%);
    cursor: default;
    transition: filter .4s, transform .4s;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06); /* adds a subtle, elegant shadow */
}
.pfp-image:hover {
    filter: grayscale(0%);
    transform: scale(1.02); /* gentle zoom on hover */
}
.hero-right { padding-top: 0.5rem; }

.hero-title {
    font-family: 'EB Garamond', serif;
    font-size: clamp(3rem, 5vw, 5rem);
    font-weight: 400;
    line-height: 1.08;
    margin-bottom: 0.4rem;
}
.hero-title em { font-style: italic; }

.skill-fade {
    font-size: 1rem;
    color: var(--muted);
    height: 1.6rem;
    margin: 1.5rem 0 2.2rem;
    font-weight: 300;
    opacity: 0;
    transition: opacity .6s ease;
}
.skill-fade.visible { opacity: 1; }

.about-text {
    font-size: 1rem;
    font-weight: 300;
    max-width: 60ch;
    line-height: 1.8;
    margin-bottom: 2.5rem;
}


.section {
    padding: 4.5rem 5%;
    max-width: 1280px;
    margin: 0 auto;
    border-bottom: 1px solid var(--rule);
}


.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    border-top: 1px solid var(--rule);
    border-left: 1px solid var(--rule);
}
.tool-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 1.6rem 0.5rem;
    border-right: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    cursor: default;
    transition: background .2s;
}
.tool-cell:hover { background: var(--ink); }
.tool-cell .ti {
    width: 26px;
    height: 26px;
    display: block;
    fill: var(--ink);
    transition: fill .2s;
}
.tool-cell:hover .ti { fill: var(--bg); }
.tool-cell .ti-cc {
    width: 26px;
    height: 26px;
    display: block;
    color: var(--ink);
    transition: color .2s;
}
.tool-cell:hover .ti-cc { color: var(--bg); }
.tool-label {
    font-size: 0.63rem;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--muted);
    text-align: center;
    transition: color .2s;
    line-height: 1.2;
}
.tool-cell:hover .tool-label { color: var(--bg); }

.learning-dot { display: none; }
.tool-cell[data-learning] { position: relative; }
.tool-cell[data-learning]::after {
    content: 'Learning';
    position: absolute;
    bottom: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--ink);
    color: var(--bg);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.58rem;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 3px 7px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
    z-index: 10;
}
.tool-cell[data-learning]:hover::after { opacity: 1; }



.proj-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.proj-card {
    padding: 2.2rem 1.8rem;
    border: 1px solid var(--rule);
    display: flex;
    flex-direction: column;
    min-height: 260px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .5s ease, transform .5s ease, background .2s;
}
.proj-card.visible { opacity: 1; transform: translateY(0); }
.proj-card:hover { background: var(--hover); }

.proj-tag {
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--muted);
    margin-bottom: 1rem;
}
.proj-title {
    font-family: 'EB Garamond', serif;
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 0.8rem;
    line-height: 1.2;
}
.proj-desc {
    font-size: 0.86rem;
    color: var(--muted);
    font-weight: 300;
    flex: 1;
    margin-bottom: 1.6rem;
    line-height: 1.7;
}
.proj-links { display: flex; gap: 1.2rem; }
.proj-links a {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 2px;
    transition: border-color .2s;
}
.proj-links a:hover { border-color: var(--ink); }

.see-more-row { display: flex; justify-content: flex-end; padding-top: 1.4rem; }
.see-more {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--ink);
    text-decoration: none;
    border: 1px solid var(--ink);
    padding: 0.65rem 1.6rem;
    transition: background .2s, color .2s;
}
.see-more:hover { background: var(--ink); color: var(--bg); }



.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
}
.contact-intro p {
    font-size: 0.93rem;
    color: var(--muted);
    font-weight: 300;
    line-height: 1.8;
    margin-bottom: 2rem;
}
.soc-row { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.soc-link { display: block; opacity: 0.5; transition: opacity .2s, transform .2s; }
.soc-link:hover { opacity: 1; transform: translateY(-2px); }
.soc-link .si { width: 22px; height: 22px; display: block; fill: var(--ink); }

.cf-form { display: flex; flex-direction: column; gap: 1rem; }
.cf-field {
    border: 1px solid var(--rule);
    padding: 0.85rem 1rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    background: transparent;
    color: var(--ink);
    width: 100%;
    transition: border-color .2s;
}
.cf-field::placeholder { color: var(--muted); }
.cf-field:focus { outline: none; border-color: var(--ink); }
textarea.cf-field { resize: vertical; min-height: 120px; }
.cf-btn {
    align-self: flex-start;
    background: var(--ink);
    color: var(--bg);
    border: none;
    padding: 0.8rem 2rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    cursor: pointer;
    transition: opacity .2s;
}
.cf-btn:hover { opacity: 0.75; }



.top-bar {
    padding: 1.4rem 5%;
    max-width: 1280px;
    margin: 0 auto;
    border-bottom: 1px solid var(--rule);
}
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--muted);
    text-decoration: none;
    transition: color .2s;
}
.back-btn:hover { color: var(--ink); }
.back-btn svg { width: 14px; height: 14px; fill: currentColor; }

.page-header {
    padding: 4rem 5% 3.5rem;
    max-width: 1280px;
    margin: 0 auto;
    border-bottom: 1px solid var(--rule);
}
.page-eyebrow {
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.8rem;
}
.page-title {
    font-family: 'EB Garamond', serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 400;
    line-height: 1.05;
}
.page-title em { font-style: italic; }

.filter-bar {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 5%;
    border-bottom: 1px solid var(--rule);
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }

.ftab {
    flex-shrink: 0;
    padding: 1rem 1.6rem;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--muted);
    cursor: pointer;
    border: none;
    background: none;
    font-family: 'DM Sans', sans-serif;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color .2s, border-color .2s;
    white-space: nowrap;
}
.ftab:hover { color: var(--ink); }
.ftab.active { color: var(--ink); border-bottom-color: var(--ink); }

.proj-body {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 5%;
}
.proj-section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--rule);
}
.proj-section:last-child { border-bottom: none; }
.proj-section.hidden { display: none; }

.sec-label {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}
.sec-num {
    font-family: 'EB Garamond', serif;
    font-size: 4rem;
    font-weight: 400;
    color: var(--rule);
    line-height: 1;
    user-select: none;
    flex-shrink: 0;
}
.sec-cat {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--muted);
    margin-bottom: 0.3rem;
}
.sec-title {
    font-family: 'EB Garamond', serif;
    font-size: 1.8rem;
    font-weight: 400;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}
.p-card {
    padding: 2rem 1.8rem;
    border: 1px solid var(--rule);
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    position: relative;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .45s ease, transform .45s ease, background .2s;
}
.p-card.visible { opacity: 1; transform: translateY(0); }
.p-card:hover { background: var(--hover); }

.p-card-tag {
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
}
.p-card-title {
    font-family: 'EB Garamond', serif;
    font-size: 1.3rem;
    font-weight: 400;
    line-height: 1.2;
}
.p-card-tech {
    font-size: 0.74rem;
    color: var(--muted);
    font-weight: 300;
}
.p-card-desc {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 300;
    line-height: 1.7;
    flex: 1;
}
.p-card-links {
    display: flex;
    gap: 1.2rem;
    padding-top: 0.4rem;
}
.p-card-links a {
    font-size: 0.71rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 2px;
    transition: border-color .2s;
}
.p-card-links a:hover { border-color: var(--ink); }

.badge-wip {
    position: absolute;
    top: 1.5rem;
    right: 1.4rem;
    font-size: 0.58rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 1px solid var(--rule);
    padding: 2px 6px;
    color: var(--muted);
}



@media (max-width: 1024px) {
    .hero { grid-template-columns: 280px 1fr; gap: 3rem; }
    .proj-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .hero { grid-template-columns: 1fr; }
    .proj-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
    .tools-grid { grid-template-columns: repeat(auto-fill, minmax(75px, 1fr)); }
    .cards-grid { grid-template-columns: 1fr; }
    .sec-num { font-size: 2.5rem; }
}

.coming-soon {
    grid-column: 1 / -1;
    padding: 40px 32px;
    border: 1.5px dashed rgba(0,0,0,0.12);
    border-radius: 14px;
    text-align: center;
}

.cs-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #aaa;
    margin-bottom: 6px;
}

.cs-sub {
    font-size: 0.88rem;
    color: #bbb;
}

.p-card--hidden {
    display: none;
}

.see-more-row {
    margin-top: 20px;
    text-align: center;
}

.see-more-btn {
    font-family: 'DM Sans', -apple-system, sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink, #111);
    background: transparent;
    border: 1.5px solid rgba(0,0,0,0.15);
    border-radius: 999px;
    padding: 9px 28px;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.01em;
}

.see-more-btn:hover {
    background: var(--ink, #111);
    color: #fff;
    border-color: var(--ink, #111);
}

.coming-soon {
    grid-column: 1 / -1;
    padding: 40px 32px;
    border: 1.5px dashed rgba(0,0,0,0.12);
    border-radius: 14px;
    text-align: center;
}

.cs-label {
    font-family: 'DM Sans', -apple-system, sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #aaa;
    margin-bottom: 6px;
}

.cs-sub {
    font-family: 'DM Sans', -apple-system, sans-serif;
    font-size: 0.88rem;
    color: #bbb;
}
