/* ================= GLOBAL ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", "Segoe UI", sans-serif;
    background-color: #0f172a; /* deep navy */
    color: #e2e8f0;
    line-height: 1.6;
}

/* ================= VARIABLES ================= */
:root {
    --bg: #0f172a;
    --card: #1e293b;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --accent: #38bdf8;
    --border: #334155;
}

/* ================= HEADER ================= */
.header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    padding: 20px 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.logo {
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
}

.navbar a {
    margin-left: 25px;
    color: var(--muted);
    text-decoration: none;
    font-size: 15px;
    transition: 0.3s ease;
}

.navbar a:hover {
    color: var(--text);
}

/* ================= HERO ================= */
.home {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.home-left {
    flex: 1;
}

.home-right {
    flex: 1;
    display: flex;
    justify-content: center;
}

.home-cont {
    max-width: 700px;
}

.home-cont h1 {
    font-size: 48px;
    font-weight: 600;
    margin-bottom: 10px;
}

.home-cont h3 {
    font-size: 20px;
    color: var(--accent);
    margin-bottom: 20px;
}

.home-cont p {
    color: var(--muted);
    margin-bottom: 30px;
}

/* IMAGE FRAME */
.image-frame {
    width: 420px;
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    position: relative;
    background: #020617;
}

.image-frame img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease;
}

.image-frame img.active {
    opacity: 1;
}

/* ================= BUTTONS ================= */
.btn {
    display: inline-block;
    padding: 10px 22px;
    background: var(--accent);
    color: #0f172a;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid var(--accent);
}

.btn:hover {
    background: transparent;
    color: var(--accent);
    transform: translateY(-2px);
}

.btn-outline {
    margin-left: 10px;
    padding: 10px 20px;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 6px;
    text-decoration: none;
    transition: 0.3s ease;
}

.btn-outline:hover {
    border-color: var(--accent);
}

/* ================= SOCIAL ================= */
.social_media {
    margin-top: 25px;
}

.social_media a {
    margin-right: 18px;   /* increased spacing */
    font-size: 20px;
    color: var(--muted);
    transition: 0.3s ease;
}

.social_media a:hover {
    color: var(--accent);
}

/* ================= SECTION ================= */
section {
    padding: 80px 8%;
}

.head {
    text-align: center;
    font-size: 28px;
    margin-bottom: 40px;
}

/* ================= ABOUT ================= */
.about-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    max-width: 1000px;
    margin: auto;
}

/* IMAGE */
.about-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.about-image img {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--border);
    transition: 0.4s ease;
}

/* subtle hover */
.about-image img:hover {
    transform: scale(1.05);
    border-color: var(--accent);
}

.About_txt {
    flex: 2;
}

.About_txt h2 {
    font-size: 32px;
    margin-bottom: 20px;
}

.About_txt span {
    color: var(--accent);
}

.About_txt p {
    font-size: 16px;
    color: var(--muted);
    margin-bottom: 15px;
    line-height: 1.7;
}

@media (max-width: 768px) {
    .about-container {
        flex-direction: column;
        text-align: center;
    }

    .about-image img {
        width: 180px;
        height: 180px;
    }
}

/* ================= PROJECTS ================= */
.projects-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.project-card {
    background: var(--card);
    padding: 20px;
    border-radius: 10px;
    width: 340px;
    max-width: 320px;
    min-width: 260px;
    border: 1px solid var(--border);

    display: flex;
    flex: 1 1 300px;
    flex-direction: column;
    justify-content: space-between;

    min-height: 220px; /* ensures consistent size */

    transition: all 0.3s ease;
}

/* subtle left accent bar */
.project-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--accent);
    opacity: 0.6;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.project-card h3 {
    font-size: 17px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.project-card p {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 10px;
}

.project-card .focus {
    font-size: 13px;
    color: var(--text);
}

/* links */
.project-links a {
    margin-right: 12px;
    font-size: 13px;
    color: var(--accent);
    text-decoration: none;
    transition: 0.3s ease;
}

.project-links a:hover {
    text-decoration: underline;
}

.project-img {
    width: 100%;
    border-radius: 6px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.project-content {
    flex-grow: 1;
}

/* footer area */
.project-footer {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.expand-btn {
    padding: 8px 18px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;

    transition: all 0.3s ease;
}

/* hover interaction */
.expand-btn:hover {
    background: var(--accent);
    color: #0f172a;
    transform: translateY(-2px);
    border-color: var(--accent);
}

.expand-btn:active {
    transform: scale(0.96);
}

/* ================= OVERLAY ================= */

.project-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: var(--bg);
    z-index: 999;

    opacity: 0;
    visibility: hidden;
    transform: scale(0.98);

    transition: all 0.4s ease;
    overflow-y: auto;
    scrollbar-width: thin;
}

.project-overlay::-webkit-scrollbar {
    width: 6px;
}

.project-overlay::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

/* ACTIVE STATE */
.project-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* ================= OVERLAY HERO ================= */

.overlay-hero {
    position: relative;
    height: 40vh;
    overflow: hidden;
}

.overlay-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.5);
}

/* TITLE ON IMAGE */
.overlay-title {
    position: absolute;
    bottom: 20px;
    left: 8%;
}

.overlay-title h2 {
    color: white;
    font-size: 28px;
    max-width: 700px;
}

/* ================= OVERLAY CONTENT ================= */

.overlay-content {
    padding: 40px 8%;
    max-width: 900px;
    margin: auto;
    overflow-y: auto;
}

.overlay-content h3 {
    margin-bottom: 10px;
    margin-top: 20px;
}

.overlay-content p {
    color: var(--muted);
    margin-bottom: 20px;
}

/* LINKS */
.overlay-content a {
    margin-right: 15px;
    color: var(--accent);
    text-decoration: none;
    transition: 0.3s ease;
}

.overlay-content a:hover {
    text-decoration: underline;
}

/* ================= CLOSE BUTTON ================= */

.close-btn {
    position: fixed;
    top: 20px;
    right: 30px;
    font-size: 30px;
    color: white;
    cursor: pointer;
    z-index: 1000;
    transition: 0.3s ease;
}

.close-btn:hover {
    color: var(--accent);
    transform: rotate(90deg);
}

.expand-btn {
    margin-top: 10px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.expand-btn:hover {
    background: var(--accent);
    color: #0f172a;
}

/* ================= INTERESTS ================= */
.interest-list {
    max-width: 600px;
    margin: auto;
    list-style: none;
    text-align: center;
}

.interest-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
}

.interests-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1000px;
    margin: auto;
}

/* card */
.interest-card {
    background: var(--card);
    padding: 18px;
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.interest-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
}

/* title */
.interest-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

/* text */
.interest-card p {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.5;
}

@media (max-width: 900px) {
    .interests-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .interests-container {
        grid-template-columns: 1fr;
    }
}

/* ================= EXPERIENCE ================= */
.Experience-cont {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.exp-cont {
    background: var(--card);
    padding: 20px;
    border-radius: 10px;
    width: 300px;
    border: 1px solid var(--border);
    transition: 0.3s ease;
}

.exp-cont:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.exp-cont h3 {
    margin-bottom: 5px;
}

.exp-cont h4 {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 10px;
}

.exp-cont p {
    font-size: 14px;
    color: var(--muted);
}

/* ================= CONTACT ================= */
.contact-text {
    max-width: 600px;
    margin: auto;
    text-align: center;
}

.contact-text p {
    margin-bottom: 20px;
    color: var(--muted);
}

.contact-list {
    list-style: none;
    margin-bottom: 20px;
}

.contact-list a:link {
  color: green;
  background-color: transparent;
  text-decoration: underline;
}

.contact-list li {
    margin-bottom: 10px;
    color: var(--muted);
}

/* ================= SCROLL ANIMATION ================= */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}