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

:root {
    --bg: #f3efe9;
    --surface: #e9e3da;
    --card: #faf8f4;
    --text: #2b2926;
    --muted: #7a7269;
    --accent: #8c8173;
    --line: #d6cfc4;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
}

/* ---------- NAV ---------- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 72px;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(243, 239, 233, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.5px;
}

.brand img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--line);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ---------- 3 BAR MENU ---------- */
.menu-btn {
    position: absolute;
    right: 28px;
    width: 34px;
    height: 26px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 12;
}

.menu-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--text);
    border-radius: 3px;
    transition: transform 0.35s ease, opacity 0.25s ease;
}

.menu-btn.open span:nth-child(1) {
    transform: translateY(11.5px) rotate(45deg);
}
.menu-btn.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.menu-btn.open span:nth-child(3) {
    transform: translateY(-11.5px) rotate(-45deg);
}

.menu {
    position: fixed;
    top: 72px;
    right: 0;
    width: 280px;
    height: calc(100% - 72px);
    background: rgba(250, 248, 244, 0.97);
    backdrop-filter: blur(12px);
    border-left: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    padding-top: 12px;
    transform: translateX(100%);
    transition: transform 0.4s ease;
    z-index: 9;
}

.menu.open {
    transform: translateX(0);
}

.menu a {
    color: var(--text);
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    padding: 18px 32px;
    transition: background 0.2s ease, padding-left 0.2s ease;
}

.menu a:hover {
    background: var(--surface);
    padding-left: 40px;
}

/* ---------- HERO ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 24px 60px;
}

.eyebrow {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.hero h1 {
    margin: 8px 0 0;
    font-size: clamp(44px, 9vw, 96px);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.05;
}

.hero h2 {
    margin: 10px 0 0;
    font-size: clamp(20px, 3vw, 30px);
    font-weight: 500;
    color: var(--accent);
}

.location {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 16px;
}

.hero-buttons {
    margin-top: 36px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn.solid {
    background: var(--text);
    color: var(--bg);
}

.btn.solid:hover {
    background: var(--accent);
}

.btn.outline {
    border: 2px solid var(--text);
    color: var(--text);
}

.btn.outline:hover {
    background: var(--text);
    color: var(--bg);
}

/* ---------- SECTIONS ---------- */
section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 90px 24px;
}

.section-title {
    margin: 0 0 28px;
    font-size: 32px;
    font-weight: 700;
}

.section-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 4px;
    margin-top: 10px;
    background: var(--accent);
    border-radius: 4px;
}

.about-text {
    max-width: 640px;
    margin: 0 0 28px;
    font-size: 18px;
    color: var(--muted);
}

/* ---------- PROJECT CARDS ---------- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 26px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(43, 41, 38, 0.12);
}

.card h4 {
    margin: 0 0 8px;
    font-size: 20px;
}

.card p {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 15px;
}

.tag {
    display: inline-block;
    margin: 0 6px 6px 0;
    padding: 4px 12px;
    background: var(--surface);
    color: var(--accent);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* ---------- SKILLS ---------- */
.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skills span {
    padding: 10px 22px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 30px;
    font-weight: 600;
    font-size: 15px;
}

/* ---------- FOOTER ---------- */
footer {
    text-align: center;
    padding: 36px 24px;
    color: var(--muted);
    font-size: 14px;
    border-top: 1px solid var(--line);
}

footer p {
    margin: 0;
}

@media (max-width: 600px) {
    .brand span {
        display: none;
    }
    .menu {
        width: 100%;
    }
}

/* ---------- JS EXTRAS ---------- */
.cursor {
    margin-left: 2px;
    color: var(--accent);
    animation: blink 1s steps(1) infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

.menu a.active {
    background: var(--surface);
    border-left: 4px solid var(--accent);
}

nav.scrolled {
    box-shadow: 0 4px 18px rgba(43, 41, 38, 0.1);
}

.to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: var(--text);
    color: var(--bg);
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
    z-index: 8;
}

.to-top.show {
    opacity: 1;
    pointer-events: auto;
    transform: none;
}

.to-top:hover {
    background: var(--accent);
}