/* --- Variables & Reset --- */
:root {
    --bg-color: #0a192f;
    --nav-bg: rgba(10, 25, 47, 0.85);
    --text-main: #ccd6f6;
    --text-secondary: #8892b0;
    --accent: #64ffda;
    --card-bg: #112240;
    --font-main: 'Inter', sans-serif;
    --font-mono: 'Fira Code', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
}

/* --- Typography --- */
h1,
h2,
h3 {
    color: var(--text-main);
}

p {
    color: var(--text-secondary);
    margin-bottom: 15px;
}

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

.mono-text {
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 100px 20px;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
}

.section-title::after {
    content: "";
    display: block;
    height: 1px;
    width: 300px;
    background-color: #233554;
    margin-left: 20px;
}

/* --- Navigation --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--nav-bg);
    backdrop-filter: blur(10px);
    z-index: 100;
    padding: 20px 0;
}

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

.logo {
    font-weight: 800;
    font-size: 1.5rem;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: color 0.3s;
}

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

.nav-icons {
    display: flex;
    gap: 20px;
}

.icon {
    width: 24px;
    height: 24px;
    stroke: var(--text-secondary);
    transition: stroke 0.3s;
}

.icon:hover {
    stroke: var(--accent);
}

/* --- Hero Section --- */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.hero-text {
    flex: 1;
}

#hero h1 {
    font-size: clamp(40px, 8vw, 80px);
    margin: 0;
}

#hero h2 {
    font-size: clamp(30px, 6vw, 60px);
    color: var(--text-secondary);
}

.hero-desc {
    max-width: 540px;
    margin-top: 20px;
}

.hero-image {
    flex-shrink: 0;
}

.hero-image img {
    width: 280px;
    height: 280px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--accent);
    box-shadow: 0 10px 30px -10px rgba(2, 12, 27, 0.7);
    transition: transform 0.3s ease;
    
    /* Image rendering fixes for high-res downscaling */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    transform: translateZ(0);
}

.hero-image img:hover {
    transform: translateY(-5px);
}

.btn {
    display: inline-block;
    padding: 15px 30px;
    border: 1px solid var(--accent);
    color: var(--accent);
    text-decoration: none;
    font-family: var(--font-mono);
    border-radius: 4px;
    margin-top: 30px;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: rgba(100, 255, 218, 0.1);
}

.edu-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 5px;
}

.edu-header h3 {
    font-size: 1.5rem;
    color: var(--text-main);
}

.edu-degree {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.edu-details {
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.coursework-title {
    color: var(--text-main);
    margin-bottom: 15px;
    font-size: 1rem;
}

.course-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.course-badge {
    background-color: var(--card-bg);
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-family: var(--font-mono);
    border: 1px solid rgba(100, 255, 218, 0.1);
}

/* --- Project Card Styling --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 4px;
    box-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
    transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-card:hover {
    transform: translateY(-7px);
}

.project-overline {
    color: var(--accent);
    margin-bottom: 15px;
}

.project-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

.project-description {
    margin-bottom: 20px;
}

.project-tech-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: auto; /* Pushes tech list to the bottom */
}


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

.skill-category h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-main);
}

.skills-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    list-style: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.skills-list li::before {
    content: "▹";
    color: var(--accent);
    margin-right: 10px;
}

.project-bullets {
    list-style-type: none;
    padding-left: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.project-bullets li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
}

.project-bullets li:last-child {
    margin-bottom: 0;
}

.project-bullets li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-family: var(--font-mono);
}

/* --- Contact Section --- */
#contact {
    text-align: center;
    max-width: 600px;
}

#contact .section-title {
    justify-content: center;
}

#contact .section-title::after {
    display: none;
}

.contact-content p {
    margin-bottom: 20px;
}

.contact-phone {
    font-size: 1.2rem;
    margin-bottom: 35px !important;
}

.contact-btn {
    padding: 18px 40px;
    font-size: 1.1rem;
}

footer {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
}

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

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

/* --- Mobile Responsive Fixes --- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .section-title::after {
        width: 100%;
    }

    .hero-wrapper {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 50px;
    }

    .hero-desc {
        margin: 20px auto 0;
    }

    .edu-header {
        flex-direction: column;
        gap: 5px;
    }
}

/* --- Timeline Styling --- */
.timeline {
    border-left: 2px solid #233554;
    padding-left: 40px;
    margin-left: 10px;
}

.timeline-item {
    position: relative;
    margin-bottom: 60px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -49px;
    /* Aligns dot perfectly over the border */
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--bg-color);
    border: 2px solid var(--accent);
}

.timeline-date {
    margin-bottom: 5px;
}

.timeline-role {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

.timeline-desc {
    list-style: none;
    color: var(--text-secondary);
}

.timeline-desc li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
}

.timeline-desc li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-family: var(--font-mono);
}

/* --- Mobile Fix for Timeline --- */
@media (max-width: 768px) {
    .timeline {
        padding-left: 20px;
    }

    .timeline-dot {
        left: -29px;
    }
}


/* --- Navigation --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--nav-bg);
    backdrop-filter: blur(10px);
    z-index: 100;
    padding: 20px 0;
}

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

.logo {
    font-weight: 800;
    font-size: 1.5rem;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: color 0.3s;
}

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

.nav-icons {
    display: flex;
    gap: 20px;
}

.icon {
    width: 24px;
    height: 24px;
    stroke: var(--text-secondary);
    transition: stroke 0.3s;
}

.icon:hover {
    stroke: var(--accent);
}

/* --- Hero Section --- */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.hero-text {
    flex: 1;
}

#hero h1 {
    font-size: clamp(40px, 8vw, 80px);
    margin: 0;
}

#hero h2 {
    font-size: clamp(30px, 6vw, 60px);
    color: var(--text-secondary);
}

.hero-desc {
    max-width: 540px;
    margin-top: 20px;
}

.hero-image {
    flex-shrink: 0;
}

.hero-image img {
    width: 280px;
    height: 280px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--accent);
    box-shadow: 0 10px 30px -10px rgba(2, 12, 27, 0.7);
    transition: transform 0.3s ease;
    
    /* Image rendering fixes for high-res downscaling */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    transform: translateZ(0);
}

.hero-image img:hover {
    transform: translateY(-5px);
}

.btn {
    display: inline-block;
    padding: 15px 30px;
    border: 1px solid var(--accent);
    color: var(--accent);
    text-decoration: none;
    font-family: var(--font-mono);
    border-radius: 4px;
    margin-top: 30px;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: rgba(100, 255, 218, 0.1);
}

.edu-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 5px;
}

.edu-header h3 {
    font-size: 1.5rem;
    color: var(--text-main);
}

.edu-degree {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.edu-details {
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.coursework-title {
    color: var(--text-main);
    margin-bottom: 15px;
    font-size: 1rem;
}

.course-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.course-badge {
    background-color: var(--card-bg);
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-family: var(--font-mono);
    border: 1px solid rgba(100, 255, 218, 0.1);
}

/* --- Project Card Styling --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 4px;
    box-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
    transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-card:hover {
    transform: translateY(-7px);
}

.project-overline {
    color: var(--accent);
    margin-bottom: 15px;
}

.project-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

.project-description {
    margin-bottom: 20px;
}

.project-tech-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: auto; /* Pushes tech list to the bottom */
}


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

.skill-category h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-main);
}

.skills-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    list-style: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.skills-list li::before {
    content: "▹";
    color: var(--accent);
    margin-right: 10px;
}

.project-bullets {
    list-style-type: none;
    padding-left: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.project-bullets li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
}

.project-bullets li:last-child {
    margin-bottom: 0;
}

.project-bullets li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-family: var(--font-mono);
}

/* --- Contact Section --- */
#contact {
    text-align: center;
    max-width: 600px;
}

#contact .section-title {
    justify-content: center;
}

#contact .section-title::after {
    display: none;
}

.contact-content p {
    margin-bottom: 20px;
}

.contact-phone {
    font-size: 1.2rem;
    margin-bottom: 35px !important;
}

.contact-btn {
    padding: 18px 40px;
    font-size: 1.1rem;
}

footer {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
}

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

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

/* --- Mobile Responsive Fixes --- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .section-title::after {
        width: 100%;
    }

    .hero-wrapper {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 50px;
    }

    .hero-desc {
        margin: 20px auto 0;
    }

    .edu-header {
        flex-direction: column;
        gap: 5px;
    }
}

/* --- Timeline Styling --- */
.timeline {
    border-left: 2px solid #233554;
    padding-left: 40px;
    margin-left: 10px;
}

.timeline-item {
    position: relative;
    margin-bottom: 60px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -49px;
    /* Aligns dot perfectly over the border */
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--bg-color);
    border: 2px solid var(--accent);
}

.timeline-date {
    margin-bottom: 5px;
}

.timeline-role {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

.timeline-desc {
    list-style: none;
    color: var(--text-secondary);
}

.timeline-desc li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
}

.timeline-desc li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-family: var(--font-mono);
}

/* --- Mobile Fix for Timeline --- */
@media (max-width: 768px) {
    .timeline {
        padding-left: 20px;
    }

    .timeline-dot {
        left: -29px;
    }
}