/* styles.css */

* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}


body {
    margin: 0;
    padding-top: 70px;  /* Add spacing so content doesn't hide behind navbar */
    font-family: Inter, sans-serif;
    font-weight: 400;
    color: #222;
    background: #fafafa;
    line-height: 1.6;
}

/* Headings */
h1, h2, h3, h4 {
    font-family: 'Inter Tight', sans-serif;
    font-weight: 600;
    letter-spacing: -0.5px;
}

h1 { font-size: 48px; }
h2 { font-size: 24px; color: #555; }
h3 { font-size: 28px; margin-bottom: 20px; border-left: 4px solid #4a6cf7; padding-left: 12px; }
h4 { font-size: 22px; margin-bottom: 10px; }


section {
    margin: 120px auto;
    padding: 0 20px;
}

/* Buttons */
.btn {
    padding: 12px 26px;
    background: #1f1f1f;
    color: #ffffff;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.btn:hover {
    background: #444;
}

.btn.secondary {
    background: #e8e8e8;
    color: #222;
}

.btn.secondary:hover {
    background: #dcdcdc;
}

/* Hamburger Button */
.hamburger {
    display: none;
    font-size: 26px;
    background: none;
    border: none;
    cursor: pointer;
    color: #222;
    padding: 4px 8px;
}

body.dark .hamburger {
    color: #e6e6e6;
}


/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    z-index: 1000;
}

.nav-container {
    max-width: 1100px;
    margin: auto;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 20px;
    font-weight: 600;
    color: #4a6cf7;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: #222;
    font-size: 16px;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: #555;
}

/* Dark Mode Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
}

.theme-toggle input {
    display: none;
}

.toggle-label {
    width: 42px;
    height: 22px;
    background: #ccc;
    border-radius: 22px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s ease;
}

.toggle-label::after {
    content: "";
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
}

.theme-icon {
    font-size: 18px;
    margin-right: 10px;
    transition: color 0.3s ease, transform 0.3s ease;
    user-select: none;
}

body.dark .theme-icon {
    transform: rotate(180deg);
}

#darkToggle:checked + .toggle-label {
    background: #4a6cf7; /* soft blue accent */
}

#darkToggle:checked + .toggle-label::after {
    transform: translateX(20px);
}


/* Hero */
.hero {
    text-align: center;
    max-width: 700px;
    margin: auto;
    padding: 140px 20px 120px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 10px;
}

.hero h2 {
    font-size: 22px;
    font-weight: 400;
    margin-bottom: 20px;
    color: #555;
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
}

.hero-buttons .btn {
    padding: 12px 24px;
    background: #222;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    margin-right: 10px;
}

.btn.secondary {
    background: #e0e0e0;
    color: #222;
}

/* About */
.about {
    display: flex;
    max-width: 1000px;
    margin: 80px auto;
    padding: 0 20px;
    gap: 60px;
    align-items: center;
}

.about-photo .photo-placeholder {
    width: 200px;
    height: 200px;
    background: #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-photo-img {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* Fullscreen Photo Modal */
.photo-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
}

.modal-image {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    user-select: none;
}


/* Projects */
.projects {
    max-width: 900px;
    margin: 80px auto;
    padding: 0 20px;
}

.project-card {
    display: flex;
    gap: 40px;
    margin-bottom: 80px;
    align-items: flex-start;
    background: linear-gradient(180deg, #ffffff, #f7f9fc);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, box-shadow 0.25s ease;
}

.project-card p {
    color: #444;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.10);
}

.project-card img {
    width: 320px;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.project-info h4 {
    margin-top: 0;
}

.tech {
    font-style: italic;
    color: #555;
    margin-top: 6px;
}

.learned {
    margin-top: 10px;
}

.project-link {
    color: #3a7afe;
    font-weight: 600;
    text-decoration: none;
    margin-top: 18px;
    margin-right: 18px;
    display: inline-block;
    transition: color 0.25s ease, text-shadow 0.25s ease;
}

.project-link:hover {
    color: #1e3a8a;
    text-shadow: 0 0 6px rgba(58, 122, 254, 0.3);
}

/* Skills */
.skills {
    max-width: 900px;
    margin: 80px auto;
    padding: 0 20px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

/* Contact */
.contact {
    max-width: 700px;
    margin: 80px auto;
    padding: 0 20px;
    text-align: center;
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 30px;
    margin-top: 80px;
    background: #f4f4f4;
    color: #444;
    font-size: 15px;
    border-top: 1px solid #ddd;
}

.footer-divider {
    width: 60%;
    height: 1px;
    background: rgba(0,0,0,0.15);
    margin: 20px auto 15px auto;
}

/* Dark mode */
body.dark .footer-divider {
    background: rgba(255,255,255,0.15);
}

.social-links {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-icon .icon {
    width: 26px;
    height: 26px;
    fill: #444;
    transition: fill 0.3s ease, transform 0.3s ease;
}

.social-icon {
    position: relative;
}

.social-icon::after {
    content: attr(aria-label);
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    white-space: nowrap;
}

/* Dark mode tooltip */
body.dark .social-icon::after {
    background: #eee;
    color: #222;
}

.social-icon:hover::after {
    opacity: 1;
}

.social-icon:hover .icon {
    fill: #4a6cf7;
    transform: scale(1.15);
}

.icon path {
    stroke: currentColor;
    stroke-width: 1.5;
    fill: none;
    stroke-dasharray: 120;
    stroke-dashoffset: 120;
    animation: drawIcon 1.2s ease forwards;
}

@keyframes drawIcon {
    to {
        stroke-dashoffset: 0;
    }
}


/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.theme-icon {
    font-size: 20px;
    cursor: pointer;
    user-select: none;
    margin-left: 12px;
    transition: color 0.3s ease, transform 0.3s ease;
}


/* Dark mode */
body.dark {
    background: #121212;
    color: #e6e6e6;
}

body.dark h1,
body.dark h2,
body.dark h3,
body.dark h4 {
    color: #f2f2f2; /* brighter headings */
}

body.dark img {
    border: 1px solid rgba(255,255,255,0.08);
}

body.dark .icon {
    color: #ccc;
}

/* Buttons in dark mode */
body.dark button,
body.dark .btn {
    background: #2a2a2a;
    color: #f0f0f0;
    border: 1px solid rgba(255,255,255,0.15);
}

body.dark button:hover,
body.dark .btn:hover {
    background: #3a3a3a;
    border-color: #ffd86b;
    box-shadow: 0 0 8px rgba(255, 216, 107, 0.4);
}

body.dark .social-icon .icon {
    fill: #ccc;
}

body.dark .social-icon:hover .icon {
    fill: #f5d76e;
}

body.dark .theme-icon {
    color: #f5d76e; /* soft sun color */
}

body:not(.dark) .theme-icon {
    color: #4a6cf7; /* soft moon color */
}

.theme-icon {
    opacity: 0.9;
}

.theme-icon:hover {
    opacity: 1;
}

.theme-toggle {
    display: flex;
    align-items: center;
}

body.dark .navbar {
    background: #1e1e1e;
    border-bottom: 1px solid #333;
}

body.dark nav a {
    color: #eaeaea;
}

body.dark .nav-links a:hover {
    color: #ffd86b;
}

body.dark .hero-buttons .btn {
    background: #e6e6e6;
    color: #121212;
}

body.dark .btn.secondary {
    background: #333;
    color: #e6e6e6;
}

body.dark .about-photo .photo-placeholder {
    background: #333;
}

body.dark .project-card {
    background: #1c1c1c;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}

body.dark .project-card p {
    color: #dcdcdc;
}

body.dark .tech {
    color: #cfcfcf; /* readable but subtle */
}

body.dark .about-photo-img {
    box-shadow: 0 4px 12px rgba(255,255,255,0.08);
}

body.dark .project-card img {
    box-shadow: 0 4px 12px rgba(255,255,255,0.08);
}

body.dark .project-link {
    color: #4a8cff; /* soft blue */
    font-weight: 500;
}

body.dark .project-link:hover {
    color: #ffd86b; /* warm gold highlight */
    text-shadow: 0 0 6px rgba(255, 216, 107, 0.4);
}

body.dark .footer {
    background: #1e1e1e;
    color: #ccc;
    border-top: 1px solid #333;
}

body.dark .footer-divider {
    background: rgba(255,255,255,0.15);
}

body.dark .social-icon .icon {
    color: #ccc;
}

body.dark .social-icon:hover .icon {
    color: #ffd86b;
}

body.dark .tech {
    color: #e0e0e0; /* soft light gray */
}

/* Responsive Design */

@media (max-width: 900px) {

    .about {
        flex-direction: column;
        text-align: center;
    }

    .about-photo .photo-placeholder {
        margin: auto;
    }

    .project-card {
        flex-direction: column;
        text-align: center;
    }

    .project-card img {
        width: 100%;
        max-width: 400px;
        margin: auto;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 700px) {

    h1 {
        font-size: 36px;
    }

    h2 {
        font-size: 20px;
    }

    .hero {
        padding: 100px 20px 80px;
    }

    .nav-links {
        gap: 15px;
    }

    section {
        margin: 80px auto;
    }
}

@media (max-width: 500px) {

    /* Keep header compact */
    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 6px;
    }

    /* Hide nav links on mobile */
    .nav-links {
        display: none;
    }

    /* Keep icon small and aligned */
    .theme-icon {
        font-size: 18px;
        margin-left: 6px;
    }

    /* Buttons */
    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }

    /* Show hamburger on mobile */
    .hamburger {
        display: block;
    }

    /* Hide nav links until menu opens */
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: center;
        margin-top: 10px;
        gap: 18px;
    }

    /* When menu is active */
    .nav-links.active {
        display: flex;
    }

    .btn {
        padding: 10px 18px;
        font-size: 15px;
        width: auto;
        min-width: 160px;
        text-align: center;
    }

    .btn.secondary {
        padding: 10px 18px;
    }

    /* Images */
    .project-card img {
        max-width: 300px;
    }

    /* Footer */
    .footer {
        font-size: 14px;
        padding: 30px 20px;
    }
}


@media (max-width: 400px) {
    .btn {
        min-width: 140px;
        padding: 8px 16px;
        font-size: 14px;
    }
}
