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

html,
body {
    height: 100%;
}

body {
    font-family: 'Geist Sans', 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #ffffff;
    color: #1a1a1a;
    line-height: 1.6;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* Layout */
.container {
    max-width: 540px;
    margin: 0 auto;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.header-text h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
    line-height: 1.4;
    min-height: 1.4em;
}

.header-text .title {
    font-size: 14px;
    font-weight: 300;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.header-text .location {
    font-size: 14px;
    font-weight: 300;
    color: #828282;
}

/* Links with animated underline */
a {
    text-decoration: none;
    background-size: 0% 1px;
    background-repeat: no-repeat;
    background-position: left bottom;
    padding-bottom: 2px;
    transition: background-size 0.3s ease;
}

a:hover {
    background-size: 100% 1px;
}

.header-text .title a {
    color: #1a1a1a;
    background-image: linear-gradient(#1a1a1a, #1a1a1a);
}

/* Avatar */
.avatar-placeholder {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: #e5e5e5;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.avatar.falling {
    position: fixed;
    z-index: 1000;
    pointer-events: none;
}

.avatar.settled {
    position: fixed;
    z-index: 999;
    pointer-events: none;
}

.avatar.reappearing {
    animation: growBack 0.5s ease-out forwards;
}

@keyframes growBack {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Sections */
section {
    margin-bottom: 32px;
}

section h2 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

/* About */
.about p {
    font-size: 14px;
    font-weight: 300;
    color: #828282;
    line-height: 1.6;
}

.about p a {
    color: #828282;
    background-image: linear-gradient(#828282, #828282);
}

/* Experience */
.experience-item {
    margin-bottom: 20px;
}

.experience-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.experience-item .role {
    font-size: 14px;
    font-weight: 300;
    color: #1a1a1a;
}

.experience-item .role a {
    color: #1a1a1a;
    background-image: linear-gradient(#1a1a1a, #1a1a1a);
}

.experience-item .date {
    font-size: 14px;
    font-weight: 300;
    color: #1a1a1a;
    text-align: right;
}

.experience-item .team {
    font-size: 14px;
    font-weight: 300;
    color: #828282;
}

.experience-item .location {
    font-size: 14px;
    font-weight: 300;
    color: #828282;
    text-align: right;
}

/* Contact */
.contact-list {
    list-style: none;
}

.contact-list li {
    font-size: 14px;
    font-weight: 300;
    color: #828282;
    margin-bottom: 4px;
}

.contact-list li.with-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-list li a {
    color: #828282;
    background-image: linear-gradient(#828282, #828282);
}

/* Theme Toggle */
.theme-toggle {
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: #a0a0a0;
    stroke-width: 1.5;
    transition: stroke 0.2s ease;
}

.theme-toggle .moon-icon {
    stroke-width: 1.2;
}

.theme-toggle:hover svg {
    stroke: #1a1a1a;
}

.theme-toggle .sun-icon {
    display: none;
}

.theme-toggle .moon-icon {
    display: block;
}

/* Dark Mode */
body.dark-mode {
    background-color: #1a1a1a;
    color: #ffffff;
}

body.dark-mode .header-text .title {
    color: #ffffff;
}

body.dark-mode .header-text .title a {
    color: #ffffff;
    background-image: linear-gradient(#ffffff, #ffffff);
}

body.dark-mode .experience-item .role {
    color: #ffffff;
}

body.dark-mode .experience-item .role a {
    color: #ffffff;
    background-image: linear-gradient(#ffffff, #ffffff);
}

body.dark-mode .experience-item .date {
    color: #ffffff;
}

body.dark-mode .header-text .location,
body.dark-mode .about p,
body.dark-mode .about p a,
body.dark-mode .experience-item .team,
body.dark-mode .experience-item .location,
body.dark-mode .contact-list li,
body.dark-mode .contact-list li a {
    color: #a0a0a0;
}

body.dark-mode .theme-toggle:hover svg {
    stroke: #ffffff;
}

body.dark-mode .theme-toggle .sun-icon {
    display: block;
}

body.dark-mode .theme-toggle .moon-icon {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    body {
        padding: 24px;
        align-items: flex-start;
        justify-content: flex-start;
        min-height: auto;
    }

    .avatar-placeholder,
    .avatar {
        width: 80px;
        height: 80px;
    }
}