/* Modern Personal Site CSS */
:root {
    /* Colors */
    --primary: #0f172a;
    /* Dark Navy */
    --secondary: #334155;
    /* Slate */
    --accent: #2563eb;
    /* Royal Blue */
    --accent-light: #eff6ff;
    --bg-body: #ffffff;
    --bg-alt: #f8fafc;
    /* Very light slate */
    --text-main: #1e293b;
    --text-muted: #64748b;

    /* Typography */
    --font-sans: 'Inter', system-ui, sans-serif;

    /* Layout */
    --max-width: 1000px;
    --nav-height: 70px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--text-main);
    background-color: var(--bg-body);
    line-height: 1.6;
    /* Geometric Background Pattern */
    background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
    background-size: 30px 30px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

a:hover {
    opacity: 0.8;
}

/* Navigation */
.navbar {
    position: sticky;
    top: 0;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.85);
    /* Increased transparency for frost effect */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    z-index: 100;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.nav-content {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary);
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 12px;
    justify-content: flex-end;
}

@media (min-width: 768px) {
    .nav-links {
        align-items: center;
        gap: 30px;
        flex-wrap: nowrap;
    }
}

/* Animated Link Underlines */
.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--secondary);
    position: relative;
    opacity: 1;
    /* Reset default opacity hover */
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.btn-small {
    background: var(--primary);
    color: white !important;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem !important;
}

.btn-small:hover {
    background: var(--secondary);
    opacity: 1;
    transform: translateY(-1px);
}

.btn-small::after {
    display: none;
}

/* No underline for button */

/* Section Containers */
.section-wrapper {
    padding: 80px 20px;
}

.section-content {
    max-width: var(--max-width);
    margin: 0 auto;
}

.bg-light {
    background-color: rgba(248, 250, 252, 0.8);
    /* Slight transparency */
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 40px;
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: var(--accent);
    margin-top: 8px;
    border-radius: 2px;
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.js .reveal {
    opacity: 0;
    transform: translateY(30px);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Section */
.hero-section {
    padding: 120px 20px 80px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.hero-grid {
    display: grid;
    gap: 40px;
    align-items: center;
}

@media (min-width: 768px) {
    .hero-grid {
        grid-template-columns: 1.5fr 1fr;
    }
}

.hero-text h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .hero-text h1 {
        font-size: 3.5rem;
    }
}

.highlight {
    color: var(--accent);
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--secondary);
    margin-bottom: 30px;
    max-width: 500px;
}

.social-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-btn {
    padding: 10px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-weight: 600;
    color: var(--secondary);
    background: white;
    transition: all 0.2s;
}

.social-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.hero-image-container {
    display: flex;
    justify-content: center;
    position: relative;
}

.hero-img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 20px;
    /* Squircle */
    box-shadow: 20px 20px 0 var(--accent-light);
    transform: rotate(3deg);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hero-img:hover {
    transform: rotate(0deg) scale(1.02);
}

/* Skills Grid */
.skills-grid {
    display: grid;
    gap: 40px;
}

@media (min-width: 768px) {
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

.skill-category h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--primary);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--secondary);
    font-weight: 500;
    transition: transform 0.2s, border-color 0.2s;
}

.tag:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    color: var(--accent);
}

/* Timeline */
.timeline {
    position: relative;
    border-left: 2px solid #e2e8f0;
    margin-left: 20px;
    padding-left: 30px;
}

.timeline-item {
    margin-bottom: 40px;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -37px;
    top: 5px;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 1px #e2e8f0;
    transition: transform 0.3s;
}

.timeline-item:hover::before {
    transform: scale(1.3);
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (max-width: 767px) {
    .navbar {
        height: auto;
        padding: 14px 0;
    }

    .nav-content {
        align-items: flex-start;
        gap: 12px;
        flex-direction: column;
    }

    .nav-links a {
        font-size: 0.9rem;
    }
}

.timeline-content h3 {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 4px;
}

.company {
    font-size: 1rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 10px;
}

.timeline-content p {
    color: var(--secondary);
    font-size: 0.95rem;
}

/* Cards */
.card-grid {
    display: grid;
    gap: 30px;
}

@media (min-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: rgba(37, 99, 235, 0.3);
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.card-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    font-style: italic;
}

.card-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--accent);
    font-weight: 600;
    position: relative;
    opacity: 1;
}

.card-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.card-link:hover::after {
    width: 100%;
}


/* Education */
.education-grid {
    display: grid;
    gap: 20px;
}

@media (min-width: 768px) {
    .education-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Expanded Full-width Item */
.full-width {
    grid-column: 1 / -1;
}

.edu-item {
    background: var(--bg-alt);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: border-color 0.3s;
}

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

.edu-header-group {
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 15px;
}

.edu-header-group h3 {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 4px;
}

.school {
    font-weight: 500;
    color: var(--secondary);
}

.grade {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 600;
    margin-top: 5px;
}

.edu-details {
    display: grid;
    gap: 20px;
}

@media (min-width: 768px) {
    .edu-details {
        grid-template-columns: 1fr 1fr;
    }
}

.detail-category h4 {
    font-size: 0.95rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.detail-category p {
    font-size: 0.9rem;
    color: var(--secondary);
    line-height: 1.5;
}

.detail-category strong {
    color: var(--primary);
    font-weight: 600;
}

/* Footer */
.site-footer {
    background: var(--primary);
    color: white;
    padding: 80px 20px;
    text-align: center;
}

.footer-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.footer-content p {
    color: #94a3b8;
    margin-bottom: 30px;
}

.email-link {
    font-size: 1.5rem;
    color: white;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 5px;
    transition: color 0.3s, border-color 0.3s;
}

.email-link:hover {
    color: var(--accent);
    border-color: white;
}

.copyright {
    margin-top: 60px;
    font-size: 0.85rem;
    color: #475569;
}
