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

:root {
    --black: #000000;
    --white: #ffffff;
    --gray-light: #f5f5f5;
    --gray-medium: #e0e0e0;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.7;
    color: var(--black);
    background-color: var(--white);
    max-width: 900px;
    margin: 0 auto;
    padding: clamp(20px, 5vw, 60px) clamp(20px, 4vw, 40px);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

header {
    margin-bottom: 0;
    border-bottom: 1px solid var(--black);
    padding-bottom: clamp(20px, 2.5vw, 28px);
    animation: fadeIn 0.6s ease-out;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: clamp(16px, 2vw, 20px);
    flex-wrap: wrap;
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: clamp(1px, 0.2vw, 3px);
    line-height: 1.2;
    flex: 1;
    min-width: 0;
}

.subtitle {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    font-style: italic;
    color: var(--black);
    opacity: 0.85;
    font-weight: 400;
}

.email {
    margin-top: clamp(20px, 2.5vw, 28px);
    margin-bottom: 0;
    font-size: clamp(0.85rem, 1.7vw, 0.95rem);
    color: var(--black);
}

.social-links {
    display: flex;
    gap: clamp(12px, 2vw, 16px);
    justify-content: flex-end;
    align-items: center;
    flex-shrink: 0;
}

.social-links a {
    color: var(--black);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(36px, 4vw, 40px);
    height: clamp(36px, 4vw, 40px);
    min-width: 44px;
    min-height: 44px;
    border: 1px solid var(--black);
    transition: var(--transition);
    background-color: var(--white);
    flex-shrink: 0;
}

.social-links a:hover {
    background-color: var(--black);
    color: var(--white);
    transform: translateY(-2px);
}

.social-links a:focus-visible {
    outline: 2px solid var(--black);
    outline-offset: 2px;
}

.social-links svg {
    width: clamp(16px, 2.5vw, 20px);
    height: clamp(16px, 2.5vw, 20px);
}

/* Tab Navigation */
.tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: clamp(20px, 2.5vw, 28px);
    margin-bottom: clamp(20px, 2.5vw, 28px);
    gap: clamp(8px, 1.5vw, 16px);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    position: sticky;
    top: 0;
    background-color: var(--white);
    z-index: 10;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab-button {
    background-color: var(--white);
    border: none;
    padding: 0 clamp(16px, 3vw, 24px);
    min-height: 44px;
    cursor: pointer;
    font-family: inherit;
    font-size: clamp(0.85rem, 1.8vw, 1rem);
    text-transform: uppercase;
    letter-spacing: clamp(0.5px, 0.1vw, 1.5px);
    color: var(--black);
    transition: var(--transition);
    white-space: nowrap;
    font-weight: 400;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.tab-button:hover {
    opacity: 0.7;
}

.tab-button:focus-visible {
    outline: 2px solid var(--black);
    outline-offset: 2px;
}

.tab-button.active {
    font-weight: 600;
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeInUp 0.4s ease-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

main {
    margin-bottom: clamp(28px, 3.5vw, 36px);
    min-height: 60vh;
}

section {
    margin-bottom: 0;
}

.section-line {
    border-bottom: 1px solid var(--black);
    margin-bottom: clamp(20px, 3vw, 28px);
    padding-bottom: 0;
    margin-top: 0;
}

.content-wrapper {
    animation: fadeInUp 0.5s ease-out;
}

h3 {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 8px;
    line-height: 1.4;
    flex: 1;
    min-width: 0;
}

h3 a {
    color: var(--black);
    text-decoration: none;
    transition: var(--transition);
}

h3 a:hover {
    opacity: 0.7;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

h4 {
    font-size: clamp(1rem, 2vw, 1.15rem);
    font-weight: 500;
    margin-top: 20px;
    margin-bottom: 12px;
    font-style: italic;
}

.entry {
    margin-bottom: clamp(24px, 3vw, 32px);
    padding-bottom: clamp(20px, 2.5vw, 28px);
    border-bottom: 1px solid var(--gray-medium);
    transition: var(--transition);
}

.entry:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.entry-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.date-badge {
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    font-weight: 500;
    padding: 4px 12px;
    border: 1px solid var(--black);
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
}

.organization {
    font-weight: 400;
    font-size: clamp(1rem, 2vw, 1.1rem);
    margin-top: 4px;
    margin-bottom: 4px;
}

.degree {
    font-style: italic;
    margin-top: 8px;
    font-size: clamp(0.95rem, 1.8vw, 1.05rem);
}

.extracurriculars {
    margin-top: 20px;
}

.extracurriculars h4 {
    font-size: clamp(0.9rem, 1.8vw, 1rem);
    font-weight: 600;
    margin-bottom: 8px;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.extracurriculars-list {
    margin-top: 0;
    margin-bottom: 0;
    font-size: clamp(0.9rem, 1.7vw, 1rem);
    line-height: 1.6;
}

.location {
    font-style: italic;
    margin-top: 4px;
    margin-bottom: 12px;
    color: var(--black);
    opacity: 0.7;
    font-size: clamp(0.9rem, 1.6vw, 0.95rem);
}

.description {
    margin-top: 12px;
    text-align: left;
    line-height: 1.8;
    font-size: clamp(0.95rem, 1.8vw, 1.05rem);
}

.skills {
    margin-top: 12px;
    font-style: italic;
    font-size: clamp(0.85rem, 1.6vw, 0.95rem);
    opacity: 0.8;
}

a {
    color: var(--black);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: var(--transition);
}

a:hover {
    opacity: 0.7;
}

a:focus-visible {
    outline: 2px solid var(--black);
    outline-offset: 2px;
}

strong {
    font-weight: 600;
}

ul {
    margin-top: 12px;
    margin-left: clamp(20px, 4vw, 24px);
    list-style-type: disc;
    line-height: 1.8;
}

li {
    margin-bottom: 8px;
    font-size: clamp(0.95rem, 1.8vw, 1.05rem);
}

.award-category {
    margin-bottom: clamp(24px, 3vw, 32px);
    padding-bottom: clamp(20px, 2.5vw, 28px);
    border-bottom: 1px solid var(--gray-medium);
}

.award-category:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.award-category h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: clamp(1.2rem, 2.8vw, 1.5rem);
}

.award-subsection {
    margin-bottom: 20px;
}

.award-subsection:last-child {
    margin-bottom: 0;
}

.note {
    margin-top: 20px;
    padding: 12px;
    border-left: 3px solid var(--black);
    background-color: var(--gray-light);
    font-size: clamp(0.9rem, 1.7vw, 1rem);
}

footer {
    border-top: 1px solid var(--black);
    padding-top: clamp(24px, 3vw, 32px);
    text-align: center;
    font-size: clamp(0.85rem, 1.6vw, 0.95rem);
    margin-top: clamp(32px, 4vw, 40px);
}

footer p {
    opacity: 0.7;
    margin-top: 0;
}

p {
    margin-bottom: clamp(10px, 1.5vw, 14px);
}

em {
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: clamp(16px, 4vw, 20px) clamp(12px, 3vw, 16px);
    }

    .header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .social-links {
        justify-content: flex-start;
    }

    .tabs {
        position: relative;
        top: 0;
        margin-left: -12px;
        margin-right: -12px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .tab-button {
        padding: 12px 16px;
        font-size: 0.9rem;
        min-height: 44px;
    }

    .entry-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .date-badge {
        align-self: flex-start;
    }

    .section-line {
        margin-bottom: clamp(16px, 2.5vw, 24px);
    }
}

@media (max-width: 480px) {
    body {
        padding: clamp(12px, 3vw, 16px) clamp(10px, 2.5vw, 12px);
    }

    h1 {
        font-size: clamp(1.5rem, 6vw, 1.75rem);
        letter-spacing: 1px;
    }

    .subtitle {
        font-size: clamp(0.85rem, 3vw, 0.9rem);
    }

    .tab-button {
        padding: 12px 14px;
        font-size: clamp(0.8rem, 3vw, 0.85rem);
        min-height: 44px;
    }

    .entry {
        margin-bottom: clamp(20px, 3vw, 24px);
        padding-bottom: clamp(20px, 2.5vw, 24px);
    }

    .award-category {
        margin-bottom: clamp(20px, 3vw, 24px);
        padding-bottom: clamp(20px, 2.5vw, 24px);
    }

    .section-line {
        margin-bottom: clamp(16px, 2.5vw, 20px);
    }

    h3 {
        font-size: clamp(1rem, 4vw, 1.1rem);
    }

    ul {
        margin-left: clamp(16px, 3vw, 18px);
    }

    .social-links a {
        min-width: 44px;
        min-height: 44px;
    }
}

@media (min-width: 1200px) {
    body {
        max-width: 1000px;
    }
}

/* Print Styles */
@media print {
    .tabs {
        display: none;
    }

    .tab-content {
        display: block !important;
        page-break-inside: avoid;
    }

    .tab-button {
        display: none;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
