:root {
    color-scheme: dark;
    --bg: #07111f;
    --bg-secondary: #0c1728;
    --surface: rgba(11, 24, 40, 0.68);
    --surface-strong: rgba(12, 22, 36, 0.9);
    --surface-soft: rgba(255, 255, 255, 0.08);
    --text: #f5f7fb;
    --muted: #96a5bb;
    --border: rgba(255, 255, 255, 0.12);
    --accent: #7dd3fc;
    --accent-strong: #5eead4;
    --accent-warm: #f9a8d4;
    --shadow: 0 25px 80px rgba(3, 10, 20, 0.35);
    --radius-lg: 32px;
    --radius-md: 22px;
    --radius-sm: 16px;
    --container: min(1180px, calc(100vw - 2rem));
    --nav-height: 88px;
    --touch-target: 48px;
}

body.light {
    color-scheme: light;
    --bg: #f2f5fb;
    --bg-secondary: #e8eef9;
    --surface: rgba(255, 255, 255, 0.7);
    --surface-strong: rgba(255, 255, 255, 0.92);
    --surface-soft: rgba(14, 30, 54, 0.05);
    --text: #101828;
    --muted: #5f6e85;
    --border: rgba(16, 24, 40, 0.09);
    --accent: #2563eb;
    --accent-strong: #0f766e;
    --accent-warm: #db2777;
    --shadow: 0 30px 70px rgba(30, 41, 59, 0.12);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Manrope', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(125, 211, 252, 0.16), transparent 32%),
        radial-gradient(circle at top right, rgba(249, 168, 212, 0.15), transparent 30%),
        linear-gradient(180deg, var(--bg-secondary), var(--bg));
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.45s ease, color 0.3s ease;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input,
textarea {
    font: inherit;
}

button {
    border: 0;
    background: none;
}

::selection {
    background: rgba(125, 211, 252, 0.28);
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(125, 211, 252, 0.35);
    border-radius: 999px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
}

.page-noise {
    position: fixed;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.04) 0.6px, transparent 0.6px);
    background-size: 18px 18px;
    opacity: 0.14;
    mix-blend-mode: soft-light;
    pointer-events: none;
    z-index: -2;
}

.ambient {
    position: fixed;
    width: 34rem;
    height: 34rem;
    border-radius: 50%;
    filter: blur(22px);
    opacity: 0.26;
    pointer-events: none;
    z-index: -3;
    animation: floatBlob 16s ease-in-out infinite;
    will-change: transform;
}

.ambient-one {
    top: -12rem;
    left: -12rem;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.36), rgba(45, 212, 191, 0.1));
}

.ambient-two {
    top: 18%;
    right: -10rem;
    background: linear-gradient(135deg, rgba(244, 114, 182, 0.24), rgba(99, 102, 241, 0.18));
    animation-delay: -5s;
}

.ambient-three {
    bottom: -14rem;
    left: 25%;
    background: linear-gradient(135deg, rgba(45, 212, 191, 0.2), rgba(37, 99, 235, 0.2));
    animation-delay: -9s;
}

.preloader {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(4, 10, 18, 0.94);
    backdrop-filter: blur(18px);
    z-index: 1100;
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-mark {
    position: relative;
    width: 110px;
    height: 110px;
    display: grid;
    place-items: center;
}

.preloader-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-top-color: var(--accent);
    border-right-color: var(--accent-warm);
    animation: spin 1.1s linear infinite;
}

.preloader-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.7rem;
    letter-spacing: 0.18em;
}

.cursor-glow {
    position: fixed;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(125, 211, 252, 0.18), transparent 65%);
    transform: translate(-50%, -50%);
    z-index: 0;
    mix-blend-mode: screen;
    opacity: 0;
    transition: opacity 0.25s ease;
}

main,
section,
.hero-grid,
.about-grid,
.contact-layout,
.skills-layout,
.projects-grid,
.stats-grid,
.timeline-item,
.footer-shell,
.nav-shell {
    min-width: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

.nav-shell {
    width: var(--container);
    margin: 0 auto;
    min-height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.05rem;
    border: 1px solid var(--border);
    background: rgba(10, 18, 30, 0.54);
    backdrop-filter: blur(24px);
    border-radius: 999px;
    box-shadow: var(--shadow);
}

body.light .nav-shell {
    background: rgba(255, 255, 255, 0.75);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}

.brand-mark {
    width: 3rem;
    height: 3rem;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--accent), var(--accent-warm));
    color: white;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.brand-copy strong,
.section-heading h2,
.hero h1,
.profile-card h3,
.skills-card h3,
.project-body h3,
.timeline-card h3,
.contact-panel h3 {
    font-family: 'Space Grotesk', sans-serif;
}

.brand-copy strong {
    font-size: 0.98rem;
}

.brand-copy small {
    color: var(--muted);
    font-size: 0.8rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.nav-link,
.theme-toggle,
.nav-toggle {
    border-radius: 999px;
}

.nav-link {
    padding: 0.9rem 1rem;
    min-height: var(--touch-target);
    color: var(--muted);
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
    background: var(--surface-soft);
    transform: translateY(-1px);
}

.theme-toggle,
.nav-toggle {
    width: 3rem;
    height: 3rem;
    min-width: var(--touch-target);
    min-height: var(--touch-target);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.theme-toggle:hover,
.nav-toggle:hover,
.filter-btn:hover,
.overlay-btn:hover,
.social-row a:hover,
.footer-links a:hover {
    transform: translateY(-2px);
}

.nav-toggle {
    display: none;
    position: relative;
}

.nav-toggle span {
    position: absolute;
    width: 18px;
    height: 2px;
    background: currentColor;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle span:first-child {
    transform: translateY(-4px);
}

.nav-toggle span:last-child {
    transform: translateY(4px);
}

.nav-toggle.active span:first-child {
    transform: rotate(45deg);
}

.nav-toggle.active span:last-child {
    transform: rotate(-45deg);
}

.section {
    width: var(--container);
    margin: 0 auto;
    padding: 4.5rem 0;
    position: relative;
}

.hero {
    min-height: calc(100vh - 2rem - var(--nav-height));
    display: grid;
    align-items: center;
    padding-top: 2rem;
}

.hero-grid,
.about-grid,
.contact-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    align-items: center;
}

.hero-copy h1 {
    font-size: clamp(3rem, 8vw, 6.2rem);
    line-height: 0.95;
    margin: 1rem 0 1.4rem;
}

.intro-line {
    display: block;
    font-size: clamp(1.3rem, 2.7vw, 2rem);
    color: var(--muted);
    margin-bottom: 0.65rem;
}

.gradient-text,
.section-heading h2 {
    background: linear-gradient(135deg, var(--text), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.eyebrow,
.project-topline span,
.timeline-date,
.contact-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.type-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2rem;
    margin-bottom: 1.4rem;
    color: var(--accent-strong);
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    font-weight: 700;
}

.type-prefix {
    color: var(--accent-warm);
}

.typing-caret {
    width: 0.7rem;
    height: 1.35rem;
    border-radius: 4px;
    background: currentColor;
    animation: blink 0.9s ease infinite;
}

.hero-description,
.section-heading p,
.about-story p,
.project-body p,
.timeline-card p,
.contact-panel p,
.profile-card p,
.skills-note p,
.footer-shell p {
    color: var(--muted);
}

.hero-description {
    max-width: 58ch;
    font-size: 1.05rem;
    overflow-wrap: break-word;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 1rem 1.5rem;
    min-width: 170px;
    min-height: var(--touch-target);
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
    cursor: pointer;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #14b8a6, #ec4899);
    background-size: 220% 220%;
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.28);
    animation: gradientShift 9s ease infinite;
}

.btn-primary:hover {
    box-shadow: 0 22px 42px rgba(37, 99, 235, 0.36);
}

.btn-secondary {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
}

.hero-meta {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.hero-meta div,
.hero-code,
.floating-badge,
.skill-chip,
.project-tags span,
.stat-card,
.contact-item,
.social-row a,
.filter-btn,
.timeline-card,
.profile-points > div {
    border: 1px solid var(--border);
    background: var(--surface);
    backdrop-filter: blur(18px);
}

.hero-meta div {
    padding: 1rem 1.1rem;
    border-radius: 20px;
    min-width: 220px;
    flex: 1 1 220px;
}

.hero-meta strong,
.project-body h3,
.stat-number,
.contact-item strong,
.footer-links a {
    display: block;
    font-weight: 800;
}

.hero-meta span {
    display: block;
    margin-top: 0.3rem;
    color: var(--muted);
}

.hero-visual {
    position: relative;
}

.hero-orbital {
    position: relative;
    min-height: 640px;
    display: grid;
    place-items: center;
    width: 100%;
}

.glass-card {
    border: 1px solid var(--border);
    background: var(--surface);
    backdrop-filter: blur(22px);
    box-shadow: var(--shadow);
}

.hero-photo-card {
    width: min(440px, 100%);
    padding: 1rem;
    border-radius: 38px;
    position: relative;
    overflow: hidden;
}

.hero-photo-card::before,
.project-card::before,
.profile-card::before,
.skills-card::before,
.contact-form::before,
.contact-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 35%, transparent 65%, rgba(255, 255, 255, 0.08));
    opacity: 0.45;
    pointer-events: none;
}

.hero-photo-wrap {
    border-radius: 28px;
    overflow: hidden;
    aspect-ratio: 0.9;
}

.hero-photo-wrap img,
.project-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease;
}

.hero-photo-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 1.1rem 0.4rem 0.25rem;
}

.hero-photo-footer span {
    color: var(--muted);
}

.hero-code,
.floating-badge {
    position: absolute;
    padding: 0.95rem 1.15rem;
    border-radius: 20px;
}

.hero-code {
    right: -1rem;
    bottom: 1.5rem;
}

.hero-code span,
.floating-badge span {
    color: var(--muted);
    display: block;
    font-size: 0.9rem;
}

.floating-badge {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.floating-badge i,
.contact-item i,
.skills-note i {
    color: var(--accent);
}

.badge-top {
    top: 3rem;
    left: -1rem;
    animation: drift 8s ease-in-out infinite;
}

.badge-bottom {
    right: -2rem;
    top: 50%;
    animation: drift 7s ease-in-out infinite reverse;
}

.scroll-indicator {
    position: absolute;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.scroll-line {
    width: 1px;
    height: 70px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), var(--accent));
    animation: bounceLine 1.8s ease-in-out infinite;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 2rem;
    min-width: 0;
}

.section-heading h2 {
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.02;
    margin: 1rem 0 1rem;
}

.about-grid {
    align-items: stretch;
}

.profile-card,
.about-story,
.skills-card,
.project-card,
.contact-panel,
.contact-form {
    position: relative;
    border-radius: var(--radius-lg);
    min-width: 0;
}

.profile-card,
.skills-card,
.contact-panel,
.contact-form {
    padding: 1.6rem;
}

.profile-card-top {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.4rem;
}

.profile-card-top img {
    width: 92px;
    height: 92px;
    border-radius: 24px;
    object-fit: cover;
}

.profile-points {
    display: grid;
    gap: 1rem;
}

.profile-points > div {
    padding: 1rem;
    border-radius: 18px;
}

.label {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    margin-bottom: 0.35rem;
}

.about-story {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stats-grid,
.projects-grid,
.skills-layout {
    display: grid;
    gap: 1.25rem;
}

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

.stat-card {
    padding: 1.25rem;
    border-radius: 24px;
    text-align: center;
}

.stat-number {
    font-size: clamp(2rem, 4vw, 2.8rem);
}

.stat-label {
    color: var(--muted);
}

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

.skills-card-head {
    margin-bottom: 1.3rem;
}

.skills-card-head span {
    color: var(--muted);
}

.chip-grid,
.project-tags,
.footer-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.skill-list {
    margin-top: 0.4rem;
}

.skill-chip,
.project-tags span,
.filter-btn {
    padding: 0.7rem 0.95rem;
    min-height: var(--touch-target);
    border-radius: 999px;
}

.skills-note {
    margin-top: 1.2rem;
    display: flex;
    gap: 0.85rem;
    padding: 1rem;
    border-radius: 18px;
    background: rgba(125, 211, 252, 0.08);
    border: 1px solid rgba(125, 211, 252, 0.18);
}

.project-filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.6rem;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.filter-btn.active {
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #14b8a6);
}

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

.project-card {
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
    transform-style: preserve-3d;
}

.project-card.is-hidden {
    display: none;
}

.project-media {
    position: relative;
    height: clamp(220px, 28vw, 260px);
    overflow: hidden;
}

.project-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(180deg, transparent 40%, rgba(6, 10, 18, 0.84));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.project-card:hover .project-overlay,
.project-card:focus-within .project-overlay {
    opacity: 1;
}

.project-card:hover .project-media img,
.project-card:focus-within .project-media img {
    transform: scale(1.08);
}

.overlay-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    min-height: var(--touch-target);
    padding: 0.8rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
    color: #fff;
    transition: transform 0.25s ease, background 0.25s ease;
}

.project-body {
    padding: 1.4rem;
}

.project-topline {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.95rem;
}

.project-body h3 {
    font-size: 1.55rem;
    margin-bottom: 0.7rem;
}

.timeline {
    position: relative;
    display: grid;
    gap: 1.25rem;
    margin-top: 2rem;
}

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

.timeline-item {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 1rem;
    align-items: start;
}

.timeline-dot {
    width: 34px;
    height: 34px;
    margin-top: 1rem;
    border-radius: 50%;
    border: 8px solid rgba(125, 211, 252, 0.18);
    background: var(--accent);
    box-shadow: 0 0 0 10px rgba(125, 211, 252, 0.08);
}

.timeline-card {
    padding: 1.5rem;
    border-radius: var(--radius-md);
    transition: transform 0.25s ease;
}

.timeline-card:hover {
    transform: translateX(5px);
}

.contact-layout {
    align-items: stretch;
}

.contact-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.5rem;
}

.contact-list {
    display: grid;
    gap: 0.9rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.1rem;
    min-height: var(--touch-target);
    border-radius: 20px;
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.contact-item span {
    display: block;
    color: var(--muted);
    font-size: 0.88rem;
}

.contact-item:hover,
.social-row a:hover {
    border-color: rgba(125, 211, 252, 0.3);
    background: rgba(125, 211, 252, 0.1);
}

.social-row {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.social-row a {
    width: 3.2rem;
    height: 3.2rem;
    min-width: var(--touch-target);
    min-height: var(--touch-target);
    display: grid;
    place-items: center;
    border-radius: 50%;
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 10px 24px rgba(3, 10, 20, 0.14);
}

.contact-form {
    display: grid;
    gap: 1rem;
}

.field-group {
    position: relative;
}

.field-group input,
.field-group textarea {
    width: 100%;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    min-height: var(--touch-target);
    padding: 1.5rem 1rem 0.9rem;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

body.light .field-group input,
body.light .field-group textarea {
    background: rgba(255, 255, 255, 0.66);
}

.field-group textarea {
    resize: vertical;
    min-height: 160px;
}

.field-group label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: var(--muted);
    pointer-events: none;
    transition: transform 0.2s ease, color 0.2s ease, font-size 0.2s ease;
}

.field-group input:focus,
.field-group textarea:focus,
.field-group input:not(:placeholder-shown),
.field-group textarea:not(:placeholder-shown) {
    outline: none;
    border-color: rgba(125, 211, 252, 0.45);
    box-shadow: 0 0 0 5px rgba(125, 211, 252, 0.08);
}

.field-group input:focus + label,
.field-group textarea:focus + label,
.field-group input:not(:placeholder-shown) + label,
.field-group textarea:not(:placeholder-shown) + label {
    transform: translateY(-0.52rem);
    color: var(--accent);
    font-size: 0.75rem;
}

.submit-btn {
    width: 100%;
    margin-top: 0.4rem;
}

.submit-btn i {
    transition: transform 0.25s ease;
}

.submit-btn:hover i {
    transform: translate(3px, -3px);
}

.form-message {
    padding: 1rem;
    border-radius: 18px;
    font-weight: 700;
}

.form-message.success {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.form-message.error {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.site-footer {
    padding: 0 0 2.5rem;
}

.footer-shell {
    width: var(--container);
    margin: 0 auto;
    padding: 1.4rem 1.5rem;
    border-radius: 28px;
    border: 1px solid var(--border);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.footer-shell > * {
    min-width: 0;
}

.footer-links a {
    color: var(--muted);
    transition: color 0.25s ease;
}

.footer-links a:hover {
    color: var(--text);
}

.reveal {
    opacity: 0;
    transform: translateY(34px);
    transition: opacity 0.7s ease, transform 0.7s ease;
    transition-delay: var(--reveal-delay, 0s);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

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

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes drift {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes bounceLine {
    0%, 100% { transform: scaleY(0.7); opacity: 0.6; }
    50% { transform: scaleY(1); opacity: 1; }
}

@keyframes floatBlob {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(24px, -28px, 0) scale(1.08); }
}

@media (max-width: 1080px) {
    .hero-grid,
    .about-grid,
    .contact-layout,
    .skills-layout,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .hero-orbital {
        min-height: 520px;
    }

    .hero-copy,
    .hero-visual,
    .about-story,
    .contact-panel,
    .contact-form {
        width: 100%;
    }

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

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

@media (max-width: 840px) {
    .site-header {
        padding: 0.75rem 0;
    }

    .nav-shell {
        min-height: 74px;
        border-radius: 28px;
        align-items: center;
        flex-wrap: wrap;
        row-gap: 0.5rem;
    }

    .nav-toggle {
        display: inline-flex;
        order: 2;
    }

    .theme-toggle {
        order: 1;
        margin-left: auto;
    }

    .site-nav {
        width: 100%;
        order: 3;
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.4rem;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transform: translateY(-8px);
        transition: max-height 0.35s ease, opacity 0.25s ease, transform 0.25s ease, padding-top 0.25s ease;
    }

    .site-nav.open {
        max-height: 520px;
        opacity: 1;
        transform: translateY(0);
        padding-top: 0.85rem;
    }

    .nav-link {
        width: 100%;
        padding: 1rem;
        border-radius: 18px;
        justify-content: flex-start;
    }

    .hero {
        padding-top: 1rem;
        min-height: auto;
    }

    .hero-grid {
        padding-top: 1rem;
        gap: 1.5rem;
    }

    .hero-copy h1 {
        font-size: clamp(2.6rem, 12vw, 4.4rem);
    }

    .hero-orbital {
        min-height: auto;
        padding-top: 2rem;
        padding-bottom: 4rem;
    }

    .hero-code,
    .badge-top,
    .badge-bottom {
        position: relative;
        inset: auto;
        margin-top: 1rem;
    }

    .stats-grid,
    .projects-grid,
    .skills-layout {
        grid-template-columns: 1fr;
    }

    .project-filters {
        gap: 0.6rem;
    }

    .footer-shell {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    :root {
        --container: min(100vw - 1.2rem, 100%);
    }

    .section {
        padding: 3.5rem 0;
    }

    .nav-shell,
    .footer-shell {
        padding-inline: 1rem;
    }

    .site-header {
        padding: 0.6rem 0;
    }

    .brand-copy small {
        display: none;
    }

    .brand-mark {
        width: 2.75rem;
        height: 2.75rem;
    }

    .brand-copy strong {
        font-size: 0.92rem;
    }

    .hero-copy {
        text-align: left;
    }

    .eyebrow,
    .project-topline span,
    .timeline-date,
    .contact-kicker {
        font-size: 0.72rem;
        letter-spacing: 0.08em;
    }

    .type-row {
        min-height: 2.5rem;
        font-size: 1rem;
    }

    .hero-meta div,
    .profile-card,
    .skills-card,
    .contact-panel,
    .contact-form,
    .timeline-card,
    .project-body {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero-meta {
        flex-direction: column;
    }

    .hero-meta div {
        min-width: 100%;
    }

    .hero-actions,
    .project-filters,
    .chip-grid,
    .project-tags,
    .social-row,
    .footer-links {
        width: 100%;
    }

    .hero-actions .btn,
    .overlay-btn,
    .filter-btn {
        width: 100%;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-photo-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-card-top {
        align-items: flex-start;
    }

    .profile-card-top img {
        width: 76px;
        height: 76px;
    }

    .skills-card,
    .contact-panel,
    .contact-form,
    .profile-card,
    .timeline-card {
        padding-top: 1.2rem;
        padding-bottom: 1.2rem;
    }

    .project-overlay {
        opacity: 1;
        align-items: flex-end;
        background: linear-gradient(180deg, transparent 35%, rgba(6, 10, 18, 0.72));
    }

    .project-overlay .overlay-btn {
        width: auto;
        flex: 1 1 0;
        min-width: 0;
    }

    .project-media {
        height: 220px;
    }

    .timeline-item {
        grid-template-columns: 26px 1fr;
        gap: 0.85rem;
    }

    .timeline::before {
        left: 12px;
    }

    .timeline-dot {
        width: 26px;
        height: 26px;
        border-width: 6px;
        box-shadow: 0 0 0 6px rgba(125, 211, 252, 0.08);
    }

    .contact-item {
        align-items: flex-start;
    }

    .social-row a {
        width: calc(50% - 0.425rem);
        border-radius: 18px;
    }

    .scroll-indicator {
        display: none;
    }
}

@media (max-width: 480px) {
    :root {
        --container: min(100vw - 1rem, 100%);
    }

    .section {
        padding: 3rem 0;
    }

    .nav-shell {
        padding: 0.8rem;
        border-radius: 24px;
    }

    .hero-copy h1 {
        font-size: clamp(2.2rem, 13vw, 3.2rem);
    }

    .intro-line {
        font-size: clamp(1.05rem, 5vw, 1.35rem);
    }

    .hero-description,
    .section-heading p,
    .about-story p,
    .project-body p,
    .timeline-card p,
    .contact-panel p {
        font-size: 0.97rem;
    }

    .section-heading h2 {
        font-size: clamp(1.7rem, 9vw, 2.3rem);
    }

    .project-media {
        height: 200px;
    }

    .project-body {
        padding: 1rem;
    }

    .overlay-btn {
        padding-inline: 0.85rem;
    }

    .skill-chip,
    .project-tags span,
    .filter-btn {
        width: 100%;
        justify-content: center;
    }

    .social-row a {
        width: 100%;
    }
}

@media (hover: none) and (pointer: coarse) {
    .cursor-glow,
    .ambient {
        display: none;
    }

    .project-card,
    .timeline-card,
    .contact-item,
    .social-row a,
    .filter-btn,
    .btn,
    .nav-link {
        transition-duration: 0.18s;
    }

    .project-card:hover,
    .timeline-card:hover,
    .contact-item:hover,
    .social-row a:hover,
    .filter-btn:hover,
    .btn:hover,
    .nav-link:hover {
        transform: none;
    }
}

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

    *,
    *::before,
    *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
        scroll-behavior: auto !important;
    }
}
