/* ===========================================
   Swara Harne - Portfolio Website
   Minimal, clean design inspired by karpathy.ai
   =========================================== */

/* CSS Variables - Light Mode (default) */
:root {
    --color-text: #1a1a1a;
    --color-text-secondary: #666;
    --color-text-muted: #888;
    --color-background: #fff;
    --color-accent: #0066cc;
    --color-accent-hover: #0052a3;
    --color-border: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-color-hover: rgba(0, 0, 0, 0.15);
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --max-width: 680px;
    --spacing-unit: 1rem;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    :root {
        --color-text: #e8e8e8;
        --color-text-secondary: #b0b0b0;
        --color-text-muted: #888;
        --color-background: #1a1a1a;
        --color-accent: #6eb5ff;
        --color-accent-hover: #9dcaff;
        --color-border: #333;
        --shadow-color: rgba(0, 0, 0, 0.3);
        --shadow-color-hover: rgba(0, 0, 0, 0.4);
    }
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-background);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: calc(var(--spacing-unit) * 3) calc(var(--spacing-unit) * 1.5);
}

/* Typography */
h1, h2, h3 {
    font-weight: 600;
    line-height: 1.3;
    margin-top: 0;
}

h1 {
    font-size: 2.25rem;
    margin-bottom: 0.25rem;
}

h2 {
    font-size: 1.25rem;
    color: var(--color-text);
    margin-bottom: calc(var(--spacing-unit) * 1.25);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

p {
    margin-top: 0;
    margin-bottom: var(--spacing-unit);
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: calc(var(--spacing-unit) * 3);
}

.profile-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: calc(var(--spacing-unit) * 1.25);
    box-shadow: 0 4px 20px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-photo:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 25px var(--shadow-color-hover);
}

.tagline {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
    margin-bottom: calc(var(--spacing-unit) * 1.25);
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: calc(var(--spacing-unit) * 1.25);
}

.social-links a {
    color: var(--color-text-secondary);
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}

.social-links a:hover {
    color: var(--color-accent);
    transform: translateY(-2px);
    text-decoration: none;
}

.social-links svg {
    width: 24px;
    height: 24px;
}

/* Sections */
.section {
    margin-bottom: calc(var(--spacing-unit) * 3);
}

/* Timeline */
.timeline {
    position: relative;
}

.timeline-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: calc(var(--spacing-unit) * 1.5);
    margin-bottom: calc(var(--spacing-unit) * 1.5);
    padding-bottom: calc(var(--spacing-unit) * 1.5);
    border-bottom: 1px solid var(--color-border);
    transition: transform 0.2s ease;
}

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

.timeline-item:hover {
    transform: translateX(4px);
}

.timeline-date {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    font-weight: 500;
    padding-top: 2px;
}

.timeline-content h3 {
    color: var(--color-text);
}

.timeline-content .company {
    color: var(--color-text-secondary);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.timeline-content .location,
.timeline-content .detail {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 0;
}

.timeline-content .coursework {
    font-style: italic;
}

/* Achievement Lists */
.achievements {
    margin: 0.75rem 0 0 0;
    padding-left: 1.25rem;
    list-style-type: disc;
}

.achievements li {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

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

/* Highlight Box (Patent) */
.highlight-box {
    background-color: var(--color-border);
    border-left: 3px solid var(--color-accent);
    padding: 1rem 1.25rem;
    margin-top: 1rem;
    border-radius: 0 4px 4px 0;
}

.highlight-box strong {
    color: var(--color-text);
}

.highlight-detail {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.skill-category h3 {
    color: var(--color-text);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.skill-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.skill-category li {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    padding: 0.25rem 0;
    transition: color 0.2s ease;
}

.skill-category li:hover {
    color: var(--color-text);
}

/* Research List */
.research-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.research-item {
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--color-border);
}

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

.research-item h3 {
    color: var(--color-text);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.research-item p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin: 0;
    line-height: 1.6;
}

/* Email Link */
.encoded-email {
    cursor: pointer;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent));
    background-size: 0% 2px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 0.3s ease;
}

.encoded-email:hover {
    background-size: 100% 2px;
    text-decoration: none;
}

/* Footer */
.footer {
    margin-top: calc(var(--spacing-unit) * 4);
    padding-top: calc(var(--spacing-unit) * 2);
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.footer p {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin: 0;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation delays */
.header.fade-in { transition-delay: 0s; }
#about.fade-in { transition-delay: 0.1s; }
#experience.fade-in { transition-delay: 0.2s; }
#skills.fade-in { transition-delay: 0.3s; }
#research.fade-in { transition-delay: 0.4s; }
#education.fade-in { transition-delay: 0.5s; }
#contact.fade-in { transition-delay: 0.6s; }
.footer.fade-in { transition-delay: 0.7s; }

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        padding: calc(var(--spacing-unit) * 2) var(--spacing-unit);
    }

    h1 {
        font-size: 1.75rem;
    }

    .profile-photo {
        width: 120px;
        height: 120px;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .timeline-date {
        font-size: 0.8rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .highlight-box {
        padding: 0.875rem 1rem;
    }
}

/* Print Styles */
@media print {
    .fade-in {
        opacity: 1;
        transform: none;
    }

    .social-links a::after {
        content: " (" attr(href) ")";
        font-size: 0.8rem;
    }
}

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

    html {
        scroll-behavior: auto;
    }
}
