/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Premium Obsidian Palette */
    --bg-main: #050505;
    /* True Black */
    --bg-surface: #0f0f0f;
    /* Darkest Gray */
    --bg-highlight: #1a1a1a;
    /* Subtle Highlight */

    --text-primary: #ededed;
    /* Off-white */
    --text-secondary: #a3a3a3;
    /* Neutral Gray */
    --text-tertiary: #525252;
    /* Dark Gray */

    --accent-color: #e2e8f0;
    /* Platinum/Silver */
    --accent-subtle: #2d2d2d;
    /* Dark Border */

    --max-width: 1400px;
    --nav-height: 90px;

    --font-main: 'Manrope', sans-serif;
}

/* Global Resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Critical Image Fixes */
img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--text-primary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Layout */
/* Contact Studio Layout - SPLIT BOXED */
/* Contact Page - Reset & Robust Layout */
.contact-page-wrapper {
    width: 100%;
    min-height: 100vh;
    background-color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: var(--nav-height);
    padding-bottom: 5rem;
}

.split-layout {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4vw;
    gap: 4rem;
}

.left-panel {
    flex: 1;
    max-width: 500px;
    padding-top: 2rem;
}

.right-panel {
    flex: 1.2;
    max-width: 700px;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 4vw;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4vw;
    z-index: 1000;
    background: rgba(5, 5, 5, 0.8);
    /* Slight dark tint */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    text-transform: uppercase;
}

/* Hamburger Menu Placeholder */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 2000;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background-color: white;
    transition: all 0.3s ease;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--bg-main);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease;
        z-index: 1500;
    }

    .nav-links.active {
        right: 0;
    }

    .hamburger {
        display: flex;
    }

    /* Hamburger Animation */
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }
}

/* Language Selector - Professional Style */
.language-selector {
    display: flex;
    align-items: center;
    gap: 0;
    margin-right: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* More subtle border */
    border-radius: 8px;
    /* Slightly softer corners */
    padding: 3px;
    background: rgba(15, 15, 15, 0.6);
    /* Darker, more integrated bg */
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s ease;
    padding: 0.35rem 0.8rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    border-radius: 6px;
    /* Matched inner radius */
}

.lang-btn.active {
    background: white;
    /* Clean solid active state */
    color: black;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    /* Slight lift */
}

.lang-btn:hover:not(.active) {
    color: white;
    background: rgba(255, 255, 255, 0.03);
}

.language-selector span {
    display: none;
    /* Hide pipe separator */
}

.nav-links {
    display: flex;
    gap: 3rem;
}

.nav-links a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    opacity: 0.7;
}

.nav-links a:hover,
.nav-links a.active {
    opacity: 1;
    color: white;
}

.cta-btn {
    padding: 0.8rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    display: inline-block;
    /* Fix for multiline border glitch */
    text-align: center;
}

.cta-btn:hover {
    background: white;
    color: black;
    border-color: white;
}

.cta-btn.secondary {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.2);
}

.cta-btn.secondary:hover {
    background: white;
    color: black;
    border-color: white;
}

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: var(--nav-height);
}

.hero-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    display: block;
}

.hero-title {
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 300;
    margin-bottom: 2rem;
    color: white;
}

.hero-desc {
    max-width: 600px;
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 300;
    margin: 0 auto 3rem;
}

span.highlight {
    color: white;
    font-weight: 600;
}

/* ABOUT PAGE - Refined */
.about-section {
    padding: 8rem 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
    min-height: 100vh;
}

.about-image-container {
    width: 100%;
    height: 600px;
    overflow: hidden;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--accent-subtle);
}

.about-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    filter: grayscale(100%) contrast(1.1);
    transition: transform 0.5s ease;
}

.about-image-container:hover img {
    transform: scale(1.03);
}

.about-content h2 {
    font-size: 3.5rem;
    margin-bottom: 2rem;
    font-weight: 400;
}

.about-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.stat-grid {
    display: flex;
    gap: 4rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--accent-subtle);
}

.stat-item .num {
    display: block;
    font-size: 2rem;
    font-weight: 300;
    color: white;
}

.stat-item .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    margin-top: 0.5rem;
    display: block;
}

/* SERVICES / FREELANCE - REDESIGNED */
.services-container {
    padding: 8rem 0;
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-header {
    margin-bottom: 5rem;
    text-align: center;
}

.section-header h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 300;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 6rem;
}

.service-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 3rem;
    border-radius: 4px;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.service-card:hover {
    background: var(--bg-highlight);
    transform: translateY(-5px);
    border-color: var(--text-primary);
}

.service-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 400;
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.service-footer {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.service-price {
    display: block;
    font-size: 0.85rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Partnership Block */
.partnership-block {
    background: linear-gradient(135deg, var(--bg-surface) 0%, #151515 100%);
    border: 1px solid var(--accent-subtle);
    padding: 4rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    margin-bottom: 8rem;
}

.partner-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.partner-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
}

.partner-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-tertiary);
    display: block;
    margin-bottom: 1rem;
}

/* Process Section */
.process-section {
    padding-top: 4rem;
    border-top: 1px solid var(--accent-subtle);
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.process-step {
    position: relative;
}

.step-num {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.05);
    font-weight: 700;
    position: absolute;
    top: -2rem;
    left: 0;
    z-index: 0;
}

.step-content {
    position: relative;
    z-index: 1;
    padding-top: 1rem;
}

.step-content h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: white;
}

.step-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .partnership-block {
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem;
        gap: 2rem;
    }

    .process-grid {
        grid-template-columns: 1fr;
        /* Stack on mobile */
        gap: 4rem;
    }
}

/* PROJECTS / WORK */
.work-list {
    margin-top: 5vh;
}

.work-item {
    display: block;
    padding: 4rem 0;
    border-top: 1px solid var(--accent-subtle);
    position: relative;
    transition: background 0.3s ease;
}

.work-item:last-child {
    border-bottom: 1px solid var(--accent-subtle);
}

.work-item:hover {
    background: var(--bg-highlight);
}

.work-item-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 4vw;
}

.work-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 400;
}

.work-cat {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    margin-bottom: 0.5rem;
    display: block;
}

.work-arrow {
    font-size: 1.5rem;
    color: var(--text-tertiary);
    transition: all 0.3s ease;
}

footer {
    padding: 4rem 4vw;
    border-top: 1px solid var(--accent-subtle);
    display: flex;
    justify-content: space-between;
    color: var(--text-tertiary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Page Specific Typography */
.page-title {
    font-size: clamp(3.5rem, 5vw, 6rem);
    font-weight: 700;
    color: white;
    line-height: 0.95;
    margin-bottom: 4rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.detail-item .label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #888;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.detail-item a {
    color: white;
    font-size: 1.2rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.detail-item a:hover {
    color: #ccc;
}

.social-icons-row {
    display: flex;
    gap: 1.5rem;
}

/* Boxed Form Styles */
.boxed-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.input-group label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #aaa;
    margin-left: 5px;
}

.boxed-input {
    width: 100%;
    background-color: #0f0f0f !important;
    /* Force dark background */
    border: 1px solid #222;
    border-radius: 8px;
    padding: 1.5rem;
    font-family: inherit;
    font-size: 1.1rem;
    color: white !important;
    transition: all 0.3s ease;
    resize: none;
}

.boxed-input:focus {
    outline: none;
    border-color: white;
    background-color: #151515 !important;
}

.boxed-input::placeholder {
    color: #444;
}

.submit-btn {
    background: white;
    color: black;
    border: none;
    padding: 1.2rem 3rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    align-self: flex-start;
    margin-top: 1rem;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.submit-btn:hover {
    transform: scale(1.02);
    background-color: #eee;
}

/* =========================================
   THE JOURNEY / TIMELINE PAGE
   ========================================= */

.timeline-container {
    position: relative;
    max-width: 800px;
    margin-left: 0;
    padding-left: 2rem;
    padding-bottom: 5rem;
}

.timeline-line {
    position: absolute;
    left: 19px;
    /* Adjust based on dot size/margin */
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--text-tertiary), transparent);
    z-index: 0;
}

.timeline-item {
    position: relative;
    padding-left: 4rem;
    padding-bottom: 5rem;
    z-index: 1;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 12px;
    /* Center on line */
    top: 0;
    width: 16px;
    height: 16px;
    background: var(--bg-main);
    border: 2px solid white;
    border-radius: 50%;
    z-index: 2;
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    background: white;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.timeline-item.future .timeline-dot {
    border-color: var(--text-tertiary);
    border-style: dashed;
}

.timeline-date {
    position: absolute;
    left: -80px;
    /* Pull date to left if space allows, or keep inside */
    top: 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-tertiary);
    text-align: right;
    width: 60px;
}

/* For mobile/responsive, we might want date inside or above */
@media (max-width: 768px) {
    .timeline-date {
        position: relative;
        left: 0;
        top: -0.5rem;
        text-align: left;
        width: auto;
        margin-bottom: 0.5rem;
        display: block;
    }
}

.timeline-content h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.timeline-subtitle {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
}

.timeline-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 500px;
}

/* =========================================
   SKILLS PAGE
   ========================================= */

/* =========================================
   SKILLS PAGE
   ========================================= */

.skills-section {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    padding-bottom: 5rem;
}

.skill-category h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--accent-subtle);
    padding-bottom: 1rem;
    display: inline-block;
}

.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 2rem 1rem;
    /* More vertical padding */
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    /* Stack icon and text */
    align-items: center;
    justify-content: center;
    gap: 1rem;
    min-height: 140px;
    position: relative;
    overflow: hidden;
}

.skill-card:hover {
    background: var(--bg-surface);
    border-color: var(--text-tertiary);
    /* Subtle border on hover */
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.skill-card img {
    width: 64px;
    height: 64px;
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
    filter: grayscale(100%);
    opacity: 0.8;
}

.skill-card:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

.invert-icon {
    /* Handle GitHub or other dark icons */
    filter: invert(100%) grayscale(100%) !important;
}

.skill-card:hover .invert-icon {
    /* Keep white but remove grayscale on hover if needed, or just stay white */
    filter: invert(100%) !important;
    opacity: 1;
}

.skill-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.skill-card:hover .skill-name {
    color: var(--text-primary);
}

/* GitHub icon handling for dark mode */
.devicon-github-original {
    color: white;
}

/* =========================================
   RESPONSIVE DESIGN (MOBILE & TABLET)
   ========================================= */

/* Hamburger Menu (Hidden on Desktop) */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1002;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Hamburger Animation */
.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 1024px) {
    :root {
        --nav-height: 80px;
    }

    .hero-title {
        font-size: clamp(2.5rem, 6vw, 5rem);
    }

    .about-section {
        grid-template-columns: 1fr;
        gap: 5rem;
        /* Increased gap */
        padding: 4rem 0;
        text-align: center;
    }

    .about-image-container {
        height: 400px;
        margin-top: 3rem;
        /* Move image down */
    }

    .stat-grid {
        justify-content: center;
    }

    .split-layout {
        flex-direction: column;
        padding: 0 5vw;
        gap: 2rem;
    }

    .left-panel,
    .right-panel {
        max-width: 100%;
        width: 100%;
    }

    .partnership-block {
        flex-direction: column;
        text-align: center;
        padding: 3rem;
    }
}

@media (max-width: 768px) {

    /* Navigation Mobile */
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: rgba(5, 5, 5, 0.98);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        transition: right 0.4s ease;
        z-index: 1001;
        overflow-y: auto;
        padding-top: 8rem;
        /* Enough space for header/logo */
        padding-bottom: 4rem;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.5rem;
        margin: 1.2rem 0;
        /* Reduced to fit better */
        display: block;
        /* Ensure block for tapping */
    }

    .navbar .cta-btn {
        display: none;
        /* Hide 'Connect' button in header on mobile if simpler */
    }

    /* Hero */
    .hero {
        padding-top: calc(var(--nav-height) + 2rem);
        min-height: auto;
        padding-bottom: 4rem;
    }

    .hero-desc {
        padding: 0 1rem;
    }

    /* Services & Process */
    .services-grid {
        grid-template-columns: 1fr;
    }

    .process-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
        text-align: center;
    }

    .step-num {
        left: 50%;
        transform: translateX(-50%);
    }

    /* Work Items */
    .work-item-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .work-title {
        font-size: 2rem;
    }

    .work-arrow {
        align-self: flex-end;
    }

    /* Typography adjustments */
    h1,
    .page-title {
        font-size: 3rem;
    }

    .section-header h2 {
        font-size: 2.5rem;
    }

    /* Footer */
    footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding-bottom: 2rem;
    }

    .input-group label {
        margin-left: 0;
    }

    .contact-page-wrapper {
        padding-top: var(--nav-height);
    }

    .nav-logo {
        z-index: 1003;
        /* Stay above mobile menu */
    }

    .hamburger {
        z-index: 1003;
    }
}