/* Local Fonts */
@font-face {
    font-family: 'Bebas Neue';
    src: url('../fonts/bebas-neue.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-400.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-500.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-600.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Playfair Display';
    src: url('../fonts/playfair-regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Playfair Display';
    src: url('../fonts/playfair-italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

/* Prevent CSS transitions on page load */
.preload,
.preload * {
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -ms-transition: none !important;
    -o-transition: none !important;
    transition: none !important;
}

/* Touch Action Optimization for Instant Click Response */
a,
button,
input,
textarea,
.filter-pill,
.skill-item,
.project-card,
.timeline-card {
    touch-action: manipulation;
}

:root {
    --primary-color: #000000;
    --bg-color: #f8f9fb;
    --text-color: #111111;
    --text-color-light: #4b5563;
    --text-color-medium: #374151;
    --gradient-center: rgba(255, 233, 168, 0.2);
    --nav-color: #333333;
    --bg-overlay: #f8f9fb;
    --card-bg: #ffffff;
    --card-hover-bg: #ffffff;
    --border-color: rgba(0, 0, 0, 0.06);
    --badge-bg: rgba(255, 255, 255, 0.65);
    --fade-bottom: linear-gradient(to bottom, rgba(248, 249, 251, 0) 0%, rgba(248, 249, 251, 1) 90%);
    --bg-text-color: #111111;
    --bg-text-opacity: 0.04;
    --btn-text: #ffffff;
    --placeholder-bg: #ffffff;
    --placeholder-hover: #f3f4f6;

    /* Premium Shadow System */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.02);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.03);

    --font-serif: 'Playfair Display', Georgia, Cambria, 'Times New Roman', Times, serif;
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-display: 'Bebas Neue', 'Arial Narrow', 'Trebuchet MS', Impact, sans-serif;

    --bento-hover-border: rgba(0, 0, 0, 0.25);
    --bento-highlight-hover-border: rgba(0, 0, 0, 0.45);
    --bento-hover-accent: #000000;

    --accent-color: #ff7a00;
    --accent-color-glow: rgba(255, 122, 0, 0.2);
    --accent-color-translucent: rgba(255, 122, 0, 0.06);

    /* Standardized Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    /* Custom Transitions & Bezier Curves */
    --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out: cubic-bezier(0.25, 1, 0.5, 1);
    --transition-smooth: 0.4s var(--ease-expo);
    --transition-fast: 0.2s var(--ease-out);

    /* Apple VisionOS Liquid Glass Material System - Light Mode */
    --apple-glass-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.2) 100%);
    --apple-glass-border: 1px solid rgba(255, 255, 255, 0.22);
    --apple-glass-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -1px 0 rgba(0, 0, 0, 0.02), 0 8px 30px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
    --apple-glass-blur: blur(35px) saturate(180%) brightness(101%);
    --apple-glass-shadow-hover: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -1px 0 rgba(0, 0, 0, 0.03), 0 16px 40px rgba(0, 0, 0, 0.05), 0 2px 6px rgba(0, 0, 0, 0.03);
    --apple-glass-arrow-bg: rgba(255, 255, 255, 0.22);
}

body.dark-mode {
    --primary-color: #ffffff;
    --bg-color: #000000;
    --text-color: #ffffff;
    --text-color-light: #aaaaaa;
    --text-color-medium: #dddddd;
    --gradient-center: rgba(255, 255, 255, 0.08);
    --nav-color: #cccccc;
    --bg-overlay: #000000;
    --card-bg: rgba(20, 20, 20, 0.5);
    --card-hover-bg: #0c0c0c;
    --border-color: rgba(255, 255, 255, 0.08);
    --badge-bg: rgba(20, 20, 20, 0.85);
    --fade-bottom: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, #000000 90%);
    --bg-text-color: #ffffff;
    --bg-text-opacity: 0.02;
    --btn-text: #000000;
    --placeholder-bg: #111111;
    --placeholder-hover: #1a1a1a;

    /* Soft Dark Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.6), 0 4px 16px rgba(0, 0, 0, 0.4);

    --bento-hover-border: rgba(255, 255, 255, 0.25);
    --bento-highlight-hover-border: rgba(255, 255, 255, 0.5);
    --bento-hover-accent: #ffffff;

    /* Apple VisionOS Liquid Glass Material System - Dark Mode */
    --apple-glass-bg: linear-gradient(135deg, rgba(15, 15, 15, 0.3) 0%, rgba(15, 15, 15, 0.12) 100%);
    --apple-glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --apple-glass-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.03), 0 16px 40px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.15);
    --apple-glass-blur: blur(35px) saturate(190%) brightness(95%);
    --apple-glass-shadow-hover: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 24px 50px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.2);
    --apple-glass-arrow-bg: rgba(15, 15, 15, 0.12);
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body.has-custom-cursor,
body.has-custom-cursor * {
    cursor: none;
}

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

/* Screen reader only text */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    position: relative;
    width: 100%;
    transition: background-color 0.4s ease, color 0.4s ease;
}

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

ul {
    list-style: none;
}

/* Background Gradient - Fixed behind everything */
.gradient-bg {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    height: 80vh;
    background: radial-gradient(circle, var(--gradient-center) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: -2;
    pointer-events: none;
    transition: background 0.4s ease;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5rem;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: var(--bg-overlay);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.logo {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 2.2rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--text-color);
}

nav ul {
    display: flex;
    gap: 1rem;
    /* Reduced to compensate for padding */
}

nav a {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--nav-color);
    transition: color 0.3s ease;
    padding: 1rem 1.5rem;
    /* Larger clickable area */
    display: inline-block;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0.8rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
    border-radius: 2px;
}

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

nav a:hover::after,
nav a.active::after {
    width: 40%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.menu-toggle {
    display: none !important;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

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

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
}

.contact-btn {
    background-color: var(--primary-color);
    color: var(--btn-text);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid transparent;
    transition: box-shadow var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transform: none !important;
}

@media (hover: hover) and (min-width: 901px) {
    .contact-btn:hover {
        transform: none !important;
        box-shadow: var(--shadow-md);
        opacity: 0.92;
    }

    .contact-btn:active {
        transform: none !important;
    }
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    transform: none !important;
}

@media (hover: hover) and (min-width: 901px) {
    .theme-toggle:hover {
        background-color: var(--primary-color);
        color: var(--btn-text);
        transform: none !important;
        box-shadow: var(--shadow-sm);
    }
}

/* Theme toggle icons */
.theme-toggle .moon-icon {
    display: block;
}

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

body.dark-mode .theme-toggle .moon-icon {
    display: none;
}

body.dark-mode .theme-toggle .sun-icon {
    display: block;
}

/* Base Layout */
main {
    width: 100%;
}

/* HERO SECTION (100vh) */
.hero {
    height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 100px max(1.5rem, 5vw) 2rem max(1.5rem, 5vw);
    position: relative;
    overflow: hidden;
}



/* Middle Elements */
.hero-middle {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    pointer-events: none;
    z-index: 10;
    margin-bottom: 12vh;
}

.availability-badge {
    background: var(--apple-glass-bg);
    backdrop-filter: var(--apple-glass-blur);
    -webkit-backdrop-filter: var(--apple-glass-blur);
    border: var(--apple-glass-border);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--apple-glass-shadow);
    color: var(--text-color);
    pointer-events: auto;
    transition: background-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
}

.availability-badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--apple-glass-shadow-hover);
}

.availability-badge .dot {
    width: 10px;
    height: 10px;
    background-color: var(--accent-color);
    border-radius: 50%;
    position: relative;
}

.availability-badge .dot::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    width: 18px;
    height: 18px;
    background-color: rgba(255, 122, 0, 0.3);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.specialization {
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.6;
    max-width: 250px;
    color: var(--text-color-medium);
    transition: color 0.4s ease;
    text-align: right;
    align-self: flex-end;
    margin-bottom: 3rem;
    pointer-events: auto;
}

/* Profile Image */
.profile-container {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 85vh;
    max-height: calc(100dvh - 120px);
    z-index: 2;
    display: flex;
    align-items: flex-end;
    pointer-events: none;
}

.profile-img {
    height: 100%;
    width: auto;
    aspect-ratio: 2556 / 4108;
    object-fit: contain;
    object-position: bottom;
}

.fade-bottom {
    position: absolute;
    bottom: 0;
    left: -10%;
    width: 120%;
    height: 20vh;
    background: var(--fade-bottom);
    z-index: 3;
    pointer-events: none;
    transition: background 0.4s ease;
}

/* Bottom Large Texts */
.hero-bottom {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 4;
}

@media (min-width: 768px) {
    .hero-bottom {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }
}

.left-text {
    font-family: var(--font-display);
    font-size: clamp(3rem, 9vw, 10rem);
    line-height: 0.9;
    font-weight: 400;
    /* Prevent browser h1 faux-bolding */
    color: var(--text-color);
    transition: color 0.4s ease;
    white-space: nowrap;
}

.right-text {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 4.5rem);
    line-height: 1;
    font-weight: 400;
    /* Prevent browser h2 faux-bolding */
    text-align: left;
    color: var(--text-color);
    transition: color 0.4s ease;
    white-space: nowrap;
}

/* SECTIONS COMMON */
.section-padding {
    padding: clamp(3.2rem, 5vw, 4.5rem) max(1.5rem, 5vw) clamp(4rem, 6.5vw, 6rem) max(1.5rem, 5vw);
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.section-title {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-bottom: clamp(2.5rem, 4.8vw, 4rem);
    color: var(--text-color);
    transition: color 0.4s var(--ease-expo);
}

.large-text {
    font-size: clamp(1.4rem, 2.5vw, 2.2rem);
    line-height: 1.55;
    font-weight: 400;
    letter-spacing: -0.015em;
    color: var(--text-color-medium);
    max-width: 50ch;
    /* Constrain for comfortable line length and breathing room */
    transition: color 0.4s var(--ease-expo);
}

.large-text strong {
    font-weight: 600;
    color: var(--accent-color);
}

.about,
.skills,
.projects,
.journey {
    display: block;
    box-sizing: border-box;
    scroll-margin-top: 105px;
}

/* About Grid & Column Layout */
.about-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: clamp(3rem, 6vw, 6rem);
    align-items: center;
}

.about-paragraph {
    font-size: clamp(1.1rem, 1.8vw, 1.35rem);
    line-height: 1.75;
    color: var(--text-color-medium);
    margin-bottom: 1.8rem;
    max-width: 60ch;
    transition: color 0.4s var(--ease-expo);
}

.about-paragraph strong {
    font-weight: 600;
    color: var(--accent-color);
}

.about-illustration-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-illustration {
    width: 100%;
    height: auto;
    aspect-ratio: 950 / 847;
    max-width: 450px;
    display: block;
}

/* Responsiveness for About Grid */
@media (max-width: 991px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}



/* SKILLS SECTION */
.skills {
    position: relative;
    overflow: hidden;
}

/* Cinematic soft glow backdrop */
.skills::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(80vw, 800px);
    height: min(80vw, 800px);
    background: radial-gradient(circle, rgba(0, 0, 0, 0.015) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
    pointer-events: none;
    transition: background 0.4s ease;
}

body.dark-mode .skills::before {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0) 70%);
}

/* Category Filter Navigation */
.skills-filter {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 4rem;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
    -ms-overflow-style: none;
    /* Hide scrollbar IE/Edge */
    padding-bottom: 0.5rem;
    width: 100%;
}

.skills-filter::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Safari/Chrome */
}

.filter-pill {
    background: transparent;
    padding: 0.6rem 1.6rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-weight: 500;
    font-size: 0.9rem;
    font-family: var(--font-sans);
    color: var(--text-color-medium);
    transition: transform var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
    cursor: pointer;
    white-space: nowrap;
}

/* Light mode hover state */
@media (hover: hover) and (min-width: 901px) {
    .filter-pill:hover {
        background-color: var(--placeholder-hover);
        color: var(--text-color);
        transform: translateY(-1px);
    }
}

/* Active Pill styles */
/* Light Mode Active */
.filter-pill.active {
    background-color: #000000;
    color: #ffffff;
    border-color: #000000;
}

/* Dark Mode Active */
body.dark-mode .filter-pill.active {
    background-color: #ffffff;
    color: #000000;
    border-color: #ffffff;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4rem 3rem;
    max-width: 1000px;
    width: 100%;
    position: relative;
    min-height: 380px;
    /* Preserve height to prevent jumps */
}

/* Skill Item */
.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    cursor: pointer;
    transition: filter 0.4s ease, opacity 0.4s ease, transform 0.4s ease;
}

.skill-item img {
    width: 100%;
    max-width: 80px;
    aspect-ratio: 1;
    object-fit: contain;
    opacity: 0.9;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05));
    transition: filter 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.skill-item span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color-light);
    transition: color 0.4s ease;
}

/* Dark mode handling for Grayscale Logos (e.g. GitHub, Vercel) */
body.dark-mode .skill-item img.invert-dark {
    filter: invert(1);
}

/* Hover Animations - Desktop only */
@media (hover: hover) and (min-width: 901px) {
    .skill-item:hover img {
        transform: translateY(-5px) scale(1.08);
        opacity: 1;
        filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.1));
    }

    body.dark-mode .skill-item:hover img.invert-dark {
        filter: invert(1) drop-shadow(0 8px 16px rgba(255, 255, 255, 0.12));
    }

    .skill-item:hover span {
        color: var(--text-color);
    }
}

/* Filtering Animation Classes */
.skill-item.hidden {
    display: none !important;
}



/* Responsive Overrides */
@media (max-width: 900px) {
    .skills-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 3.5rem 2.5rem;
        min-height: 520px;
    }
}

/* PROJECTS SECTION */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(2rem, 4vw, 3.5rem);
    max-width: 1000px;
    margin: 3rem auto;
}

/* CONTACT SECTION (Full Viewport Fit - All Elements Visible at Once) */
/* CONTACT SECTION */
.contact {
    min-height: 100dvh;
    padding: calc(90px + 1vh) max(1.5rem, 5vw) clamp(1.5rem, 2.5vh, 2.5rem) max(1.5rem, 5vw) !important;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-margin-top: 90px;
}

.contact .section-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact .section-title {
    font-size: clamp(3.2rem, 5.8vw, 4.8rem);
    margin-bottom: 1.1rem;
    line-height: 1.1;
}

.contact .large-text {
    font-size: clamp(1.25rem, 2vw, 1.6rem);
    line-height: 1.5;
    margin-bottom: 2.2rem;
    max-width: 50ch;
}

.contact-links {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    gap: 2.2rem;
}

.email-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    position: relative;
}

.email-hint {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    background: var(--apple-glass-bg);
    backdrop-filter: var(--apple-glass-blur);
    -webkit-backdrop-filter: var(--apple-glass-blur);
    border: var(--apple-glass-border);
    padding: 0.52rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: var(--apple-glass-shadow);
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

/* Tooltip pointer pointing down to the email */
.email-hint::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 2.5rem;
    width: 10px;
    height: 10px;
    background: var(--apple-glass-arrow-bg);
    border-right: 1px solid rgba(255, 255, 255, 0.22);
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
    transform: rotate(45deg);
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

body.dark-mode .email-hint::after {
    border-color: rgba(255, 255, 255, 0.08);
}

.email-hint .hint-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-color);
    border-radius: 50%;
    position: relative;
    display: inline-block;
}

.email-hint .hint-dot::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    width: 16px;
    height: 16px;
    background-color: var(--accent-color-glow);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.email-container:hover .email-hint {
    transform: translateY(-3px);
}

.big-link {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 6.2vw, 6.6rem);
    line-height: 1;
    letter-spacing: -0.01em;
    transition: color 0.3s;
    color: var(--text-color);
    white-space: nowrap;
    word-break: normal;
    position: relative;
    display: inline-block;
    padding-bottom: 0.2rem;
    max-width: 100%;
}

.big-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.big-link:hover::after {
    transform: scaleX(1);
}

/* Dark mode handling for icons */
body.dark-mode .invert-dark {
    filter: invert(1);
}

/* =========================================================
   SOCIAL LINKS
   ========================================================= */

.social-links {
    display: flex;
    gap: clamp(2.2rem, 4.5vw, 5rem);
    margin-top: 0;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
}

.social-links a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.55rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    position: relative;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.25s ease, transform 0.25s ease;
}

.social-links a svg,
.social-links a img {
    width: 33px;
    height: 33px;
    object-fit: contain;
    display: block;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-links a .github-svg {
    fill: #181717;
}

body.dark-mode .social-links a .github-svg {
    fill: #ffffff;
}

.social-links a:hover {
    color: var(--text-color);
    transform: translateY(-4px);
}

.social-links a:hover svg,
.social-links a:hover img {
    transform: scale(1.18);
}

.social-links a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--text-color);
    transition: width 0.3s ease;
}

.social-links a:hover::after {
    width: 100%;
}

/* ANIMATIONS */
.reveal {
    opacity: 0;
    visibility: hidden;
    will-change: opacity, transform;
}

.reveal.active {
    opacity: 1;
    visibility: visible;
    will-change: auto;
}

.fade-up {
    transform: translate3d(0, 30px, 0);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s;
}

.slide-up {
    transform: translate3d(0, 40px, 0);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s;
}

.reveal.active.fade-up,
.reveal.active.slide-up {
    transform: translate3d(0, 0, 0);
}

.reveal.active[style*="--delay"] {
    transition-delay: var(--delay);
}

/* Custom Cursor */
.cursor {
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 100000;
    /* Keeps cursor on top of the modal */
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background-color 0.4s ease;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 99999;
    /* Keeps cursor follower on top of the modal overlay */
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s, border-color 0.3s;
    transition-timing-function: ease-out;
}

body.dark-mode .cursor-follower {
    border-color: rgba(255, 255, 255, 0.3);
}

.cursor-hover .cursor {
    width: 0;
    height: 0;
}

.cursor-hover .cursor-follower {
    width: 60px;
    height: 60px;
    background-color: var(--border-color);
    border-color: var(--text-color);
}

/* STAGGERED TIMELINE JOURNEY REDESIGN */

.journey-header-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 5rem;
}

.journey-header-grid .section-title {
    margin-bottom: 0;
}



.timeline-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--border-color) 8%, var(--border-color) 92%, transparent);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    margin-bottom: 4rem;
    position: relative;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item.left {
    justify-content: flex-start;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 16px;
    height: 16px;
    background: var(--card-bg);
    border: 3px solid var(--text-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    transition: transform var(--transition-smooth), background-color var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.timeline-item:hover .timeline-dot {
    background: var(--text-color);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.08);
    transform: translate(-50%, -50%) scale(1.2);
}

body.dark-mode .timeline-item:hover .timeline-dot {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
}

.timeline-item.highlight:hover .timeline-dot {
    background: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 20px var(--accent-color-glow);
}

body.dark-mode .timeline-item.highlight:hover .timeline-dot {
    background: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(255, 122, 0, 0.4);
}

.timeline-dot.glow {
    border-color: var(--accent-color);
    background: var(--accent-color);
    animation: pulse-orange 2s infinite;
}

@keyframes pulse-orange {
    0% {
        transform: translate(-50%, -50%) scale(0.95);
        box-shadow: 0 0 0 0 var(--accent-color-glow);
    }

    70% {
        transform: translate(-50%, -50%) scale(1.1);
        box-shadow: 0 0 0 10px rgba(255, 122, 0, 0);
    }

    100% {
        transform: translate(-50%, -50%) scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 122, 0, 0);
    }
}

.timeline-card {
    width: 45%;
    background: var(--apple-glass-bg);
    border: var(--apple-glass-border);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    position: relative;
    transition: transform var(--transition-smooth), border-color var(--transition-smooth), background-color var(--transition-smooth), box-shadow var(--transition-smooth);
    backdrop-filter: var(--apple-glass-blur);
    -webkit-backdrop-filter: var(--apple-glass-blur);
    box-shadow: var(--apple-glass-shadow);
}

.timeline-item:hover .timeline-card {
    transform: translateY(-5px);
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: var(--apple-glass-shadow-hover);
}

body.dark-mode .timeline-item:hover .timeline-card {
    border-color: rgba(255, 255, 255, 0.18);
}

/* Highlight item layout styles */
.timeline-item.highlight .timeline-card {
    border-color: rgba(255, 122, 0, 0.25);
    box-shadow: var(--apple-glass-shadow), 0 0 15px rgba(255, 122, 0, 0.03);
}

.timeline-item.highlight:hover .timeline-card {
    border-color: rgba(255, 122, 0, 0.5);
    box-shadow: var(--apple-glass-shadow-hover), 0 0 25px rgba(255, 122, 0, 0.12);
}

body.dark-mode .timeline-item.highlight .timeline-card {
    border-color: rgba(255, 122, 0, 0.2);
}

body.dark-mode .timeline-item.highlight:hover .timeline-card {
    border-color: rgba(255, 122, 0, 0.45);
    box-shadow: var(--apple-glass-shadow-hover), 0 0 25px rgba(255, 122, 0, 0.18);
}

.timeline-year {
    font-family: var(--font-display);
    font-size: 3.5rem;
    line-height: 1;
    color: var(--text-color);
    opacity: 0.1;
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    pointer-events: none;
    transition: opacity var(--transition-smooth), transform var(--transition-smooth);
}

.timeline-item:hover .timeline-year {
    opacity: 0.16;
    transform: translateY(3px);
}

.timeline-item.highlight:hover .timeline-year {
    color: var(--text-color);
    opacity: 0.2;
}

.timeline-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: var(--radius-full);
    background: var(--border-color);
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-family: var(--font-sans);
    font-weight: 600;
}

.timeline-badge.orange {
    background: var(--accent-color-translucent);
    color: var(--accent-color);
    border: 1px solid rgba(255, 122, 0, 0.2);
}

.timeline-title {
    font-family: var(--font-sans);
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.timeline-desc {
    font-family: var(--font-sans);
    font-size: 1.05rem;
    color: var(--text-color);
    opacity: 0.85;
    line-height: 1.6;
}

.timeline-extra {
    margin-top: 1rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--text-color);
    opacity: 0.7;
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.5rem;
}

.t-tag {
    font-size: 0.85rem;
    padding: 0.4rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-color);
    opacity: 0.9;
    font-family: var(--font-sans);
    transition: transform var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast);
}

.t-tag:hover {
    transform: translateY(-1px);
    background-color: var(--placeholder-hover);
    border-color: var(--text-color-medium);
}

.timeline-item.highlight:hover .t-tag {
    border-color: var(--border-color);
    color: var(--text-color);
    background: var(--placeholder-bg);
}

.journey-stats-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-top: 5rem;
    padding: 3rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.stat-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.stat-num {
    font-family: var(--font-display);
    font-size: 3.5rem;
    color: var(--text-color);
    line-height: 1;
}

.stat-label {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-color);
    opacity: 0.6;
}

@media (max-width: 991px) {
    .timeline-line {
        left: 20px;
    }

    .timeline-dot {
        left: 20px;
    }

    .timeline-item,
    .timeline-item.left {
        flex-direction: column;
        align-items: flex-end;
    }

    .timeline-card {
        width: calc(100% - 60px);
    }

    .journey-stats-bar {
        flex-direction: column;
        gap: 3rem;
    }
}

/* Responsive (Basic) */
@media (max-width: 1200px) {


    .section-padding {
        padding: 3.2rem 3rem 5rem 3rem;
    }

    header {
        padding: 1.5rem 3rem;
    }

    #about,
    #skills,
    #journey,
    #works,
    #contact {
        scroll-margin-top: 95px;
    }
}

@media (max-width: 900px) {

    .about,
    .skills,
    .projects,
    .journey {
        display: block;
        box-sizing: border-box;
    }

    :root {
        --apple-glass-blur: blur(10px) saturate(180%) brightness(101%);
    }

    body.dark-mode {
        --apple-glass-blur: blur(10px) saturate(180%) brightness(95%);
    }

    #about,
    #skills,
    #journey,
    #works,
    #contact {
        scroll-margin-top: 88px;
    }



    .availability-badge {
        left: 2rem;
    }

    .specialization {
        right: 2rem;
    }

    header {
        padding: 1.5rem 2rem;
    }

    nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100dvh;
        background-color: var(--bg-color);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
        z-index: 99;
    }

    nav.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    nav ul {
        flex-direction: column;
        gap: 3rem;
        align-items: center;
    }

    nav ul li a {
        font-size: 2rem;
    }

    .menu-toggle {
        display: flex !important;
        z-index: 100;
    }

    .section-padding {
        padding: 2.8rem 2rem 4rem 2rem;
    }

    .big-link {
        font-size: 3rem;
    }

    .large-text {
        font-size: 1.5rem;
    }
}

@media (max-width: 600px) {
    header {
        padding: 1rem 1.2rem;
    }

    .logo {
        font-size: 1.6rem;
    }

    .header-actions {
        gap: 0.75rem;
    }

    .contact-btn {
        padding: 0.6rem 1.1rem;
        font-size: 0.85rem;
    }

    .theme-toggle {
        width: 38px;
        height: 38px;
    }

    .theme-toggle svg {
        width: 18px;
        height: 18px;
    }

    .menu-toggle {
        width: 26px;
        height: 18px;
    }



    .availability-badge {
        font-size: 0.8rem;
        padding: 0.6rem 1rem;
        margin-bottom: 1rem;
        align-self: flex-start;
    }

    .specialization {
        text-align: left;
        align-self: flex-start;
        margin-bottom: 2rem;
        max-width: 100%;
        font-size: 0.95rem;
        background: var(--apple-glass-bg);
        border: var(--apple-glass-border);
        padding: 1rem;
        border-radius: 12px;
        backdrop-filter: var(--apple-glass-blur);
        -webkit-backdrop-filter: var(--apple-glass-blur);
        box-shadow: var(--apple-glass-shadow);
        z-index: 10;
    }

    body.dark-mode .specialization {
        background: var(--apple-glass-bg);
        border: var(--apple-glass-border);
    }

    .hero-middle {
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 5vh;
        z-index: 10;
    }

    .section-padding {
        padding: 2.2rem 1.5rem 3.2rem 1.5rem;
    }

    #about,
    #skills,
    #journey,
    #works,
    #contact {
        scroll-margin-top: 72px;
    }

    .contact {
        min-height: 100dvh;
        height: auto;
        padding: calc(65px + 1.2vh) 1.5rem 3vh 1.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }

    .contact .section-container {
        display: flex;
        flex-direction: column;
        justify-content: center;
        height: 100%;
        max-height: 100%;
    }

    .contact .section-title {
        font-size: clamp(2.2rem, 7.5vw, 2.7rem);
        margin-bottom: 0.7rem;
    }

    .contact .large-text {
        font-size: clamp(1rem, 3.6vw, 1.2rem);
        line-height: 1.45;
        margin-bottom: 1.5rem;
    }

    .contact-links {
        margin-top: 0;
        gap: 1.6rem;
        width: 100%;
    }

    .email-container {
        align-items: flex-start;
        text-align: left;
        width: 100%;
        gap: 0.5rem;
    }

    .email-hint {
        margin: 0;
        font-size: 0.75rem;
        padding: 0.4rem 0.95rem;
    }

    .email-hint::after {
        left: 2.5rem;
        transform: rotate(45deg);
    }

    .big-link {
        font-size: clamp(1.8rem, 7.4vw, 2.8rem);
        line-height: 1;
        letter-spacing: -0.015em;
        white-space: nowrap;
        word-break: normal;
        display: inline-block;
        max-width: 100%;
        margin-top: 0.1rem;
    }

    .social-links {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1.4rem 0.8rem;
        justify-items: center;
        align-items: center;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    .social-links a {
        width: 100%;
        font-size: 0.8rem;
        gap: 0.4rem;
    }

    .social-links a img,
    .social-links a svg {
        width: 27px;
        height: 27px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        margin-bottom: 3rem;
    }

    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem 1.5rem;
        min-height: 640px;
    }

    /* Hide custom cursor on mobile */
    .cursor,
    .cursor-follower {
        display: none !important;
    }
}

/* Selected Works Upgrade */
.project-card {
    background: var(--apple-glass-bg);
    backdrop-filter: var(--apple-glass-blur);
    -webkit-backdrop-filter: var(--apple-glass-blur);
    border: var(--apple-glass-border);
    border-radius: var(--radius-md);
    padding: clamp(1.2rem, 3vw, 2.5rem);
    height: auto;
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    box-shadow: var(--apple-glass-shadow);
    transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth), background-color var(--transition-smooth);
}

.project-card:hover {
    background: var(--apple-glass-bg);
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: var(--apple-glass-shadow-hover);
    transform: translateY(-6px);
}

body.dark-mode .project-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
}

.project-img-wrapper {
    margin-bottom: 0;
    background: transparent;
    position: relative;
    z-index: 1;
    width: 45%;
    aspect-ratio: 1448 / 1086;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: transform var(--transition-smooth);
}

.project-img-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.12) 100%);
    transform: skewX(-25deg);
    transition: left 0.65s ease;
    pointer-events: none;
    z-index: 2;
}

body.dark-mode .project-img-wrapper::after {
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.05) 100%);
}

.project-card:hover .project-img-wrapper::after {
    left: 125%;
}

.project-img {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 1448 / 1086;
    object-fit: contain;
    display: block;
    border-radius: var(--radius-sm);
    transition: transform var(--transition-smooth);
}

.project-card:hover .project-img {
    transform: scale(1.03);
}

.project-info {
    width: 55%;
    padding: 1rem 0 1rem clamp(1.5rem, 4vw, 3rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-info h3 {
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    margin-bottom: 0.8rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--text-color);
}

.project-desc {
    color: var(--text-color-light);
    font-size: clamp(0.95rem, 1.5vw, 1.05rem);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 55ch;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-pill {
    background-color: var(--placeholder-bg);
    color: var(--text-color-medium);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: transform var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), color var(--transition-fast);
}

.tech-pill:hover {
    transform: translateY(-2px);
    border-color: var(--accent-color);
    background-color: var(--accent-color-translucent);
    color: var(--accent-color);
    box-shadow: 0 4px 10px var(--accent-color-glow);
}

body.dark-mode .tech-pill:hover {
    border-color: var(--accent-color);
    background-color: var(--accent-color-translucent);
    box-shadow: 0 4px 15px var(--accent-color-glow);
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: auto;
    align-items: center;
}

/* Primary Filled Buttons */
.project-links a {
    color: var(--btn-text);
    background-color: var(--text-color);
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    white-space: nowrap;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 0.7rem 1.4rem;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    font-family: var(--font-sans);
    transition: transform var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

body.dark-mode .project-links a {
    background-color: #ffffff;
    color: #000000;
}

.project-links a:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background-color: #222222;
}

body.dark-mode .project-links a:hover {
    background-color: #e5e5e5;
}

/* Secondary Outline Button */
.project-links button.project-details-btn {
    color: var(--text-color);
    background-color: transparent;
    border: 1px solid var(--border-color);
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    white-space: nowrap;
    border-radius: var(--radius-sm);
    padding: 0.7rem 1.4rem;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: transform var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.project-links button.project-details-btn:hover {
    background-color: var(--placeholder-hover);
    border-color: var(--text-color-medium);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

body.dark-mode .project-links button.project-details-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.25);
}

.project-links a svg,
.project-links button.project-details-btn svg {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.project-links a:hover svg {
    transform: translate(2px, -2px);
}

.project-links button.project-details-btn:hover svg {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .project-card {
        flex-direction: column;
        height: auto;
        padding: 1.5rem;
    }

    .project-img-wrapper {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 1.5rem;
        display: flex;
    }

    .project-img-wrapper a {
        display: block;
        width: 100%;
        height: 100%;
    }

    .project-info {
        width: 100%;
        padding: 0;
    }

    .project-links {
        margin-top: 1.5rem;
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        width: 100%;
        align-items: center;
    }

    .project-links a,
    .project-links button.project-details-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
        padding: 0.65rem 1.1rem;
        font-size: 0.85rem;
        flex: 1 1 auto;
        text-align: center;
    }
}

/* CONTACT MODAL */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    overscroll-behavior: contain;
    transition: opacity var(--transition-smooth), visibility var(--transition-smooth);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-box {
    background: var(--apple-glass-bg);
    backdrop-filter: var(--apple-glass-blur);
    -webkit-backdrop-filter: var(--apple-glass-blur);
    border: var(--apple-glass-border);
    border-radius: var(--radius-lg);
    padding: clamp(1.8rem, 4vw, 3rem);
    width: 90%;
    max-width: 450px;
    transform: scale(0.95) translateY(15px);
    transition: transform var(--transition-smooth);
    color: var(--text-color);
    box-shadow: var(--apple-glass-shadow);
}

body.dark-mode .modal-box {
    background: var(--apple-glass-bg);
    border: var(--apple-glass-border);
}

.modal-overlay.active .modal-box {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.modal-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -0.015em;
}

.close-modal {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 2.2rem;
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition-fast), transform var(--transition-fast), opacity var(--transition-fast);
}

.close-modal:hover {
    color: var(--accent-color);
    transform: scale(1.05);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color-medium);
}

.form-group input,
.form-group textarea {
    background: var(--placeholder-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    color: var(--text-color);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: border-color var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    max-height: 250px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: var(--placeholder-hover);
    box-shadow: 0 0 0 4px var(--accent-color-glow);
}

.submit-btn {
    margin-top: 1rem;
    width: 100%;
    display: flex;
    justify-content: center;
    border: none;
}



/* PROJECT MODAL STYLING */
.project-modal-box {
    max-width: 750px;
    width: 92%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--apple-glass-bg);
    backdrop-filter: var(--apple-glass-blur);
    -webkit-backdrop-filter: var(--apple-glass-blur);
    border: var(--apple-glass-border);
    border-radius: var(--radius-lg);
    padding: 0;
    box-shadow: var(--apple-glass-shadow);
}

body.dark-mode .project-modal-box {
    background: var(--apple-glass-bg);
    border: var(--apple-glass-border);
}

.project-modal-box .modal-header {
    padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1.5rem, 4vw, 2.5rem) 0 clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 0;
    flex-shrink: 0;
}

.project-modal-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 0;
    text-align: left;
}

.project-modal-scroll-inner {
    padding: 1.5rem clamp(1.5rem, 4vw, 2.5rem) clamp(1.5rem, 4vw, 2.5rem) clamp(1.5rem, 4vw, 2.5rem);
}

/* Custom Webkit scrollbar that fades out when not scrolling */
.project-modal-body::-webkit-scrollbar {
    width: 10px;
}

.project-modal-body::-webkit-scrollbar-track {
    background: transparent;
    margin-top: 8px;
    margin-bottom: 24px;
}

.project-modal-body::-webkit-scrollbar-thumb {
    background-color: transparent;
    border: 3px solid transparent;
    background-clip: padding-box;
    border-radius: 100px;
    transition: background-color 0.3s ease;
}

.project-modal-body.is-scrolling::-webkit-scrollbar-thumb,
.project-modal-body::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-color-light);
}

.project-modal-subtitle {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--accent-color);
    margin-bottom: 1.8rem;
    line-height: 1.6;
}

.project-modal-section {
    margin-bottom: 2rem;
}

.project-modal-section:last-of-type {
    margin-bottom: 0;
}

.project-modal-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.4rem;
}

.project-modal-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color-medium);
    margin-bottom: 1rem;
}

.project-features-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem 1.5rem;
    margin: 1rem 0;
    padding: 0;
    list-style: none;
}

@media (max-width: 600px) {
    .project-features-list {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
}

.project-features-list li {
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-color-medium);
}

.project-features-list li::before {
    content: "✦";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-size: 0.8rem;
    top: 2px;
}

.project-tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.project-modal-links {
    display: flex;
    gap: 1.2rem;
    margin-top: 2.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

@media (max-width: 480px) {
    .project-modal-box {
        padding: 0;
    }

    .project-modal-box .modal-header {
        padding: 1.8rem 1.2rem 0 1.2rem;
    }

    .project-modal-body {
        padding: 0;
    }

    .project-modal-scroll-inner {
        padding: 1.2rem 1.2rem 1.8rem 1.2rem;
    }

    .project-modal-links {
        flex-direction: column;
        gap: 0.8rem;
    }

    .project-modal-links a {
        width: 100%;
        text-align: center;
    }
}

/* Premium Glassmorphism and Hover Glow Highlights */
.project-card,
.timeline-card {
    position: relative;
    overflow: hidden;
}

.project-card::before,
.timeline-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 80%;
    height: 100%;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.05) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: skewX(-20deg);
    transition: left 0.75s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    z-index: 1;
}

body.dark-mode .project-card::before,
body.dark-mode .timeline-card::before {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.03) 50%,
            rgba(255, 255, 255, 0) 100%);
}

.project-card:hover::before,
.timeline-card:hover::before {
    left: 150%;
}

/* Custom Glassmorphic Tooltips */
.skill-item {
    position: relative;
}

.skill-item::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%) translateY(10px) scale(0.95);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
    z-index: 100;
    text-align: center;
}

body.dark-mode .skill-item::after {
    background: rgba(20, 20, 20, 0.85);
    border-color: rgba(255, 255, 255, 0.08);
}

/* Tooltip Arrow */
.skill-item::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    border-width: 5px;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.8) transparent transparent transparent;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
    z-index: 100;
}

body.dark-mode .skill-item::before {
    border-color: rgba(20, 20, 20, 0.85) transparent transparent transparent;
}

/* Hover States */
@media (hover: hover) and (min-width: 901px) {
    .skill-item:hover::after {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0) scale(1);
    }

    .skill-item:hover::before {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }
}

/* Accessibility Custom Keyboard Focus Indicators */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
    border-radius: 4px;
}

button.contact-btn:focus-visible,
button.theme-toggle:focus-visible,
button.menu-toggle:focus-visible,
.project-links a:focus-visible,
.project-links button.project-details-btn:focus-visible {
    outline-offset: 3px;
    border-radius: 50px;
}

.project-links a:focus-visible,
.project-links button.project-details-btn:focus-visible {
    border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {

    *,
    ::before,
    ::after {
        animation-delay: -1ms !important;
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        background-attachment: scroll !important;
        scroll-behavior: auto !important;
        transition-duration: 0s !important;
        transition-delay: 0s !important;
    }

    .reveal {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }
}