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

:root {
    --bg-color: #111;
    --text-color: #fff;
    --highlight-color: #aaa;
    --border-color: rgba(255, 255, 255, 0.2);
    --link-hover: rgba(255, 255, 255, 0.5);

    --font-primary: 'Inter', sans-serif;
    --font-mono: 'Space Mono', monospace;
    --current-font: var(--font-primary);
    
    --status-color: #00ff88;
}

body.light-mode {
    --bg-color: #e5e5e5;
    --text-color: #111;
    --highlight-color: #555;
    --border-color: rgba(0, 0, 0, 0.2);
    --link-hover: rgba(0, 0, 0, 0.5);
    
    --status-color: #008f4f;
}

body.mono-font {
    --current-font: var(--font-mono);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--current-font);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
    transition: background-color 0.4s ease, color 0.4s ease, font-family 0.1s ease;
}

/* Background Canvas */
canvas#bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* Global Frame */
.frame {
    position: fixed;
    top: 25px;
    left: 25px;
    right: 25px;
    bottom: 25px;
    border: 1px solid var(--border-color);
    pointer-events: none;
    z-index: 100;
    transition: border-color 0.4s ease;
}

/* Rotated Left Edge Toggles */
.left-edge-text {
    position: absolute;
    left: -190px;
    bottom: 180px;
    transform: rotate(-90deg);
    transform-origin: left bottom;
    display: flex;
    gap: 30px;
    pointer-events: auto;
}

.toggle-btn {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-family: var(--font-primary);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.5px;
    transition: opacity 0.3s;
    text-transform: uppercase;
}

.toggle-btn:hover {
    opacity: 0.5;
}

.bottom-left {
    position: absolute;
    bottom: -22px;
    left: 0px;
    font-size: 10px;
    font-family: var(--font-primary);
    letter-spacing: 0.5px;
    color: var(--highlight-color);
}

.bottom-right {
    position: absolute;
    bottom: 25px;
    right: 30px;
    font-size: 12px;
    font-family: var(--font-primary);
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: -0.2px;
    text-align: left;
    color: var(--text-color);
}

/* Layout */
.container {
    display: flex;
    justify-content: space-between;
    min-height: 100vh;
    padding: 100px 80px 100px 90px;
}

/* Left Header (Sticky) */
.left {
    position: fixed;
    width: 350px;
    top: 80px;
    left: 70px;
}

.name {
    font-size: 58px;
    font-weight: 100;
    /* Ultra thin like screenshot */
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 8px;
}

.role {
    font-size: 12px;
    color: var(--text-color);
    margin-bottom: 80px;
    font-weight: 400;
    letter-spacing: -0.2px;
}

.nav ul {
    list-style: none;
}

.nav li {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
}

/* Dot for active menu items */
.nav li::before {
    content: '\2022';
    color: var(--text-color);
    margin-right: 12px;
    font-size: 20px;
    line-height: 0;
    opacity: 0;
    transition: opacity 0.3s;
}

.nav li.active::before {
    opacity: 1;
}

.nav a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 13px;
    font-weight: 600;
    transition: color 0.3s ease;
    letter-spacing: 0px;
}

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

/* Right Content (Scrollable) */
.content {
    margin-left: max(40%, 450px);
    width: 100%;
    max-width: 600px;
    padding-bottom: 100px;
}

.section {
    padding-top: 100px;
    min-height: 80vh;
    display: none;
    flex-direction: column;
    justify-content: center;
}

.section.active {
    display: flex;
    animation: fadeInSection 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes fadeInSection {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 40px;
    color: var(--highlight-color);
}

.about-text p {
    font-size: 17px;
    font-weight: 300;
    line-height: 1.7;
    margin-bottom: 24px;
    color: var(--text-color);
}

.about-text p.intro-para {
    font-size: 18.5px;
    line-height: 1.65;
    border-left: 2px solid var(--border-color);
    padding-left: 20px;
    margin-bottom: 28px;
}

.about-text .highlight {
    font-weight: 500;
}

.about-text .tech-highlight {
    font-family: var(--font-mono);
    font-size: 13.5px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 2px 6px;
    margin: 0 1px;
    font-weight: 400;
    color: var(--text-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

body.light-mode .about-text .tech-highlight {
    background: rgba(0, 0, 0, 0.03);
}

.about-text .tech-highlight:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--text-color);
}

body.light-mode .about-text .tech-highlight:hover {
    background-color: rgba(0, 0, 0, 0.08);
}

.project {
    margin-bottom: 60px;
}

.project h3 {
    font-size: 24px;
    font-weight: 300;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.project p {
    font-size: 15px;
    color: var(--highlight-color);
    margin-bottom: 16px;
    font-weight: 300;
}

.project .role-date {
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 16px;
    color: var(--text-color);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    font-family: var(--font-primary);
    font-size: 10px;
    font-weight: 500;
    padding: 4px 10px;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

/* Experience Timeline */
.timeline {
    position: relative;
    padding-left: 32px;
}

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

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

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

.timeline-dot {
    position: absolute;
    left: -32px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid var(--border-color);
    z-index: 1;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item.active .timeline-dot {
    background: #fff;
    border-color: #fff;
    box-shadow: none;
}

body.light-mode .timeline-dot {
    background: rgba(0, 0, 0, 0.15);
    border-color: var(--border-color);
}

body.light-mode .timeline-item.active .timeline-dot {
    background: #111;
    border-color: #111;
    box-shadow: none;
}

.timeline-date {
    display: block;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.5px;
    color: var(--highlight-color);
    margin-bottom: 8px;
}

.timeline-title {
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-color);
    margin-bottom: 4px;
    line-height: 1.3;
}

.timeline-company {
    display: block;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 400;
    color: var(--highlight-color);
    margin-bottom: 12px;
    letter-spacing: 0.3px;
}

.timeline-desc {
    font-size: 14px;
    font-weight: 300;
    line-height: 1.7;
    color: var(--highlight-color);
    max-width: 480px;
}

/* Contact Widget & Form Styles */
.contact-status-widget {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.5px;
    margin-bottom: 40px;
    color: var(--highlight-color);
    text-transform: uppercase;
}

.status-pulse {
    position: relative;
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--status-color);
    border-radius: 50%;
}

.status-pulse::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    width: 12px;
    height: 12px;
    border: 1px solid var(--status-color);
    border-radius: 50%;
    animation: statusPulseAnimation 2s infinite ease-out;
    opacity: 0;
}

@keyframes statusPulseAnimation {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    30% {
        opacity: 0.8;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

.status-divider {
    color: var(--border-color);
    margin: 0 4px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 60px;
}

.form-group {
    position: relative;
    display: flex;
    flex-direction: column;
}

.form-group input,
.form-group textarea {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    font-family: var(--current-font);
    font-size: 15px;
    font-weight: 300;
    padding: 10px 0;
    width: 100%;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-group textarea {
    resize: none;
    overflow-y: hidden;
    min-height: 40px;
}

.form-group label {
    position: absolute;
    left: 0;
    top: 10px;
    font-size: 15px;
    font-weight: 300;
    color: var(--highlight-color);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Float the label */
.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
    top: -16px;
    font-size: 11px;
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-color);
}

/* Form line animation on focus */
.form-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background-color: var(--text-color);
    transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), left 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.form-group input:focus ~ .form-line,
.form-group textarea:focus ~ .form-line {
    width: 100%;
    left: 0;
}

.submit-btn {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 12px 28px;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.submit-btn:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
    border-color: var(--text-color);
}

.submit-btn .btn-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.submit-btn:hover .btn-icon {
    transform: translate(2px, -2px);
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: transparent !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
}

.form-status {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 15px;
    min-height: 16px;
    transition: color 0.3s ease;
}

.form-status.success {
    color: var(--status-color);
}

.form-status.error {
    color: #ff4a4a;
}

.contact-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 40px;
    margin-top: 40px;
}

.contact-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--highlight-color);
    margin-bottom: 20px;
}

.contact-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-anchor {
    color: var(--text-color);
    text-decoration: none;
    font-size: 16px;
    font-weight: 300;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s ease;
}

.contact-anchor:hover {
    color: var(--highlight-color);
}

.contact-anchor .arrow {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--highlight-color);
    transition: transform 0.3s ease, color 0.3s ease;
}

.contact-anchor:hover .arrow {
    transform: translate(2px, -2px);
    color: var(--text-color);
}

.copy-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--highlight-color);
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 3px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 2px;
}

.copy-btn:hover {
    border-color: var(--text-color);
    color: var(--text-color);
}

.copy-btn.copied {
    background-color: var(--text-color);
    color: var(--bg-color);
    border-color: var(--text-color);
}

/* Responsiveness */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
        padding: 60px 40px;
    }

    .left {
        position: relative;
        width: 100%;
        top: 0;
        left: 0;
        margin-bottom: 80px;
    }

    .content {
        margin-left: 0;
    }

    .frame {
        display: none;
    }
}