/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --text-color: #2c3e50;
    --light-text: #7f8c8d;
    --background: #ffffff;
    --section-bg: #f8f9fa;
    --transition: all 0.2s ease;
    --border-color: #e9ecef;
    --nav-bg: rgba(255, 255, 255, 0.98);
    --footer-bg: #2c3e50;
}

/* Dark theme variables */
.dark-theme {
    --primary-color: #9ec1ff;
    --secondary-color: #7aa7ff;
    --text-color: #e6e6e6;
    --light-text: #b8c2cc;
    --background: #0f172a;
    --section-bg: #111827;
    --transition: all 0.2s ease;
    --border-color: #263041;
    --nav-bg: rgba(15, 23, 42, 0.9);
    --footer-bg: #0b1220;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--background);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nav-bg);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    letter-spacing: -0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: var(--transition);
}

/* Theme toggle button */
.theme-toggle {
    margin-left: 0.75rem;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.35rem 0.55rem;
    border-radius: 6px;
    cursor: pointer;
    line-height: 1;
    vertical-align: middle;
        transition: var(--transition);
        font-size: 1.1rem;
        box-shadow: 0 1px 2px rgba(0,0,0,0.06);
        background-image: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(0,0,0,0.04));
}
.theme-toggle:hover {
    background: var(--section-bg);
    transform: translateY(-1px);
}
.theme-toggle:active { transform: translateY(0); }
.theme-toggle i { pointer-events: none; }

/* Fun pop animation for the toggle */
.theme-toggle.pop { animation: theme-pop 220ms ease; }
@keyframes theme-pop {
    0% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.12) translateY(-1px); }
    100% { transform: scale(1) translateY(0); }
}

/* Floating theme toggle button */
.theme-toggle.theme-fab {
    position: fixed;
    bottom: 20px;
    right: 76px; /* offset from scroll-top */
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0;
    background: var(--background);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    z-index: 1000;
}
.theme-toggle.theme-fab:hover {
    background: var(--section-bg);
    transform: translateY(-2px);
}
@media (max-width: 640px) {
    .theme-toggle.theme-fab {
        bottom: 76px; /* stack above scroll-top on phones */
        right: 20px;
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: left;
    padding: 0 5%;
    background: var(--background);
}

.hero-content {
    max-width: 800px;
    width: 100%;
}

.hero-content h1 {
    font-size: clamp(1.9rem, 3.5vw + 0.5rem, 3.25rem);
    margin-bottom: 1rem;
    color: var(--text-color);
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.2;
}

.typing-text {
    font-size: 1.25rem;
    color: var(--light-text);
    margin-bottom: 2rem;
    font-weight: 400;
}

.hero-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
}

.primary-btn {
    background: var(--primary-color);
    color: white;
}

.primary-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

.secondary-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.secondary-btn:hover {
    background: var(--section-bg);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* Sections */
section {
    padding: clamp(3rem, 5vw, 6rem) 5%;
}

section h2 {
    text-align: left;
    font-size: clamp(1.4rem, 1.6vw + 1rem, 2rem);
    margin-bottom: clamp(1.25rem, 3vw, 3rem);
    color: var(--text-color);
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* About Section */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--light-text);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Skills Section */
.skills {
    background: var(--section-bg);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.skill-card {
    background: var(--background);
    padding: 1.75rem;
    border-radius: 8px;
    text-align: left;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.skill-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.skill-card i {
    font-size: 2.25rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.skill-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.skill-level {
    font-size: 0.85rem;
    color: var(--light-text);
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    background: var(--section-bg);
    border-radius: 4px;
    display: inline-block;
    margin: 0;
}

.skill-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.skill-details span {
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    background: var(--section-bg);
    color: var(--text-color);
    border-radius: 4px;
    font-weight: 500;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: var(--background);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.project-image {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: var(--section-bg);
    overflow: hidden;
}

.project-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}
.project-icon i {
    font-size: clamp(2.25rem, 6vw, 4rem);
    opacity: 0.9;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.project-card:hover .project-icon i {
    transform: translateY(-2px) scale(1.04);
    opacity: 1;
}

.project-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-header {
    margin-bottom: 1rem;
}

.project-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.tech-tag {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    background: var(--section-bg);
    color: var(--text-color);
    border-radius: 4px;
    font-weight: 500;
}

.project-stats {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: var(--light-text);
}

.project-stats span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-stats i {
    font-size: 0.9rem;
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1rem;
}

.project-links .btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

/* GitHub Profile Card */
.github-profile {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
}

.github-profile .project-info {
    padding: 2rem;
}

.github-profile .project-header h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.github-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.github-stats span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.github-profile p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

.github-profile .btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.github-profile .btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.github-profile .primary-btn {
    background: white;
    color: var(--primary-color);
}

.github-profile .primary-btn:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* Contact Section */
.contact {
    background: var(--section-bg);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Footer */
.footer {
    background: var(--footer-bg);
    color: white;
    text-align: center;
    padding: 2rem 5%;
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.social-links a {
    color: white;
    font-size: 1.25rem;
    opacity: 0.8;
    transition: var(--transition);
}

.social-links a:hover {
    opacity: 1;
}

/* CV Section */
.cv-content {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--background);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.cv-preview {
    width: 100%;
    height: 600px;
    border: none;
}

.cv-preview iframe {
    border: none;
    width: 100%;
    height: 100%;
}

.cv-actions {
    padding: 1.25rem;
    text-align: center;
    background: var(--background);
    border-top: 1px solid var(--border-color);
}

.cv-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.cv-actions .btn i {
    font-size: 1.1rem;
}

/* Scroll to Top Button */
.scroll-top {
    background: var(--primary-color);
    opacity: 0.9;
}

.scroll-top:hover {
    opacity: 1;
    transform: translateY(-2px);
}

/* LinkedIn Button Styles */
.linkedin-btn {
    background: #0077b5;
    color: white;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.linkedin-btn:hover {
    background: #006399;
    transform: translateY(-1px);
}

/* Credly Button Styles */
.credly-btn {
    background: #ff6a00; /* Credly-like orange */
    color: white;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.credly-btn:hover {
    background: #e85f00;
    transform: translateY(-1px);
}

/* Navigation Social Icon */
.nav-social {
    margin-left: 1rem;
}

.social-icon {
    color: var(--text-color);
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-icon:hover {
    color: #0077b5;
}

/* Contact Section LinkedIn */
.linkedin-contact {
    margin-top: 0.5rem;
}

.linkedin-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.linkedin-link:hover {
    color: #0077b5;
}

/* Career Overview Section */
.career {
    background: var(--section-bg);
    padding: 6rem 5%;
}
.career-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: var(--text-color);
    line-height: 1.8;
}

/* Education Section */
.education {
    background: var(--background);
    padding: 6rem 5%;
}
.education-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: var(--primary-color);
    line-height: 1.8;
    background: var(--section-bg);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(44,62,80,0.05);
}

/* Certifications Section */
.certifications {
    background: var(--section-bg);
    padding: 6rem 5%;
}
.cert-list {
    max-width: 800px;
    margin: 0 auto;
    padding-left: 1.5rem;
    font-size: 1.05rem;
    color: var(--primary-color);
    line-height: 2;
}
.cert-list li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.2em;
}
.cert-list li:before {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #27ae60;
    position: absolute;
    left: 0;
    top: 0.1em;
}

/* Internship Section */
.internship {
    background: var(--background);
    padding: 6rem 5%;
}
.internship-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: var(--text-color);
    line-height: 1.8;
    background: var(--section-bg);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(44,62,80,0.05);
}

/* References Section */
.references {
    background: var(--section-bg);
    padding: 6rem 5%;
}
.ref-list {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.05rem;
    color: var(--primary-color);
    line-height: 2;
    padding-left: 1.5rem;
}
.ref-list li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.2em;
}
.ref-list li:before {
    content: '\f007';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #2980b9;
    position: absolute;
    left: 0;
    top: 0.1em;
}

/* Contact Form Polishing */
.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
    align-items: flex-start;
}
.contact-form {
    flex: 1 1 350px;
    background: var(--background);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(44,62,80,0.05);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Contact Info Polishing */
.contact-info {
    flex: 1 1 250px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: var(--section-bg);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(44,62,80,0.05);
}
.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.05rem;
}
.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Hero Section Animation */
.hero-content h1 {
    animation: fadeInDown 0.7s cubic-bezier(.77,0,.18,1) both;
}
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.typing-text {
    font-size: 1.3rem;
    color: #2980b9;
    font-weight: 600;
    margin-bottom: 2rem;
    letter-spacing: 0.5px;
    min-height: 2.2rem;
}
.cursor {
    display: inline-block;
    color: var(--text-color);
    font-weight: bold;
    font-size: 1.3rem;
    animation: blink 1s infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Button Glow Effect */
.btn.primary-btn {
    box-shadow: 0 2px 8px rgba(41,128,185,0.15);
    position: relative;
    overflow: hidden;
}
.btn.primary-btn::after {
    content: '';
    position: absolute;
    left: -50%;
    top: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, #2980b9 0%, transparent 70%);
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
}

/* Section Separation */
section {
    margin-bottom: 0;
    border-bottom: 1px solid var(--border-color);
}
section:last-of-type {
    border-bottom: none;
}

/* Responsive Tweaks for New Sections */
@media (max-width: 900px) {
    .contact-content {
        flex-direction: column;
        gap: 2rem;
    }
    .contact-form, .contact-info {
        width: 100%;
        padding: 1.2rem;
    }
    .education-content, .internship-content, .career-content, .cert-list, .ref-list {
        padding: 1.2rem;
    }
}

/* Collapse nav earlier to avoid wrapping on tablets */
@media (max-width: 900px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }
}

/* Tablet and down */
@media (max-width: 1024px) {
    .nav-links {
        gap: 1.25rem;
    }
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}

/* Phone */
@media (max-width: 640px) {
    .navbar {
        padding: 0.75rem 5%;
    }
    .nav-brand { font-size: 1.1rem; }
    .hero { padding: 4.5rem 5% 2.5rem; }
    .hero-buttons { grid-template-columns: 1fr; }
    .skills-grid { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr; }
    .contact-content { gap: 1.5rem; }
    .project-links { flex-direction: column; }
    .nav-links {
        display: none;
    }
    .hamburger { display: flex; }
}

/* Minimal Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.hero-content, .about-content, .skill-card, .project-card {
    animation: fadeIn 0.5s ease-out;
} 