/* =========================================
   Luke Miles – Portfolio
   styles.css
   ========================================= */

/* Custom Properties */
:root {
    --grad-start: #1e3a8a;
    --grad-mid: #7c3aed;
    --grad-end: #db2777;
    --gradient: linear-gradient(135deg, var(--grad-start) 0%, var(--grad-mid) 50%, var(--grad-end) 100%);

    --accent: #f59e0b;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --bg-white: #ffffff;
    --bg-light: #f3f4f6;
    --border: #e5e7eb;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.09);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.13);

    --radius: 14px;
    --radius-lg: 22px;
    --nav-height: 68px;
    --max-width: 1100px;
}

/* =========================================
   Reset & Base
   ========================================= */

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

html {
    scroll-behavior: smooth;
}

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

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

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

ul {
    list-style: none;
}

/* =========================================
   Layout
   ========================================= */

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* =========================================
   Navbar
   ========================================= */

#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);
    transition: background 0.35s ease, box-shadow 0.35s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 var(--border);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: white;
    transition: color 0.3s;
}

#navbar.scrolled .nav-logo {
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.88);
    padding: 6px 14px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

#navbar.scrolled .nav-link {
    color: var(--text-secondary);
}

#navbar.scrolled .nav-link:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.nav-cta {
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    background: rgba(255, 255, 255, 0.18);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    padding: 7px 18px;
    border-radius: 100px;
    margin-left: 8px;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.nav-cta:hover {
    background: white;
    color: var(--grad-mid);
    border-color: white;
}

#navbar.scrolled .nav-cta {
    background: var(--gradient);
    border-color: transparent;
    color: white;
}

#navbar.scrolled .nav-cta:hover {
    opacity: 0.88;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: background 0.3s, transform 0.3s, opacity 0.3s;
}

#navbar.scrolled .nav-toggle span {
    background: var(--text-primary);
}

/* =========================================
   Hero
   ========================================= */

#hero {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    padding-top: var(--nav-height);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: var(--gradient);
    z-index: 0;
}

/* Floating decorative circles */
.hero-bg::before {
    content: '';
    position: absolute;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.045);
    top: -150px;
    right: -150px;
    animation: hero-float 9s ease-in-out infinite;
}

.hero-bg::after {
    content: '';
    position: absolute;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    bottom: -80px;
    left: -100px;
    animation: hero-float 12s ease-in-out infinite reverse;
}

@keyframes hero-float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-24px) scale(1.04); }
}

.hero-container {
    position: relative;
    z-index: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 80px 24px 100px;
    display: flex;
    align-items: center;
    gap: 64px;
    width: 100%;
}

.hero-photo-wrapper {
    flex-shrink: 0;
}

.hero-photo-ring {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.55), rgba(255,255,255,0.12));
    padding: 5px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255,255,255,0.15);
}

.hero-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
}

.hero-content {
    flex: 1;
    color: white;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.18);
    border: 1.5px solid rgba(255, 255, 255, 0.28);
    color: rgba(255, 255, 255, 0.95);
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 22px;
}

.badge-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    animation: badge-pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes badge-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.65; transform: scale(1.35); }
}

.hero-name {
    font-size: clamp(2.6rem, 5.5vw, 4.2rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.08;
    margin-bottom: 14px;
}

.hero-title {
    font-size: clamp(1.1rem, 2.2vw, 1.45rem);
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 8px;
}

.hero-sub {
    font-size: 0.95rem;
    opacity: 0.72;
    margin-bottom: 34px;
    letter-spacing: 0.01em;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* =========================================
   Buttons
   ========================================= */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 12px 26px;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: white;
    color: var(--grad-mid);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.26);
}

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

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.9);
}

.btn-white {
    background: white;
    color: var(--grad-mid);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
}

.btn-white:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
}

/* =========================================
   Scroll Indicator
   ========================================= */

.hero-scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    opacity: 0.65;
    transition: opacity 0.2s;
}

.hero-scroll-indicator:hover {
    opacity: 1;
}

.scroll-mouse {
    width: 24px;
    height: 38px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    position: relative;
}

.scroll-dot {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 2px;
    animation: scroll-bounce 1.6s ease-in-out infinite;
}

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

/* =========================================
   Sections
   ========================================= */

.section {
    padding: 100px 0;
}

.section-alt {
    background: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-label {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.section-header h2 {
    font-size: clamp(1.85rem, 3.5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.2;
    color: var(--text-primary);
}

/* =========================================
   About
   ========================================= */

.about-content {
    max-width: 740px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.about-text:last-child {
    margin-bottom: 0;
}

/* =========================================
   Achievements
   ========================================= */

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.achievement-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 28px 22px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.achievement-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}

.achievement-stat {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    line-height: 1;
}

.achievement-card h3 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.achievement-card p {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* =========================================
   Timeline (Experience)
   ========================================= */

.timeline {
    position: relative;
    max-width: 820px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 12px;
    bottom: 12px;
    width: 2px;
    background: linear-gradient(to bottom, var(--grad-start), var(--grad-mid), var(--grad-end));
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding-left: 56px;
    margin-bottom: 28px;
}

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

.timeline-dot {
    position: absolute;
    left: 11px;
    top: 26px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--border), var(--shadow-sm);
    z-index: 1;
}

.timeline-card {
    background: white;
    border-radius: var(--radius);
    padding: 24px 28px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-lg);
}

.timeline-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.timeline-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
}

.timeline-role {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--grad-mid);
}

.timeline-date {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    background: var(--bg-light);
    padding: 4px 12px;
    border-radius: 100px;
    flex-shrink: 0;
}

.timeline-bullets {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.timeline-bullets li {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.55;
    padding-left: 16px;
    position: relative;
}

.timeline-bullets li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--grad-mid);
    flex-shrink: 0;
}

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

/* =========================================
   Skills
   ========================================= */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

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

.skill-category {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.skill-category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    font-size: 0.84rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.01em;
}

.skill-tags {
    padding: 16px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-light);
    border: 1px solid var(--border);
    padding: 4px 13px;
    border-radius: 100px;
    transition: background 0.2s;
}

.skill-category:hover .skill-tag {
    background: var(--bg-white);
}

/* =========================================
   Education
   ========================================= */

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.education-card {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 16px;
    align-items: flex-start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.education-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.education-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.education-content h3 {
    font-size: 0.93rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
    line-height: 1.35;
}

.education-place {
    font-size: 0.83rem;
    color: var(--text-muted);
    margin-bottom: 9px;
}

.education-badge {
    display: inline-block;
    font-size: 0.74rem;
    font-weight: 700;
    background: var(--gradient);
    color: white;
    padding: 3px 11px;
    border-radius: 100px;
    letter-spacing: 0.01em;
}

.education-year {
    display: inline-block;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-light);
    padding: 3px 11px;
    border-radius: 100px;
}

/* =========================================
   Footer
   ========================================= */

footer {
    position: relative;
    padding: 90px 0 44px;
    overflow: hidden;
}

.footer-bg {
    position: absolute;
    inset: 0;
    background: var(--gradient);
    z-index: 0;
}

.footer-bg::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    top: -160px;
    right: -100px;
    animation: hero-float 10s ease-in-out infinite;
}

.footer-bg::after {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    bottom: -80px;
    left: -60px;
    animation: hero-float 13s ease-in-out infinite reverse;
}

.footer-content {
    position: relative;
    z-index: 1;
    color: white;
    text-align: center;
}

.footer-main {
    margin-bottom: 52px;
}

.footer-main h2 {
    font-size: clamp(2.2rem, 4.5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 12px;
    line-height: 1.15;
}

.footer-main p {
    font-size: 1.05rem;
    opacity: 0.78;
    margin-bottom: 30px;
}

.footer-links {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

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

.btn-white-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.9);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    padding-top: 24px;
}

.footer-bottom p {
    font-size: 0.84rem;
    opacity: 0.55;
}

/* =========================================
   Fade-in Scroll Animations
   ========================================= */

.fade-in {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* =========================================
   Responsive – Tablet
   ========================================= */

@media (max-width: 900px) {
    .hero-container {
        gap: 40px;
    }

    .hero-photo-ring {
        width: 230px;
        height: 230px;
    }
}

/* =========================================
   Responsive – Mobile
   ========================================= */

@media (max-width: 768px) {
    .section {
        padding: 72px 0;
    }

    .section-header {
        margin-bottom: 40px;
    }

    /* Navbar */
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 12px 12px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
        border-bottom: 1px solid var(--border);
    }

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

    .nav-link {
        color: var(--text-secondary) !important;
        padding: 12px 14px;
        border-radius: 10px;
    }

    .nav-link:hover {
        background: var(--bg-light) !important;
        color: var(--text-primary) !important;
    }

    .nav-cta {
        background: var(--gradient) !important;
        border-color: transparent !important;
        color: white !important;
        text-align: center;
        margin: 4px 0 0;
        justify-content: center;
    }

    /* Hero */
    .hero-container {
        flex-direction: column;
        text-align: center;
        padding: 52px 24px 88px;
        gap: 36px;
    }

    .hero-photo-ring {
        width: 200px;
        height: 200px;
    }

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

    /* Timeline */
    .timeline::before {
        left: 15px;
    }

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

    .timeline-dot {
        left: 7px;
    }

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

    .timeline-date {
        align-self: flex-start;
    }

    /* Achievements */
    .achievements-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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