/* ===== CSS Variables ===== */
:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #141822;
    --bg-tertiary: #1a1f2e;
    --text-primary: #e8eaed;
    --text-secondary: #a0a4b8;
    --accent-primary: #00d9ff;
    --accent-secondary: #7c3aed;
    --accent-gradient: linear-gradient(135deg, #00d9ff 0%, #7c3aed 100%);
    --glass-bg: rgba(26, 31, 46, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e9ecef;
    --text-primary: #1a1f2e;
    --text-secondary: #6c757d;
    --accent-primary: #0099cc;
    --accent-secondary: #6610f2;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
}

/* ===== Navbar Styles ===== */
.navbar-custom {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    color: var(--text-primary) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.theme-toggle {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
    transform: rotate(180deg);
}

/* ===== Hero Section ===== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 4rem 0;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(124, 58, 237, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 217, 255, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    /* text-align: center;  REMOVED for 2-col layout */
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 0 2rem;
}

.cta-button {
    background: var(--accent-gradient);
    color: white;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 217, 255, 0.3);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 217, 255, 0.5);
    color: white;
}

/* ===== Hero Visual / Animation (NEW) ===== */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.3s;
    /* Delays appearance slightly */
}

.orbit-container {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-hero-img {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(0, 217, 255, 0.3);
    box-shadow: 0 0 50px rgba(124, 58, 237, 0.4);
    position: relative;
    z-index: 10;
    animation: float 6s ease-in-out infinite;
}

.orbit-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px dashed rgba(124, 58, 237, 0.3);
    animation: orbit 20s linear infinite;
}

.floating-icon {
    position: absolute;
    width: 50px;
    height: 50px;
    background: var(--bg-secondary);
    border: 1px solid var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    font-size: 1.5rem;
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.3);
    animation: counter-rotate 20s linear infinite;
    /* Keeps icons upright */
}

/* Positioning icons on the ring */
.icon-1 {
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
}

.icon-2 {
    right: -25px;
    top: 50%;
    transform: translateY(-50%);
}

.icon-3 {
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
}

.icon-4 {
    left: -25px;
    top: 50%;
    transform: translateY(-50%);
}

/* Keyframes for Hero Animation */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes orbit {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes counter-rotate {
    from {
        transform: rotate(360deg);
    }

    to {
        transform: rotate(0deg);
    }
}

/* ===== Section Styles ===== */
.section {
    padding: 6rem 0;
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

/* ===== About Section ===== */
.about-img {
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
}

.about-img:hover {
    transform: translateY(-10px);
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.about-list {
    list-style: none;
    padding: 0;
    margin-top: 2rem;
}

.about-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
}

.about-list li i {
    color: var(--accent-primary);
    margin-right: 1rem;
    font-size: 1.2rem;
}

/* ===== Skills Section ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 217, 255, 0.2);
}

.skill-icon {
    font-size: 3rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.skill-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.skill-bar {
    background: var(--bg-tertiary);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 1rem;
}

.skill-progress {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 4px;
    width: 0;
    transition: width 1s ease;
}

/* ===== Projects Section ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.project-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg-tertiary);
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.project-desc {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: var(--bg-tertiary);
    color: var(--accent-primary);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-btn {
    flex: 1;
    padding: 0.7rem;
    border: 1px solid var(--accent-primary);
    background: transparent;
    color: var(--accent-primary);
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
}

.project-btn:hover {
    background: var(--accent-primary);
    color: white;
}

/* ===== Contact Section ===== */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: center;
}

.contact-info {
    text-align: left;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

.contact-form {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 2.5rem;
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-control-custom {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control-custom:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.2);
}

.form-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-primary);
}

textarea.form-control-custom {
    min-height: 120px;
    resize: vertical;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--accent-gradient);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 217, 255, 0.4);
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-secondary);
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.social-icon {
    width: 50px;
    height: 50px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    background: var(--accent-gradient);
    color: white;
    transform: translateY(-5px);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

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

/* ===== Responsive Styles ===== */
@media (max-width: 991px) {
    .hero-section {
        text-align: center;
    }

    .hero-content {
        text-align: center !important;
        margin-bottom: 3rem;
    }

    .hero-description {
        margin: 0 auto 2rem;
        /* Center description on mobile */
    }

    /* Reverse column order on mobile so image is top or text is top depending on preference. 
       Currently Text on top, Image below */

    .orbit-container {
        width: 300px;
        height: 300px;
        margin: 0 auto;
    }

    .main-hero-img {
        width: 180px;
        height: 180px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}