/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-dark: #0f172a;
    --border-color: #e2e8f0;
    --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);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    animation: fadeInUp 1s ease-out;
}

.hero-greeting {
    display: block;
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.hero-name {
    display: block;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #fff, #f0f9ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-role {
    display: block;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 500px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: #d97706;
    border-color: #d97706;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

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

/* Section Styles */
section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-primary);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* About Section */
.about {
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-description {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
}

.stat h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat p {
    color: var(--text-secondary);
    font-weight: 500;
}

.about-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
}

/* About Section Slideshow */
.slideshow-container {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.slideshow-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slideshow-img.active {
    opacity: 1;
}

/* Skills Section */
/* Projects Section */
.projects {
    background: var(--bg-secondary);
}

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

.project-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

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

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

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

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

.project-link {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.project-link:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

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

.tech-tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Contact Section */
.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.25rem;
}

.social-link:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer-content p {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

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

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

    .about-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

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

    .hero-buttons {
        justify-content: center;
    }

}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }

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

    .section-title {
        font-size: 2rem;
    }

    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }

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

/* Scroll animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Smooth scrolling for older browsers */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* ==========================================================================
   Hero without profile image - single centred column
   ========================================================================== */
.hero-container {
    grid-template-columns: 1fr;
    max-width: 820px;
    text-align: center;
    justify-items: center;
}

.hero-description {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5rem;
}

.hero-buttons {
    justify-content: center;
}

.hero-availability {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(8px);
    padding: 0.5rem 1.1rem;
    border-radius: 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 2rem;
}

.availability-dot {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.25);
    flex-shrink: 0;
}

/* Hamburger is now a <button> - strip the default chrome */
.hamburger {
    background: none;
    border: none;
    padding: 0;
}

/* ==========================================================================
   Experience
   ========================================================================== */
.experience {
    background: var(--bg-primary);
}

.role {
    background: white;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 0.75rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

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

.role-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.role-heading h3 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
}

.role-company {
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 0.15rem;
}

.role-period {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.35rem 0.85rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.role-points {
    margin: 0 0 1.25rem 1.1rem;
    color: var(--text-secondary);
}

.role-points li {
    margin-bottom: 0.65rem;
    line-height: 1.65;
}

.role-points li::marker {
    color: var(--primary-color);
}

.role-points strong {
    color: var(--text-primary);
    font-weight: 600;
}

.role-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.subsection-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 3rem 0 1.5rem;
}

/* ==========================================================================
   Skills as tags (replaces self-rated progress bars)
   ========================================================================== */
.skill-tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.skill-tag {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.85rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
}

.skill-tag-primary {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.35);
    color: var(--primary-dark);
    font-weight: 600;
}

/* ==========================================================================
   Section intro copy
   ========================================================================== */
.section-intro {
    text-align: center;
    max-width: 700px;
    margin: -1.5rem auto 3rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ==========================================================================
   Form labels
   ========================================================================== */
/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .role {
        padding: 1.5rem;
    }

    .role-header {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero-availability {
        font-size: 0.85rem;
        padding: 0.45rem 0.9rem;
    }
}

/* ==========================================================================
   Skills panel - aligned label/tag rows so nothing is ragged
   ========================================================================== */
.skills-panel {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    padding: 0 2rem;
}

.skill-row {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
    align-items: start;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.skill-row:last-child {
    border-bottom: none;
}

.skill-row-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.skill-row-label i {
    font-size: 1.25rem;
    color: var(--primary-color);
    width: 1.5rem;
    text-align: center;
    flex-shrink: 0;
}

.skill-row-label h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

@media (max-width: 768px) {
    .skills-panel {
        padding: 0 1.25rem;
    }

    .skill-row {
        grid-template-columns: 1fr;
        gap: 0.85rem;
        padding: 1.25rem 0;
    }
}

/* ==========================================================================
   Contact - single centred column, email instead of a form
   ========================================================================== */
.contact-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
    max-width: 620px;
    margin: 0 auto;
}

.contact-lead {
    color: var(--text-secondary);
    font-size: 1.125rem;
    line-height: 1.7;
    margin: 0;
}

.contact-email {
    gap: 0.6rem;
    font-size: 1.05rem;
}

.contact-location {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-secondary);
    margin: 0;
}

.contact-location i {
    color: var(--primary-color);
}

/* ==========================================================================
   Visible keyboard focus on everything interactive
   ========================================================================== */
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
    border-radius: 0.25rem;
}

/* On the gradient hero the blue ring disappears - use white there */
.hero a:focus-visible,
.navbar a:focus-visible,
.hamburger:focus-visible {
    outline-color: var(--primary-color);
}

.hero a:focus-visible {
    outline-color: #ffffff;
}

/* These two are solid blue circles, so a blue ring would vanish against them.
   Social links sit on a light section - use the dark ink colour.
   Project links sit on a dark hover overlay - use white. */
.social-link:focus-visible {
    outline-color: var(--text-primary);
    outline-offset: 4px;
}

.project-link:focus-visible {
    outline-color: #ffffff;
    outline-offset: 4px;
}

/* ==========================================================================
   Respect reduced-motion preferences
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .fade-in {
        opacity: 1;
        transform: none;
    }
}
