/* Add to top of file (after * selector) */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;     /* accounts for sticky header height */
}

:root {
    --primary: #006d77;
    --primary-dark: #00535c;
    --primary-light: #83c5be;
    --text: #1d3557;
    --text-light: #457b9d;
    --bg: #f8f9fa;
    --card: #ffffff;
    --border: #e0e7ff;
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-md: 0 10px 30px rgba(0,109,119,0.12);
    --radius: 12px;
}

body.dark-mode {
    --primary: #83c5be;
    --primary-dark: #a7d8d4;
    --primary-light: #006d77;
    --text: #f1f5f9;
    --text-light: #94a3b8;
    --bg: #0f172a;
    --card: #1e293b;
    --border: #334155;
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.25);
    --shadow-md: 0 10px 30px rgba(131,197,190,0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    background: rgba(255,255,255,0.92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: 1.1rem 0;
}

.dark-mode .header {
    background: rgba(15, 23, 42, 0.92);
    border-bottom-color: var(--border);
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-actions {
    display: flex;
    align-items: center;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.nav-desktop a {
    margin-left: 2.4rem;
    color: var(--text);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.25s;
}

.nav-desktop a:hover {
    color: var(--primary);
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    transition: all 0.25s;
    margin-left: 1.2rem;
}

.theme-toggle-btn .fa-sun {
    display: none;
}
.dark-mode .theme-toggle-btn .fa-moon {
    display: none;
}
.dark-mode .theme-toggle-btn .fa-sun {
    display: block;
}
.theme-toggle-btn:hover {
    color: var(--primary);
    background: rgba(0,109,119,0.08);
}
.dark-mode .theme-toggle-btn:hover {
    background: rgba(131, 197, 190, 0.1);
}

/* ── Mobile Menu ──────────────────────────────────────────────── */

.mobile-menu {
    position: fixed;
    height: 100vh;
    inset: 0;
    background: rgba(13, 27, 42, 0.98);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    color: white;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    display: none;
    flex-direction: column;
}

.mobile-menu.active {
    display: flex;
    transform: translateX(0);
}

/* Header inside mobile menu */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.6rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.mobile-logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(90deg, #00c9b7, #38bdf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.mobile-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.4rem 0.8rem;
    opacity: 0.7;
    transition: all 0.25s ease;
}

.mobile-close-btn:hover {
    opacity: 1;
    transform: rotate(90deg);
}

/* Main navigation links */
.mobile-menu-links {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(13, 27, 42, 0.98);

    justify-content: center;
    align-items: center;
    gap: 3rem;
    padding: 2rem;
}

.mobile-menu-links a {
    font-size: 2.1rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    position: relative;
    transition: all 0.35s ease;
    letter-spacing: -0.4px;
}

.mobile-menu-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -8px;
    left: 50%;
    background: linear-gradient(90deg, #00c9b7, #38bdf8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}

.mobile-menu-links a:hover,
.mobile-menu-links a:focus {
    color: white;
    transform: translateX(8px);
}

.mobile-menu-links a:hover::after {
    width: 60%;
}

/* Footer with socials */
.mobile-menu-footer {
    background: rgba(13, 27, 42, 0.98);

    padding: 2rem;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.mobile-menu-footer .social-links {
    display: flex;
    justify-content: center;
    gap: 1.6rem;
    margin-bottom: 1.4rem;
}

.mobile-menu-footer .social-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.mobile-menu-footer .social-icon:hover {
    background: linear-gradient(135deg, #00c9b7, #38bdf8);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(56,189,248,0.35);
}

.mobile-menu-footer .copyright {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
}

/* Hamburger button styles */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 34px;
    height: 26px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
}

.mobile-menu-btn span {
    width: 100%;
    height: 3.5px;
    background: var(--primary);
    border-radius: 2px;
    transition: all 0.4s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(9px, 9px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Show on mobile */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .nav-desktop {
        display: none;
    }
}

/* Optional: slight overlay effect when menu is open */
body.menu-open {
    overflow: hidden;
}


/* Hero */
.hero {
    padding: 140px 0 100px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.dark-mode .hero {
    background: var(--bg);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.hero-content h1 {
    color: var(--primary);
    font-size: 4.2rem;
    line-height: 1;
    font-weight: 800;
    margin-bottom: 0.4rem;
}

.hero-content h2 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.lead {
    font-size: 1.3rem;
    color: var(--text-light);
    max-width: 520px;
    margin-bottom: 2.5rem;
}

.hero-photo img {
    width: 380px;
    height: 380px;
    object-fit: cover;
    border-radius: 100%;
    box-shadow: var(--shadow-md);
    border: 12px solid white;
}

.dark-mode .hero-photo img {
    border-color: var(--card);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.3s ease;
}

.primary {
    background: var(--primary);
    color: white;
    border: none;
}

.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.outline:hover {
    background: var(--primary);
    color: white;
}

.dark-mode .outline:hover {
    color: #0f172a; /* Dark background color for text */
}

/* Section heading */
.section-heading {
    padding-top: 50px;
    font-size: 2.6rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary);
}

/* About */
.about-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
}

.about-intro {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.info-list div {
    margin: 1rem 0;
    font-size: 1.1rem;
}

.info-list strong {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 1.2rem;
    margin-top: 2rem;
}

.social-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0,109,119,0.08);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all 0.3s;
}

.social-icon:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.dark-mode .social-icon {
    background: rgba(131, 197, 190, 0.1);
}
.dark-mode .social-icon:hover {
    background: var(--primary);
    color: #0f172a;
}

/* Skills */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 1.5rem 0 2.5rem;
}

.skill-tag {
    background: rgba(0,109,119,0.08);
    color: var(--primary);
    padding: 10px 18px;
    border-radius: 50px;
    font-size: 0.95rem;
    border: 1px solid rgba(0,109,119,0.15);
}

.dark-mode .skill-tag {
    background: rgba(131, 197, 190, 0.1);
    border-color: rgba(131, 197, 190, 0.2);
}

.mt-2 { margin-top: 2rem; }

/* Education */
.education-item {
    display: flex;
    gap: 1.2rem;
    background: var(--card);
    padding: 1.2rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
}

.education-item:hover {
    transform: translateX(6px);
    box-shadow: var(--shadow-md);
}

.dark-mode .education-item {
    border-left-color: var(--primary);
}

.edu-year {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 32px;
}

.project-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.project-content {
    padding: 2.2rem;
}

.project-content h3 {
    color: var(--primary);
    margin-bottom: 0.6rem;
}

.project-type {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
}

.project-features {
    margin-top: 1.3rem;
    padding-left: 1.3rem;
}

.project-features li {
    margin-bottom: 0.7rem;
    color: var(--text-light);
}

/* Experience */
.experience-item {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    background: var(--card);
    padding: 2rem;
    margin-bottom: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.exp-date {
    font-weight: 600;
    color: var(--primary);
}

.exp-company {
    color: var(--text-light);
    margin-top: 0.3rem;
}

/* Contact */
.contact-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.dark-mode .contact-section {
    background: var(--bg);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 60px;
    max-width: 960px;
    margin: 4rem auto 0;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    font-size: 1.1rem;
}

.contact-item i {
    color: var(--primary);
    font-size: 1.5rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.contact-form input,
.contact-form textarea {
    padding: 16px 20px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius);
    font-family: inherit;
    background: white;
}

.contact-form textarea {
    resize: vertical;
    min-height: 140px;
}

.dark-mode .contact-form input,
.dark-mode .contact-form textarea {
    background: var(--card);
    border-color: var(--border);
    color: var(--text);
}

.dark-mode .contact-form input::placeholder,
.dark-mode .contact-form textarea::placeholder {
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-grid,
    .about-layout,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero-photo {
        text-align: center;
    }

    .hero-photo img {
        width: 320px;
        height: 320px;
    }
}

@media (max-width: 768px) {
    .nav-desktop { display: none; }
    .mobile-menu-btn { display: flex; }
    .header-actions {
        gap: 0.5rem;
    }
    .theme-toggle-btn { margin-left: 0; }

    .hero { padding: 100px 0 80px; }
    .hero-content h1 { font-size: 3.2rem; }
    .hero-content h2 { font-size: 2.4rem; }

    .experience-item {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}



/* ==========================================
   Scroll Reveal Animations
========================================== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.215, 0.61, 0.355, 1);
    will-change: transform, opacity;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children inside reveal-group */
.reveal-group > * {
    opacity: 0;
    transform: translateY(35px);
    transition: all 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-group.active > * {
    opacity: 1;
    transform: translateY(0);
}

/* Nice staggering */
.reveal-group > *:nth-child(1) { transition-delay: 0.1s; }
.reveal-group > *:nth-child(2) { transition-delay: 0.2s; }
.reveal-group > *:nth-child(3) { transition-delay: 0.35s; }
.reveal-group > *:nth-child(4) { transition-delay: 0.5s; }

/* Cards get a bit more dramatic entrance */
.project-card,
.experience-item {
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.project-card:hover {
    transform: translateY(-14px) scale(1.015);
    box-shadow: 0 20px 40px rgba(0,109,119,0.18);
}

/* Skill tags micro-interaction */
.skill-tag {
    transition: all 0.4s ease;
}

.skill-tag:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,109,119,0.2);
}

/* Primary button subtle ripple effect on click */
.btn.primary {
    position: relative;
    overflow: hidden;
}

.btn.primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.btn.primary:active::after {
    width: 500px;
    height: 500px;
    transition: width 0.6s, height 0.6s;
}

.dark-mode .btn.primary:active::after {
    background: rgba(0,0,0,0.2);
}
