/* === Custom Properties === */
:root {
    --color-bg: #ffffff;
    --color-bg-alt: #f8fafc;
    --color-dark: #0f172a;
    --color-text: #334155;
    --color-text-light: #64748b;
    --color-primary: #2563eb;
    --color-primary-light: #dbeafe;
    --color-border: #e2e8f0;
    --color-white: #ffffff;
    --font: 'Inter', sans-serif;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
    --radius: 12px;
    --transition: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

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

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

/* === Navigation === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    padding: 0 24px;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo img {
    height: 40px;
}

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

.nav-links a {
    color: var(--color-white);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: color var(--transition);
}

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

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 24px;
    cursor: pointer;
}

/* === Hero === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: linear-gradient(135deg, var(--color-dark) 0%, #1e293b 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url(images/background.jpg) center/cover no-repeat;
    opacity: 0.15;
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 0 24px;
}

.hero-greeting {
    color: var(--color-primary);
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 8px;
}

.hero-name {
    color: var(--color-white);
    font-size: clamp(40px, 8vw, 72px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 12px;
}

.hero-title {
    color: var(--color-text-light);
    font-size: clamp(16px, 3vw, 22px);
    font-weight: 400;
    margin-bottom: 36px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 8px;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

.btn-outline:hover {
    background: var(--color-white);
    color: var(--color-dark);
    transform: translateY(-2px);
}

.btn-outline-light {
    background: transparent;
    color: var(--color-white);
    border: 2px solid rgba(255,255,255,0.3);
}

.btn-outline-light:hover {
    background: var(--color-white);
    color: var(--color-dark);
    border-color: var(--color-white);
    transform: translateY(-2px);
}

/* === Scroll Indicator === */
.scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-indicator span {
    display: block;
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 12px;
    position: relative;
}

.scroll-indicator span::after {
    content: '';
    width: 4px;
    height: 8px;
    background: var(--color-white);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
    50% { transform: translateX(-50%) translateY(12px); opacity: 0.3; }
}

/* === Section Titles === */
.section-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--color-dark);
    text-align: center;
    margin-bottom: 12px;
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-light);
    font-size: 16px;
    margin-bottom: 48px;
}

/* === About === */
.about {
    padding: 100px 0;
    background: var(--color-bg);
}

.about .section-title {
    margin-bottom: 48px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image img {
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.about-text p {
    font-size: 17px;
    line-height: 1.8;
    margin-bottom: 28px;
    color: var(--color-text);
}

.about-text h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 16px;
}

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

.skill-badge {
    display: inline-block;
    padding: 8px 18px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 600;
    border-radius: 50px;
    transition: all var(--transition);
}

.skill-badge:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
}

/* === Experience === */
.experience {
    padding: 100px 0;
    background: var(--color-bg-alt);
}

.experience .section-title {
    margin-bottom: 48px;
}

.experience-stack {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.col-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.col-title i {
    color: var(--color-primary);
}

/* === Timeline === */
.timeline {
    position: relative;
    padding-left: 28px;
}

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

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

.timeline-dot {
    position: absolute;
    left: -28px;
    top: 20px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-white);
    border: 3px solid var(--color-primary);
    z-index: 1;
}

.timeline-card {
    background: var(--color-white);
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: all var(--transition);
    position: relative;
}

.timeline-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
    position: absolute;
    top: 20px;
    right: 24px;
}

.timeline-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 4px;
    padding-right: 50px;
}

.timeline-header h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-dark);
}

.timeline-date {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-primary);
    white-space: nowrap;
}

.timeline-company {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-light);
    margin-bottom: 6px;
}

.timeline-desc {
    font-size: 14px;
    color: var(--color-text);
    line-height: 1.6;
}

.timeline-bullets {
    margin: 8px 0 0 18px;
    padding: 0;
    font-size: 14px;
    color: var(--color-text);
    line-height: 1.6;
}

.timeline-bullets li {
    margin-bottom: 6px;
}

/* === Projects === */
.projects {
    padding: 100px 0;
    background: var(--color-bg);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.project-card {
    background: var(--color-bg-alt);
    border-radius: var(--radius);
    padding: 32px 28px;
    border: 1px solid var(--color-border);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

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

.project-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--color-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 20px;
    color: var(--color-primary);
    transition: all var(--transition);
}

.project-card:hover .project-icon {
    background: var(--color-primary);
    color: var(--color-white);
}

.project-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 10px;
}

.project-card p {
    font-size: 14px;
    color: var(--color-text-light);
    line-height: 1.7;
    flex-grow: 1;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary);
}

.project-link i {
    transition: transform var(--transition);
}

.project-card:hover .project-link i {
    transform: translateX(4px);
}

/* === Contact === */
.contact {
    padding: 100px 0;
    background: var(--color-dark);
    color: var(--color-white);
}

.contact .section-title {
    color: var(--color-white);
}

.contact .section-subtitle {
    color: rgba(255,255,255,0.6);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.contact-item {
    text-align: center;
    padding: 28px 16px;
    border-radius: var(--radius);
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    transition: all var(--transition);
}

.contact-item:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-4px);
}

.contact-item i {
    font-size: 28px;
    margin-bottom: 12px;
    color: var(--color-primary);
}

.contact-item p {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    word-break: break-word;
}

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

/* === Responsive === */

/* Prevent horizontal overflow on all screen sizes */
html, body {
    overflow-x: hidden;
}

/* Tablet */
@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
        padding: 8px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(15, 23, 42, 0.98);
        flex-direction: column;
        padding: 16px 24px;
        gap: 0;
    }

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

    .nav-links li a {
        display: block;
        padding: 14px 0;
        font-size: 16px;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    .nav-links li:last-child a {
        border-bottom: none;
    }

    /* Hero */
    .hero {
        min-height: 100svh;
        padding: 80px 16px 60px;
    }

    .hero-greeting {
        font-size: 16px;
    }

    .hero-title {
        margin-bottom: 28px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .hero-cta .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .scroll-indicator {
        bottom: 16px;
    }

    /* Sections */
    .about,
    .experience,
    .projects,
    .contact {
        padding: 60px 0;
    }

    .container {
        padding: 0 16px;
    }

    .section-title {
        font-size: 26px;
    }

    .section-subtitle {
        font-size: 15px;
        margin-bottom: 32px;
    }

    /* About */
    .about .section-title {
        margin-bottom: 32px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }

    .about-image img {
        max-width: 220px;
        margin: 0 auto;
    }

    .about-text p {
        font-size: 15px;
        line-height: 1.7;
    }

    .about-text h3 {
        font-size: 16px;
    }

    .skills {
        justify-content: center;
    }

    .skill-badge {
        padding: 6px 14px;
        font-size: 13px;
    }

    /* Experience */
    .experience .section-title {
        margin-bottom: 32px;
    }

    .experience-stack {
        gap: 40px;
    }

    .col-title {
        font-size: 18px;
        margin-bottom: 24px;
    }

    .timeline-header {
        flex-direction: column;
        gap: 2px;
    }

    .timeline-card {
        padding: 16px 18px;
    }

    .timeline-header h4 {
        font-size: 15px;
    }

    .timeline-date {
        font-size: 12px;
    }

    .timeline-company {
        font-size: 13px;
    }

    .timeline-desc {
        font-size: 13px;
    }

    /* Projects */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .project-card {
        padding: 24px 20px;
    }

    .project-card h3 {
        font-size: 16px;
    }

    .project-card p {
        font-size: 13px;
    }

    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .contact-item {
        padding: 20px 12px;
    }

    .contact-item i {
        font-size: 24px;
    }

    .contact-item p {
        font-size: 12px;
    }

    .contact-cta .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .hero-name {
        font-size: 32px;
    }

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

    .about-image img {
        max-width: 180px;
    }

    .section-title {
        font-size: 22px;
    }
}

/* Touch device: disable hover transforms to avoid sticky states */
@media (hover: none) {
    .timeline-card:hover,
    .project-card:hover,
    .contact-item:hover,
    .skill-badge:hover {
        transform: none;
    }
}