/* ========================================
   VARIABLES & TOKENS (Design System)
   ======================================== */
:root {
    /* Colors - Light Mode (Default) */
    --bg-color: #f8fafc;
    /* Slate 50 */
    --surface-color: #ffffff;
    --text-primary: #0f172a;
    /* Slate 900 */
    --text-secondary: #475569;
    /* Slate 600 */
    --accent-color: #2563eb;
    /* Blue 600 */
    --accent-hover: #1d4ed8;
    /* Blue 700 */
    --border-color: #e2e8f0;
    /* Slate 200 */

    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Dark Mode Theme */
body.dark-mode {
    --bg-color: #0f172a;
    /* Slate 900 */
    --surface-color: #1e293b;
    /* Slate 800 */
    --text-primary: #f8fafc;
    /* Slate 50 */
    --text-secondary: #94a3b8;
    /* Slate 400 */
    --accent-color: #3b82f6;
    /* Blue 500 */
    --accent-hover: #60a5fa;
    /* Blue 400 */
    --border-color: #334155;
    /* Slate 700 */
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
}

/* ========================================
   RESET & BASE
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    /* Offset for sticky nav */
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ========================================
   TYPOGRAPHY & UTILITIES
   ======================================== */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--text-primary);
}

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

section {
    padding: 6rem 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #ffffff !important;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover {
    border-color: var(--text-primary);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

/* ========================================
   NAVBAR
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(var(--surface-color), 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

@supports (backdrop-filter: blur(10px)) {
    .navbar {
        background-color: transparent;
    }

    body.light-mode .navbar {
        background-color: rgba(255, 255, 255, 0.85);
    }

    body.dark-mode .navbar {
        background-color: rgba(30, 41, 59, 0.85);
    }
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--text-primary);
}

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

.nav-links a {
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform var(--transition-fast), color var(--transition-fast);
}

.lang-toggle:hover {
    transform: scale(1.1);
    color: var(--accent-color);
}

.theme-toggle,
.menu-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform var(--transition-fast);
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.menu-toggle {
    display: none;
}

/* ========================================
   HERO
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    /* offset for nav */
}

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

.hero-greeting {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.hero-name {
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: -1px;
}

.hero-role {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.hero-value {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.hero-ctas {
    display: flex;
    gap: 1rem;
}

/* ========================================
   ABOUT
   ======================================== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.about-text strong {
    color: var(--text-primary);
}

.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.skill-category h4 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tags span {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 0.4rem 1rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.skill-tags span:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background-color: rgba(37, 99, 235, 0.05);
}

/* ========================================
   PROJECTS
   ======================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

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

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

.project-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.project-info {
    padding: 1.5rem;
    flex: 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: 1rem;
    flex: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tech span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-color);
    background-color: rgba(37, 99, 235, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

body.dark-mode .project-tech span {
    background-color: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.btn-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-link:hover {
    color: var(--accent-color);
}

.btn-link.disabled {
    opacity: 0.5;
    pointer-events: none;
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--border-color);
}

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

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

.timeline-dot {
    position: absolute;
    left: 8px;
    top: 5px;
    width: 16px;
    height: 16px;
    background-color: var(--surface-color);
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    z-index: 1;
}

.timeline-content {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast);
}

.timeline-content:hover {
    transform: translateX(5px);
    border-color: var(--accent-color);
}

.timeline-date {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    background-color: rgba(37, 99, 235, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
}

body.dark-mode .timeline-date {
    background-color: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

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

.timeline-content h4 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.timeline-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ========================================
   CONTACT
   ======================================== */
.contact-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 4rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    box-shadow: var(--shadow-md);
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

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

.social-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-weight: 500;
    transition: all var(--transition-fast);
    background-color: var(--bg-color);
}

.social-btn i {
    font-size: 1.25rem;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.social-btn:hover {
    border-color: var(--accent-color);
    transform: translateX(5px);
}

.social-btn:hover i {
    color: var(--accent-color);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-made-with {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* ========================================
   ANIMATIONS (Scroll Reveal)
   ======================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 900px) {

    .about-content,
    .contact-card {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-card {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--surface-color);
        flex-direction: column;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-md);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        padding: 1rem 2rem;
        width: 100%;
        text-align: center;
    }

    .menu-toggle {
        display: block;
    }

    .theme-toggle {
        margin-right: 1rem;
        margin-left: auto;
    }

    .hero-name {
        font-size: 2.5rem;
    }

    .hero-role {
        font-size: 1.5rem;
    }

    .hero-ctas {
        flex-direction: column;
    }
}