/* Main Styles */
@import './variables.css';
@import './reset.css';

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

.animate-reveal {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

/* Skills */
#skills {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.skill-category h3 {
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: var(--space-m);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* --- Layout Utilities --- */
section {
    padding-block: var(--space-xl);
    scroll-snap-align: start; /* Snap to top of section */
    scroll-snap-stop: always; /* Ensure we stop at each section */
}

/* --- Shader Background --- */
#hero_bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    opacity: 0.15; /* Subtle blend */
    pointer-events: none; /* Let clicks pass through to window listener? No, we used window listener in JS. */
}

#hero_bg canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.notice {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 10;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    pointer-events: none;
    opacity: 0.7;
}

/* --- Custom Cursor --- */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    /* transform is set via JS for performance */
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--text-primary);
    /* Initial definition to centre it if JS hasn't loaded, though JS overwrites transform */
    transform: translate(-50%, -50%); 
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid var(--text-primary);
    /* Transition for property changes like width/color, not movement (movement handled by WAAPI) */
    transition: width 0.2s, height 0.2s, background-color 0.2s, border-color 0.2s;
    transform: translate(-50%, -50%);
}

/* --- Components --- */

/* Theme Toggle */
.theme-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
    padding: 0.75rem;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-btn:hover {
    transform: scale(1.1);
}

.theme-btn svg {
    display: none;
}

[data-theme='light'] .moon-icon { display: block; }
[data-theme='dark'] .sun-icon { display: block; }

/* Hero */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    letter-spacing: -0.02em;
    margin-bottom: var(--space-s);
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--text-secondary);
    margin-bottom: var(--space-l);
    min-height: 1.5em; /* Reserve space for one line */
}

/* Buttons */
.btn {
    display: inline-flex;
    padding: 0.8rem 1.6rem;
    border-radius: var(--radius-m);
    font-weight: 500;
    transition: all 0.2s;
    margin-right: var(--space-s);
}

.btn-primary {
    background-color: var(--accent);
    color: white;
}
.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-outline {
    border: 1px solid var(--border);
    color: var(--text-primary);
}
.btn-outline:hover {
    border-color: var(--text-primary);
}

.btn-text {
    color: var(--text-secondary);
}
.btn-text:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

/* Cards */
.card {
    background: var(--bg-secondary);
    padding: var(--space-l);
    border-radius: var(--radius-l);
    border: 1px solid var(--border);
    transition: transform 0.3s, border-color 0.3s;
}

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

/* Professional Journey (Summary + Experience) */
#professional-journey,
#academic-background {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4rem; /* Gap between subsections */
}

#academic-background {
    min-height: 80vh !important;
}

/* Summary Section Redesign */
#about {
    position: relative;
    /* max-width removed by user previously */
}
/* ... rest of existing styles ... */

#about .card {
    background: rgba(var(--bg-secondary-rgb), 0.8); /* Pre-calc RGB var if possible, or fallback */
    /* Fallback: background: var(--bg-secondary); with some transparency if we had rgba vars. 
       Let's stick to var(--bg-secondary) but add backdrop filter styling if supported */
    background: var(--bg-secondary);
    backdrop-filter: blur(10px);
    /* border-left: 4px solid var(--accent); */
    padding: var(--space-xl);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.1);
}

#about p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

#about .card::before {
    content: '"';
    position: absolute;
    top: -20px;
    right: 40px;
    font-family: serif;
    font-size: 8rem;
    color: var(--accent);
    opacity: 0.1;
    pointer-events: none;
}

/* Cursor - Text Interaction */
/* When hovering over text, show default text cursor and hide custom cursor via JS logic ideally, 
   but css 'cursor: text' will force system cursor to show. */
p, h1, h2, h3, h4, h5, h6, input, textarea, span {
    cursor: text;
}
body:has(p:hover, h1:hover, h2:hover, h3:hover, h4:hover, h5:hover, h6:hover, span:hover) .cursor-dot,
body:has(p:hover, h1:hover, h2:hover, h3:hover, h4:hover, h5:hover, h6:hover, span:hover) .cursor-outline {
    opacity: 0; /* Hide custom cursor when hovering text */
}

/* ... existing sections ... */
/* Redesigned Timeline */
.timeline {
    position: relative;
    /* border-left: 2px solid var(--border); */
    padding-left: 2rem;
    margin-left: 1rem;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0px;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, var(--accent) 0%, transparent 100%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: -2.4rem; /* Aligns with line */
    top: 1.5rem;
    width: 14px;
    height: 14px;
    background: var(--bg-primary);
    border: 3px solid var(--accent);
    border-radius: 50%;
    z-index: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item:hover::after {
    transform: scale(1.3);
    box-shadow: 0 0 0 4px rgba(var(--accent), 0.2); 
    /* rgba var hack: need var(--accent) to be rgb numbers or use opacity. 
       Simple shadow for now. */
    box-shadow: 0 0 10px var(--accent);
}

.timeline-date {
    display: inline-block;
    background: var(--bg-secondary);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
    border: 1px solid var(--border);
    margin-bottom: 0.5rem;
}

/* Experience Card Specifics */
.timeline-content.card {
    /* border-left: 4px solid var(--accent); */ /* Matches Summary */
    position: relative;
}

.timeline-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.2rem;
}

.timeline-content .company {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-content ul {
    list-style: none;
    padding: 0;
}

.timeline-content ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.timeline-content ul li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 1.2rem;
    line-height: 1.5;
}

/* Grid & Tags */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-l);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-s);
    margin-top: var(--space-m);
}

.tag {
    display: flex;
    align-items: center;
    /* font-size: 0.85rem; */
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    background: rgba(128, 128, 128, 0.1);
    color: var(--text-secondary);
}

.project-card .achievement {
    margin-top: var(--space-m);
    font-weight: 500;
    color: var(--success);
}

/* Education */
.education-item h3 {
    margin-bottom: var(--space-xs);
}
.education-item .achievement {
    color: var(--accent);
    font-weight: 600;
}


.icons {
    width: 24px;
    height: 24px;
    margin: 0 0.5rem;
    transition: filter 0.3s ease;
}

.tech-icons{
    width: 24px;
    height: 24px;
    margin: 0 0.5rem;
}

[data-theme='dark'] .icons {
    filter: invert(1);
}