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

:root {
    --primary: #0066ff;
    --primary-dark: #0052d4;
    --secondary: #00d4aa;
    --secondary-dark: #00b894;
    --background: #0a0a0f;
    --surface: #12121f;
    --surface-light: #1e1e2e;
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --text-tertiary: #718096;
    --accent: #ff6b6b;
    --success: #00ff88;
    --border: rgba(255, 255, 255, 0.1);
    --glow: 0 0 30px rgba(0, 102, 255, 0.3);
    --glow-secondary: 0 0 30px rgba(0, 212, 170, 0.3);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s ease-out;
}

.loading-bar {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 20px;
}

.loading-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
    animation: loading 2s ease-in-out forwards;
}

@keyframes loading {
    0% { width: 0%; }
    100% { width: 100%; }
}

.loading-text {
    font-size: 14px;
    color: var(--text-tertiary);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.network-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 102, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 102, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.3;
}

.pulse-circles {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
}

.pulse-circles::before,
.pulse-circles::after,
.pulse-circles div::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(0, 102, 255, 0.1);
    border-radius: 50%;
    animation: pulse 4s linear infinite;
}

.pulse-circles::before {
    width: 80%;
    height: 80%;
    animation-delay: 0s;
}

.pulse-circles::after {
    width: 60%;
    height: 60%;
    animation-delay: 1s;
}

.pulse-circles div::before {
    width: 40%;
    height: 40%;
    animation-delay: 2s;
}

@keyframes pulse {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 100%;
        height: 100%;
        opacity: 0;
    }
}

/* Main Container */
.portfolio-container {
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    padding: 40px;
    gap: 40px;
    opacity: 0;
    animation: fadeIn 0.8s ease-out 2s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Left Column */
.left-column {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Name Animation */
.name-animation {
    margin-top: 40px;
}

.first-name-container,
.last-name-container {
    position: relative;
    overflow: hidden;
}

.first-name,
.last-name {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
    margin: 0;
    opacity: 0;
    transform: translateY(30px);
}

.first-name {
    color: var(--primary);
    animation: slideUp 0.8s ease-out 2.2s forwards;
}

.last-name {
    color: var(--text-primary);
    animation: slideUp 0.8s ease-out 2.4s forwards;
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.name-underline {
    height: 4px;
    width: 0;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    margin-top: 5px;
    border-radius: 2px;
}

.first-name-container .name-underline {
    animation: expandWidth 0.6s ease-out 2.8s forwards;
}

.last-name-container .name-underline {
    animation: expandWidth 0.6s ease-out 3s forwards;
}

@keyframes expandWidth {
    to {
        width: 100%;
    }
}

.title-container {
    margin-top: 20px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s ease-out 3.2s forwards;
}

.title-text {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.title-subtext {
    font-size: 1rem;
    color: var(--text-tertiary);
    font-weight: 400;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Timeline Visual */
.timeline-visual {
    position: relative;
    padding: 30px 0;
}

.timeline-track {
    position: absolute;
    left: 25px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.timeline-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    animation: fillTimeline 2s ease-out 3.4s forwards;
}

@keyframes fillTimeline {
    to {
        height: 100%;
    }
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateX(-20px);
}

.timeline-item[data-year="2022"] {
    animation: slideInRight 0.6s ease-out 3.6s forwards;
}

.timeline-item[data-year="2023"] {
    animation: slideInRight 0.6s ease-out 3.8s forwards;
}

.timeline-item[data-year="2025"] {
    animation: slideInRight 0.6s ease-out 4s forwards;
}

.timeline-item[data-year="2026"] {
    animation: slideInRight 0.6s ease-out 4.2s forwards;
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.timeline-dot {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--surface);
    border: 3px solid var(--primary);
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glow);
}

.timeline-dot::before {
    content: '';
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.timeline-content {
    flex: 1;
}

.timeline-year {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.timeline-role {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.timeline-company {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.timeline-metric {
    font-size: 0.9rem;
    color: var(--secondary);
    font-weight: 500;
}

/* Current Focus */
.current-focus {
    background: var(--surface);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid var(--border);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s ease-out 4.4s forwards;
}

.focus-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.focus-icon {
    font-size: 1.5rem;
}

.focus-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
}

.focus-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.focus-progress {
    position: relative;
    width: 50px;
    height: 50px;
}

.progress-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(var(--secondary) 0%, var(--surface-light) 0%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-circle::before {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    background: var(--surface);
    border-radius: 50%;
}

.focus-details {
    flex: 1;
}

.focus-name {
    font-weight: 600;
    margin-bottom: 3px;
}

.focus-status {
    font-size: 0.9rem;
    color: var(--secondary);
    font-weight: 500;
}

/* Right Column */
.right-column {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 40px;
}

.stat-card {
    background: var(--surface);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 15px;
    opacity: 0;
    transform: translateY(20px);
}

.stat-card:nth-child(1) {
    animation: cardAppear 0.6s ease-out 4.6s forwards;
}

.stat-card:nth-child(2) {
    animation: cardAppear 0.6s ease-out 4.8s forwards;
}

.stat-card:nth-child(3) {
    animation: cardAppear 0.6s ease-out 5s forwards;
}

.stat-card:nth-child(4) {
    animation: cardAppear 0.6s ease-out 5.2s forwards;
}

@keyframes cardAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 5px;
}

.stat-content {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-unit {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.stat-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.stat-context {
    font-size: 0.9rem;
    color: var(--text-tertiary);
}

.stat-visual {
    margin-top: 10px;
}

.stat-bar {
    height: 6px;
    background: var(--surface-light);
    border-radius: 3px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
    width: 0;
    animation: fillBar 1.5s ease-out 5.4s forwards;
}

@keyframes fillBar {
    to {
        width: 95%;
    }
}

.speed-gauge {
    position: relative;
    width: 80px;
    height: 40px;
}

.gauge-circle {
    position: absolute;
    top: 0;
    left: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 8px solid var(--surface-light);
    border-top-color: var(--primary);
    border-right-color: var(--secondary);
    clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%);
    transform: rotate(45deg);
    animation: rotateGauge 2s ease-out 5.4s forwards;
}

@keyframes rotateGauge {
    to {
        transform: rotate(225deg);
    }
}

.gauge-needle {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 2px;
    height: 35px;
    background: var(--accent);
    transform-origin: bottom center;
    transform: translateX(-50%) rotate(0deg);
    animation: rotateNeedle 1s ease-out 5.6s forwards;
}

@keyframes rotateNeedle {
    to {
        transform: translateX(-50%) rotate(180deg);
    }
}

.ticket-chart {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    height: 40px;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(to top, var(--primary), var(--secondary));
    border-radius: 3px 3px 0 0;
    opacity: 0;
    animation: chartBars 0.6s ease-out 5.8s forwards;
}

.chart-bar:nth-child(1) { animation-delay: 5.8s; }
.chart-bar:nth-child(2) { animation-delay: 6s; }
.chart-bar:nth-child(3) { animation-delay: 6.2s; }
.chart-bar:nth-child(4) { animation-delay: 6.4s; }
.chart-bar:nth-child(5) { animation-delay: 6.6s; }

@keyframes chartBars {
    to {
        opacity: 1;
    }
}

.improvement-arrow {
    position: relative;
    width: 80px;
    height: 40px;
}

.arrow-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: translateY(-50%);
    animation: drawLine 1s ease-out 6.8s forwards;
}

.arrow-head {
    position: absolute;
    top: 50%;
    right: 0;
    width: 0;
    height: 0;
    border-left: 10px solid var(--secondary);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    transform: translateY(-50%);
    opacity: 0;
    animation: showArrow 0.3s ease-out 7.8s forwards;
}

@keyframes drawLine {
    to {
        width: 100%;
    }
}

@keyframes showArrow {
    to {
        opacity: 1;
    }
}

/* Tech Stack */
.tech-stack {
    background: var(--surface);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid var(--border);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s ease-out 7s forwards;
}

.stack-header {
    margin-bottom: 25px;
}

.stack-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.stack-subtitle {
    font-size: 0.95rem;
    color: var(--text-tertiary);
}

.stack-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: var(--surface-light);
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.tech-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--glow);
}

.tech-icon {
    font-size: 2rem;
    margin-bottom: 15px;
}

.tech-name {
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
}

.level-dots {
    display: flex;
    gap: 5px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
}

.dot.active {
    background: var(--primary);
    border-color: var(--primary);
}

/* Contact Section */
.contact-section {
    background: var(--surface);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid var(--border);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s ease-out 7.4s forwards;
}

.contact-header {
    margin-bottom: 30px;
}

.contact-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.contact-subtitle {
    font-size: 1rem;
    color: var(--text-tertiary);
}

.contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-btn {
    display: flex;
    align-items: center;
    padding: 20px 25px;
    border-radius: 15px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

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

.contact-btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: var(--glow);
}

.contact-btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.btn-icon {
    font-size: 1.5rem;
    margin-right: 20px;
    width: 30px;
    display: flex;
    justify-content: center;
}

.btn-content {
    flex: 1;
}

.btn-title {
    font-weight: 600;
    margin-bottom: 3px;
}

.btn-detail {
    font-size: 0.95rem;
    opacity: 0.9;
}

.btn-arrow {
    font-size: 1.2rem;
    font-weight: 700;
}

.contact-note {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(0, 102, 255, 0.05);
    border-radius: 15px;
    margin-top: 10px;
}

.note-icon {
    color: var(--primary);
    font-size: 1.2rem;
}

.note-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Photo Modal */
.photo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(10px);
}

.photo-modal.active {
    display: flex;
}

.modal-content {
    background: var(--surface);
    border-radius: 25px;
    width: 90%;
    max-width: 500px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalAppear 0.3s ease-out;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 30px;
}

.modal-photo {
    width: 100%;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background: var(--surface-light);
    border-radius: 10px;
}

.info-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.info-value {
    font-weight: 600;
    color: var(--primary);
}

/* Responsive */
@media (max-width: 1200px) {
    .portfolio-container {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 20px;
    }
    
    .left-column, .right-column {
        max-width: 800px;
        margin: 0 auto;
        width: 100%;
    }
    
    .first-name, .last-name {
        font-size: 4rem;
    }
}

@media (max-width: 768px) {
    .first-name, .last-name {
        font-size: 3rem;
    }
    
    .title-text {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stack-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline-item {
        gap: 20px;
    }
    
    .timeline-dot {
        width: 40px;
        height: 40px;
    }
}