/* portfolio styles */

:root {
    --bg-primary: #ffffff;
    --bg-alt: #f8f9fa;
    --bg-card: #ffffff;
    --text-heading: #111827;
    --text-body: #374151;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --accent: #3b82f6;
    --accent-subtle: rgba(59, 130, 246, 0.08);
    --accent-border: rgba(59, 130, 246, 0.25);
    --border-light: #e5e7eb;
    --border-medium: #d1d5db;
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
    --max-width: 920px;
    --header-height: 56px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    --transition: 0.15s ease;
}

/* reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + var(--space-lg));
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-body);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-light);
    z-index: 100;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-heading);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.site-name:hover {
    color: var(--accent);
}

.site-nav {
    display: flex;
    gap: 0.25rem;
}

.site-nav a {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all var(--transition);
}

.site-nav a:hover {
    color: var(--text-heading);
    background: var(--bg-alt);
}

/* hamburger menu */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-heading);
    transition: all var(--transition);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.document {
    max-width: var(--max-width);
    margin: 0 auto;
    padding-top: calc(var(--header-height) + var(--space-xl));
}

/* sections */
.section {
    padding: var(--space-xl) var(--space-md);
}

.section-alt {
    background: var(--bg-alt);
}

.section-heading {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: var(--space-lg);
    padding-left: var(--space-sm);
    border-left: 3px solid var(--accent);
    letter-spacing: -0.01em;
}

/* intro */
.section-intro {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: var(--space-xl);
    align-items: start;
    padding-bottom: var(--space-2xl);
}

.intro-sidebar {
    position: sticky;
    top: calc(var(--header-height) + var(--space-md));
}

.sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: var(--space-md);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.intro-name {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.intro-title {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 0.125rem;
}

.intro-school {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.status-badge {
    display: block;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--accent);
    background: var(--accent-subtle);
    padding: 0.5rem 0.75rem;
    padding-left: calc(0.75rem + 3px);
    border-radius: 4px;
    margin-bottom: var(--space-md);
    position: relative;
}

.status-badge::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
    border-radius: 4px 0 0 4px;
}

.quick-links {
    list-style: none;
}

.quick-links li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.625rem;
    font-size: 0.8125rem;
}

.quick-links li:last-child {
    margin-bottom: 0;
}

.quick-links svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.quick-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition);
}

.quick-links a:hover {
    color: var(--accent);
}

.intro-content p {
    color: var(--text-body);
    margin-bottom: var(--space-sm);
    font-size: 0.9375rem;
    line-height: 1.75;
}

.intro-content p:last-of-type {
    margin-bottom: var(--space-lg);
}

.exploring-box {
    background: var(--bg-alt);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: var(--space-sm) var(--space-md);
}

.exploring-label {
    display: block;
    font-size: 0.6875rem;
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.exploring-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.exploring-list li {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    padding: 0.375rem 0.625rem;
    border-radius: 4px;
    transition: border-color var(--transition);
}

.exploring-list li:hover {
    border-color: var(--border-medium);
}

/* skills */
.skills-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.skill-group {
    display: flex;
    align-items: baseline;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.skill-label {
    font-size: 0.6875rem;
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--text-muted);
    min-width: 80px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.tag {
    font-size: 0.8125rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    padding: 0.3125rem 0.625rem;
    border-radius: 4px;
    transition: all var(--transition);
}

.tag:hover {
    border-color: var(--accent-border);
    color: var(--accent);
}

/* projects */
.project-filters {
    display: flex;
    gap: 0.375rem;
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.filter-btn {
    font-size: 0.8125rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    background: none;
    border: 1px solid transparent;
    padding: 0.4375rem 0.875rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all var(--transition);
}

.filter-btn:hover {
    color: var(--text-secondary);
    background: var(--bg-alt);
}

.filter-btn.active {
    color: var(--accent);
    background: var(--accent-subtle);
    border-color: var(--accent-border);
}

.project-list {
    list-style: none;
}

.project-item {
    border: 1px solid var(--border-light);
    border-radius: 6px;
    margin-bottom: var(--space-sm);
    background: var(--bg-card);
    transition: all var(--transition);
}

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

.project-item:hover {
    border-color: var(--border-medium);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.project-item.hidden {
    display: none;
}

.project-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
}

.project-main {
    flex: 1;
    min-width: 0;
}

.project-name {
    display: block;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-heading);
    margin-bottom: 0.25rem;
}

.project-desc {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.project-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.project-tech {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    display: none;
}

.github-link {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-alt);
    border: 1px solid var(--border-light);
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    text-decoration: none;
    transition: all var(--transition);
}

.github-link:hover {
    background: var(--bg-primary);
    border-color: var(--border-medium);
    color: var(--text-heading);
}

.project-toggle {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--accent);
    background: var(--accent-subtle);
    border: 1px solid var(--accent-border);
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition);
}

.project-toggle:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.project-details {
    margin: 0 var(--space-md) var(--space-md);
    padding: var(--space-sm) var(--space-md);
    padding-left: calc(var(--space-md) + 3px);
    background: var(--bg-alt);
    border-radius: 4px;
    position: relative;
}

.project-details::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
    border-radius: 3px 0 0 3px;
}

.details-overview {
    font-size: 0.875rem;
    color: var(--text-body);
    margin-bottom: var(--space-sm);
    line-height: 1.6;
}

.details-section {
    margin-top: var(--space-sm);
}

.details-label {
    display: block;
    font-size: 0.6875rem;
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.details-section ul {
    list-style: none;
    padding-left: 0;
}

.details-section li {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    padding-left: 1rem;
    position: relative;
    margin-bottom: 0.375rem;
    line-height: 1.55;
}

.details-section li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
}

/* experience */
.experience-list {
    list-style: none;
}

.experience-item {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-light);
}

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

.experience-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.625rem;
}

.experience-role {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-heading);
}

.experience-org {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.experience-org::before {
    content: '—';
    margin-right: 0.5rem;
    color: var(--border-medium);
}

.experience-date {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--text-muted);
    margin-left: auto;
    background: var(--bg-primary);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    border: 1px solid var(--border-light);
}

.experience-desc {
    font-size: 0.875rem;
    color: var(--text-body);
    line-height: 1.65;
    margin-bottom: 0.75rem;
}

.experience-bullets {
    list-style: none;
    margin-bottom: 0.875rem;
}

.experience-bullets li {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding-left: 1rem;
    position: relative;
    margin-bottom: 0.375rem;
    line-height: 1.6;
}

.experience-bullets li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
}

.experience-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

/* contact */
.contact-note {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: var(--space-xl);
    align-items: start;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 0;
    transition: color var(--transition);
}

.contact-link svg {
    color: var(--text-muted);
    flex-shrink: 0;
    transition: color var(--transition);
}

.contact-link:hover {
    color: var(--accent);
}

.contact-link:hover svg {
    color: var(--accent);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-row label {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-row input,
.form-row textarea {
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    color: var(--text-body);
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 0.75rem 0.875rem;
    transition: all var(--transition);
}

.form-row input:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}

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

.form-row textarea {
    resize: vertical;
    min-height: 100px;
}

.submit-btn {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 500;
    color: white;
    background: var(--accent);
    border: none;
    border-radius: 6px;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    transition: all var(--transition);
    align-self: flex-start;
}

.submit-btn:hover {
    background: #2563eb;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.form-success {
    background: var(--bg-alt);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: var(--space-md);
    text-align: center;
}

.form-success p {
    font-size: 0.9375rem;
    color: var(--text-body);
    margin-bottom: 0.875rem;
}

.reset-btn {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--accent);
    background: none;
    border: 1px solid var(--accent-border);
    border-radius: 6px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all var(--transition);
}

.reset-btn:hover {
    background: var(--accent-subtle);
}

/* footer */
.site-footer {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-lg) var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-light);
    background: var(--bg-alt);
}

.site-footer p {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    padding: 0.25rem;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--accent);
}

/* tablet */
@media (max-width: 800px) {
    .section-intro {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .intro-sidebar {
        position: static;
    }

    .sidebar-card {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-sm);
        align-items: baseline;
    }

    .intro-name {
        width: 100%;
        margin-bottom: 0;
    }

    .intro-title,
    .intro-school {
        margin-bottom: 0;
    }

    .status-badge {
        margin-left: auto;
        margin-bottom: 0;
    }

    .quick-links {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem var(--space-lg);
        margin-top: var(--space-xs);
        padding-top: var(--space-sm);
        border-top: 1px solid var(--border-light);
    }

    .quick-links li {
        margin-bottom: 0;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .project-tech {
        display: none;
    }
}

/* mobile */
@media (max-width: 600px) {
    :root {
        --space-md: 1.25rem;
        --space-lg: 2rem;
        --space-xl: 2.5rem;
    }

    .header-inner {
        padding: 0 var(--space-sm);
    }

    .site-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border-light);
        flex-direction: column;
        padding: var(--space-sm);
        gap: 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.2s ease;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }

    .site-nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .site-nav a {
        display: block;
        padding: 0.875rem;
        font-size: 0.9375rem;
    }

    .nav-toggle {
        display: flex;
    }

    .section {
        padding: var(--space-lg) var(--space-sm);
    }

    .sidebar-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .status-badge {
        margin-left: 0;
    }

    .quick-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .quick-links li {
        font-size: 0.8125rem;
    }

    .skill-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .skill-label {
        min-width: auto;
    }

    .project-row {
        flex-direction: column;
        gap: 0.625rem;
    }

    .project-meta {
        width: 100%;
        justify-content: space-between;
    }

    .project-tech {
        display: block;
    }

    .experience-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .experience-org::before {
        display: none;
    }

    .experience-date {
        margin-left: 0;
        margin-top: 0.25rem;
    }

    .contact-grid {
        gap: var(--space-md);
    }

    .contact-links {
        gap: 0.5rem;
    }

    .contact-link {
        font-size: 0.8125rem;
        padding: 0.375rem 0;
    }

    .form-row input,
    .form-row textarea {
        font-size: 16px; /* Prevents iOS zoom */
    }

    .site-footer {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
        padding: var(--space-md) var(--space-sm);
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
