:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --primary: #38bdf8;
    --secondary: #818cf8;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --accent: #22d3ee;
    --glass-border: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: var(--card-bg);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* --- Background Animation Canvas --- */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.4;
}

/* --- Navigation --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    z-index: 100;
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.logo {
    display: flex;       /* Aligns image and text in a row */
    align-items: center; /* Vertically centers them */
    gap: 0.8rem;         /* Adds space between the logo and the text */
    
    /* Keep your existing font styles */
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo img {
    height: 40px; /* Adjust this number to make it bigger/smaller */
    width: auto;  /* Keeps the aspect ratio correct */
}

.logo span {
    color: var(--primary);
}

.nav-links {
    position: absolute;       /* Take it out of the 'gap' calculation */
    left: 50%;                /* Move to the middle of the screen */
    transform: translateX(-50%); /* Perfect center alignment */
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.cta-btn {
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid transparent;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4);
    color: white;
}

.secondary-btn {
    color: var(--text-main);
    padding: 0.6rem 1.5rem;
    text-decoration: none;
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.2s;
}

.secondary-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* --- Hero Section (Updated for better spacing) --- */
.hero {
    min-height: 45vh;  /* Changed from 60vh or 100vh */
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 140px 5% 1rem 5%; /* Reduced bottom padding to 1rem */
    position: relative;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
}

.tagline {
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.typewriter {
    border-right: 3px solid var(--primary);
    padding-right: 5px;
    animation: blink 0.75s step-end infinite;
}

p.hero-desc {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

/* --- Sections General --- */
section {
    padding: 8rem 5%;
}

.darker-bg {
    background: rgba(255,255,255,0.02);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Grid Layouts --- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.narrow-grid {
    max-width: 900px;
    margin: 0 auto;
}

/* --- Cards (Glassmorphism) --- */
.card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.card-text {
    color: var(--text-muted);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.accent-icon {
    color: var(--secondary);
}

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* --- Skills & Quals --- */
.quals-list {
    list-style: none;
    color: var(--text-muted);
}

.quals-list li {
    margin-bottom: 1rem;
}

.quals-list strong {
    color: var(--text-main);
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
}

.skill-tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(56, 189, 248, 0.1);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

/* --- Pricing Table --- */
.price-card {
    text-align: center;
    position: relative;
    overflow: hidden;
}

.price-card.featured {
    border: 2px solid var(--primary);
    background: rgba(56, 189, 248, 0.05);
}

.price-card.featured::before {
    content: 'POPULAR';
    position: absolute;
    top: 12px;
    right: -30px;
    background: var(--primary);
    color: #000;
    font-weight: bold;
    font-size: 0.7rem;
    padding: 5px 40px;
    transform: rotate(45deg);
}

.price {
    font-size: 3rem;
    font-weight: 700;
    margin: 1.5rem 0;
    color: var(--text-main);
}

.price span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.features-list {
    list-style: none;
    margin-bottom: 2rem;
    text-align: left;
}

.features-list li {
    margin-bottom: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.features-list li::before {
    content: '✓';
    color: var(--accent);
    margin-right: 10px;
    font-weight: bold;
}

.full-width {
    width: 100%;
    display: block;
}

/* --- Contact Section --- */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info h3 {
    margin-bottom: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.contact-item i {
    margin-right: 1rem;
    color: var(--primary);
}

.contact-item a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s;
}

.contact-item a:hover {
    color: var(--primary);
}

form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

input, textarea, select {
    width: 100%;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    color: white;
    font-size: 1rem;
    transition: border 0.3s;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
}

label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: all 0.3s ease;
    background-color: transparent;
}

input:focus ~ label,
input:not(:placeholder-shown) ~ label,
textarea:focus ~ label,
textarea:not(:placeholder-shown) ~ label {
    top: -0.6rem;
    left: 0.5rem;
    font-size: 0.8rem;
    color: var(--primary);
    background-color: var(--bg-color);
    padding: 0 5px;
}

/* --- Footer --- */
footer {
    background: #020617;
    padding: 3rem 5%;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
}

.social-links {
    margin-bottom: 1.5rem;
}

.social-links a {
    color: var(--text-main);
    font-size: 1.5rem;
    margin: 0 1rem;
    transition: color 0.3s;
    text-decoration: none;
}

.social-links a:hover {
    color: var(--primary);
}

/* --- Animations --- */
@keyframes blink {
    0%, 100% { border-color: transparent; }
    50% { border-color: var(--primary); }
}

.hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.show {
    opacity: 1;
    transform: translateY(0);
}

/* --- Mobile --- */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    .contact-container { grid-template-columns: 1fr; }
    .nav-links { display: none; } /* Simple mobile handling */
    nav { justify-content: space-between; }
    .hero { padding-top: 60px; }
}

/* --- Bio & Profile Section --- */
.bio-container {
    display: flex;
    align-items: center;
    gap: 3.5rem; /* Increased gap */
    max-width: 1000px; /* Increased max-width */
    margin: 0 auto 5rem auto; /* Center it and add more space below */
    background: rgba(30, 41, 59, 0.4); /* Subtle background */
    padding: 2.5rem; /* Increased padding */
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(5px);
}

.bio-image-wrapper {
    flex-shrink: 0; 
}

.bio-img {
    width: 280px;  /* Increased from 220px */
    height: 280px; /* Increased from 220px */
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--primary);
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.4);
}

/* 2. Make the Title slightly smaller to balance */
.bio-content h3 {
    font-size: 2rem; /* Reduced from 2.2rem */
    margin-bottom: 1rem;
    color: var(--text-main);
}

.bio-content p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 1rem; /* Reduced from 1.15rem */
    line-height: 1.6;
}

/* Update Mobile Styles */
@media (max-width: 768px) {
    .bio-container {
        flex-direction: column; 
        text-align: center;
        gap: 2rem; /* Adjusted gap for mobile */
        padding: 2rem; /* Adjusted padding for mobile */
    }
    
    .bio-img {
        width: 180px; /* Adjusted size for mobile */
        height: 180px; /* Adjusted size for mobile */
    }

    .bio-content h3 {
        font-size: 1.8rem; /* Adjusted for mobile */
    }
    .bio-content p {
        font-size: 1rem; /* Adjusted for mobile */
    }
}

/* --- Updates for Bio Text --- */

/* The horizontal line divider */
.glass-divider {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, transparent, var(--glass-border), transparent);
    margin: 1.5rem 0;
}

/* The "Why Do I Tutor?" sub-headline */
.bio-content h4 {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 0.8rem;
    font-weight: 600;
}

/* Add slight bold emphasis color */
.bio-content strong {
    color: var(--text-main);
    font-weight: 600;
}

.bio-content em {
    font-style: normal;
    color: var(--secondary);
}

#about {
    padding-top: 1rem; /* Reduced to almost zero */
}