/* =========================================
   COLOR VARIABLES (Dark / Light Mode)
========================================= */
:root {
    --bg: #0d0d0d;
    --text: #e5e5e5;
    --card: #161616;
    --header: #111;
    --border: #222;
    --accent: #4da6ff;
}

.light-mode {
    --bg: #f8f8f8;
    --text: #111;
    --card: #ffffff;
    --header: #ffffff;
    --border: #ddd;
    --accent: #0070f3;
}

/* =========================================
   GLOBAL BODY & TEXT
========================================= */
body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    animation: fadeIn 1.2s ease-in-out;
    transition: background 0.3s ease, color 0.3s ease;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: 0.2s;
}

a:hover {
    text-decoration: underline;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* =========================================
   FADE IN ANIMATION
========================================= */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade {
    animation: fadeIn 1.2s ease-in-out;
}

/* =========================================
   HEADER (Sticky)
========================================= */
header {
    position: sticky;
    top: 0;
    background: var(--header);
    padding: 20px 0;
    text-align: center;
    border-bottom: 1px solid var(--border);
    z-index: 10;
    transition: background 0.3s ease;
}

header h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
}

header p {
    margin: 5px 0 0 0;
    color: #aaa;
    font-size: 15px;
}

/* =========================================
   OPEN TO WORK BADGE
========================================= */
.badge {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
    border-radius: 20px;
    background: var(--accent);
    color: #000;
    animation: fadeIn 1.5s ease-in-out;
}

/* =========================================
   LIGHT/DARK TOGGLE BUTTON
========================================= */
.toggle-btn {
    position: absolute;
    right: 20px;
    top: 20px;
    background: var(--accent);
    color: #000;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    border: none;
    font-weight: bold;
    transition: 0.2s;
}

.toggle-btn:hover {
    opacity: 0.8;
}

/* =========================================
   CONTAINER
========================================= */
.container {
    max-width: 950px;
    margin: 0 auto;
    padding: 40px 20px;
}

.section {
    margin-bottom: 60px;
}

h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* =========================================
   PROFILE SECTION
========================================= */
.profile {
    text-align: center;
    margin-bottom: 60px;
}

.cv-button {
    display: inline-block;
    padding: 12px 22px;
    background: var(--accent);
    color: #000;
    border-radius: 6px;
    font-weight: bold;
    margin-top: 20px;
    transition: 0.2s;
}

.cv-button:hover {
    opacity: 0.8;
}

/* =========================================
   SKILLS SECTION
========================================= */
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skills-list span {
    padding: 8px 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    transition: transform 0.2s ease, background 0.3s ease;
}

.skills-list span:hover {
    transform: translateY(-3px);
    background: var(--accent);
    color: #000;
}

/* =========================================
   OPERATIONS & RELIABILITY SECTION
========================================= */
.ops-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ops-list span {
    padding: 8px 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    transition: transform 0.2s ease, background 0.3s ease;
}

.ops-list span:hover {
    transform: translateY(-3px);
    background: var(--accent);
    color: #000;
}

/* =========================================
   PROJECT GRID
========================================= */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.project {
    background: var(--card);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: transform 0.2s ease, background 0.3s ease;
}

.project:hover {
    transform: translateY(-5px);
}

.project h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: var(--accent);
}

/* =========================================
   TECH BADGES IN PROJECTS
========================================= */
.tech-badges {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-badges span {
    padding: 5px 10px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    transition: 0.2s ease;
}

.tech-badges span:hover {
    background: var(--accent);
    color: #000;
}

/* MODAL OVERLAY */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    animation: fadeIn 0.3s ease;
}

/* MODAL BOX */
.modal-content {
    background-color: var(--bg);
    margin: auto;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    border: 1px solid var(--border);
}

/* CLOSE BUTTON */
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #fff;
}

/* TECH BADGES */
#modalTech span {
    display: inline-block;
    margin: 5px 5px 0 0;
    padding: 6px 12px;
    background: #1a1a1a;
    border-radius: 6px;
    border: 1px solid #333;
    font-size: 13px;
}


/* =========================================
   BACK TO TOP BUTTON
========================================= */
#topBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 10px 16px;
    background: var(--accent);
    border-radius: 6px;
    color: #000;
    cursor: pointer;
    font-size: 14px;
    display: none;
    font-weight: bold;
    z-index: 99999;
    transition: 0.25s;
}

#topBtn:hover {
    opacity: 0.8;
}

/* =========================================
   FOOTER
========================================= */
footer {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 14px;
}

/* =========================================
   HERO ACTIONS
========================================= */
.hero-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.secondary-button {
    display: inline-block;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    font-weight: 600;
    transition: 0.2s ease;
}

.secondary-button:hover {
    background: var(--card);
    text-decoration: none;
    border-color: var(--accent);
    color: var(--accent);
}

.profile p {
    max-width: 860px;
    margin: 0 auto;
    font-size: 20px;
    line-height: 1.7;
}

.section p {
    max-width: 860px;
    font-size: 18px;
    line-height: 1.8;
}

