:root {
    --bg-color: #2d3250;
    --card-color: #424769;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --accent-color: #f9b17a;
    --accent-hover: #ffc291;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Montserrat', sans-serif;
    --transition: all 0.3s ease;
    --nav-bg: rgba(45, 50, 80, 0.9);
    --border-color: rgba(255, 255, 255, 0.2);
}

body.light-mode {
    --bg-color: #f8f9fa;
    --card-color: #ffffff;
    --text-primary: #2d3250;
    --text-secondary: #424769;
    --accent-color: #e67e22;
    --accent-hover: #d35400;
    --nav-bg: rgba(248, 249, 250, 0.9);
    --border-color: rgba(45, 50, 80, 0.15);
}

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

/* Base */
html {
    scroll-behavior: smooth;
    width: 100%;
}

body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    transition: background-color 0.4s ease, color 0.4s ease;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Helpers */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 500;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: var(--transition);
}

.primary-btn {
    background-color: var(--accent-color);
    color: var(--bg-color);
}

.primary-btn:hover {
    transform: translateY(-2px);
}

.secondary-btn {
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
}

.secondary-btn:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: background 0.4s ease;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

.navbar nav ul {
    display: flex;
    gap: 30px;
}

.navbar nav a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 15px;
}

.navbar nav a:hover {
    color: var(--accent-color);
}

/* Theme Toggle */
.theme-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, color 0.3s ease;
}

.theme-btn:hover {
    color: var(--accent-color);
    transform: rotate(15deg);
}

.theme-btn .fa-sun {
    display: none;
}

body.light-mode .theme-btn .fa-moon {
    display: none;
}

body.light-mode .theme-btn .fa-sun {
    display: block;
    color: var(--accent-color);
}

/* Hero */
.hero {
    min-height: 100vh;
    padding: 80px 5% 80px 10%;
    /* 10% left, 5% right */
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.hero-content {
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.secondary-btn {
    background-color: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.secondary-btn:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
}

.sub-headline {
    color: var(--accent-color);
    font-family: 'Courier New', Courier, monospace;
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 600;
}

.typing-cursor {
    border-right: 3px solid var(--accent-color);
    padding-right: 3px;
    animation: blink 0.75s step-end infinite;
}

@keyframes blink {

    from,
    to {
        border-color: transparent
    }

    50% {
        border-color: var(--accent-color)
    }
}

.headline {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    margin-bottom: 15px;
}

.accent-text {
    color: var(--accent-color);
}

.role {
    color: var(--text-secondary);
    letter-spacing: 2px;
    margin-bottom: 30px;
}

.hero-image {
    margin-right: -8px;
}

.hero-image img {
    max-width: 450px;
    max-height: 70vh;
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Social Icons */
.social-icons {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.social-link {
    width: 45px;
    height: 45px;
    background-color: var(--card-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    position: relative;
    transition: var(--transition);
    overflow: hidden;
    /* Added */
}

.social-link i {
    font-size: 1.2rem;
}

.social-link:hover {
    width: 140px;
    /* Increased width to fit text */
    border-radius: 30px;
    background-color: var(--accent-color);
    color: var(--bg-color);
    justify-content: center;
    /* Keep centered or maybe flex-start/space-evenly? center works if margins are used */
    padding: 0 15px;
    /* Add padding for looks */
}

.social-link::after {
    content: attr(data-tooltip);
    opacity: 0;
    white-space: nowrap;
    transition: var(--transition);
    max-width: 0;
    display: inline-block;
    overflow: hidden;
}

.social-link:hover::after {
    opacity: 1;
    max-width: 100px;
    margin-left: 10px;
}

/* About & Skills Merged */
.about-skills {
    background-color: var(--card-color);
}

.about-skills-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    column-gap: 60px;
}

.about-header,
.skills-header {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 200px;
    /* Match new image size */
    /* Ensures titles are on the same line */
}

.skills-header {
    border-left: 2px solid var(--border-color);
    padding-left: 30px;
}

.about-image img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.section-title.left-align {
    text-align: left;
    font-size: 2rem;
    margin-bottom: 0;
}

.about-text-column,
.skills-column {
    padding-top: 10px;
    /* Reduced from 30px */
}

.skills-column {
    border-left: 2px solid var(--border-color);
    padding-left: 30px;
}

.about-text p {
    margin-bottom: 15px;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
}

.about-quote {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-style: italic;
    color: var(--accent-color);
    border-left: 4px solid var(--accent-color);
    padding-left: 15px;
    margin-top: 20px;
}

.skills-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 20px;
}

@media (max-width: 900px) {
    .about-skills-wrapper {
        display: flex;
        /* Switch back to flex for mobile stacking */
        flex-direction: column;
        gap: 20px;
    }

    .about-header {
        order: 1;
        height: auto;
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .about-header .section-title {
        order: 1;
    }

    .about-header .about-image {
        order: 2;
    }

    .about-text-column {
        order: 2;
        padding-top: 0;
    }

    .skills-header {
        order: 3;
        height: auto;
        flex-direction: column;
        text-align: center;
        gap: 15px;
        border-left: none;
        padding-left: 0;
    }

    .skills-column {
        order: 4;
        border-left: none;
        padding-left: 0;
        padding-top: 0;
    }

    .section-title.left-align {
        text-align: center;
    }
}

/* Education / Timeline */
.education {
    background-color: var(--bg-color);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 40px;
}

/* The Vertical Line */
.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    /* Slight offset to align with the first dot */
    width: 2px;
    height: 100%;
    background-color: var(--accent-color);
}

.timeline-item {
    margin-bottom: 40px;
    position: relative;
    background: var(--card-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    /* Subtle shadow for depth */
}

/* The Circle */
.timeline-item::before {
    content: '';
    position: absolute;
    left: -49px;
    /* -40px parent padding - 9px (half width + border) */
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--accent-color);
    border: 3px solid var(--bg-color);
    z-index: 1;
}

.timeline-date {
    color: var(--accent-color);
    font-size: 1.1rem;
    font-weight: 500;
    display: block;
    margin-bottom: 8px;
}

.timeline-item h2 {
    /* Targeting the h2 the user added */
    font-family: var(--font-heading);
    font-size: 1.5rem;
    /* Larger */
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.institute {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    /* Brighter than secondary */
    margin-bottom: 2px;
}

.location {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 3px;
}

/* Skills */



/* Skills styles for skill-card */
.skill-card {
    width: 60px;
    height: 60px;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.skill-card i {
    font-size: 1.8rem;
    color: var(--accent-color);
    transition: var(--transition);
}

.custom-icon {
    height: 1.8rem;
    width: auto;
    max-width: 90%;
    object-fit: contain;
    transition: var(--transition);
}

.skill-card:hover i,
.skill-card:hover .custom-icon {
    transform: scale(1.2);
    color: var(--text-primary);
}

.skill-text {
    position: absolute;
    bottom: -18px;
    opacity: 0;
    font-size: 0.75rem;
    transition: var(--transition);
    pointer-events: none;
    white-space: nowrap;
}

.skill-card:hover .skill-text {
    opacity: 1;
}

/* =========================
   PROJECTS SECTION
========================= */



.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project {
    background-color: var(--card-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.project:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.project-image {
    position: relative;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project:hover img {
    transform: scale(1.08);
}

/* Overlay */
.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(45, 50, 80, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.project-image:hover .project-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Overlay buttons */
.project-overlay-btn {
    padding: 8px 16px;
    background-color: var(--accent-color);
    color: var(--bg-color);
    font-family: var(--font-heading);
    border-radius: 6px;
    font-size: 0.85rem;
    transition: var(--transition);
    min-width: 120px;
    text-align: center;
    border: 2px solid var(--accent-color);
    display: inline-block;
    /* Ensure min-width works */
}

.project-overlay-btn:hover {
    transform: translateY(-2px);
    background-color: transparent;
    color: var(--accent-color);
}

.project-overlay-btn.outline {
    background: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
}

.project-overlay-btn.outline:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
}

/* Project text */
.project-text {
    padding: 16px 20px;
    text-align: center;
}

.project-text h3 {
    font-family: var(--font-heading);
    margin-bottom: 6px;
}

.project-text p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.project-tech {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.tech-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: var(--bg-color);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.tech-tag i {
    color: var(--accent-color);
    font-size: 0.85rem;
}

.tech-tag img {
    height: 0.85rem;
    width: auto;
}

.project:hover .tech-tag {
    border-color: var(--accent-color);
    color: var(--text-primary);
}

/* Contact Form */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    background-color: var(--card-color);
    border: 2px solid transparent;
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent-color);
    outline: none;
}

.contact-form button {
    align-self: flex-start;
    cursor: pointer;
    border: none;
}

/* Footer */
footer {
    padding: 0 0 20px;
    text-align: center;
    border-top: none;
}

/* Contact Text */
.contact .section-title {
    margin-bottom: 10px;
}

.contact-text {
    text-align: center;
    margin-bottom: 30px;
}

.contact-text h3 {
    font-family: var(--font-heading);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.contact-text p {
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.tagline {
    font-weight: 500;
    color: var(--text-primary);
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0;
    padding: 20px 10% 0;
    border-top: 1px solid var(--card-color);
}

.footer-socials a {
    color: var(--text-secondary);
    font-size: 1.5rem;
    transition: var(--transition);
    position: relative;
}

.footer-socials a::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 140%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--card-color);
    color: var(--text-primary);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    border: 1px solid var(--accent-color);
    visibility: hidden;
}

.footer-socials a:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: 130%;
}

.footer-socials a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 900px) {
    .section {
        padding: 50px 0;
    }

    .hero {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding-top: 100px;
        padding-bottom: 40px;
        height: auto;
        min-height: 80vh;
    }

    .hero-image {
        display: none;
    }

    .social-icons,
    .hero-buttons {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .navbar nav {
        display: none;
        /* Consider adding a mobile menu later */
    }

    .headline {
        font-size: 2.8rem;
        margin-bottom: 20px;
    }

    .sub-headline {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }

    .role {
        font-size: 0.9rem;
        letter-spacing: 1px;
    }

    .project-image img {
        height: 160px;
    }

    .footer-bottom {
        flex-direction: column-reverse;
        gap: 20px;
        padding: 20px 5%;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* =========================
   SCROLL REVEAL ANIMATIONS
   ========================= */

.reveal {
    opacity: 0;
    transition: all 1.2s cubic-bezier(0.17, 0.55, 0.55, 1);
}

.reveal.active {
    opacity: 1;
}

/* Fade In */
.reveal-fade {
    transform: translateY(0);
}

/* Slide Up */
.reveal-up {
    transform: translateY(30px);
}

.reveal-up.active {
    transform: translateY(0);
}

/* Slide Right (From Left) */
.reveal-left {
    transform: translateX(-50px);
}

.reveal-left.active {
    transform: translateX(0);
}

/* Slide Left (From Right) */
.reveal-right {
    transform: translateX(50px);
}

.reveal-right.active {
    transform: translateX(0);
}

/* Staggered Delays for Children */
.stagger-container .reveal.active:nth-child(1) {
    transition-delay: 0.1s;
}

.stagger-container .reveal.active:nth-child(2) {
    transition-delay: 0.2s;
}

.stagger-container .reveal.active:nth-child(3) {
    transition-delay: 0.3s;
}

.stagger-container .reveal.active:nth-child(4) {
    transition-delay: 0.4s;
}

.stagger-container .reveal.active:nth-child(5) {
    transition-delay: 0.5s;
}

.stagger-container .reveal.active:nth-child(6) {
    transition-delay: 0.6s;
}

.stagger-container .reveal.active:nth-child(7) {
    transition-delay: 0.7s;
}

.stagger-container .reveal.active:nth-child(8) {
    transition-delay: 0.8s;
}

/* Hero specific delays */
.hero .headline {
    transition-delay: 0.1s;
}

.hero .sub-headline {
    transition-delay: 0.4s;
}

.hero .role {
    transition-delay: 0.7s;
}

.hero .social-icons {
    transition-delay: 1s;
}

.hero .hero-buttons {
    transition-delay: 1.3s;
}

/* =========================================
   CUSTOM CURSOR
   ========================================= */

/* 1. Hide default cursor on the body (non-active areas) */
body {
    cursor: none;
}

/* 2. The Custom Cursor Element (Small Circle) */
#custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    background-color: var(--accent-color);
    /* Orange #f9b17a */
    border-radius: 50%;
    pointer-events: none;
    /* Let clicks pass through */
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease, transform 0.1s linear;
    mix-blend-mode: difference;
    /* Optional: ensures visibility on light/dark */
    will-change: left, top;
}

/* 3. On interactive elements, show the system Hand Pointer and hide custom circle */
a,
button,
.btn,
input,
textarea,
select,
label,
.project-overlay,
.skill-card,
.theme-btn,
[role="button"] {
    cursor: pointer;
    /* Force system hand cursor */
}

/* Helper class added by JS when hovering interactive elements */
body.hovering-interactable #custom-cursor {
    opacity: 0;
    /* Hide custom circle */
}