:root {
    --cyan: #00f6ff;
    --violet: #8b8dff;
    --bg: #000;
    --grid-color: rgba(255, 255, 255, 0.03);
    --mono: 'JetBrains Mono', monospace;
    --safe-area: 6%;
}

/* --- GLOBAL RESET & SHARPNESS --- */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent; 
}

body { 
    background: var(--bg); 
    font-family: 'Space Grotesk', sans-serif; 
    color: #ffffff; 
    overflow-x: hidden; 
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed; inset: 0;
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: 0;
    pointer-events: none;
}

nav { 
    position: fixed; top: 0; width: 100%; padding: 30px var(--safe-area); 
    display: flex; justify-content: space-between; align-items: center; 
    z-index: 10000; background: rgba(0,0,0,0.85);
}
.logo-img { height: 55px; width: auto; transition: 0.3s; }
.nav-links { display: flex; gap: 40px; list-style: none; }
.nav-links a { 
    text-decoration: none; color: #fff; font-size: 0.9rem; letter-spacing: 2px; 
    text-transform: uppercase; font-family: var(--mono); opacity: 0.8; transition: 0.3s;
    position: relative; padding: 10px 0;
}
.nav-links a:hover, .nav-links a.active { opacity: 1; color: var(--cyan); text-shadow: 0 0 10px var(--cyan); }
.nav-links a::after { 
    content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; 
    background: var(--cyan); transition: 0.3s; box-shadow: 0 0 8px var(--cyan); 
}
.nav-links a:hover::after { width: 100%; }

.menu-toggle { display: none; flex-direction: column; gap: 6px; cursor: pointer; z-index: 10002; padding: 10px; }
.menu-toggle span { width: 28px; height: 2px; background: var(--cyan); transition: 0.3s; }

.contact-wrap {
    min-height: 100vh;
    display: flex; flex-direction: column; justify-content: center;
    min-width: 0;   /* ← ADD THIS LINE */
    padding: 140px var(--safe-area) 60px;
    position: relative; z-index: 10;
}

/* --- HERO TEXT & WRAPPING FIXES --- */
.hero-text {
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 300; 
    line-height: 1.2;
    margin-bottom: 30px; 
    max-width: 100%;
    letter-spacing: -1px;
    white-space: normal;
    overflow-wrap: anywhere;
    
    /* --- NEW 2026 WRAPPING FIXES --- */
    text-wrap: balance; /* Distributes words evenly to avoid long-then-short lines */
    text-wrap: pretty;  /* Specifically prevents "widows" (single words on the last line) */
}

.hero-text i {
    font-size: 0.8em;
    color: var(--cyan);
    margin: 0 12px;
    vertical-align: middle;
    opacity: 0.9;
    filter: drop-shadow(0 0 8px var(--cyan));
}

.hero-text span { 
    display: inline-block; 
    white-space: nowrap; /* Ensures [Icon] and [Word] never split */
}

@media (max-width: 768px) {
    .hero-text {
        font-size: 1.8rem;
        line-height: 1.4;
    }
}

/* --- EMAIL SECTION --- */
.email-reveal {
    display: block; 
    text-decoration: none; 
    color: var(--cyan);
    font-size: clamp(1.2rem, 5.5vw, 3.8rem);
    font-weight: 700; 
    padding: 15px 0;
    transition: 0.3s ease;
    
    /* Optimized Wrapping for 2026 Standards */
    max-width: 100%;
    white-space: normal; 
    overflow-wrap: anywhere; 
    word-break: break-word; 
}
.email-reveal:hover { text-shadow: 0 0 20px rgba(0, 246, 255, 0.4); }

#typewriter {
    border-right: 2px solid var(--cyan);
    font-family: var(--mono);
    min-height: 1.2em;
    /* SPECIFIC FIREFOX FIX: */
    /* inline-block combined with max-width ensures Firefox 
       re-calculates the container size as text is typed. */
    display: inline-block;
    max-width: 100%;
    vertical-align: bottom;
    /* ADD THIS LINE */
    word-break: break-word;
}

/* --- SPECS GRID --- */
.specs-grid {
    margin-top: 50px;
    display: grid; 
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 40px;
}

.spec-item { font-family: var(--mono); }
.spec-label { font-size: 0.65rem; opacity: 0.4; text-transform: uppercase; letter-spacing: 3px; margin-bottom: 10px; }
.spec-value {
    font-size: 0.85rem;
    letter-spacing: 1px;
    /* FIX: Allow wrapping for long location names on small screens */
    white-space: normal;
    overflow-wrap: break-word;
}

.status-indicator {
    display: inline-block; width: 8px; height: 8px;
    background: var(--cyan); border-radius: 50%; margin-right: 10px;
    box-shadow: 0 0 10px var(--cyan);
    animation: pulse 2s infinite;
}

@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.9); } }

/* --- FOOTER --- */
footer { padding: 80px var(--safe-area); text-align: center; border-top: 1px solid rgba(255,255,255,0.1); position: relative; z-index: 10; background: #000; }
.footer-logo { height: 45px; margin-bottom: 20px; }
.copyright { font-family: var(--mono); font-size: 0.7rem; opacity: 0.5; letter-spacing: 2px; }

/* --- RESPONSIVE NAVIGATION --- */
@media (min-width: 769px) {
    .specs-grid { grid-template-columns: repeat(4, 1fr); }
    .contact-wrap { padding-top: 0; }
}

@media (max-width: 992px) {
    .menu-toggle { display: flex; }
    .nav-links { 
        position: fixed; top: 0; right: -100%; height: 100vh; width: 100%; 
        background: #000; flex-direction: column; justify-content: center; 
        align-items: center; transition: 0.5s ease; gap: 30px;
    }
    .nav-links.active { right: 0; }
}