/* =============================================================
   cantyland.net — Modern Resume Portfolio
   ============================================================= */

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

:root {
    --accent: #00cc66;
    --accent-dark: #00a854;
    --bg-body: #1a1a2e;
    --bg-sidebar: #16213e;
    --bg-card: #1e2a47;
    --bg-nav: #0f1629;
    --bg-skill-track: #2a2a4a;
    --text-primary: #ffffff;
    --text-muted: #8892a4;
    --text-body: #c0c8d8;
    --border: rgba(255, 255, 255, 0.06);
    --shadow: rgba(0, 0, 0, 0.3);
    --font: 'Poppins', 'Segoe UI', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg-body);
    color: var(--text-primary);
    font-family: var(--font);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ---- Light Mode ---- */
body.light-mode {
    --bg-body: #f0f2f5;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-nav: #ffffff;
    --bg-skill-track: #e0e0e0;
    --text-primary: #1a1a2e;
    --text-muted: #6b7280;
    --text-body: #4b5563;
    --border: rgba(0, 0, 0, 0.08);
    --shadow: rgba(0, 0, 0, 0.08);
}

body.light-mode .navbar { box-shadow: 0 2px 12px var(--shadow); }
body.light-mode .sidebar { box-shadow: 2px 0 16px var(--shadow); }
body.light-mode .project-card { box-shadow: 0 2px 12px var(--shadow); }

/* =============================================================
   NAVBAR
   ============================================================= */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    height: 56px;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    height: 100%;
    gap: 2rem;
}

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

.nav-links { display: flex; gap: 1.5rem; }

.nav-link {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.3rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

#theme-toggle {
    margin-left: auto;
    cursor: pointer;
    font-size: 1.15rem;
    background: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: all 0.3s;
}

#theme-toggle:hover {
    background: rgba(0, 204, 102, 0.1);
    border-color: var(--accent);
    transform: rotate(25deg);
}

/* =============================================================
   PORTFOLIO LAYOUT
   ============================================================= */
.portfolio-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    min-height: calc(100vh - 56px);
}

/* ---- SIDEBAR ---- */
.sidebar {
    background: var(--bg-sidebar);
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    overflow-y: auto;
    border-right: 1px solid var(--border);
}

.profile-initials {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #0099ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 204, 102, 0.25);
    position: relative;
}

.profile-initials::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(0, 204, 102, 0.3);
}

.social-icons {
    display: flex;
    gap: 0.7rem;
    margin-bottom: 1.5rem;
}

.social-icons a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: all 0.3s;
}

.social-icons a:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 204, 102, 0.3);
}

.sidebar-label {
    font-size: 0.65rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.sidebar-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.8rem;
}

.sidebar-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: 100%;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    text-decoration: none;
}

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

.btn-accent:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 204, 102, 0.3);
}

.btn-outline-accent {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
}

.btn-outline-accent:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 204, 102, 0.3);
}

.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.8rem; }

/* =============================================================
   MAIN CONTENT
   ============================================================= */
.main-content {
    padding: 3rem 3.5rem;
    max-width: 900px;
}

/* ---- HERO ---- */
.hero-section { margin-bottom: 2.5rem; }

.hero-greeting {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-weight: 400;
}

#typed-subtitle {
    color: var(--accent);
    font-weight: 600;
}

.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.15em;
    background: var(--accent);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink 0.75s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.hero-headline {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.2rem;
    color: var(--text-primary);
}

.highlight {
    background: var(--accent);
    color: #fff;
    padding: 0.05em 0.35em;
    border-radius: 6px;
}

.hero-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    max-width: 560px;
    line-height: 1.75;
}

/* ---- STATS ---- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 2rem 0;
    margin-bottom: 2.5rem;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stat-item { text-align: center; }

.stat-number {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.stat-plus {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--accent);
}

.stat-line1 {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    margin-top: 0.35rem;
}

.stat-line2 {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ---- SECTION LABELS ---- */
.section-label {
    font-size: 0.65rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.section-label::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
}

.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

/* ---- SKILLS ---- */
.skills-section { margin-bottom: 3rem; }

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

.skill-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-body);
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.skill-track {
    height: 8px;
    background: var(--bg-skill-track);
    border-radius: 4px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent), #0099ff);
    border-radius: 4px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- PROJECTS ---- */
.content-section { margin-bottom: 3rem; }

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0, 204, 102, 0.12);
}

.project-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
}

.project-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }

.tag {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25em 0.7em;
    border-radius: 20px;
    background: rgba(0, 204, 102, 0.12);
    color: var(--accent);
}

/* ---- TIMELINE ---- */
.timeline-item {
    border-left: 3px solid var(--accent);
    padding-left: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 5px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--bg-body);
}

body.light-mode .timeline-item::before {
    border-color: var(--bg-body);
}

.timeline-item h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.timeline-item h4 {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.timeline-item ul {
    padding-left: 1.2rem;
    list-style-type: disc;
}

.timeline-item li {
    font-size: 0.85rem;
    color: var(--text-body);
    margin-bottom: 0.3rem;
    line-height: 1.6;
}

.education {
    margin-top: 1.5rem;
}

.education h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.education p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

/* ---- CONTACT ---- */
.text-muted { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }

.contact-buttons {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* ---- FOOTER ---- */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
}

/* ---- FADE IN ANIMATION ---- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 992px) {
    .portfolio-layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: relative;
        top: 0;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        padding: 1.5rem 2rem;
        gap: 1rem;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .profile-initials { width: 80px; height: 80px; font-size: 1.8rem; margin-bottom: 0; }
    .profile-initials::after { inset: -3px; }
    .sidebar-buttons { flex-direction: row; width: auto; }
    .sidebar-label { margin-bottom: 0; }
    .sidebar-name { margin-bottom: 0; }
    .main-content { padding: 2rem 1.5rem; }
    .hero-headline { font-size: 2rem; }
    .skills-grid { grid-template-columns: 1fr; }
}

@media (max-width: 576px) {
    .hero-headline { font-size: 1.6rem; }
    .stat-number, .stat-plus { font-size: 2rem; }
    .stats-row { grid-template-columns: 1fr; gap: 1.5rem; }
    .sidebar {
        flex-direction: column;
        gap: 0.6rem;
    }
    .sidebar-buttons { flex-direction: column; width: 100%; }
    .main-content { padding: 1.5rem 1rem; }
    .projects-grid { grid-template-columns: 1fr; }
    .nav-container { padding: 0 1rem; gap: 1rem; }
}
