/* Core Variables */
:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.5);
    --border-color: rgba(255, 255, 255, 0.1);
    --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Glows (Modern Touch) */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
}
.glow-1 {
    width: 400px;
    height: 400px;
    background: rgba(56, 189, 248, 0.15);
    top: -100px;
    left: -100px;
}
.glow-2 {
    width: 500px;
    height: 500px;
    background: rgba(129, 140, 248, 0.15);
    bottom: -150px;
    right: -150px;
}

/* Typography & Utilities */
h1, h2, h3 { font-weight: 700; line-height: 1.2; }
.highlight { color: var(--accent-color); }
.w-100 { width: 100%; }

/* Navigation (Glassmorphism) */
.navbar {
    position: fixed;
    top: 0; width: 100%;
    padding: 1.2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}
.nav-brand {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
}
.nav-brand span { color: var(--accent-color); }
.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}
.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--accent-color);
}
.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px; left: 0;
    width: 100%; height: 2px;
    background: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Main Container & Sections */
.container {
    max-width: 1200px;
    margin: 100px auto 40px auto;
    padding: 0 2rem;
    min-height: calc(100vh - 200px);
}
.section {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}
.section.active {
    display: block;
}
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.section-header p {
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Buttons */
.btn {
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}
.btn-primary {
    background: var(--accent-color);
    color: #000;
    box-shadow: 0 4px 15px var(--accent-glow);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}
.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-outline:hover {
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Home Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    min-height: 70vh;
}
.hero-content { flex: 1; }
.hero-content h1 { font-size: 3.5rem; margin-bottom: 1rem; }
.hero-content h2 { font-size: 1.5rem; color: var(--text-secondary); margin-bottom: 1.5rem; font-weight: 500; }
.hero-content p { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 2rem; max-width: 500px; }
.hero-actions { display: flex; gap: 1rem; }
.hero-image { flex: 1; display: flex; justify-content: center; }
.hero-image img {
    width: 350px; height: 350px;
    object-fit: cover;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    border: 4px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 40px var(--accent-glow);
    animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

/* Projects 3x3 Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.8rem;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}
.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.card-badge {
    position: absolute;
    top: 1rem; right: 1rem;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-color);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.card h3 { margin-top: 1rem; margin-bottom: 0.8rem; font-size: 1.3rem; }
.card p { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 1.5rem; flex-grow: 1; }
.card-link { color: var(--accent-color); text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 0.5rem; }
.empty-card { text-align: center; justify-content: center; align-items: center; border-style: dashed; opacity: 0.6; }
.empty-card i { font-size: 2rem; color: var(--text-secondary); margin-bottom: 1rem; }

/* Creative Section (Iframes) */
.toggle-container {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    padding: 0.3rem;
    margin-top: 1rem;
}
.toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 0.6rem 2rem;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}
.toggle-btn.active { background: var(--accent-color); color: #000; }
.iframe-wrapper {
    width: 100%;
    height: 70vh;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
    background: var(--card-bg);
}
.iframe-wrapper iframe { width: 100%; height: 100%; border: none; position: relative; z-index: 2; }
.iframe-loader { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: var(--text-secondary); z-index: 1; }
.iframe-fallback { text-align: center; margin-top: 1rem; font-size: 0.9rem; color: var(--text-secondary); }
.iframe-fallback a { color: var(--accent-color); text-decoration: none; }

/* Contact Section */
.contact-container { max-width: 600px; margin: 0 auto; }
.form-group { margin-bottom: 1.5rem; }
.form-group input, .form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    transition: border-color 0.3s;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent-color); }
.form-status { margin-top: 1rem; text-align: center; font-weight: 600; }

/* Footer & Privacy Modal */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.footer-links a { color: var(--text-secondary); text-decoration: none; transition: color 0.3s; margin-top: 0.5rem; display: inline-block; }
.footer-links a:hover { color: var(--accent-color); }

.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal.show { display: flex; opacity: 1; }
.modal-content {
    background: #1e293b;
    padding: 2.5rem;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    border: 1px solid var(--border-color);
    position: relative;
}
.close-modal {
    position: absolute;
    top: 1rem; right: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}
.close-modal:hover { color: var(--text-primary); }
.modal-content h2 { margin-bottom: 1rem; color: var(--accent-color); }
.modal-content p { color: var(--text-secondary); margin-bottom: 1rem; }

/* Responsive Adjustments */
@media (max-width: 992px) {
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
    .hero { flex-direction: column-reverse; text-align: center; }
    .hero-actions { justify-content: center; }
}
@media (max-width: 768px) {
    .nav-links { gap: 1rem; }
    .projects-grid { grid-template-columns: 1fr; }
    .hero-content h1 { font-size: 2.5rem; }
}
@media (max-width: 480px) {
    .navbar { flex-direction: column; gap: 1rem; padding: 1rem; }
    .hero-image img { width: 250px; height: 250px; }
}

/* Quote Tag */
.quote-tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(56, 189, 248, 0.1);
    border-left: 3px solid var(--accent-color);
    color: var(--accent-color);
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 1rem;
    border-radius: 0 6px 6px 0;
}

/* Hero Widget Integration */
.hero-widget {
    flex: 0 0 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Profile Summary Grid (Experience & Education) */
.profile-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.summary-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
}

.summary-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

/* Timeline Layout */
.timeline {
    position: relative;
    border-left: 2px solid var(--border-color);
    padding-left: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.timeline-item {
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.95rem;
    top: 0.3rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-color);
    box-shadow: 0 0 8px var(--accent-glow);
}

.timeline-title {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.05rem;
}

.timeline-company {
    font-size: 0.85rem;
    color: var(--accent-color);
    margin-bottom: 0.4rem;
}

.timeline-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Certifications List */
.cert-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1rem;
}

.cert-list li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cert-list i {
    color: var(--accent-color);
}

/* Responsive adjustment for summary grid */
@media (max-width: 992px) {
    .profile-summary-grid {
        grid-template-columns: 1fr;
    }
}

.hero-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}