/* ===========================
   MAIN STYLES & LAYOUT
   =========================== */

:root {
    --primary-bg: #0a0b1e;
    --secondary-bg: #1a1b3a;
    --accent-color: #64ffda;
    --accent-secondary: #82b1ff;
    --accent-tertiary: #448aff;
    --text-primary: #ffffff;
    --text-secondary: #b3c5ef;
    --text-muted: #7986cb;
    --gradient-primary: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    --gradient-accent: linear-gradient(135deg, #64ffda 0%, #82b1ff 100%);
    --glow-color: rgba(100, 255, 218, 0.4);
}

/* ===========================
   GLOBAL STYLES
   =========================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
    -webkit-hyphens: none;
    -ms-hyphens: none;
}

body {
    font-family: 'Exo 2', sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: normal;
}

/* Text wrapping rules for all text elements */
p, h1, h2, h3, h4, h5, h6, span, div, a, li {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
    -webkit-hyphens: none;
    -ms-hyphens: none;
}

/* Prevent layout shifts during text scrambling */
.scramble-word {
    display: inline;
    white-space: nowrap;
}

.scramble-space {
    display: inline;
}

/* Ensure text containers maintain stable layout */
.project-description,
.hero-description,
.about-text p {
    min-height: 1.2em;
    line-height: 1.6;
}

/* Enable selective hyphenation only for very long text blocks */
.about-text p, .modal-description p {
    hyphens: manual;
    -webkit-hyphens: manual;
    -ms-hyphens: manual;
}

/* ===========================
   NAVIGATION
   =========================== */

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    transition: transform 0.3s ease;
}

.logo:hover .logo-icon {
    transform: rotate(360deg);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
    font-weight: 500;
}

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

.nav-link:hover {
    color: var(--text-primary);
}

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

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===========================
   LAYOUT SECTIONS
   =========================== */

.section {
    padding: 5rem 0;
    position: relative;
}

.hero + .section {
    margin-top: 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--gradient-accent);
}

/* ===========================
   HERO SECTION
   =========================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
    padding-bottom: 2rem;
    box-sizing: border-box;
}

.hero-content {
    text-align: center;
    max-width: min(90vw, 1200px);
    width: 100%;
    z-index: 2;
    padding: 2rem 1rem 3rem 1rem;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: min(90%, 600px);
    margin: 0 auto 3rem;
    opacity: 0;
    animation: fadeInUp 1s ease 2s forwards;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: normal;
}

/* ===========================
   SCROLLBAR STYLING
   =========================== */

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}
