@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* =====================
   CSS Variables
   ===================== */
:root {
    --bg-color: #f1f5f9;
    --text-color: #1e293b;
    --sidebar-bg: rgb(135, 206, 235);
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.07);
    --accent: #3b82f6;
    --accent-light: rgba(59, 130, 246, 0.1);
    --sidebar-width: 260px;
}

html[data-theme="dark"] {
    --bg-color: #0f172a;
    --text-color: #e2e8f0;
    --sidebar-bg: #4a5568;
    --card-bg: #1e293b;
    --card-border: rgba(255, 255, 255, 0.07);
    --accent: #60a5fa;
    --accent-light: rgba(96, 165, 250, 0.12);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 1rem;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =====================
   Layout wrapper
   ===================== */
#layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    flex: 1;
    min-height: 100vh;
}

/* =====================
   Left Sidebar
   ===================== */
.left-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    background-color: var(--sidebar-bg);
    padding: 2rem 1.25rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    transition: background-color 0.3s ease;
}

.left-container h4 {
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.4;
}

#left-pane-img {
    border-radius: 50%;
    width: 140px;
    height: 140px;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid var(--accent);
    box-shadow: 0 0 0 5px var(--accent-light);
}

#description {
    font-size: 0.78rem;
    text-align: center;
    line-height: 1.65;
    opacity: 0.85;
}

/* =====================
   Social Icons
   ===================== */
.social-icons {
    display: flex;
    flex-direction: row;
    list-style: none;
    gap: 0.75rem;
}

.social-icons a {
    display: block;
    transition: transform 0.25s ease;
}

.social-icons a:hover {
    transform: translateY(-3px) scale(1.12);
}

.icon {
    height: 2rem;
    width: 2rem;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 3px;
}

/* =====================
   Sidebar Nav
   ===================== */
.details {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
}

.detail-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.85rem;
    border-radius: 0.6rem;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.detail-link:hover {
    background-color: rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.nav-link.active {
    background-color: var(--accent-light);
    color: var(--accent);
    font-weight: 600;
}

.resume-link {
    margin-top: 0.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 1rem;
}

/* =====================
   Right / Main Content
   ===================== */
.right-container {
    padding: 3rem 3.5rem;
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
    max-width: 960px;
    width: 100%;
}

/* =====================
   Scroll Fade-In
   ===================== */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

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

/* =====================
   Section Title
   ===================== */
.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    padding-left: 0.85rem;
    border-left: 4px solid var(--accent);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

/* =====================
   Hero
   ===================== */
.title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.title-row h1 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.typing-wrapper {
    font-size: 1.05rem;
    font-weight: 400;
    opacity: 0.75;
    margin-top: 0.3rem;
    min-height: 1.6rem;
}

.cursor {
    display: inline-block;
    animation: blink 0.75s step-end infinite;
    color: var(--accent);
    font-style: normal;
    font-weight: 300;
    margin-left: 1px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* =====================
   Stat Badges
   ===================== */
.stat-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.badge {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-color);
    font-size: 0.76rem;
    font-weight: 500;
    padding: 0.3rem 0.75rem;
    border-radius: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* =====================
   About Me
   ===================== */
#about-me {
    font-size: 0.95rem;
    line-height: 1.85;
    margin-bottom: 1.5rem;
}

/* =====================
   Buttons
   ===================== */
.btn-container {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.7rem 1.6rem;
    border-radius: 2rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.2s ease;
    white-space: nowrap;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.4);
    text-decoration: none;
    color: #ffffff;
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-color);
    border-color: var(--text-color);
}

.btn-secondary:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
    transform: translateY(-2px);
    text-decoration: none;
}

/* =====================
   What I Do
   ===================== */
.what-i-do-container {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 1.75rem 2rem;
    border-radius: 1rem;
    transition: background-color 0.3s ease;
}

.what-i-do-container p {
    font-size: 0.95rem;
    line-height: 1.85;
}

/* =====================
   Experience Timeline
   ===================== */
.timeline {
    position: relative;
    padding-left: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.timeline-item {
    position: relative;
}

.timeline-dot {
    position: absolute;
    left: -1.6rem;
    top: 1rem;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background-color: var(--accent);
    border: 2px solid var(--bg-color);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.timeline-content {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 1.25rem 1.5rem;
    border-radius: 1rem;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.timeline-content:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.timeline-header h3 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.company {
    display: block;
    font-size: 0.87rem;
    color: var(--accent);
    font-weight: 600;
    margin-top: 0.15rem;
}

.location {
    display: block;
    font-size: 0.76rem;
    opacity: 0.6;
    margin-top: 0.1rem;
}

.date {
    font-size: 0.76rem;
    opacity: 0.6;
    white-space: nowrap;
    flex-shrink: 0;
    padding-top: 0.15rem;
}

.timeline-bullets {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.timeline-bullets li {
    font-size: 0.84rem;
    line-height: 1.65;
    padding-left: 1.1rem;
    position: relative;
    opacity: 0.85;
}

.timeline-bullets li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.75rem;
    top: 0.05rem;
}

/* =====================
   Projects
   ===================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.project-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 1.5rem;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.3s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.project-header h3 {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.4;
}

.project-date {
    font-size: 0.73rem;
    opacity: 0.55;
    white-space: nowrap;
    flex-shrink: 0;
    padding-top: 0.1rem;
}

.project-card p {
    font-size: 0.82rem;
    line-height: 1.7;
    opacity: 0.82;
    flex: 1;
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tech {
    font-size: 0.71rem;
    font-weight: 500;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    background-color: var(--accent-light);
    color: var(--accent);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* =====================
   Skills
   ===================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.skill-category {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 1.25rem 1.5rem;
    border-radius: 1rem;
    transition: background-color 0.3s ease;
}

.skill-category h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

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

.skill-tags span {
    font-size: 0.78rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background-color: var(--bg-color);
    border: 1px solid var(--card-border);
    color: var(--text-color);
    transition: background-color 0.2s ease;
}

/* =====================
   Education
   ===================== */
.education-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.education-item {
    display: flex;
    gap: 1.1rem;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 1.25rem 1.5rem;
    border-radius: 1rem;
    align-items: flex-start;
    transition: background-color 0.3s ease;
}

.edu-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1;
    padding-top: 0.1rem;
}

.edu-content h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.certifications {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 1.25rem 1.5rem;
    border-radius: 1rem;
    transition: background-color 0.3s ease;
}

.certifications h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.85rem;
}

.cert-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.cert-badge {
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1.5px solid var(--accent);
    color: var(--accent);
}

/* =====================
   Contact
   ===================== */
.contact-container {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 2.5rem 2rem;
    border-radius: 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    transition: background-color 0.3s ease;
}

.contact-container p {
    font-size: 0.95rem;
    line-height: 1.75;
    max-width: 480px;
    opacity: 0.85;
}

.contact-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.contact-info {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.83rem;
    opacity: 0.6;
}

/* =====================
   Theme Toggle
   ===================== */
.theme-toggle {
    position: relative;
    width: 52px;
    height: 28px;
    border-radius: 999px;
    border: 2px solid #d97706;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    background-color: #f59e0b;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

html[data-theme="dark"] .theme-toggle {
    background-color: #4f46e5;
    border-color: #6366f1;
}

.toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

html[data-theme="dark"] .toggle-thumb {
    transform: translateX(24px);
}

/* =====================
   Footer
   ===================== */
footer {
    text-align: center;
    padding: 1.25rem;
    font-size: 0.82rem;
    background-color: var(--sidebar-bg);
    opacity: 0.9;
    transition: background-color 0.3s ease;
}
