/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #000000;
    --text: #ffffff;
    --muted: rgba(255, 255, 255, 0.5);
    --border: rgba(255, 255, 255, 0.12);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: none;
}

html::-webkit-scrollbar {
    display: none;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: calc(0.875rem + 0.15vw);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

::selection {
    background: #ffffff;
    color: #000000;
}

a {
    color: var(--text);
    text-decoration: none;
    transition: opacity 0.3s;
}

a:hover {
    opacity: 0.6;
}

/* ===== NAV ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 24px 48px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav.scrolled {
    padding: 16px 48px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-logo {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--text);
    opacity: 1;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 28px;
    height: 20px;
    position: relative;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 1px;
    background: var(--text);
    position: absolute;
    left: 0;
    transition: all 0.3s;
}

.nav-toggle span:first-child { top: 4px; }
.nav-toggle span:last-child { bottom: 4px; }

.nav-toggle.open span:first-child {
    top: 50%;
    transform: rotate(45deg);
}

.nav-toggle.open span:last-child {
    bottom: 50%;
    transform: rotate(-45deg);
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 120px 48px 80px;
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.hero-label {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 24px;
}

.hero-title {
    font-size: clamp(48px, 10vw, 120px);
    font-weight: 300;
    line-height: 0.95;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.hero-tagline {
    font-size: clamp(16px, 1.8vw, 20px);
    font-weight: 300;
    color: var(--muted);
    max-width: 500px;
    line-height: 1.5;
    margin: 0 auto 64px;
}

/* =============================================================
   PHONE CALL WIDGET
   ============================================================= */
.phone {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

/* ---- IDLE STATE ---- */
.phone-idle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    position: relative;
}

.phone-idle-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
    pointer-events: none;
    animation: idleGlow 4s ease-in-out infinite;
}

@keyframes idleGlow {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -60%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -60%) scale(1.15); }
}

.phone-call-btn {
    position: relative;
    z-index: 2;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(12px);
}

.phone-call-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
    transform: scale(1.08);
    box-shadow: 0 0 60px rgba(255,255,255,0.06);
}

.phone-call-btn:active {
    transform: scale(0.96);
}

.phone-idle-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.phone-idle-label {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.phone-idle-sub {
    font-size: 13px;
    color: var(--muted);
}

/* ---- ACTIVE STATE (CALL UI) ---- */
.phone-active {
    display: none;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    overflow: hidden;
    animation: callSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes callSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header */
.phone-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.phone-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    position: relative;
    flex-shrink: 0;
}

.phone-avatar-pulse {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    animation: avatarPulse 2s ease-in-out infinite;
}

@keyframes avatarPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.12); opacity: 0; }
}

.phone-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.phone-name {
    font-size: 15px;
    font-weight: 500;
}

.phone-timer {
    font-size: 13px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.phone-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    flex-shrink: 0;
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Waveform */
.phone-wave {
    height: 64px;
    padding: 0 24px;
    position: relative;
}

.phone-wave canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Transcript */
.phone-transcript {
    padding: 0 24px;
    height: 200px;
    position: relative;
}

.phone-transcript::before {
    content: "";
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 32px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
    z-index: 2;
    pointer-events: none;
    border-radius: 0;
}

.phone-transcript-inner {
    height: 100%;
    overflow-y: auto;
    scrollbar-width: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px 0;
}

.phone-transcript-inner::-webkit-scrollbar {
    display: none;
}

.transcript-msg {
    display: flex;
    flex-direction: column;
    gap: 2px;
    animation: msgIn 0.3s ease;
}

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

.transcript-msg--agent {
    align-items: flex-start;
}

.transcript-msg--user {
    align-items: flex-end;
}

.transcript-role {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
}

.transcript-msg--agent .transcript-text {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 16px 16px 16px 4px;
    padding: 10px 16px;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
    max-width: 90%;
}

.transcript-msg--user .transcript-text {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 16px 16px 4px 16px;
    padding: 10px 16px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    max-width: 90%;
}

/* Mode indicator */
.phone-mode {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
}

.phone-mode-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--muted);
    transition: background 0.3s;
}

[data-mode="listening"] .phone-mode-dot {
    background: #4ade80;
    animation: dotPulse 1.5s ease-in-out infinite;
}

[data-mode="speaking"] .phone-mode-dot {
    background: #60a5fa;
    animation: dotPulse 0.8s ease-in-out infinite;
}

[data-mode="connecting"] .phone-mode-dot {
    background: #fbbf24;
    animation: dotPulse 1s ease-in-out infinite;
}

#phoneModeText {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.5px;
}

/* Controls */
.phone-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 16px 24px 24px;
}

.phone-mute-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.phone-mute-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

.phone-mute-btn .mute-icon-on {
    display: none;
}

.phone-mute-btn.muted {
    background: rgba(255, 100, 100, 0.15);
    border-color: rgba(255, 100, 100, 0.3);
}

.phone-mute-btn.muted .mute-icon-off {
    display: none;
}

.phone-mute-btn.muted .mute-icon-on {
    display: block;
}

.phone-end-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: #dc2626;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 4px 24px rgba(220, 38, 38, 0.3);
}

.phone-end-btn:hover {
    background: #ef4444;
    transform: scale(1.06);
    box-shadow: 0 6px 32px rgba(220, 38, 38, 0.4);
}

.phone-end-btn:active {
    transform: scale(0.95);
}

/* ===== SECTIONS ===== */
.section {
    padding: 120px 48px;
    max-width: 1400px;
    margin: 0 auto;
    border-top: 1px solid var(--border);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 64px;
}

.section-label {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
}

.section-count {
    font-size: 13px;
    color: var(--muted);
    letter-spacing: 1px;
}

/* ===== PROJECTS ===== */
.project-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.project-card {
    display: block;
    padding: 48px 0;
    border-bottom: 1px solid var(--border);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card:first-child { padding-top: 0; }
.project-card:last-child { border-bottom: none; }

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

.project-card:hover .project-title {
    padding-left: 16px;
}

.project-meta {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
}

.project-meta span {
    font-size: 13px;
    color: var(--muted);
    letter-spacing: 0.5px;
}

.project-title {
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 16px;
    transition: padding-left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-desc {
    font-size: 15px;
    color: var(--muted);
    max-width: 600px;
    line-height: 1.7;
}

/* ===== ABOUT ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.about-lead {
    font-size: clamp(20px, 2.5vw, 28px);
    font-weight: 300;
    line-height: 1.5;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

.about-text p {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.8;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s 0.1s, transform 0.6s 0.1s;
}

.about-text.visible p,
.about-text.visible .about-lead {
    opacity: 1;
    transform: translateY(0);
}

.about-text .about-lead {
    color: var(--text);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s, transform 0.6s;
}

.about-details {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s 0.2s, transform 0.6s 0.2s;
}

.about-details.visible {
    opacity: 1;
    transform: translateY(0);
}

.detail-group { margin-bottom: 32px; }

.detail-label {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 16px;
}

.detail-text {
    font-size: 15px;
    line-height: 1.7;
}

.muted {
    color: var(--muted);
    font-size: 14px;
}

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

.tags span {
    font-size: 13px;
    font-weight: 400;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--muted);
    transition: color 0.3s, border-color 0.3s;
}

.tags span:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.4);
}

/* ===== EXPERIENCE ===== */
.exp-list {
    display: flex;
    flex-direction: column;
}

.exp-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    padding: 32px 0;
    border-bottom: 1px solid var(--border);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.exp-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.exp-item:last-child { border-bottom: none; }

.exp-date {
    font-size: 14px;
    color: var(--muted);
    padding-top: 2px;
}

.exp-role {
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 4px;
}

.exp-org {
    font-size: 14px;
    color: var(--muted);
}

/* ===== FOOTER ===== */
.footer {
    padding: 80px 48px 40px;
    max-width: 1400px;
    margin: 0 auto;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 80px;
}

.footer-logo {
    font-size: 16px;
    font-weight: 500;
    display: block;
    margin-bottom: 8px;
}

.footer-sub {
    font-size: 14px;
    color: var(--muted);
}

.footer-label {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 8px;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--text);
    opacity: 1;
}

/* ===== CONTACT FORM ===== */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

.contact-form input,
.contact-form textarea {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    font-family: var(--font);
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: border-color 0.3s;
    resize: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--muted);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: rgba(255, 255, 255, 0.35);
}

.contact-submit {
    align-self: flex-start;
    padding: 8px 24px;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #000;
    background: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.3s, transform 0.2s;
}

.contact-submit:hover {
    opacity: 0.85;
}

.contact-submit:active {
    transform: scale(0.97);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.footer-bottom p {
    font-size: 13px;
    color: var(--muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
    body { font-size: 1rem; }
    .nav { padding: 20px 32px; }
    .nav.scrolled { padding: 16px 32px; }
    .hero { padding: 120px 32px 60px; }
    .section { padding: 80px 32px; }
    .about-grid { grid-template-columns: 1fr; gap: 48px; }
    .footer { padding: 60px 32px 32px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 767px) {
    .nav { padding: 16px 24px; }
    .nav.scrolled { padding: 14px 24px; }

    .nav-links {
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: #000000;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 32px;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s;
        z-index: 99;
    }

    .nav-links.open {
        opacity: 1;
        pointer-events: all;
    }

    .nav-links a {
        font-size: 24px;
        letter-spacing: 3px;
    }

    .nav-toggle {
        display: block;
        z-index: 101;
    }

    .hero {
        padding: 100px 24px 48px;
        min-height: 100vh;
    }

    .hero-title {
        font-size: clamp(40px, 14vw, 80px);
    }

    .hero-tagline {
        margin-bottom: 48px;
    }

    .phone {
        max-width: 100%;
    }

    .phone-transcript {
        height: 180px;
    }

    .section {
        padding: 64px 24px;
    }

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

    .project-meta {
        flex-wrap: wrap;
        gap: 12px;
    }

    .project-card { padding: 32px 0; }

    .exp-item {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 24px 0;
    }

    .footer { padding: 48px 24px 24px; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; margin-bottom: 48px; }
}
