/* Homepage styles (Portfolio Redesign canvas). Case study pages keep css/style.css. */

:root {
    --accent: #5B33F0;
    --ink: #121212;
    --ink-2: #3F3F3B;
    --ink-3: #5C5C57;
    --ground: #F7F6F2;
    --line: #E2E0D8;
    --line-2: #D9D6CB;
    --line-3: #CFCCC1;
    --pad-x: clamp(20px, 4vw, 48px);
    --font-body: 'Inter', system-ui, sans-serif;
    --font-disp: 'Bricolage Grotesque', 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--ground);
    -webkit-font-smoothing: antialiased;
    line-height: 1.55;
}

h1, h2, h3, .disp {
    font-family: var(--font-disp);
    margin: 0;
    letter-spacing: -0.02em;
}

p { margin: 0; }
img { max-width: 100%; }

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 10;
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
}
.skip-link:focus { top: 16px; }

.mono {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: var(--pad-x);
    padding-right: var(--pad-x);
}

.sec-pad { padding-top: clamp(72px, 10vw, 128px); }

.kicker { color: var(--accent); }

.sec-title {
    margin-top: 14px;
    font-size: clamp(34px, 4.6vw, 56px);
    line-height: 1.04;
    font-weight: 700;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    border: 0;
    font: inherit;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, background .15s, color .15s, border-color .15s;
}
.btn svg { transition: transform .15s; }
.btn:hover svg { transform: translateX(4px); }

.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--accent); box-shadow: 0 10px 24px rgba(91, 51, 240, .28); transform: translateY(-1px); }

.btn-line { border: 1.5px solid var(--ink); color: var(--ink); background: transparent; }
.btn-line:hover { background: var(--ink); color: #fff; }

.btn-acc { background: var(--accent); color: #fff; }
.btn-acc:hover { background: var(--ink); transform: translateY(-1px); }

.btn-light { background: #fff; color: var(--ink); }
.btn-ghost { border: 1.5px solid var(--ink-3); color: #fff; }
.btn-ghost:hover { border-color: #fff; }

/* ===== Nav ===== */
.topnav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px var(--pad-x);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.topnav__logo { font-weight: 700; font-size: 18px; }
.nl { display: flex; gap: 28px; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.nl a { padding: 8px 4px; transition: color .15s; }
.nl a:hover { color: var(--accent); }
.topnav .btn { min-height: 44px; padding: 0 20px; }

/* ===== Hero ===== */
.hero { padding-top: clamp(32px, 6vw, 72px); }

.hero h1 {
    font-size: clamp(44px, 8.4vw, 116px);
    line-height: 0.98;
    font-weight: 700;
    max-width: 1100px;
}
.hero h1 span { color: var(--accent); }

.hero__row {
    margin-top: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 32px 64px;
    align-items: flex-end;
    justify-content: space-between;
}
.hero__lead { max-width: 560px; font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }

.viewer-wrap { position: relative; margin-top: 72px; }
.viewer {
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line-2);
    box-shadow: 0 40px 80px rgba(18, 18, 18, .14);
}
.viewer__bar {
    height: 36px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 16px;
    background: #EFEDE6;
    border-bottom: 1px solid var(--line);
}
.viewer__bar > span:not(.mono) { width: 11px; height: 11px; border-radius: 50%; background: #D5D2C7; }
.viewer__bar .mono { margin-left: 12px; color: var(--ink-3); font-size: 11px; }
.viewer .shot { aspect-ratio: 2 / 1; border-bottom: 0; }

.tabs {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: 12px;
}
.tab {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
    min-height: 64px;
    padding: 14px 18px;
    border-radius: 14px;
    border: 1.5px solid var(--line-2);
    background: #fff;
    color: var(--ink);
    font: inherit;
    cursor: pointer;
    transition: transform .15s, border-color .15s, background .15s, color .15s;
}
.tab:hover { border-color: var(--ink); transform: translateY(-2px); }
.tab[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.tab__label { font-size: 18px; font-weight: 700; }
.tab__stat { font-size: 13px; opacity: .8; }

/* ===== Screenshots ===== */
.shot { background: #fff; overflow: hidden; border-bottom: 1px solid var(--line); }
.shot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    transition: transform .5s ease;
}
.shot--contain { background: #EFEDE6; }
.shot--contain img { object-fit: contain; object-position: center; }

/* ===== Work ===== */
.work h2 { font-size: clamp(34px, 5vw, 60px); max-width: 820px; }

.work__bar {
    margin-top: 40px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.fbtn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1.5px solid var(--line-3);
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.fbtn:hover { border-color: var(--ink); transform: translateY(-1px); }
.fbtn[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.fbtn .mono { font-size: 11px; opacity: .7; }
.work__count { font-size: 14px; color: var(--ink-3); }

.card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 24px 48px rgba(18, 18, 18, .10); border-color: var(--line-3); }
.card:hover .shot img { transform: scale(1.035); }
.card:hover .go svg { transform: translateX(5px); }
.card:hover .ttl { color: var(--accent); }
.card[hidden] { display: none; }

.ttl { font-weight: 700; transition: color .2s; }
.go { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.go svg { transition: transform .2s; }

.feature { margin-top: 24px; flex-direction: row; flex-wrap: wrap; }
.feature .shot { flex: 1 1 560px; min-width: 0; aspect-ratio: 2 / 1; border-bottom: 0; border-right: 1px solid var(--line); }
.feature__body {
    flex: 1 1 340px;
    padding: clamp(24px, 3vw, 44px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
}
.feature .ttl { margin-top: 14px; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.05; }
.feature__tagline { margin-top: 6px; font-size: clamp(20px, 2vw, 26px); color: var(--ink-3); font-weight: 500; }
.feature__text { margin-top: 18px; color: var(--ink-2); }

.m-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: baseline;
    padding: 11px 0;
    border-top: 1px solid var(--line);
}
.m-row .disp { font-size: 26px; font-weight: 700; }
.m-row span:last-child { font-size: 14px; color: var(--ink-3); text-align: right; }

.card__foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 14px;
}
.card__foot > span:first-child { color: var(--ink-3); }

.grid2 {
    margin-top: 28px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
    gap: 28px;
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.grid2 .card { animation: rise .4s ease both; }

.card__head { padding: 28px 28px 24px; background: #FBFAF7; border-bottom: 1px solid var(--line); }
.card__head .ttl { font-size: 30px; line-height: 1.08; }
.card__tagline { margin-top: 4px; font-size: 20px; color: var(--ink-3); font-weight: 500; }
.metrics { margin-top: 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.metrics .disp { font-size: clamp(26px, 2.6vw, 34px); font-weight: 700; line-height: 1; color: var(--accent); }
.metrics .disp + div { margin-top: 8px; font-size: 13px; color: var(--ink-3); line-height: 1.35; }
.card .shot--wide { position: relative; aspect-ratio: 16 / 9; }
.card__body { flex: 1; padding: 28px; display: flex; flex-direction: column; }
.card__body .card__foot { margin-top: auto; padding-top: 14px; }
.card__body .mono { color: var(--ink-3); font-size: 11px; }

/* ===== About ===== */
.about__cols { display: flex; flex-wrap: wrap; gap: 40px 80px; }
.about__cols > div:first-child { flex: 1 1 320px; }
.about__text { flex: 1.3 1 420px; display: flex; flex-direction: column; gap: 20px; font-size: 18px; color: var(--ink-2); }
.note { padding: 20px 24px; border-radius: 16px; background: #fff; border: 1px solid var(--line); font-size: 17px; }
.note strong { font-weight: 600; color: var(--ink); }

/* ===== Experience ===== */
.exp { margin-top: 48px; border-bottom: 1px solid var(--line-2); }
.exp-row {
    display: grid;
    grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
    gap: 8px 40px;
    padding: 32px 0;
    border-top: 1px solid var(--line-2);
}
.exp-row > .mono { color: var(--ink-3); padding-top: 6px; }
.exp-row h3 { font-size: 24px; font-weight: 700; }
.exp-btn {
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    color: inherit;
    text-align: left;
    font-family: var(--font-disp);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.exp-org { font-weight: 500; color: var(--ink-3); transition: color .15s; }
.exp-ico {
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 50%;
    border: 1.5px solid var(--ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 500;
    transition: background .15s, color .15s;
}
.exp-btn:hover .exp-ico { background: var(--ink); color: #fff; }
.exp-btn:hover .exp-org { color: var(--accent); }
.exp-panel p { margin-top: 10px; color: var(--ink-2); max-width: 760px; }
.chips { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    background: #EFEDE6;
    border: 1px solid var(--line);
    font-size: 13px;
    color: var(--ink-2);
}
a.chip { transition: border-color .15s, color .15s; }
a.chip:hover { border-color: var(--accent); color: var(--accent); }
.experience .btn-line { margin-top: 32px; }

/* ===== Credentials ===== */
.certs {
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 20px;
}
.cert {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 22px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--line);
    transition: transform .2s, border-color .2s;
}
a.cert:hover { transform: translateY(-3px); border-color: var(--accent); }
.cert .mono { color: var(--ink-3); }
.cert .disp { font-size: 22px; font-weight: 700; line-height: 1.2; }
.cert__org { font-size: 14px; color: var(--ink-3); }
.cert .go { margin-top: 8px; font-size: 14px; }
.cert--dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.cert--dark .mono, .cert--dark .cert__org { color: #C9C6BC; }
.credentials > .btn-line { margin-top: 28px; }
.more-certs { margin-top: 20px; }

/* ===== Skills ===== */
.grid-skill {
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 20px;
}
.skill { padding: 24px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
.skill .mono { padding-bottom: 14px; border-bottom: 2px solid var(--accent); }
.skill ul { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; color: var(--ink-2); }

/* ===== Contact ===== */
.contact { margin-top: clamp(72px, 10vw, 128px); background: var(--ink); color: #fff; }
.contact .wrap { padding-top: clamp(64px, 9vw, 112px); padding-bottom: 32px; }
.contact .mono { color: #B9A8FF; }
.contact h2 { margin-top: 16px; font-size: clamp(40px, 7vw, 96px); line-height: 1; font-weight: 700; max-width: 960px; }
.contact__ctas { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 12px; }
.contact__foot {
    margin-top: 80px;
    padding-top: 24px;
    border-top: 1px solid #2E2E2A;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    color: #B5B2A7;
}

@media (max-width: 760px) {
    .nl { display: none; }
    .exp-row { grid-template-columns: minmax(0, 1fr); }
    .exp-btn { font-size: 20px; }
    .feature .shot { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .grid2 .card { animation: none; }
    .card, .cert, .btn, .tab, .fbtn, .shot img, .go svg { transition: none; }
}
