/* ============================================================
   Rohit Pakhrin — Portfolio redesign
   Dark-first, red/cyan "glitch code" aesthetic.
   ============================================================ */

:root {
    --bg: #0a0e13;
    --bg-alt: #0e141c;
    --surface: rgba(255, 255, 255, .035);
    --surface-solid: #111923;
    --border: rgba(255, 255, 255, .1);
    --border-strong: rgba(255, 255, 255, .18);
    --text: #aab6c4;
    --heading: #eef3f8;
    --muted: #6f7c8c;
    --primary: #9ccfa9;
    --primary-soft: rgba(156, 207, 169, .14);
    --primary-rgb: 156, 207, 169;
    --grad: linear-gradient(135deg, #a9d9b4 0%, #cfe9d5 100%);
    --grad-text: #0b1a10;
    --primary-glow: rgba(156, 207, 169, .22);
    --primary-glow-strong: rgba(156, 207, 169, .36);
    --accent: #5fd4bb;
    --accent-soft: rgba(95, 212, 187, .14);
    --shadow: 0 24px 60px rgba(0, 0, 0, .5);
    --nav-bg: rgba(12, 18, 26, .78);
    --radius: 18px;
    --maxw: 1160px;
    --ff: "Poppins", system-ui, -apple-system, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, monospace;
    color-scheme: dark;
}

[data-theme="light"] {
    --bg: #f3f6fb;
    --bg-alt: #e9eef7;
    --surface: rgba(255, 255, 255, .75);
    --surface-solid: #ffffff;
    --border: rgba(16, 30, 50, .12);
    --border-strong: rgba(16, 30, 50, .22);
    --text: #4a5a6e;
    --heading: #101b2a;
    --muted: #6b7a8d;
    --primary: #55735c;
    --primary-soft: rgba(85, 115, 92, .14);
    --primary-rgb: 85, 115, 92;
    --grad: linear-gradient(135deg, #b7cfbb 0%, #d3e3d6 100%);
    --grad-text: #1f3a29;
    --primary-glow: rgba(85, 115, 92, .24);
    --primary-glow-strong: rgba(85, 115, 92, .36);
    --accent: #47796e;
    --accent-soft: rgba(71, 121, 110, .12);
    --shadow: 0 22px 50px rgba(30, 50, 90, .16);
    --nav-bg: rgba(255, 255, 255, .82);
    color-scheme: light;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding-bottom: 96px;
    background: var(--bg);
    color: var(--text);
    font-family: var(--ff);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color .35s ease, color .35s ease;
}

/* subtle ambient background */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(900px 500px at 80% -10%, var(--primary-soft), transparent 60%),
        radial-gradient(800px 500px at 0% 40%, var(--accent-soft), transparent 60%);
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    color: var(--heading);
    font-weight: 700;
    line-height: 1.2;
}

p {
    margin: 0;
}

::selection {
    background: var(--primary);
    color: var(--grad-text);
}

.mono {
    font-family: var(--mono);
}

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

.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
}

.skip-link {
    position: fixed;
    top: -60px;
    left: 16px;
    z-index: 200;
    padding: 10px 16px;
    background: var(--primary);
    color: var(--grad-text);
    border-radius: 8px;
    transition: top .2s ease;
}

.skip-link:focus {
    top: 16px;
}

/* ---------- Theme toggle ---------- */
.theme-toggle {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 120;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--heading);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: color .25s ease, border-color .25s ease, transform .25s ease;
}

.theme-toggle:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: rotate(18deg);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 26px;
    font-family: var(--ff);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .3px;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}

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

.btn-primary {
    color: var(--grad-text);
    background: var(--grad);
    box-shadow: 0 12px 30px var(--primary-glow);
}

.btn-primary:hover {
    box-shadow: 0 16px 40px var(--primary-glow-strong);
}

.btn-ghost {
    color: var(--heading);
    background: var(--surface);
    border-color: var(--border-strong);
}

.btn-ghost:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 120px 0 90px;
    border-bottom: 1px solid var(--border);
}

.hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: .55;
}

.hero-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(520px 520px at 78% 42%, var(--primary-soft), transparent 70%),
        radial-gradient(420px 420px at 18% 70%, var(--accent-soft), transparent 70%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    align-items: center;
    gap: 50px;
}

.hero-kicker {
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
}

.hero-kicker .mono {
    margin-right: 6px;
    color: var(--primary);
}

.hero-name {
    position: relative;
    font-size: clamp(42px, 7vw, 76px);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.02;
}

/* subtle glitch on the name */
.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    opacity: .6;
    pointer-events: none;
}

.glitch::before {
    color: var(--accent);
    animation: glitchA 4.2s infinite steps(2, end);
}

.glitch::after {
    color: var(--primary);
    animation: glitchB 3.6s infinite steps(2, end);
}

@keyframes glitchA {
    0%, 92%, 100% { transform: translate(0, 0); clip-path: inset(0 0 100% 0); }
    93% { transform: translate(-2px, -1px); clip-path: inset(10% 0 55% 0); }
    95% { transform: translate(2px, 1px); clip-path: inset(40% 0 30% 0); }
    97% { transform: translate(-1px, 0); clip-path: inset(65% 0 10% 0); }
}

@keyframes glitchB {
    0%, 90%, 100% { transform: translate(0, 0); clip-path: inset(100% 0 0 0); }
    91% { transform: translate(2px, 1px); clip-path: inset(55% 0 20% 0); }
    94% { transform: translate(-2px, -1px); clip-path: inset(20% 0 55% 0); }
    96% { transform: translate(1px, 0); clip-path: inset(75% 0 5% 0); }
}

.hero-roles {
    display: flex;
    align-items: center;
    min-height: 42px;
    margin-top: 10px;
    font-size: clamp(20px, 3vw, 30px);
    font-weight: 600;
    color: var(--heading);
}

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

.caret {
    display: inline-block;
    width: 3px;
    height: 1.05em;
    margin-left: 4px;
    background: var(--primary);
    animation: blink 1s step-end infinite;
}

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

.hero-lead {
    max-width: 540px;
    margin: 20px 0 30px;
    font-size: 16px;
    color: var(--text);
}

.hero-lead strong {
    color: var(--heading);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-socials {
    display: flex;
    gap: 10px;
    margin-top: 34px;
}

.hero-socials a {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    transition: color .2s ease, border-color .2s ease, transform .2s ease;
}

.hero-socials a:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-3px);
}

/* portrait */
.hero-portrait {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.portrait-frame {
    position: relative;
    width: min(360px, 80%);
    aspect-ratio: 1;
    padding: 8px;
    border-radius: 50%;
    background: conic-gradient(from 140deg, var(--primary), var(--accent), var(--primary));
    box-shadow: var(--shadow);
}

.portrait-frame::after {
    content: "";
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    border: 1px dashed var(--border-strong);
    animation: spinSlow 22s linear infinite;
}

@keyframes spinSlow {
    to { transform: rotate(360deg); }
}

.portrait-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 22%;
    border-radius: 50%;
    border: 6px solid var(--bg);
}

.portrait-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--heading);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    backdrop-filter: blur(8px);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2bd576;
    box-shadow: 0 0 0 4px rgba(43, 213, 118, .18);
}

.scroll-hint {
    position: absolute;
    left: 50%;
    bottom: 24px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    transform: translateX(-50%);
    transition: color .2s ease;
}

.scroll-hint:hover {
    color: var(--primary);
}

.scroll-hint i {
    font-size: 12px;
    animation: bob 1.8s ease-in-out infinite;
}

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

/* ---------- Sections ---------- */
.section {
    position: relative;
    padding: 100px 0;
    scroll-margin-top: 20px;
}

.section-alt {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-head {
    margin-bottom: 48px;
}

.section-head.sub {
    margin-top: 80px;
}

.section-head.text-center {
    text-align: center;
}

.kicker {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
}

.section-title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 700;
    letter-spacing: -.5px;
}

/* ---------- About ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 40px;
    align-items: stretch;
}

.about-main p {
    margin-bottom: 16px;
    font-size: 16px;
}

.about-main strong {
    color: var(--heading);
}

.about-facts {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 26px 0 0;
    padding: 0;
}

.about-facts li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text);
}

.about-facts i {
    color: var(--primary);
    width: 18px;
    text-align: center;
}

.about-facts a:hover {
    color: var(--primary);
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.stat {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 22px 26px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(8px);
    transition: border-color .25s ease, transform .25s ease;
}

.stat:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.stat-num {
    font-size: 40px;
    font-weight: 800;
    line-height: 1;
    color: var(--primary);
}

.stat-label {
    margin-top: 4px;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
}

/* ---------- Skills ---------- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.skill-card {
    padding: 26px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.skill-icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 19px;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 13px;
}

.skill-card h3 {
    margin-bottom: 14px;
    font-size: 17px;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.chips span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 999px;
}

.chip-logo {
    width: 14px;
    height: 14px;
    padding: 2px;
    box-sizing: content-box;
    object-fit: contain;
    flex: 0 0 auto;
    background: #fff;
    border-radius: 4px;
}

.chip-icon {
    font-size: 12px;
    color: var(--primary);
    flex: 0 0 auto;
}

[data-theme="light"] .chips span {
    background: #fff;
}

/* ---------- Services ---------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.service-card {
    position: relative;
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .25s ease, border-color .25s ease;
}

.service-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-strong);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    display: flex;
    align-items: center;
    min-height: 28px;
    margin-bottom: 16px;
    font-size: 28px;
    color: var(--primary);
}

.service-logo {
    display: block;
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.service-card h3 {
    margin-bottom: 10px;
    font-size: 19px;
}

.service-card p {
    font-size: 14.5px;
    color: var(--text);
}

/* ---------- Experience timeline ---------- */
.timeline {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 9px;
    width: 2px;
    background: linear-gradient(180deg, var(--primary), var(--accent), transparent);
}

.timeline-item {
    position: relative;
    padding-left: 44px;
    margin-bottom: 22px;
}

.timeline-dot {
    position: absolute;
    top: 24px;
    left: 0;
    width: 20px;
    height: 20px;
    background: var(--bg);
    border: 2px solid var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 0 5px var(--primary-soft);
}

.timeline-card {
    padding: 24px 26px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color .25s ease, transform .25s ease;
}

.timeline-card:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

.timeline-period {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .5px;
    color: var(--accent);
}

.timeline-card h3 {
    margin: 8px 0 2px;
    font-size: 19px;
}

.timeline-card h4 {
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
}

.timeline-card p {
    font-size: 14.5px;
}

/* ---------- Work ---------- */
.work-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.work-card {
    display: flex;
    flex-direction: column;
    padding: 26px;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

[data-theme="light"] .work-card {
    background: #fff;
}

.work-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.work-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.work-index {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

.work-year {
    font-size: 12px;
    letter-spacing: .5px;
    color: var(--muted);
}

.work-card h3 {
    margin-bottom: 10px;
    font-size: 20px;
}

.work-card p {
    flex: 1;
    margin-bottom: 16px;
    font-size: 14px;
}

.work-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.work-links a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    transition: color .2s ease;
}

.work-links a:hover {
    color: var(--primary);
}

/* ---------- Vlog CTA ---------- */
.vlog-cta {
    padding: 60px 0;
    background:
        linear-gradient(120deg, rgba(var(--primary-rgb), .12), var(--accent-soft));
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.vlog-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.vlog-cta .section-title {
    font-size: clamp(24px, 3.5vw, 34px);
}

/* ---------- Contact ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 28px;
    align-items: start;
}

.contact-cards {
    display: grid;
    gap: 14px;
}

.contact-card {
    display: block;
    padding: 22px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color .25s ease, transform .25s ease, background .25s ease;
}

.contact-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.contact-card i {
    font-size: 20px;
    color: var(--primary);
}

.contact-card h3 {
    margin: 10px 0 2px;
    font-size: 17px;
}

.contact-card p {
    font-size: 14px;
    color: var(--text);
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
}

.contact-card:hover .contact-link i {
    transform: translateX(4px);
}

.contact-link i {
    transition: transform .2s ease;
}

.contact-form {
    display: grid;
    gap: 14px;
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.hidden-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.field input,
.field textarea {
    width: 100%;
    padding: 14px 16px;
    font-family: var(--ff);
    font-size: 14px;
    color: var(--heading);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
    resize: vertical;
    transition: border-color .2s ease, box-shadow .2s ease;
}

[data-theme="light"] .field input,
[data-theme="light"] .field textarea {
    background: #fff;
}

.field input::placeholder,
.field textarea::placeholder {
    color: var(--muted);
}

.field input:focus,
.field textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.contact-form .btn {
    justify-self: start;
}

.form-success {
    display: none;
    padding: 12px 16px;
    font-size: 14px;
    color: #2bd576;
    background: rgba(43, 213, 118, .1);
    border: 1px solid rgba(43, 213, 118, .3);
    border-radius: 10px;
}

.form-success.show {
    display: block;
}

/* ---------- Footer ---------- */
.footer {
    padding: 56px 0 30px;
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    text-align: center;
}

.footer-logo {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -.5px;
    color: var(--heading);
}

.footer-logo span {
    color: var(--primary);
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 26px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-nav a {
    font-size: 14px;
    color: var(--text);
    transition: color .2s ease;
}

.footer-nav a:hover {
    color: var(--primary);
}

.footer-socials {
    display: flex;
    gap: 10px;
}

.footer-socials a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    transition: color .2s ease, border-color .2s ease, transform .2s ease;
}

.footer-socials a:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-3px);
}

.footer-copy {
    font-size: 13px;
    color: var(--muted);
}

/* ---------- Bottom nav ---------- */
.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 22px;
    z-index: 100;
    display: flex;
    gap: 4px;
    padding: 9px 11px;
    background: var(--nav-bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    backdrop-filter: blur(16px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
    transform: translateX(-50%);
}

[data-theme="light"] .bottom-nav {
    box-shadow: 0 18px 40px rgba(30, 50, 90, .18);
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 9px 14px;
    color: var(--text);
    border-radius: 999px;
    transition: color .2s ease, background .2s ease, transform .2s ease;
}

.bottom-nav a i {
    font-size: 16px;
}

.bottom-nav a span {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .3px;
}

.bottom-nav a:hover {
    color: var(--heading);
    transform: translateY(-2px);
}

.bottom-nav a.active {
    color: var(--grad-text);
    background: var(--grad);
    box-shadow: 0 10px 24px var(--primary-glow);
}

/* ---------- Back to top ---------- */
.to-top {
    position: fixed;
    right: 22px;
    bottom: 26px;
    z-index: 100;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--heading);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    backdrop-filter: blur(10px);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .25s ease, visibility .25s ease, transform .25s ease, color .25s ease;
}

.to-top.show {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.to-top:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* ---------- Reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .7s ease, transform .7s ease;
}

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

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 44px;
        text-align: center;
    }

    .hero-copy {
        order: 2;
    }

    .hero-portrait {
        order: 1;
    }

    .hero-lead {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions,
    .hero-socials {
        justify-content: center;
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .skills-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .work-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    body {
        padding-bottom: 88px;
    }

    .section {
        padding: 72px 0;
    }

    .bottom-nav {
        gap: 2px;
        padding: 7px 8px;
        bottom: 14px;
    }

    .bottom-nav a {
        padding: 8px 9px;
    }

    .bottom-nav a span {
        display: none;
    }

    .bottom-nav a i {
        font-size: 17px;
    }

    .to-top {
        right: 16px;
        bottom: 84px;
    }

    .theme-toggle {
        top: 16px;
        right: 16px;
    }

    .skills-grid,
    .services-grid,
    .work-grid,
    .about-stats,
    .about-facts {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .stat-num {
        font-size: 30px;
    }

    .hero {
        padding-top: 100px;
    }

    .vlog-cta-inner {
        justify-content: center;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }

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