/* ==========================================
   1. CORE SYSTEM & VARIABLES (BRUTALIST)
   ========================================== */
:root {
    --bg-dark: #050505;
    --bg-panel: #111111;
    --text-main: #f3f3f3;
    --text-muted: #888888;
    --border-dim: #333333;
    --border-hot: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0;}
html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-dark); color: var(--text-main); font-family: 'Inter', sans-serif;
    min-height: 100vh; display: flex; flex-direction: column; align-items: center;
}

body::after {
    content: ""; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.05; pointer-events: none; z-index: 9999;
}

/* ==========================================
   2. NAVIGATION & LAYOUT
   ========================================== */
nav {
    width: 100%; padding: 1.5rem 2rem; display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--border-dim); background: var(--bg-dark);
    position: sticky; top: 0; z-index: 100;
}
.nav-logo { font-family: 'Fira Code', monospace; font-size: 1.2rem; color: var(--text-main); font-weight: 600; }
.nav-links { display: flex; gap: 2rem; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-family: 'Orbitron', sans-serif; font-size: 0.9rem; letter-spacing: 1px; transition: color 0.2s; text-transform: uppercase; }
.nav-links a:hover { color: var(--text-main); }

.section-container { width: 100%; max-width: 900px; padding: 4rem 2rem; display: flex; flex-direction: column; align-items: flex-start; scroll-margin-top: 100px; }
.section-header { font-family: 'Fira Code', monospace; font-size: 1.8rem; color: var(--text-main); margin-bottom: 2rem; width: 100%; border-bottom: 1px solid var(--border-dim); padding-bottom: 0.5rem; text-transform: uppercase; }
.cmd-prompt { color: var(--text-muted); margin-right: 0.5rem; }

/* ==========================================
   3. HERO SECTION & PHOTO/SVG GRID
   ========================================== */
.hero-section { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 80vh; padding: 2rem; z-index: 1; position: relative; width: 100%; max-width: 900px; }
.terminal-prompt { font-family: 'Fira Code', monospace; font-size: 1rem; color: var(--text-muted); margin-bottom: 0.5rem; letter-spacing: 1px; text-transform: uppercase; }

.hero-layout { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 2rem; flex-wrap: wrap; }
.hero-left { flex: 1; min-width: 300px; }
.hero-right { flex: 0 0 280px; position: relative; display: flex; justify-content: center; align-items: center; margin: 0 auto;}

.brutalist-photo { 
    width: 100%; aspect-ratio: 1; object-fit: cover;
    filter: grayscale(100%) contrast(1.2) brightness(0.8);
    border: 1px solid var(--border-dim); transition: filter 0.3s;
}
.brutalist-photo:hover { filter: grayscale(100%) contrast(1.3) brightness(1); }

.anime-svg { position: absolute; width: 120%; height: 120%; top: -10%; left: -10%; pointer-events: none; z-index: 2; }
.draw-line { fill: none; stroke: var(--border-hot); stroke-width: 1px; }
.dashed { stroke-dasharray: 4 4; stroke: var(--text-muted); }

.job-title { font-size: 1.1rem; color: var(--text-muted); line-height: 1.6; max-width: 600px; margin-bottom: 1.5rem; }
.typewriter-cursor { display: inline-block; width: 10px; height: 1.2em; background-color: var(--text-main); vertical-align: middle; margin-left: 4px; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.cyber-btn {
    padding: 1rem 2.5rem; background: transparent; color: var(--text-main); border: 1px solid var(--border-dim); font-family: 'Orbitron', sans-serif;
    font-size: 1rem; letter-spacing: 1px; cursor: pointer; transition: all 0.2s ease-out; text-decoration: none; display: inline-block; text-transform: uppercase;
}
.cyber-btn:hover { background: var(--text-main); color: var(--bg-dark); border-color: var(--border-hot); }

.draw-text { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: drawTextAnim 3s ease-in-out infinite alternate; }
@keyframes drawTextAnim { 0% { stroke-dashoffset: 1000; } 100% { stroke-dashoffset: 0; } }

.word-span { opacity: 0; display: inline-block; transform: translateY(10px); filter: blur(4px); animation: fadeUpWord 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes fadeUpWord { 100% { opacity: 1; transform: translateY(0); filter: blur(0); } }

/* ==========================================
   4. DATA GRIDS, CARDS & SKILL BARS
   ========================================== */
   .skills-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    width: 100%;
}

.skill-category {
    display: flex;
    flex-direction: column;
}

.skills-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.skill-tag { 
    position: relative; padding: 0.5rem 1.2rem; background: var(--bg-panel); border: 1px solid var(--border-dim); color: #ffffff;
    font-family: 'Fira Code', monospace; font-size: 0.9rem; transition: all 0.2s; overflow: hidden; cursor: crosshair; z-index: 1;
    display: flex; justify-content: space-between; align-items: center; height: 42px; width: 100%;
}

.skill-name { position: relative; z-index: 2; mix-blend-mode: difference; white-space: nowrap; }
.skill-pct { position: relative; z-index: 2; mix-blend-mode: difference; font-size: 0.8rem; opacity: 0.3; transition: opacity 0.3s ease; }
.skill-tag::before { content: ''; position: absolute; top: 0; left: 0; height: 100%; width: 0%; background: #ffffff; transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1); z-index: 0; }
.skill-tag:hover { border-color: var(--border-hot); }
.skill-tag:hover::before { width: var(--level); }
.skill-tag:hover .skill-pct { opacity: 1; font-weight: bold; }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; width: 100%; }
.project-card { background: var(--bg-panel); border: 1px solid var(--border-dim); padding: 1.5rem; display: flex; flex-direction: column; cursor: pointer; transition: all 0.2s; }
.project-card:hover { border-color: var(--border-hot); transform: translateY(-4px); background: var(--bg-dark); }
.project-card h3 { font-family: 'Orbitron', sans-serif; color: var(--text-main); margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 1px; }
.project-card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1rem; flex-grow: 1; line-height: 1.5; }
.project-link { font-family: 'Fira Code', monospace; color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; transition: color 0.2s; }
.project-card:hover .project-link { color: var(--text-main); }


/* ==========================================
   5. MODALS
   ========================================== */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(5, 5, 5, 0.95); display: flex; align-items: center; justify-content: center; z-index: 1000; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.terminal-modal { background: var(--bg-dark); border: 1px solid var(--border-hot); width: 90%; max-width: 700px; padding: 2rem; transform: translateY(20px); transition: all 0.3s ease; position: relative; }
.modal-overlay.active .terminal-modal { transform: translateY(0); }
.close-btn { position: absolute; top: 1rem; right: 1.5rem; background: transparent; border: none; color: var(--text-muted); font-family: 'Fira Code', monospace; font-size: 1.5rem; cursor: pointer; transition: color 0.2s; }
.close-btn:hover { color: var(--text-main); }
.modal-title { font-family: 'Orbitron', sans-serif; color: var(--text-main); margin-bottom: 1rem; font-size: 1.5rem; text-transform: uppercase; }
.modal-meta { font-family: 'Fira Code', monospace; color: var(--text-muted); font-size: 0.85rem; margin-bottom: 1.5rem; display: block; border-bottom: 1px solid var(--border-dim); padding-bottom: 0.5rem;}

/* ==========================================
   6. MEGA CONNECT FOOTER & INLINE PANELS
   ========================================== */
.mega-footer {
    width: 100%; max-width: 900px; padding: 4rem 2rem 2rem 2rem; display: flex;
    flex-direction: column; align-items: stretch; scroll-margin-top: 100px;
}

.mega-header h2 {
    font-family: 'Orbitron', sans-serif; font-size: clamp(2.5rem, 6vw, 4.5rem); 
    line-height: 1; color: var(--text-main); text-transform: uppercase; margin-bottom: 2rem; letter-spacing: -2px;
}

.mega-email {
    display: flex;
    align-items: center;
    gap: 1.5rem; /* This creates the perfect, wide space between icon and text */
    font-family: 'Fira Code', monospace; 
    font-size: clamp(0.9rem, 3.5vw, 2.4rem); 
    color: var(--text-muted); 
    text-decoration: none; 
    line-height: 1.1; 
    padding: 2rem 0;
    border-top: 1px solid var(--border-dim); 
    border-bottom: 1px solid var(--border-dim);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); 
    white-space: nowrap;
}

/* Prevents the SVG from shrinking on tiny mobile screens */
.mega-email svg { flex-shrink: 0; }

.mega-email:hover { 
    color: var(--bg-dark); 
    background-color: var(--text-main); 
    padding-left: 1.5rem; 
}

.mega-socials { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem; margin-top: 2rem; }

/* SVG Alignment Fix */
.mega-socials a { 
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Fira Code', monospace; 
    font-size: 1rem; 
    color: var(--text-main); 
    text-decoration: none; 
    transition: color 0.2s; 
}
.mega-socials a:hover { color: var(--text-muted); }

.cmd-panel {
    width: 100%;
    margin-top: 2rem;
    background: var(--bg-dark); border: 1px dashed var(--text-muted);
    padding: 1.5rem; display: none; z-index: 10;
}
.cmd-panel.active {
    display: block; 
    animation: slideDownPanel 0.3s ease-out forwards;
}

@keyframes slideDownPanel {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.cmd-header {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--border-dim); padding-bottom: 0.5rem; margin-bottom: 1rem;
    font-family: 'Fira Code', monospace; font-size: 0.75rem; color: var(--text-muted);
}
.cmd-header button { background: none; border: none; color: var(--text-muted); font-family: 'Fira Code', monospace; cursor: pointer; transition: color 0.2s; }
.cmd-header button:hover { color: var(--text-main); }

.panel-data p { font-family: 'Fira Code', monospace; font-size: 0.85rem; margin-bottom: 0.5rem; color: var(--text-main); }
.panel-data { margin-bottom: 1.5rem; }

.brutalist-form { display: flex; flex-direction: column; gap: 1rem; }
.brutalist-form input, .brutalist-form textarea {
    width: 100%; background: var(--bg-panel); border: 1px solid var(--border-dim);
    padding: 0.75rem; color: var(--text-main); font-family: 'Fira Code', monospace;
    font-size: 0.85rem; resize: none; transition: border-color 0.2s;
}
.brutalist-form input:focus, .brutalist-form textarea:focus { outline: none; border-color: var(--text-main); }

/* ==========================================
   7. ANIMATIONS & FOOTER
   ========================================== */
.reveal { opacity: 0; transform: translateY(30px); transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

.sys-footer { width: 100%; border-top: 1px solid var(--border-dim); padding: 2rem; display: flex; justify-content: space-between; align-items: center; max-width: 900px; margin-top: auto; }
.footer-text { font-family: 'Fira Code', monospace; font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; }

@media (max-width: 768px) { nav { flex-direction: column; gap: 1rem; } .skills-grid { flex-direction: column; align-items: stretch; text-align: center; } .sys-footer { flex-direction: column; gap: 1rem; text-align: center; } }

/* ==========================================
   8. SYSTEM LOGS (TIMELINE)
   ========================================== */
   .timeline {
    position: relative;
    border-left: 2px solid var(--border-dim);
    margin-left: 10px; /* Pushed inward to align with grids */
    padding-left: 30px; 
    width: 100%;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    transition: transform 0.2s ease-out;
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -38px; /* Mathematically locked to the border */
    top: 0;
    width: 14px;
    height: 14px;
    background-color: var(--bg-dark);
    border: 2px solid var(--text-muted);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-item:hover { transform: translateX(5px); }

.timeline-item:hover::before {
    border-color: var(--border-hot);
    background-color: var(--text-main);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.timeline-date { font-family: 'Fira Code', monospace; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.75rem; letter-spacing: 1px; }
.timeline-title { font-family: 'Orbitron', sans-serif; font-size: 1.3rem; color: var(--text-main); text-transform: uppercase; margin-bottom: 0.25rem; letter-spacing: 1px; }
.timeline-location { font-family: 'Fira Code', monospace; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1rem; }
.timeline-desc { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; max-width: 700px; }

/* THE EXPANDABLE ACCORDION PHYSICS */
.timeline-details {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-details.active {
    max-height: 500px; /* Allows it to expand */
    opacity: 1;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px dashed var(--border-dim);
}