@font-face {
    font-family: 'Alliance No.2';
    src: url('fonts/Alliance No.2 Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --primary: #000000;
    --accent: #FF6B3B;
    --bg: #FFFFFF;
    --text-muted: #666666;
    --border: #EEEEEE;
    --font-family: 'Alliance No.2', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg);
    color: var(--primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: normal;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Layout */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 8rem 0;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: transparent;
    border-bottom: 1px solid transparent;
    z-index: 1000;
    pointer-events: none; /* Flow through transparent areas */
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.header-blur, .header-tint {
    position: absolute;
    inset: 0;
    z-index: -1;
    transition: all 0.4s ease;
}

header.glass-scrolled .header-blur {
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    background: transparent;
}

header.glass-scrolled .header-tint {
    background: rgba(255, 255, 255, 0.5); /* Clear glass for light theme */
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    -webkit-mask-image: url(#logo-mask);
    mask-image: url(#logo-mask);
}

.floating-logo {
    position: fixed;
    top: 28px;
    left: max(5vw, calc(50vw - 600px));
    z-index: 10000; /* Top-most layer */
    font-weight: normal;
    font-size: 1.25rem;
    color: white; /* Maximum contrast for difference blending */
    mix-blend-mode: difference;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    pointer-events: auto;
    text-decoration: none;
    transition: all 0.4s ease;
}

header.glass-scrolled ~ .floating-logo {
    animation: techShine 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes techShine {
    0%, 100% { color: #ffffff; }
    50% { color: #cccccc; }
}

@media (max-width: 768px) {
    .floating-logo {
        left: 1.5rem;
        top: 25px; /* Adjust slightly for mobile nav align */
    }
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    pointer-events: auto; /* Enable clicks on links */
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--primary);
}

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

.lang-toggle {
    background: none;
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    gap: 0.5rem;
    transition: var(--transition);
    pointer-events: auto; /* Enable clicks */
}

.lang-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.lang-toggle span.active {
    color: var(--accent);
}

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding-top: 120px;
    padding-bottom: 4rem;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem; /* Reduced to accommodate the availability tag */
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.availability-tag {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-weight: 500;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--accent);
    color: white;
    font-weight: 600;
    border-radius: 4px;
    border: 2px solid transparent;
    transition: var(--transition);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 107, 59, 0.2);
}

.btn-secondary {
    background-color: rgba(255, 107, 59, 0.1);
    color: var(--accent);
    border: 2px solid transparent;
}

.btn-secondary:hover {
    background-color: var(--accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 107, 59, 0.2);
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 1.5rem;
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
}

.text-content p {
    margin-bottom: 1.5rem;
    font-size: 1.15rem;
    color: var(--primary);
    line-height: 1.8;
}

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

.skill-card {
    padding: 2.5rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #FFFFFF;
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.skill-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.skill-card p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* Work List */
.work-list {
    margin-top: 3rem;
}

.work-block {
    padding: 3rem 0;
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    transition: var(--transition);
}

.work-block:hover {
    background: rgba(255, 255, 255, 0.02);
}

.work-block-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.work-block-header span {
    color: var(--text-muted);
    font-size: 1rem;
    display: block;
}

.work-block-content {
    color: var(--primary);
    font-size: 1.1rem;
    line-height: 1.7;
}

.work-link {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--accent);
    font-weight: 600;
    position: relative;
}

.work-link::after {
    content: '→';
    margin-left: 0.5rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

.work-link:hover::after {
    transform: translateX(5px);
}

/* Education Condensed */
.education-condensed {
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 1rem;
}

/* Contact */
.contact-section {
    padding: 8rem 0;
}

.contact-links {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.contact-link {
    font-size: 1.5rem;
    font-weight: 600;
    position: relative;
    color: var(--primary);
}

.contact-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.contact-link:hover::after {
    width: 100%;
}

/* Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 2rem;
    z-index: 10001;
    pointer-events: auto; /* Ensure clickable in blocked header */
}

/* Footer Defaults */
footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
}

.footer-nav {
    display: flex;
    gap: 2rem;
}

.menu-toggle span {
    width: 100%;
    height: 2px;
    background-color: var(--primary);
    transition: all 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        display: flex;
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 10000;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.5rem;
        font-weight: 600;
    }

    .menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    footer .container {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
        padding: 3rem 1.5rem;
    }

    .footer-nav {
        flex-direction: column;
        gap: 1.5rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero h1 {
        font-size: 3rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

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

    .work-block {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 2rem 1rem;
    }
    
    .modal-content {
        padding: 2rem;
    }
}

/* Modal & Form */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--bg);
    padding: 3rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

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

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: #FAFAFA;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: #FFFFFF;
}



.lang-toggle {
    z-index: 10001;
}
