/* ============================================
   THIBAUT MARCHAL — thibautmarchal.be
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--accent);
    color: var(--white);
}

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

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

/* --- Custom Properties --- */
:root {
    --black: #0a0a0a;
    --white: #f5f1eb;
    --accent: #c9a87e;
    --accent-hover: #dbbf99;
    --text-light: #ffffff;
    --text-dark: #1a1a1a;
    --text-muted: #888;
    --text-muted-dark: #666;
    --nav-scrolled: rgba(10, 10, 10, 0.88);
    --hero-overlay-1: rgba(10, 10, 10, 0.6);
    --hero-overlay-2: rgba(10, 10, 10, 0.75);
    --hero-overlay-3: rgba(10, 10, 10, 0.9);
    --timeline-text: rgba(255, 255, 255, 0.5);
    --border-footer: rgba(255, 255, 255, 0.04);
    --border-contact: rgba(255, 255, 255, 0.06);
    --border-contact-hover: rgba(201, 168, 126, 0.2);
    --contact-hover-bg: rgba(201, 168, 126, 0.04);
    --border-stat: rgba(26, 26, 26, 0.08);
    --tag-border: rgba(26, 26, 26, 0.12);
    --scrollbar-track: #0a0a0a;
    --font-display: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --nav-height: 5rem;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light theme */
[data-theme="light"] {
    --black: #f5f1eb;
    --white: #ffffff;
    --text-light: #1a1a1a;
    --text-dark: #1a1a1a;
    --text-muted: #777;
    --text-muted-dark: #555;
    --accent: #a88a5e;
    --accent-hover: #917545;
    --nav-scrolled: rgba(245, 241, 235, 0.92);
    --hero-overlay-1: rgba(245, 241, 235, 0.55);
    --hero-overlay-2: rgba(245, 241, 235, 0.7);
    --hero-overlay-3: rgba(245, 241, 235, 0.88);
    --timeline-text: rgba(26, 26, 26, 0.55);
    --border-footer: rgba(26, 26, 26, 0.06);
    --border-contact: rgba(26, 26, 26, 0.08);
    --border-contact-hover: rgba(201, 168, 126, 0.3);
    --contact-hover-bg: rgba(201, 168, 126, 0.06);
    --border-stat: rgba(26, 26, 26, 0.1);
    --tag-border: rgba(26, 26, 26, 0.15);
    --scrollbar-track: #f5f1eb;
}

body {
    font-family: var(--font-body);
    background: var(--black);
    color: var(--text-light);
    overflow-x: hidden;
    line-height: 1.6;
}

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

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

/* --- Grain Overlay --- */
.grain {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200vw;
    height: 200vh;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.03;
    filter: url(#grain-filter);
}

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 0 2rem;
    transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

.nav.scrolled {
    background: var(--nav-scrolled);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-height);
    max-width: 1400px;
    margin: 0 auto;
}

.nav__logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-light);
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
}

.nav__logo:hover {
    color: var(--accent);
}

.nav__links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav__links a {
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    position: relative;
    padding: 0.25rem 0;
    transition: color 0.3s ease;
}

.nav__links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.4s var(--ease-out-expo);
}

.nav__links a:hover,
.nav__links a.active {
    color: var(--accent);
}

.nav__links a:hover::after,
.nav__links a.active::after {
    width: 100%;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s ease, background 0.3s ease;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.theme-toggle:hover {
    border-color: var(--accent);
    background: rgba(201, 168, 126, 0.08);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--text-light);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.3s ease;
}

.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun { display: none; }

[data-theme="light"] .theme-toggle {
    border-color: rgba(26, 26, 26, 0.15);
}

[data-theme="light"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }

/* Light theme specific adjustments */
[data-theme="light"] .nav__cta {
    color: var(--white) !important;
}

[data-theme="light"] .marquee {
    background: var(--accent);
}

[data-theme="light"] .marquee__content span {
    color: #ffffff;
}

[data-theme="light"] .hero__scroll-line {
    background: rgba(26, 26, 26, 0.1);
}

[data-theme="light"] .btn--outline {
    border-color: rgba(26, 26, 26, 0.2);
    color: var(--text-light);
}

[data-theme="light"] .btn--outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

[data-theme="light"] .btn--primary {
    color: #ffffff;
}

[data-theme="light"] .about__image-wrapper::before {
    border-color: var(--accent);
}

[data-theme="light"] .footer__sep {
    opacity: 0.3;
}

/* Theme transition */
body.theme-transitioning,
body.theme-transitioning *,
body.theme-transitioning *::before,
body.theme-transitioning *::after {
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease !important;
}

/* Nav CTA button */
.nav__cta {
    background: var(--accent) !important;
    color: var(--black) !important;
    padding: 0.5rem 1.25rem !important;
    border-radius: 100px;
    font-weight: 600 !important;
    transition: background 0.3s ease, transform 0.3s ease !important;
}

.nav__cta::after {
    display: none !important;
}

.nav__cta:hover {
    background: var(--accent-hover) !important;
    color: var(--black) !important;
    transform: translateY(-1px);
}

/* --- Hamburger --- */
.nav__toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 28px;
    height: 18px;
    position: relative;
    z-index: 110;
}

.nav__toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-light);
    position: absolute;
    left: 0;
    transition: all 0.35s var(--ease-out-expo);
    border-radius: 1px;
}

.nav__toggle span:nth-child(1) { top: 0; }
.nav__toggle span:nth-child(2) { top: 8px; }
.nav__toggle span:nth-child(3) { top: 16px; }

.nav__toggle.active span:nth-child(1) {
    top: 8px;
    transform: rotate(45deg);
}

.nav__toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav__toggle.active span:nth-child(3) {
    top: 8px;
    transform: rotate(-45deg);
}

/* --- Mobile Menu --- */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: var(--black);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu ul {
    list-style: none;
    text-align: center;
}

.mobile-menu li {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s var(--ease-out-expo);
}

.mobile-menu.active li {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.active li:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active li:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu.active li:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu.active li:nth-child(4) { transition-delay: 0.4s; }

.mobile-menu a {
    font-family: var(--font-display);
    font-size: clamp(2rem, 7vw, 3.5rem);
    font-weight: 700;
    display: block;
    padding: 0.75rem 0;
    transition: color 0.3s ease;
}

.mobile-menu a:hover {
    color: var(--accent);
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--black);
}

/* Hero background (photo or video) */
.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.hero__media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        var(--hero-overlay-1) 0%,
        var(--hero-overlay-2) 50%,
        var(--hero-overlay-3) 100%
    );
}

.hero__blob {
    position: absolute;
    width: 60vw;
    height: 60vw;
    max-width: 800px;
    max-height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 168, 126, 0.1), transparent 70%);
    filter: blur(80px);
    animation: blob-float 25s ease-in-out infinite;
    pointer-events: none;
}

@keyframes blob-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25%      { transform: translate(8%, -12%) scale(1.05); }
    50%      { transform: translate(-6%, 6%) scale(0.95); }
    75%      { transform: translate(-10%, -4%) scale(1.03); }
}

.hero__content {
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 0 1rem;
}

.hero__title h1 {
    line-height: 0.88;
    margin: 0;
}

.hero__line {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(3.2rem, 11vw, 11rem);
    font-weight: 400;
    letter-spacing: -0.04em;
    overflow: hidden;
    padding-bottom: 0.1em;
}

.hero__line .char {
    display: inline-block;
    transform: translateY(115%);
    transition: transform 0.9s var(--ease-out-expo);
}

.hero__line.animate .char {
    transform: translateY(0);
}

.hero__line--bold {
    font-weight: 800;
    font-size: clamp(3.8rem, 13vw, 14rem);
    color: var(--accent);
}

.hero__subtitle {
    margin-top: 2.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease 1.4s, transform 1s ease 1.4s;
}

.hero__subtitle.animate {
    opacity: 1;
    transform: translateY(0);
}

.hero__subtitle p {
    font-family: var(--font-body);
    font-size: clamp(0.875rem, 1.8vw, 1.2rem);
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* Hero CTA */
.hero__cta {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 1rem;
    margin-top: 3rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease 1.8s, transform 1s ease 1.8s;
}

.hero__cta.animate {
    opacity: 1;
    transform: translateY(0);
}

.btn {
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 1rem 2.25rem;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.35s var(--ease-out-expo);
    display: inline-block;
    text-decoration: none;
    border: none;
}

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

.btn--primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(201, 168, 126, 0.3);
}

.btn--outline {
    background: transparent;
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn--outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

/* Scroll indicator */
.hero__scroll {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    opacity: 0;
    animation: fadeInUp 1s ease 2.2s forwards;
}

.hero__scroll-line {
    width: 1px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.hero__scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent);
    animation: scroll-line 2.4s ease-in-out infinite;
}

@keyframes scroll-line {
    0%   { top: -100%; }
    50%  { top: 100%; }
    100% { top: 100%; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* --- Marquee --- */
.marquee {
    background: var(--accent);
    padding: 1.1rem 0;
    overflow: hidden;
    white-space: nowrap;
}

.marquee__track {
    display: flex;
    width: max-content;
    animation: marquee-scroll 30s linear infinite;
}

.marquee__content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-right: 1.5rem;
    flex-shrink: 0;
}

.marquee__content span {
    font-family: var(--font-display);
    font-size: clamp(0.875rem, 1.5vw, 1.125rem);
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: 0.12em;
}

.marquee__dot {
    opacity: 0.5;
}

@keyframes marquee-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.marquee:hover .marquee__track {
    animation-play-state: paused;
}

/* --- Sections --- */
.section {
    padding: clamp(5rem, 12vw, 10rem) 2rem;
    position: relative;
}

.section--dark {
    background: var(--black);
    color: var(--text-light);
}

.section--light {
    background: var(--white);
    color: var(--text-dark);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

.section__label {
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 3rem;
    font-family: var(--font-body);
}

.section__title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 3.5rem;
    line-height: 1.1;
}

.section__title--dark {
    color: var(--text-dark);
}

/* --- About --- */
.about {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
}

.about__image-wrapper {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    isolation: isolate;
}

.about__image-wrapper::before {
    content: '';
    position: absolute;
    inset: -10px;
    border: 2px solid var(--accent);
    border-radius: 1.2rem;
    z-index: -1;
    transform: rotate(3deg);
    transition: transform 0.6s var(--ease-out-expo);
}

.about__image-wrapper:hover::before {
    transform: rotate(-2deg);
}

.about__image-wrapper img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    filter: grayscale(15%) contrast(1.05);
    transition: filter 0.6s ease, transform 0.6s var(--ease-out-expo);
}

.about__image-wrapper:hover img {
    filter: grayscale(0%) contrast(1);
    transform: scale(1.03);
}

.about__content h2 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.75rem;
    letter-spacing: -0.02em;
}

.about__content p {
    font-size: 1.0625rem;
    line-height: 1.85;
    color: var(--text-muted-dark);
    margin-bottom: 1rem;
}

.about__content p:last-of-type {
    margin-bottom: 0;
}

.about__content strong {
    color: var(--text-dark);
    font-weight: 600;
}

.about__content a {
    color: var(--accent);
    font-weight: 600;
    position: relative;
    transition: color 0.3s ease;
}

.about__content a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s var(--ease-out-expo);
}

.about__content a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* About Stats */
.about__stats {
    display: flex;
    gap: clamp(1.5rem, 3vw, 3rem);
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-stat);
}

.stat__number {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(2rem, 3vw, 2.75rem);
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.stat__label {
    font-size: 0.8125rem;
    color: var(--text-muted-dark);
    margin-top: 0.375rem;
    display: block;
}

/* --- Timeline --- */
.timeline {
    position: relative;
    padding-left: 3rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    bottom: 0;
    width: 1px;
    background: linear-gradient(
        to bottom,
        var(--accent),
        rgba(201, 168, 126, 0.3) 70%,
        rgba(201, 168, 126, 0.05)
    );
}

.timeline__item {
    position: relative;
    padding-bottom: 3.5rem;
    padding-left: 2rem;
}

.timeline__item:last-child {
    padding-bottom: 0;
}

.timeline__item::before {
    content: '';
    position: absolute;
    left: -3.4rem;
    top: 0.5rem;
    width: 9px;
    height: 9px;
    background: var(--accent);
    border-radius: 50%;
    border: 2px solid var(--bg-timeline, var(--black));
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline__item:hover::before {
    transform: scale(1.4);
    box-shadow: 0 0 0 4px rgba(201, 168, 126, 0.2);
}

.timeline__item--education::before {
    background: transparent;
    border: 2px solid var(--accent);
}

.timeline__date {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    font-family: var(--font-body);
}

.timeline__content h3 {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.timeline__content h3 a {
    transition: color 0.3s ease;
}

.timeline__content h3 a:hover {
    color: var(--accent);
}

.timeline__role {
    display: block;
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-style: italic;
}

.timeline__content p {
    font-size: 0.9375rem;
    line-height: 1.75;
    color: var(--timeline-text);
}

/* --- Skills --- */
.skills {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem 3rem;
}

.skills__group:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.skills__group h3 {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.skills__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    font-size: 0.875rem;
    padding: 0.5rem 1.15rem;
    border-radius: 100px;
    border: 1px solid var(--tag-border);
    color: var(--text-muted-dark);
    transition: all 0.35s var(--ease-out-expo);
    cursor: default;
    font-family: var(--font-body);
}

.tag:hover {
    background: var(--accent);
    color: var(--text-light);
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(201, 168, 126, 0.25);
}

/* --- Contact --- */
.section--contact {
    text-align: center;
}

.contact__title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 9vw, 8rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 0.95;
    margin-bottom: 4rem;
}

.contact__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    max-width: 650px;
    margin: 0 auto;
    text-align: left;
}

.contact__item {
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-contact);
    transition: border-color 0.35s ease, background 0.35s ease;
}

.contact__item:hover {
    border-color: var(--border-contact-hover);
    background: var(--contact-hover-bg);
}

.contact__label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.contact__item a {
    font-size: 1.0625rem;
    font-weight: 400;
    position: relative;
    transition: color 0.3s ease;
    display: inline-block;
}

.contact__item a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.4s var(--ease-out-expo);
}

.contact__item a:hover {
    color: var(--accent);
}

.contact__item a:hover::after {
    width: 100%;
}

/* --- Footer --- */
.footer {
    padding: 2rem;
    border-top: 1px solid var(--border-footer);
}

.footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.5;
    letter-spacing: 0.05em;
    max-width: 1100px;
    margin: 0 auto;
}

.footer__links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer__links a {
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.footer__links a:hover {
    color: var(--accent);
}

.footer__sep {
    opacity: 0.3;
}

/* --- Scroll Reveal Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.9s var(--ease-out-expo),
                transform 0.9s var(--ease-out-expo);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Custom Cursor (TM follows mouse, default arrow stays) --- */

.cursor-tm {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    margin-left: -20px;
    margin-top: -20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transition: width 0.35s var(--ease-out-expo),
                height 0.35s var(--ease-out-expo),
                margin 0.35s var(--ease-out-expo),
                background 0.35s ease,
                border-color 0.35s ease;
}

.cursor-tm span {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.55rem;
    color: var(--accent);
    letter-spacing: 0.02em;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.cursor-tm.hover {
    width: 60px;
    height: 60px;
    margin-left: -30px;
    margin-top: -30px;
    background: rgba(201, 168, 126, 0.08);
    border-color: rgba(201, 168, 126, 0.4);
}

.cursor-tm.hover span {
    opacity: 0.5;
    transform: scale(0.8);
}

/* --- Hero Letters Interactive --- */

/* --- Photo Subtle Shake --- */
.photo-shake {
    animation: subtle-shake 0.4s ease infinite;
}

@keyframes subtle-shake {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25%      { transform: translate(-1px, 0.5px) rotate(-0.3deg); }
    50%      { transform: translate(0.5px, -1px) rotate(0.2deg); }
    75%      { transform: translate(-0.5px, -0.5px) rotate(-0.1deg); }
}

/* --- Confetti --- */
.confetti {
    position: fixed;
    top: -20px;
    z-index: 10002;
    pointer-events: none;
    animation: confetti-fall ease-out forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateX(var(--drift)) translateY(100vh) rotate(var(--spin));
        opacity: 0;
    }
}

/* --- Easter Egg Toast --- */
.easter-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--accent);
    color: var(--black);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    padding: 1rem 2rem;
    border-radius: 100px;
    z-index: 10003;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s var(--ease-out-expo);
    white-space: nowrap;
}

.easter-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* --- Skip Link --- */
.skip-link {
    position: fixed;
    top: -100%;
    left: 1rem;
    z-index: 10001;
    background: var(--accent);
    color: var(--black);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.875rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 0.5rem 0.5rem;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}

/* --- Focus Styles --- */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 2px;
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .hero__blob {
        animation: none;
    }

    .marquee__track {
        animation: none;
    }

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

    .hero__line .char {
        transform: none;
    }

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

    .hero__scroll {
        opacity: 1;
    }

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

/* --- Responsive --- */
@media (max-width: 900px) {
    .about {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .about__image-wrapper {
        max-width: 340px;
        margin: 0 auto;
    }

    .skills {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    .nav__links {
        display: none;
    }

    .nav__toggle {
        display: block;
    }

    .nav__inner {
        gap: 0.75rem;
    }

    .theme-toggle {
        margin-left: auto;
        margin-right: 0.75rem;
    }

    .contact__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .timeline {
        padding-left: 2rem;
    }

    .timeline__item {
        padding-left: 1.25rem;
    }

    .timeline__item::before {
        left: -2.35rem;
    }

    .footer__inner {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .hero__cta {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }

    .about__stats {
        gap: 1.5rem;
    }

    .hero__scroll {
        bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 4rem 1.25rem;
    }

    .nav {
        padding: 0 1.25rem;
    }

    .hero__subtitle p {
        letter-spacing: 0.1em;
    }

    .about__stats {
        flex-wrap: wrap;
        gap: 1.25rem 1.5rem;
    }

    .stat {
        min-width: calc(50% - 1rem);
    }

    .contact__title {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }

    .marquee__content {
        gap: 1rem;
        padding-right: 1rem;
    }
}
