/* style.css */

/* --- FONT IMPORTS (from HTML) --- */

/* --- CSS VARIABLES & THEMES --- */
:root {
    --font-primary: 'Inter', sans-serif;
    --font-monospace: 'Roboto Mono', monospace;
    --ease-out: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
}

[data-theme="dark"] {
    --bg-color: #020410;
    --text-color: #e2e8f0;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --accent-color: #38bdf8;
    --accent-color-darker: #0ea5e9;
    --card-bg: rgba(15, 23, 42, 0.6);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --backdrop-blur: 16px;
    --tool-tag-bg: rgba(30, 41, 59, 0.7);
}

[data-theme="light"] {
    --bg-color: #f1f5f9;
    --text-color: #0f172a;
    --text-muted: #475569;
    --border-color: rgba(0, 0, 0, 0.1);
    --accent-color: #0ea5e9;
    --accent-color-darker: #0284c7;
    --card-bg: rgba(255, 255, 255, 0.6);
    --card-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    --backdrop-blur: 16px;
    --tool-tag-bg: rgba(226, 232, 240, 0.7);
}

/* --- GLOBAL & RESET --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.4s ease, color 0.4s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    cursor: default;
    overflow-x: hidden;
}

body.hide-cursor { cursor: none; }

/* --- ANIMATED AURORA BACKGROUND --- */
.aurora-background {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
}
.aurora-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
}
.shape1 {
    width: 400px; height: 400px;
    background-color: #38bdf8;
    top: -50px; left: -100px;
    animation: move1 25s infinite alternate;
}
.shape2 {
    width: 500px; height: 500px;
    background-color: #818cf8;
    bottom: -100px; right: -150px;
    animation: move2 30s infinite alternate;
}
.shape3 {
    width: 350px; height: 350px;
    background-color: #f472b6;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation: move3 20s infinite alternate;
}

@keyframes move1 {
    from { transform: translate(0, 0) rotate(0deg); }
    to { transform: translate(200px, 100px) rotate(90deg); }
}
@keyframes move2 {
    from { transform: translate(0, 0) rotate(0deg); }
    to { transform: translate(-150px, -100px) rotate(120deg); }
}
@keyframes move3 {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-40%, -60%) rotate(-70deg); }
}

/* --- PRELOADER & CURSOR & CANVAS --- */
#preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg-color); z-index: 10000; display: flex; justify-content: center; align-items: center; transition: opacity 0.5s var(--ease-in-out); }
#preloader.loaded { opacity: 0; pointer-events: none; }
.spinner { width: 50px; height: 50px; border: 5px solid var(--border-color); border-top: 5px solid var(--accent-color); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.cursor { position: fixed; width: 20px; height: 20px; border: 2px solid var(--accent-color); border-radius: 50%; top: 0; left: 0; pointer-events: none; transform: translate(-50%, -50%); transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease; z-index: 9999; display: none; }
.cursor.grow { width: 40px; height: 40px; background-color: rgba(56, 189, 248, 0.2); }
#particle-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; transition: opacity 0.5s ease; }


/* --- SETTINGS PANEL --- */
.settings-container { position: fixed; top: 20px; right: 20px; z-index: 1000; }
#settings-toggle { background: var(--card-bg); border: 1px solid var(--border-color); backdrop-filter: blur(var(--backdrop-blur)); color: var(--text-muted); width: 45px; height: 45px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; display: flex; justify-content: center; align-items: center; transition: transform 0.3s ease, color 0.3s ease; }
#settings-toggle:hover { color: var(--accent-color); transform: rotate(45deg); }
#settings-menu { position: absolute; top: 55px; right: 0; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; padding: 10px; width: 220px; box-shadow: var(--card-shadow); backdrop-filter: blur(var(--backdrop-blur)); -webkit-backdrop-filter: blur(var(--backdrop-blur)); transform: translateY(20px) scale(0.95); opacity: 0; visibility: hidden; transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out); }
.settings-container.open #settings-menu { transform: translateY(0) scale(1); opacity: 1; visibility: visible; }
.setting-item { display: flex; justify-content: space-between; align-items: center; padding: 12px; border-bottom: 1px solid var(--border-color); }
.setting-item:last-child { border-bottom: none; }
.setting-label { font-size: 0.9rem; color: var(--text-muted); }
.theme-toggle-btn { background: var(--border-color); border: none; width: 50px; height: 25px; border-radius: 25px; cursor: pointer; position: relative; overflow: hidden; }
.icon-container { position: absolute; top: 50%; left: 5px; transform: translateY(-50%); display: flex; transition: transform 0.4s var(--ease-in-out); }
[data-theme="light"] .icon-container { transform: translate(25px, -50%); }
.theme-toggle-btn i { font-size: 14px; color: #f1c40f; width: 25px; text-align: center; }
.theme-toggle-btn .fa-moon { color: #f39c12; }
.control-btn { background: none; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; transition: color 0.3s ease; }
.control-btn:hover { color: var(--accent-color); }
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--border-color); transition: .4s; border-radius: 24px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--accent-color); }
input:checked + .slider:before { transform: translateX(20px); }


/* --- MAIN LAYOUT & GLASS CARDS --- */
.page-content { max-width: 800px; margin: 0 auto; padding: 80px 20px 40px; display: flex; flex-direction: column; gap: 24px; }
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(var(--backdrop-blur));
    -webkit-backdrop-filter: blur(var(--backdrop-blur));
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* --- PROFILE SECTION --- */
.profile-block { display: flex; align-items: center; gap: 24px; }
.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--accent-color);
    object-fit: cover;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.5);
    flex-shrink: 0;
}
.main-name { font-size: 2.5rem; font-weight: 700; color: var(--text-color); }
.tagline { font-family: var(--font-monospace); color: var(--text-muted); font-size: 1rem; margin-top: 4px; }
.bio-intro { font-size: 1rem; color: var(--text-muted); line-height: 1.6; margin-top: 12px; max-width: 500px; }

/* --- SOCIAL & SECTION TITLES --- */
.social-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; padding: 24px; }
.social-link { color: var(--text-muted); font-size: 1.5rem; transition: transform 0.3s ease, color 0.3s ease; }
.social-link:hover { color: var(--accent-color); transform: translateY(-5px) scale(1.1); }

.section-title {
    font-size: 1.5rem;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-color);
}
.section-title::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 1px; background: var(--border-color); }
.section-title i { color: var(--accent-color); }


/* --- PROJECTS --- */
.project-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
.project-card { display: block; padding: 24px; border: 1px solid var(--border-color); border-radius: 12px; text-decoration: none; color: var(--text-color); transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; }
.project-card:hover { transform: translateY(-5px); border-color: var(--accent-color); box-shadow: 0 4px 20px rgba(56, 189, 248, 0.15); }
.project-id { font-family: var(--font-monospace); font-size: 0.8rem; color: var(--text-muted); display: block; margin-bottom: 8px; }
.project-title { font-size: 1.25rem; margin-bottom: 8px; color: var(--text-color); }
.project-description { font-size: 0.95rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; }
.project-cta { font-weight: 700; color: var(--accent-color); display: inline-flex; align-items: center; gap: 8px; }
.project-cta i { transition: transform 0.3s ease; }
.project-card:hover .project-cta i { transform: translateX(5px); }


/* --- NEW TOOL SPEC SECTION --- */
.spec-grid { display: flex; flex-direction: column; gap: 24px; }
.spec-category { font-family: var(--font-monospace); font-size: 0.9rem; color: var(--text-muted); margin-bottom: 12px; }
.tool-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tool-tag {
    background: var(--tool-tag-bg);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.tool-tag:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--bg-color);
}


/* --- PHILOSOPHY & TIMELINE --- */
.philosophy-quote { border-left: 3px solid var(--accent-color); padding-left: 24px; margin: 0; }
.philosophy-quote p { font-size: 1.2rem; font-style: italic; line-height: 1.7; margin-bottom: 12px; }
.philosophy-quote cite { font-style: normal; color: var(--text-muted); }

.timeline { 
    position: relative; 
    padding-left: 40px; 
    border-left: 2px solid var(--border-color); 
}
.timeline-item { 
    position: relative; 
    margin-bottom: 30px; 
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-item::before { 
    content: ''; 
    position: absolute; 
    
    /* --- ALIGNMENT FIX V3 --- */
    /* 1. Move left by the exact padding amount to reach the line. */
    left: -40px; 
    
    /* 2. Vertically align the circle. */
    top: 5px; 
    
    /* 3. Shift the element left by 50% of its OWN width to perfectly center it. */
    transform: translateX(-50%); 
    
    width: 18px; 
    height: 18px; 
    border-radius: 50%; 
    background-color: var(--bg-color); /* Correctly uses the theme's BG color */
    border: 3px solid var(--accent-color); 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 1; 
}

.timeline-item:hover::before { 
    /* Preserve the horizontal transform when scaling */
    transform: translateX(-50%) scale(1.2); 
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.6); 
}

.timeline-date { font-family: var(--font-monospace); color: var(--text-muted); font-size: 0.85rem; margin-bottom: 8px; }
.timeline-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.timeline-company { font-size: 0.95rem; color: var(--text-muted); }


/* --- NEW CONTACT SECTION --- */
.contact-section p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
}
.cta-button {
    display: inline-block;
    background: linear-gradient(45deg, var(--accent-color), var(--accent-color-darker));
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(56, 189, 248, 0.25);
}


/* --- FOOTER --- */
.footer { text-align: center; padding: 20px; font-size: 0.9rem; color: var(--text-muted); background: transparent; border: none; box-shadow: none; backdrop-filter: none; }


/* --- RESPONSIVENESS --- */
@media (max-width: 768px) {
    .page-content { padding-top: 80px; gap: 20px; }
    .card { padding: 24px; }
    .profile-block { flex-direction: column; text-align: center; }
    .main-name { font-size: 2rem; }
    .tagline { font-size: 0.9rem; }
}
@media (min-width: 600px) {
    .project-grid { grid-template-columns: repeat(2, 1fr); }
}
