/* ========================================
   PORTFOLIO — Minimalist & Catchy
   ======================================== */

:root {
    /* Original blue palette */
    --bg-primary: #001323;
    --bg-secondary: #001a2e;
    --bg-card: rgba(0, 19, 35, 0.6);
    --bg-card-hover: rgba(0, 25, 45, 0.85);

    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(29, 99, 237, 0.3);

    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6b7280;

    --accent: #1D63ED;
    --accent-secondary: #0db7ed;
    --accent-light: #38bdf8;
    --accent-soft: rgba(29, 99, 237, 0.12);
    --accent-glow: rgba(29, 99, 237, 0.25);

    --green: #3fb950;
    --yellow: #d29922;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;

    --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.7;
    font-size: 15px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---- Ambient Background ---- */
.bg-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    opacity: 0.5;
    pointer-events: none;
}

.shape-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent), transparent 70%);
    top: -200px;
    left: -200px;
    animation: drift 30s ease-in-out infinite alternate;
}

.shape-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-light), transparent 70%);
    bottom: -100px;
    right: -100px;
    animation: drift 25s ease-in-out infinite alternate-reverse;
}

.shape-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-secondary), transparent 70%);
    top: 40%;
    left: 60%;
    animation: drift 35s ease-in-out infinite alternate;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(40px, 60px) scale(1.08);
    }
}

/* ---- Sticky Navigation ---- */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    background: rgba(0, 19, 35, 0.75);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-subtle);
    transition: var(--transition);
}

.site-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--accent);
    background: var(--accent-soft);
}

/* ---- Layout ---- */
.container {
    max-width: 920px;
    margin: 0 auto;
    padding: 5rem 1.5rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .two-columns {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 4.5rem 1rem 2rem;
        gap: 3rem;
    }
}

/* ---- Card / Panel ---- */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.glass-panel:hover {
    transform: translateY(-3px);
    border-color: var(--border-accent);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--border-accent);
}

/* ---- Typography ---- */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 0.8rem;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

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

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

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

/* ---- Hero / Header ---- */
.main-header {
    text-align: center;
    padding: 4rem 2rem 3rem;
    border: none;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
}

.main-header:hover {
    transform: none;
    box-shadow: none;
    border-color: transparent;
}

.main-header h1 {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    margin-bottom: 0.8rem;
    line-height: 1.15;
}

.welcome-text {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ---- About Section ---- */
.about-content {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.about-text h2 {
    font-size: 1.5rem;
}

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

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

.about-image img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--border-accent);
    box-shadow: 0 0 30px var(--accent-glow);
    transition: transform 0.5s ease;
}

.about-image img:hover {
    transform: scale(1.05) rotate(3deg);
}

@media (max-width: 640px) {
    .about-content {
        flex-direction: column-reverse;
        text-align: center;
    }

    .about-image img {
        width: 120px;
        height: 120px;
    }
}

/* ---- Section Titles ---- */
.section-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center;
}

.section-title i {
    margin-right: 0.3rem;
}

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

.project-card {
    display: flex;
    flex-direction: column;
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
}

/* Accent line at top of card */
.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 1.5rem;
    right: 1.5rem;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 2px;
    opacity: 0;
    transition: opacity var(--transition);
}

.project-card:hover::before {
    opacity: 1;
}

.project-header h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.2rem;
    font-style: italic;
}

.body-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
    flex-grow: 1;
    line-height: 1.75;
}

/* ---- Tags ---- */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.2rem;
}

.tag {
    font-size: 0.72rem;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    background: var(--accent-soft);
    border: 1px solid rgba(129, 140, 248, 0.15);
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: var(--transition);
}

.tag:hover {
    background: rgba(29, 99, 237, 0.2);
    border-color: var(--border-accent);
}

.tech-tag {
    color: var(--accent-secondary);
}

.skill-tag {
    background: var(--accent-soft);
    border-color: rgba(29, 99, 237, 0.15);
    color: var(--text-primary);
}

/* ---- Features ---- */
.feature-list {
    list-style: none;
    font-size: 0.85rem;
}

.feature-list li {
    margin-bottom: 0.45rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.feature-list li i {
    font-size: 0.7rem;
}

/* ---- Tech Stacks ---- */
.techstacks-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
    font-style: italic;
}

.techstack-clickable {
    cursor: pointer;
    position: relative;
}

.techstack-clickable:hover {
    background: rgba(29, 99, 237, 0.25);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.tag-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-left: 0.35rem;
}

.tag-active {
    background: var(--accent) !important;
    color: #fff !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 12px var(--accent-glow);
}

.tag-active .tag-count {
    background: rgba(255, 255, 255, 0.25);
}

.project-tech-tag {
    cursor: pointer;
}

/* ---- Project Highlight / Dim ---- */
.project-dimmed {
    opacity: 0.3;
    transform: scale(0.97);
    filter: grayscale(0.3);
}

.project-highlight {
    border-color: var(--accent) !important;
    box-shadow: 0 0 20px var(--accent-glow), 0 8px 30px rgba(0, 0, 0, 0.3) !important;
}

.section-achievements h2 {
    font-size: 1.3rem;
}

#contact h2 {
    font-size: 1.3rem;
}

.skills-group {
    margin-bottom: 1.2rem;
}

.skills-group:last-child {
    margin-bottom: 0;
}

.skills-group h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.6rem;
    font-weight: 600;
}

/* ---- Timeline / Achievements ---- */
.timeline-list {
    list-style: none;
    position: relative;
    padding-left: 1.5rem;
}

.timeline-list::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, var(--accent), rgba(29, 99, 237, 0.1));
    border-radius: 2px;
}

.timeline-list li {
    position: relative;
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

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

.timeline-dot {
    position: absolute;
    left: -1.85rem;
    top: 0.35rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}

/* ---- Contact ---- */
.contact-info p {
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.contact-info p strong {
    color: var(--text-primary);
    font-weight: 600;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* ---- Contact Row (side-by-side in full-width panel) ---- */
.contact-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 640px) {
    .contact-row {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    border: 1px solid var(--border-subtle);
    transition: var(--transition);
}

.social-btn i {
    color: var(--accent);
    width: 18px;
    text-align: center;
    transition: var(--transition);
}

.social-btn:hover {
    color: var(--text-primary);
    background: var(--accent-soft);
    border-color: var(--border-accent);
    transform: translateX(4px);
}

.social-btn:hover i {
    transform: scale(1.15);
}

/* ---- Footer ---- */
footer.glass-panel {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 1.5rem;
    margin-top: 0 !important;
}

footer.glass-panel:hover {
    transform: none;
    box-shadow: none;
    border-color: transparent;
}

footer p {
    color: var(--text-muted);
    font-size: 0.82rem;
    letter-spacing: 0.02em;
}

/* ---- Animations ---- */
.slide-up {
    opacity: 0;
    transform: translateY(24px);
    animation: slideUpFade 0.7s ease forwards;
}

.delay-1 {
    animation-delay: 0.08s;
}

.delay-1b {
    animation-delay: 0.12s;
}

.delay-2 {
    animation-delay: 0.16s;
}

.delay-3 {
    animation-delay: 0.24s;
}

.delay-4 {
    animation-delay: 0.32s;
}

.delay-5 {
    animation-delay: 0.40s;
}

.delay-6 {
    animation-delay: 0.48s;
}

.delay-7 {
    animation-delay: 0.56s;
}

.delay-8 {
    animation-delay: 0.64s;
}

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

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: rgba(29, 99, 237, 0.25);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(29, 99, 237, 0.4);
}

/* ---- Selection ---- */
::selection {
    background: var(--accent-soft);
    color: var(--text-primary);
}

/* ---- Responsive Fine-tuning ---- */
@media (max-width: 480px) {
    .main-header {
        padding: 3rem 1rem 2rem;
    }

    .main-header h1 {
        font-size: 2rem;
    }

    .welcome-text {
        font-size: 0.95rem;
    }

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

    .site-nav {
        gap: 0.2rem;
        padding: 0.6rem 0.8rem;
    }

    .site-nav a {
        font-size: 0.72rem;
        padding: 0.4rem 0.6rem;
    }
}