/* --- Import Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* --- Design System / Tokens --- */
:root {
    --bg-page: #0a0404;
    --bg-card: rgba(30, 10, 10, 0.55);
    --bg-card-hover: rgba(45, 14, 14, 0.75);
    --border-color: rgba(255, 51, 51, 0.35);
    --border-hover: rgba(255, 51, 51, 0.85);
    --text-main: #fcf8f8;
    --text-muted: #d6c5c5;
    --accent: #ff3333;
    --accent-dark: #cc0000;
    --accent-glow: rgba(255, 51, 51, 0.45);
    --font-title: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --max-width: 1100px;
    --radius: 12px;
    --radius-large: 24px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-page);
}

body {
    background-color: var(--bg-page);
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(255, 51, 51, 0.15), transparent 35%),
        radial-gradient(circle at 85% 65%, rgba(255, 51, 51, 0.15), transparent 35%),
        radial-gradient(rgba(255, 51, 51, 0.16) 1.2px, transparent 1.2px);
    background-size: 100% 100%, 100% 100%, 30px 30px;
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-page);
}
::-webkit-scrollbar-thumb {
    background: #221111;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-dark);
}

/* --- Glowing Background Blobs --- */
.bg-glow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

@keyframes float-blob {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.8;
    }
    33% {
        transform: translate(50px, -70px) scale(1.05);
        opacity: 1;
    }
    66% {
        transform: translate(-40px, 50px) scale(0.95);
        opacity: 0.6;
    }
}

.glow-blob {
    position: absolute;
    width: 900px;
    height: 900px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow) 0%, rgba(255, 51, 51, 0) 70%);
    pointer-events: none;
    z-index: -1;
    filter: blur(120px);
    animation: float-blob 22s infinite ease-in-out;
}

.glow-blob-1 {
    top: -300px;
    left: -300px;
    animation-duration: 28s;
}

.glow-blob-2 {
    top: 30%;
    right: -400px;
    background: radial-gradient(circle, rgba(255, 51, 51, 0.35) 0%, rgba(255, 51, 51, 0) 70%);
    animation-duration: 32s;
    animation-delay: -5s;
}

.glow-blob-3 {
    bottom: 20%;
    left: -400px;
    background: radial-gradient(circle, rgba(255, 51, 51, 0.28) 0%, rgba(255, 51, 51, 0) 70%);
    animation-duration: 26s;
    animation-delay: -10s;
}


/* --- Layout --- */
.header, main, .footer {
    width: 90%;
    max-width: var(--max-width);
    margin: 0 auto;
}

/* --- Header --- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 0;
    position: relative;
    z-index: 10;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    height: 36px;
    width: auto;
    filter: drop-shadow(0 0 8px rgba(255, 51, 51, 0.4));
    transition: var(--transition);
}

.brand-logo:hover {
    transform: rotate(5deg) scale(1.05);
}

.nav {
    display: flex;
    gap: 16px;
    background: rgba(30, 10, 10, 0.7);
    padding: 6px;
    border-radius: 30px;
    border: 1px solid rgba(255, 51, 51, 0.45);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 25px rgba(255, 51, 51, 0.15);
}

.nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 18px;
    border-radius: 20px;
    transition: var(--transition);
}

.nav a:hover, .nav a.active {
    color: var(--text-main);
    background: rgba(255, 51, 51, 0.22);
    text-shadow: 0 0 12px rgba(255, 51, 51, 0.8);
    box-shadow: 0 0 15px rgba(255, 51, 51, 0.15);
}

/* --- Sections --- */
section {
    padding: 100px 0;
    position: relative;
}

.section-header-left {
    margin-bottom: 50px;
}

.section-header-left h2 {
    font-family: var(--font-title);
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);
    display: inline-block;
    position: relative;
}

.section-header-left h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--accent);
}

/* --- Cards (Glassmorphism) --- */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 32px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(255, 51, 51, 0.08);
    transition: var(--transition);
}

.glass-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 51, 51, 0.35), inset 0 0 20px rgba(255, 51, 51, 0.15);
    transform: translateY(-4px);
}

/* --- Hero Section --- */
.hero-section {
    display: flex;
    flex-direction: column;
    gap: 80px;
    padding-top: 60px;
}

.hero-intro-row {
    display: grid;
    grid-template-columns: 0.7fr 1.3fr;
    gap: 48px;
    align-items: center;
}

.avatar-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.avatar-glow-placeholder {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 51, 51, 0.35) 0%, rgba(255, 51, 51, 0.05) 70%);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    box-shadow: 0 0 50px rgba(255, 51, 51, 0.25);
    transition: var(--transition);
}

.avatar-glow-placeholder::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), transparent 60%);
    z-index: -1;
    opacity: 0.6;
    transition: var(--transition);
    animation: rotate-glow 12s linear infinite;
}

.avatar-img {
    width: 85%;
    height: 85%;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.5));
    transition: var(--transition);
}

.avatar-block:hover .avatar-glow-placeholder {
    box-shadow: 0 0 50px rgba(255, 51, 51, 0.25);
}

.avatar-block:hover .avatar-glow-placeholder::before {
    opacity: 0.8;
}

.avatar-block:hover .avatar-img {
    transform: scale(1.05) translateY(-5px);
}

.speech-bubble-block {
    position: relative;
    border-radius: var(--radius-large);
}

.speech-bubble-block::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 20px;
    height: 20px;
    background-color: #210b0b;
    border-left: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    z-index: 1;
}

.speech-hello {
    font-family: var(--font-title);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 12px;
}

.speech-bubble-block h2 {
    font-family: var(--font-title);
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 16px;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

@keyframes text-glow-pulse {
    0%, 100% {
        text-shadow: 0 0 12px rgba(255, 51, 51, 0.4);
    }
    50% {
        text-shadow: 0 0 22px rgba(255, 51, 51, 0.8), 0 0 8px rgba(255, 51, 51, 0.4);
    }
}

@keyframes rotate-glow {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.speech-bubble-block h2 mark {
    background: transparent;
    color: var(--accent);
    text-shadow: 0 0 15px rgba(255, 51, 51, 0.4);
    animation: text-glow-pulse 4s ease-in-out infinite;
}

.speech-sub {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

.hero-bio-row {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 64px;
    align-items: flex-start;
}

.bio-heading h1 {
    font-family: var(--font-title);
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}

.current-role {
    font-size: 1.3rem;
    color: var(--text-muted);
}

.current-role a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
    position: relative;
    transition: var(--transition);
}

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

.current-role a:hover {
    color: var(--text-main);
    text-shadow: 0 0 8px rgba(255, 51, 51, 0.4);
}

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

.bio-text {
    font-size: 1.15rem;
    color: var(--text-muted);
    padding-top: 12px;
    border-left: 2px solid var(--border-color);
    padding-left: 24px;
}

/* --- Focus Grid (Work Experience) --- */
.focus-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.focus-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.card-icon {
    margin-bottom: 20px;
    width: 54px;
    height: 54px;
    border-radius: var(--radius);
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 51, 51, 0.05);
    border: 1px solid rgba(255, 51, 51, 0.2);
    color: var(--accent);
    box-shadow: 0 4px 12px rgba(255, 51, 51, 0.05);
    transition: var(--transition);
}

.card-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: var(--transition);
}

.focus-card:hover .card-icon {
    background: var(--accent);
    color: #050202;
    box-shadow: 0 0 25px rgba(255, 51, 51, 0.65), inset 0 0 8px rgba(255, 255, 255, 0.3);
    transform: scale(1.08);
}

.focus-card:hover .card-icon svg {
    stroke-width: 2.5;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
}

.focus-card h3 {
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-main);
}

.focus-card p {
    color: var(--text-muted);
    font-size: 0.98rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* --- Tech Funnel Section --- */
.tech-funnel-section {
    text-align: center;
    position: relative;
}

.funnel-intro {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.funnel-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.tools-floating-row {
    width: 100%;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    z-index: 2;
}

.tool-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: rgba(22, 10, 10, 0.4);
    backdrop-filter: blur(5px);
    transition: border-color 0.3s,
                background 0.3s,
                box-shadow 0.3s,
                transform 0.3s;
    cursor: pointer;
}

.tool-item:hover {
    border-color: var(--accent);
    background: rgba(255, 51, 51, 0.1);
    box-shadow: 0 0 15px rgba(255, 51, 51, 0.25);
    transform: translateY(-4px) scale(1.08); /* Lift effect */
}

/* --- Tool Icons & Logos Styling --- */
.tool-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
    transition: var(--transition);
}

/* Tool name text: Styled as a custom premium tooltip */
.tool-name {
    position: absolute;
    bottom: calc(100% + 10px); /* Positioned above the icon */
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: #110707;
    border: 1px solid var(--accent);
    color: var(--text-main);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s cubic-bezier(0.25, 0.8, 0.25, 1),
                transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    pointer-events: none; /* Prevents cursor conflict when hover transitions */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    z-index: 15;
}

/* Small indicator arrow for the tooltip */
.tool-name::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: var(--accent) transparent transparent transparent;
}

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

/* Image-based logos: start muted white, brighten on hover */
img.tool-logo {
    filter: brightness(0) invert(0.7);
}

.tool-item:hover img.tool-logo {
    filter: brightness(0) invert(1) drop-shadow(0 0 5px rgba(255, 255, 255, 0.6));
}

/* Inline SVG logos (Cavalry and Storyline): inherit currentColor */
svg.tool-logo {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

svg.tool-logo [fill="currentColor"] {
    fill: currentColor;
}

.tool-item:hover svg.tool-logo {
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

/* Local Brand/Special Logos (Antigravity): custom drop shadow */
.tool-logo-brand {
    opacity: 0.7;
    filter: none;
}

.tool-item:hover .tool-logo-brand {
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(255, 51, 51, 0.8));
}

.funnel-svg-connector {
    width: 100%;
    height: 120px;
    margin: 10px 0;
    position: relative;
    z-index: 1;
}

.connector-svg {
    width: 100%;
    height: 100%;
}

.connector-svg path {
    stroke: var(--accent);
    stroke-width: 2;
    opacity: 0.45;
    stroke-dasharray: 6 6;
    animation: flow 35s linear infinite;
    filter: drop-shadow(0 0 3px rgba(255, 51, 51, 0.6));
}

@keyframes flow {
    to {
        stroke-dashoffset: -1000;
    }
}

.central-target-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.target-logo-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 1px solid rgba(255, 51, 51, 0.35);
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    box-shadow: 0 0 35px rgba(255, 51, 51, 0.22);
    transition: var(--transition);
}

.target-logo-circle::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 1px dashed var(--accent);
    opacity: 0.3;
    animation: rotate 20s linear infinite;
}

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

.funnel-center-icon {
    width: 50%;
    height: 50%;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(255, 51, 51, 0.6));
}

.central-target-logo:hover .target-logo-circle {
    border-color: var(--accent);
    box-shadow: 0 0 50px rgba(255, 51, 51, 0.6), inset 0 0 15px rgba(255, 51, 51, 0.2);
    transform: scale(1.08);
}

/* --- Featured Projects (Overlapping Layout) --- */
.featured-projects-container {
    display: flex;
    flex-direction: column;
    gap: 120px;
    margin-bottom: 80px;
}

.featured-project-row {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    align-items: center;
    position: relative;
}

/* Overlapping configuration */
.row-normal .project-info-card {
    grid-column: 1 / 8;
    grid-row: 1;
    z-index: 2;
}

.row-normal .project-image-preview {
    grid-column: 5 / 13;
    grid-row: 1;
    z-index: 1;
}

.row-reverse .project-image-preview {
    grid-column: 1 / 9;
    grid-row: 1;
    z-index: 1;
}

.row-reverse .project-info-card {
    grid-column: 6 / 13;
    grid-row: 1;
    z-index: 2;
    align-items: flex-end;
    text-align: right;
}

.row-reverse .project-tech-list {
    justify-content: flex-end;
}

/* Card inside Project Row */
.project-info-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

@media (min-width: 901px) {
    .project-info-card {
        min-height: 380px;
        justify-content: center;
    }
}

.featured-label {
    font-family: var(--font-title);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.project-info-card h3 {
    font-family: var(--font-title);
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-main);
}

.project-desc-box {
    background: rgba(30, 15, 15, 0.6);
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: var(--radius);
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    width: 100%;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.project-tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.project-tech-list span {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-main);
    background: rgba(255, 51, 51, 0.1);
    border: 1px solid rgba(255, 51, 51, 0.15);
    padding: 4px 10px;
    border-radius: 4px;
}

.project-btn-link {
    display: inline-block;
    padding: 12px 24px;
    border: 1px solid rgba(255, 51, 51, 0.6);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    background: rgba(255, 51, 51, 0.05);
    transition: var(--transition);
    box-shadow: 0 0 18px rgba(255, 51, 51, 0.15);
}

.project-btn-link:hover {
    background: var(--accent);
    color: #050202;
    box-shadow: 0 0 25px rgba(255, 51, 51, 0.65), inset 0 0 10px rgba(255, 255, 255, 0.2);
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* Image Preview Block */
.project-image-preview {
    height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #110707;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-large);
    overflow: hidden;
    position: relative;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
}

.project-image-preview .preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(40%) contrast(1.1);
    transition: var(--transition);
}

.project-image-preview::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(7, 3, 3, 0) 50%, rgba(7, 3, 3, 0.6) 100%);
    pointer-events: none;
    transition: var(--transition);
}

.project-image-preview:hover {
    border-color: var(--border-hover);
    box-shadow: 0 20px 45px rgba(255, 51, 51, 0.22), 0 10px 20px rgba(0, 0, 0, 0.6);
}

.project-image-preview:hover .preview-img {
    filter: grayscale(0%) contrast(1.05);
    transform: scale(1.05);
}

/* Other Projects Grid */
.other-projects-title {
    margin-bottom: 30px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.other-projects-title h3 {
    font-family: var(--font-title);
    font-size: 1.6rem;
    font-weight: 700;
}

.other-projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.other-project-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.other-project-card.full-width-card {
    grid-column: 1 / -1;
}

.other-project-card h4 {
    font-family: var(--font-title);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-main);
}

.other-project-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.card-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.card-link:hover {
    color: var(--text-main);
    text-shadow: 0 0 12px rgba(255, 51, 51, 0.8);
    transform: translateX(6px);
}

/* --- Contact Section --- */
.contact-section {
    text-align: center;
    border-bottom: none;
    padding: 120px 0;
}

.contact-container {
    max-width: 650px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-label {
    font-family: var(--font-title);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent);
    letter-spacing: 0.15em;
    margin-bottom: 20px;
}

.contact-section h2 {
    font-family: var(--font-title);
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.contact-lead {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.contact-email {
    font-family: var(--font-title);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    margin-bottom: 50px;
    word-break: break-all;
    transition: var(--transition);
    position: relative;
    padding-bottom: 6px;
}

.contact-email::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2.5px;
    background-color: var(--accent);
    box-shadow: 0 0 15px var(--accent), 0 0 5px var(--accent);
    transform: scaleX(0.7);
    transition: var(--transition);
}

.contact-email:hover {
    color: var(--text-main);
    text-shadow: 0 0 20px rgba(255, 51, 51, 0.85);
}

.contact-email:hover::after {
    transform: scaleX(1);
    background-color: var(--accent);
    box-shadow: 0 0 25px var(--accent), 0 0 10px var(--accent);
}

.social-links-row {
    display: flex;
    gap: 28px;
}

.social-links-row a {
    color: var(--text-muted);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
    padding-bottom: 4px;
}

.social-links-row a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--accent);
    transform: scaleX(0);
    transition: var(--transition);
}

.social-links-row a:hover {
    color: var(--text-main);
    text-shadow: 0 0 8px rgba(255, 51, 51, 0.3);
}

.social-links-row a:hover::after {
    transform: scaleX(1);
}

/* --- Footer --- */
.footer {
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
}

/* --- Scroll-Driven & Entrance Animations --- */
@media (prefers-reduced-motion: no-preference) {
    @supports ((animation-timeline: view()) and (animation-range: entry)) {
        @keyframes reveal-in {
            from {
                opacity: 0;
                transform: translateY(40px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .focus-card, 
        .tool-item, 
        .featured-project-row,
        .other-project-card,
        .contact-container {
            animation: reveal-in auto linear forwards;
            animation-timeline: view();
            animation-range: entry 10% entry 30%;
        }

        .avatar-block, .speech-bubble-block {
            animation: reveal-in auto linear forwards;
            animation-timeline: view();
            animation-range: entry 5% entry 20%;
        }
    }
}

/* CSS Entry Class for JS Fallback */
.reveal-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-hidden {
    opacity: 0;
    transform: translateY(40px);
}

/* --- Responsividade --- */
@media (max-width: 900px) {
    .header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 24px 0;
    }

    .nav {
        padding: 4px;
        gap: 8px;
    }

    .nav a {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .hero-section {
        gap: 50px;
    }

    .hero-intro-row, .hero-bio-row {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .avatar-block {
        order: 1;
    }

    .speech-bubble-block {
        order: 2;
    }

    .speech-bubble-block::before {
        left: 50%;
        top: -10px;
        transform: translateX(-50%) rotate(45deg);
        border-left: 1px solid var(--border-color);
        border-top: 1px solid var(--border-color);
        border-bottom: none;
        border-right: none;
    }

    .bio-text {
        border-left: none;
        border-top: 2px solid var(--border-color);
        padding-left: 0;
        padding-top: 24px;
    }

    .bio-heading h1 {
        font-size: 2.8rem;
    }

    .focus-grid, .other-projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .featured-project-row {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    .row-normal .project-info-card, 
    .row-normal .project-image-preview,
    .row-reverse .project-info-card,
    .row-reverse .project-image-preview {
        margin: 0;
    }

    .project-image-preview {
        height: 260px;
        order: 2;
        width: 100%;
    }

    .project-info-card {
        order: 1;
        width: 100%;
    }

    .row-reverse .project-info-card {
        align-items: flex-start;
        text-align: left;
    }

    .row-reverse .project-tech-list {
        justify-content: flex-start;
    }

    .project-desc-box {
        padding: 20px;
    }

    .contact-section h2 {
        font-size: 2.3rem;
    }

    .contact-email {
        font-size: 1.6rem;
    }
}
