/* --- CSS Reset & Variables --- */
:root {
    /* Colors */
    --bg-main: #0b0914;
    --bg-secondary: rgba(26, 18, 43, 0.6);
    --bg-tertiary: rgba(43, 28, 66, 0.8);
    --accent: #d4af37;
    --accent-glow: rgba(212, 175, 55, 0.3);
    --text-primary: #f2f2f2;
    --text-secondary: #a6a6a6;
    
    /* Typography */
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    
    /* Spacing */
    --nav-height: 80px;
    --padding-global: 50px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

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

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--text-secondary) var(--bg-main);
}

body {
    font-family: var(--font-main);
    background-color: #0b0914;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(106, 13, 173, 0.25), transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(13, 106, 173, 0.25), transparent 40%),
        radial-gradient(circle at 50% 80%, rgba(212, 175, 55, 0.15), transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

section {
    flex: 1;
    position: relative;
    z-index: 1;
}

footer {
    position: relative;
    z-index: 1;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 700;
}

p {
    color: var(--text-secondary);
}

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

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

ul {
    list-style: none;
}

/* --- Utility Classes --- */
.section-padding {
    padding: 100px 15%;
}

@media (max-width: 1024px) {
    .section-padding {
        padding: 80px 10%;
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding: 60px 5%;
    }
}

.text-center {
    text-align: center;
}

.glass {
    background: var(--bg-secondary);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: var(--transition);
}

.glass:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -15px var(--accent-glow);
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.primary-btn {
    background-color: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

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

.secondary-btn {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid transparent;
}

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

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    background-color: rgba(10, 25, 47, 0.85);
    backdrop-filter: blur(10px);
    z-index: 100;
    transition: var(--transition);
}

.navbar.scrolled {
    height: 70px;
    box-shadow: 0 10px 30px -10px rgba(2, 12, 27, 0.7);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 5%;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--text-primary);
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links li a {
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-heading);
}

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

.nav-btn {
    border: 1px solid var(--accent);
    padding: 8px 16px;
    border-radius: 4px;
    color: var(--accent) !important;
}

.nav-btn:hover {
    background-color: var(--accent-glow);
}

.hamburger {
    display: none;
    cursor: pointer;
    color: var(--accent);
    font-size: 24px;
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
}

.greeting {
    color: var(--accent);
    font-family: var(--font-heading);
    margin-bottom: 20px;
    font-size: 32px;
}

.name {
    font-size: clamp(30px, 6vw, 70px);
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 10px;
}

.title {
    font-size: clamp(30px, 6vw, 60px);
    color: var(--text-secondary);
    line-height: 1.1;
    margin-bottom: 30px;
}

.hero-desc {
    max-width: 540px;
    font-size: 18px;
    margin-bottom: 50px;
}

.hero-cta {
    display: flex;
    gap: 20px;
}

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

.hero-visual {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 400px;
    height: 500px;
    z-index: 1;
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 24px;
}

.hero-profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
    position: relative;
    z-index: 2;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    filter: contrast(1.05) saturate(1.1);
    transition: var(--transition);
}

.hero-image-wrapper:hover .hero-profile-image {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(212, 175, 55, 0.2);
}

.hero-image-backdrop {
    position: absolute;
    top: 25px;
    left: 25px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent);
    border-radius: 24px;
    z-index: 1;
    transition: var(--transition);
    opacity: 0.8;
}

.hero-image-wrapper:hover .hero-image-backdrop {
    top: 15px;
    left: 15px;
}

/* --- Section Titles --- */
.section-title {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: clamp(26px, 5vw, 32px);
    margin-right: 20px;
    white-space: nowrap;
}

.section-title .line {
    height: 1px;
    width: 300px;
    background-color: var(--bg-tertiary);
}

/* --- About Section --- */
.about-content {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 50px;
}

.about-text p {
    margin-bottom: 15px;
    font-size: 16px;
}

.skills-list-inline {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 200px));
    gap: 10px;
    margin-top: 20px;
}

.skills-list-inline li {
    font-family: var(--font-heading);
    font-size: 14px;
    color: var(--text-secondary);
}

.skills-list-inline i {
    color: var(--accent);
    margin-right: 8px;
    font-size: 12px;
}

.image-placeholder{
    width:100%;
    aspect-ratio:1/1;
    border-radius:12px;
    overflow:hidden;
    border:2px solid var(--accent);
    position:relative;
}

.image-placeholder::before {
    content: '';
    position: absolute;
    inset: 15px;
    border: 1px solid var(--accent);
    border-radius: 8px;
    transition: var(--transition);
    z-index: -1;
}

.image-placeholder:hover {
    transform: translate(-5px, -5px);
}

.image-placeholder:hover::before {
    transform: translate(10px, 10px);
}

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

.skill-card {
    padding: 30px;
    text-align: left;
}

.skill-icon {
    font-size: 40px;
    color: var(--accent);
    margin-bottom: 20px;
}

.skill-card h3 {
    margin-bottom: 15px;
    font-size: 20px;
}

.skill-card p {
    font-size: 15px;
}

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

.project-card {
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.project-overline {
    font-family: var(--font-heading);
    color: var(--accent);
    font-size: 13px;
    margin-bottom: 5px;
}

.project-title {
    font-size: 22px;
    margin-bottom: 15px;
}

.project-description {
    flex-grow: 1;
    font-size: 15px;
    margin-bottom: 20px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    font-family: var(--font-heading);
    font-size: 13px;
    color: var(--text-secondary);
}

.project-links a {
    font-size: 20px;
    color: var(--text-primary);
    margin-right: 15px;
}

.project-links a:hover {
    color: var(--accent);
}

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

.contact-overline {
    color: var(--accent);
    font-family: var(--font-heading);
    margin-bottom: 10px;
}

.contact-title {
    font-size: clamp(40px, 5vw, 60px);
    margin-bottom: 20px;
}

.contact-desc {
    margin-bottom: 40px;
    font-size: 18px;
}

/* --- Footer --- */
footer {
    padding: 30px;
    text-align: center;
    background-color: var(--bg-main);
}

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

.social-links a {
    color: var(--text-secondary);
    font-size: 20px;
}

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

.copyright {
    font-family: var(--font-heading);
    font-size: 13px;
}

/* --- Animations (Scroll Reveal) --- */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Education Section --- */
/* ================= EDUCATION SECTION ================= */

/* ================= EDUCATION ================= */

.education-container{
    display:grid;

    grid-template-columns:
    repeat(auto-fit,minmax(300px,1fr));

    gap:40px;

    margin-top:60px;
}

.education-card{
    background:var(--bg-secondary);

    border:1px solid rgba(255,255,255,0.08);

    border-radius:25px;

    padding:40px 30px;

    text-align:center;

    transition:0.4s;

    position:relative;

    overflow:hidden;
}

.education-card:hover{
    transform:translateY(-10px);

    border-color:var(--accent);

    box-shadow:0 15px 40px rgba(0,0,0,0.4);
}

/* LOGO */

.edu-logo{
    width:120px;
    height:120px;

    margin:0 auto 25px;

    background:white;

    border-radius:50%;

    display:flex;
    justify-content:center;
    align-items:center;

    padding:15px;

    border:3px solid var(--accent);
}

.institute-logo{
    width:100%;
    height:100%;

    object-fit:contain;
}

/* TEXT */

.education-card h3{
    font-size:30px;

    margin-bottom:15px;

    line-height:1.4;
}

.edu-college{
    color:var(--text-secondary);

    font-size:18px;

    margin-bottom:15px;
}

.edu-date{
    color:var(--accent);

    font-size:16px;

    display:block;

    margin-bottom:25px;
}

/* SCORE */

.edu-score{
    background:linear-gradient(135deg,#d4af37,#facc15);

    color:#111;

    padding:12px 25px;

    border-radius:50px;

    display:inline-block;

    font-weight:700;

    font-size:20px;
}

@media (min-width: 769px) {
    .education-timeline::before {
        left: 50%;
        transform: translateX(-50%);
    }
    .timeline-item {
        width: 50%;
        margin-bottom: 30px;
    }
    .timeline-item:nth-child(odd) {
        align-self: flex-start;
        padding-right: 60px;
        flex-direction: row-reverse;
        text-align: right;
    }
    .timeline-item:nth-child(even) {
        align-self: flex-end;
        padding-left: 60px;
    }
    .timeline-icon {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        margin: 0;
    }
    .timeline-item:nth-child(odd) .timeline-icon {
        right: -60px;
    }
    .timeline-item:nth-child(even) .timeline-icon {
        left: -60px;
    }
}

/* --- Media Queries --- */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        flex-direction: column;
        background-color: var(--bg-secondary);
        width: 70%;
        height: 100vh;
        padding-top: 100px;
        transition: 0.3s;
        box-shadow: -10px 0 30px -15px rgba(2, 12, 27, 0.7);
    }

    .nav-links.active {
        right: 0;
    }

    .hamburger {
        display: block;
        z-index: 101;
    }

    .hero {
        flex-direction: column-reverse;
        justify-content: center;
        text-align: center;
        padding-top: 120px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .hero-visual {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        width: 250px;
        height: 320px;
        margin: 0 auto 40px auto;
        display: block;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .image-placeholder {
        max-width: 300px;
        margin: 0 auto;
    }
    
    .section-title .line {
        width: 100px;
    }
}
.about-profile-image{
    width:100%;
    height:100%;
    object-fit:cover;
    border-radius:12px;
}
/* FLIP CARD */

.flip-card{
    width:100%;
    height:320px;
    perspective:1000px;
}

.flip-card-inner{
    position:relative;
    width:100%;
    height:100%;
    transition:transform 0.8s;
    transform-style:preserve-3d;
}

.flip-card:hover .flip-card-inner{
    transform:rotateY(180deg);
}

.flip-card-front,
.flip-card-back{
    position:absolute;
    width:100%;
    height:100%;
    backface-visibility:hidden;
    border-radius:20px;
    overflow:hidden;
}

.flip-card-front{
    background: var(--bg-secondary);

    border:1px solid rgba(255,255,255,0.08);

    display:flex;

    flex-direction:column;

    justify-content:center;

    align-items:center;

    text-align:center;

    padding:30px;

    gap:20px;
}


.flip-card-back{
    background:linear-gradient(135deg,#0f172a,#1e293b);
    color:white;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    transform:rotateY(180deg);
    border:2px solid var(--accent);
}

.flip-card-back h1{
    font-size:55px;
    color:var(--accent);
    margin-top:10px;
}

.flip-card-back p{
    font-size:20px;
    color:#ddd;
}
/* CONTACT FORM */

.contact-form{
    max-width:700px;

    margin:50px auto 0;

    display:flex;

    flex-direction:column;

    gap:20px;
}

.contact-form input,
.contact-form textarea{
    width:100%;

    padding:18px 20px;

    border:none;

    outline:none;

    border-radius:15px;

    background:rgba(255,255,255,0.08);

    color:white;

    font-size:16px;

    font-family:var(--font-main);

    border:1px solid rgba(255,255,255,0.1);
}

.contact-form textarea{
    resize:none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder{
    color:#aaa;
}

.contact-form button{
    align-self:center;
}
/* ===== FIX PROJECT CARD LAYOUT ===== */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    align-items: start;
}

/* Equal card heights */
.project-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Keep links at bottom */
.project-links {
    margin-top: auto;
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Old icon style */
.project-links a {
    color: white;
    font-size: 1.8rem;
    transition: 0.3s ease;
}

.project-links a:hover {
    color: #6366f1;
    transform: translateY(-4px) scale(1.1);
}

/* Mobile responsive */
@media (max-width: 768px) {

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

}