/* 
   Modern Portfolio V2 Design 
   Focus: Dark Mode, Aesthetics, Interactivity
*/

:root {
    --bg-color: #0d1117;
    --bg-secondary: #161b22;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --accent-color: #58a6ff;
    --accent-hover: #1f6feb;
    --border-color: #30363d;
    --card-bg: #161b22;
    --card-hover: #21262d;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --font-heading: 'Lato', sans-serif;
    --font-body: 'Lato', sans-serif;
    --transition-base: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

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

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
    font-weight: 900;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
}

h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

section {
    padding: 5rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(13, 17, 23, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

nav {
    display: flex;
    justify-content: flex-end;
    /* Changed to flex-end to align items to the right */
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s;
}

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

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-primary);
}

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at top right, rgba(88, 166, 255, 0.1), transparent 40%),
        radial-gradient(circle at bottom left, rgba(88, 166, 255, 0.05), transparent 40%);
    padding-top: 60px;
    /* Offset for fixed header */
}

.hero-content h1 {
    background: linear-gradient(120deg, var(--text-primary), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    letter-spacing: -2px;
}

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

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    border: 1px solid transparent;
    transition: var(--transition-base);
    margin: 0 0.5rem;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 166, 255, 0.3);
}

.btn-outline {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.btn-outline:hover {
    background-color: rgba(88, 166, 255, 0.1);
    transform: translateY(-2px);
}

.scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    color: var(--text-secondary);
    font-size: 2rem;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) translateX(-50%);
    }

    40% {
        transform: translateY(-10px) translateX(-50%);
    }

    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

/* About Section */
.about-content {
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

/* Experience Section */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--border-color);
    top: 0;
    bottom: 0;
    left: 20px;
    /* Aligned left for easier mobile response */
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 50px;
}

.timeline-dot {
    position: absolute;
    left: 11px;
    top: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--bg-color);
    border: 4px solid var(--accent-color);
    z-index: 2;
}

.timeline-content {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
}

.timeline-content:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-md);
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: block;
}

.timeline-content h3 {
    margin-bottom: 0.2rem;
    font-size: 1.3rem;
}

.timeline-content h4 {
    color: var(--accent-color);
    font-size: 1rem;
    margin-bottom: 1rem;
}

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

.project-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
    display: flex;
    flex-direction: column;
}

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

.project-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.project-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-links {
    margin-top: auto;
}

/* Skills Section */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.skill-tag {
    background-color: var(--bg-secondary);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    transition: var(--transition-base);
}

.skill-tag:hover {
    background-color: rgba(88, 166, 255, 0.1);
    color: var(--accent-color);
    transform: scale(1.05);
    border-color: var(--accent-color);
}

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

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

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

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

/* Utilities */
.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 2rem;
}

.section-heading {
    text-align: center;
    margin-bottom: 4rem;
}

.section-heading::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--accent-color);
    margin: 1rem auto;
    border-radius: 2px;
}

/* Fade In Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

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

/* Responsive */
@media screen and (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 60px;
        flex-direction: column;
        background-color: var(--bg-secondary);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
        border-bottom: 1px solid var(--border-color);
    }

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

    .menu-toggle {
        display: block;
    }

    .timeline::after {
        left: 20px;
    }

    .timeline-item {
        padding-left: 50px;
    }
}