:root {
    --bg-color: #050505;
    --text-color: #ffffff;
    --accent-color: #38bdf8;
    --secondary-bg: #111111;
    --muted-text: #a1a1aa;
    --card-hover: #18181b;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --border-color: rgba(255, 255, 255, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    line-height: 1.6;
    overflow-x: hidden;
}

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

header {
    height: 80px;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

nav {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

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

nav ul a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s;
}

nav ul a:hover {
    color: var(--accent-color);
}

#hero {
    padding: 220px 0 120px;
}

.hero-splitter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    text-align: left;
    margin-bottom: 3rem;
}

.hero-left {
    flex: 1;
}

.hero-right {
    flex: 1;
    border-left: 2px solid var(--accent-color);
    padding-left: 2rem;
}

h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 0;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.highlight {
    color: var(--accent-color);
}

.subtitle {
    font-size: 1.6rem;
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.description {
    font-size: 1.1rem;
    color: var(--muted-text);
    max-width: 500px;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.social-links a {
    color: var(--text-color);
    font-size: 1.5rem;
    transition: all 0.3s;
}

.social-links a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

.cta {
    margin-top: 2rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn.primary {
    background-color: var(--accent-color);
    color: #000;
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(56, 189, 248, 0.2);
}

h2 {
    font-size: 2rem;
    margin-bottom: 3rem;
    text-align: center;
}

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

.work-card {
    background-color: var(--secondary-bg);
    padding: 2rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s, background-color 0.3s;
    border: 1px solid var(--border-color);
}

.work-card:hover {
    background-color: var(--card-hover);
    transform: translateY(-5px);
}

.work-header {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.company-logo {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
}

.work-info h3 {
    font-size: 1.1rem;
}

.work-info .company {
    color: var(--muted-text);
    font-size: 0.9rem;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    background-color: rgba(56, 189, 248, 0.1);
    color: var(--accent-color);
    margin-top: 0.5rem;
}

.badge.gray {
    background-color: rgba(148, 163, 184, 0.1);
    color: var(--muted-text);
}

.work-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.work-btn {
    text-decoration: none;
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid var(--accent-color);
    padding: 0.6rem;
    border-radius: 6px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    background: transparent;
    display: block;
    width: 100%;
}

.work-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: var(--muted-text);
    color: var(--muted-text);
}

.work-btn.disabled:hover {
    background: transparent;
    color: var(--muted-text);
    transform: none;
}

.work-btn:hover {
    background-color: var(--accent-color);
    color: #000;
}

.work-btn.secondary {
    border-color: var(--muted-text);
    color: var(--muted-text);
}

.work-btn.secondary:hover {
    background-color: var(--muted-text);
    color: #000;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    background: #000;
    border-radius: 16px;
    overflow: visible;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
    opacity: 1;
}

/* Redirect Modal Specifics */
.small-modal {
    max-width: 400px;
    padding: 2rem;
    text-align: center;
    overflow: visible;
}

.redirect-header {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.trusted-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.url-snippet {
    background: var(--bg-color);
    padding: 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--muted-text);
    margin: 1.5rem 0;
    word-break: break-all;
    border: 1px solid var(--border-color);
}

.redirect-footer {
    display: flex;
    gap: 1rem;
}

.redirect-footer .btn {
    flex: 1;
    padding: 0.7rem;
    font-size: 0.9rem;
}

.modal-content video {
    width: 100%;
    height: auto;
    display: block;
    outline: none;
}

/* Custom Video Controls */
.video-container {
    position: relative;
    overflow: hidden;
    border-radius: 15px; /* Matches parent slightly less to avoid bleed */
}

.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    display: flex;
    padding: 20px;
    align-items: center;
    gap: 15px;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.video-container:hover .video-controls {
    transform: translateY(0);
}

.video-controls button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-controls button:hover {
    color: var(--accent-color);
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.2);
    cursor: pointer;
    position: relative;
    border-radius: 2px;
}

.progress-filled {
    height: 100%;
    background: var(--accent-color);
    width: 0;
    border-radius: 2px;
}

.video-controls .time {
    font-size: 0.8rem;
    font-weight: 500;
    color: white;
    min-width: 80px;
}

.close-modal {
    position: absolute;
    top: -50px;
    right: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 20px;
    background: rgba(255, 255, 255, 0.05);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2001;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: rotate(90deg);
}

#experience, #contact {
    padding: 100px 0;
}

.contact-card {
    background-color: var(--secondary-bg);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    max-width: 600px;
    margin: 0 auto;
}

.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: 600;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.8rem;
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent-color);
}

.full-width {
    width: 100%;
}

footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--muted-text);
}

@media (max-width: 1024px) {
    h1 {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    header {
        height: 60px;
    }

    nav {
        padding: 0 1rem;
    }

    nav ul {
        gap: 1rem;
    }

    #hero {
        padding: 140px 0 80px;
    }

    .hero-splitter {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .hero-right {
        border-left: none;
        border-top: 1px solid var(--accent-color);
        padding-left: 0;
        padding-top: 2rem;
        max-width: 100%;
        margin: 0 auto;
        position: relative;
    }

    .hero-right::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
        height: 2px;
        background-color: var(--accent-color);
    }

    .hero-right {
        border-top: none;
        padding-top: 3rem;
    }

    .cta {
        text-align: center;
        margin-top: 3rem;
    }

    h1 {
        font-size: 2.5rem;
        word-wrap: break-word;
    }

    .social-links {
        justify-content: center;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }

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

    .work-header {
        flex-direction: column;
        text-align: center;
    }

    .logo-wrapper {
        margin: 0 auto;
    }

    .container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2.2rem;
    }

    nav ul {
        display: none; /* simple way for mobile, could add a menu later */
    }

    .work-header {
        flex-direction: column;
        text-align: center;
    }

    .logo-wrapper {
        margin: 0 auto;
    }
}
