/* --- Global Reset & Premium Dark Palette Theme --- */
:root {
    --bg-dark: #090b0e;
    --bg-card: #11141b;
    --bg-card-hover: #171c26;
    --accent-teal: #00f2fe;
    --accent-blue: #4facfe;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.06);
    --font-stack: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --transition-smooth: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-stack);
}

body {
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 80px 0;
}

/* --- Global Reusable UI Tokens --- */
.badge {
    background: rgba(0, 242, 254, 0.05);
    border: 1px solid rgba(0, 242, 254, 0.2);
    color: var(--accent-teal);
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.section-header {
    text-align: left;
    margin-bottom: 50px;
}

.section-header .sub-title {
    color: var(--accent-blue);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
    font-weight: 700;
}

.section-header h2 {
    font-size: 2.2rem;
    margin: 6px 0;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.section-header .line {
    width: 35px;
    height: 3px;
    background: var(--accent-teal);
    margin-top: 12px;
}

/* --- Buttons --- */
.btn-primary, .btn-secondary, .btn-primary-sm {
    display: inline-block;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.btn-primary {
    background: var(--text-main);
    color: var(--bg-dark);
    padding: 12px 24px;
    border: 1px solid var(--text-main);
}

.btn-primary:hover {
    background: transparent;
    color: var(--accent-teal);
    border-color: var(--accent-teal);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    padding: 12px 24px;
    border: 1px solid var(--border-color);
    margin-left: 12px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: var(--text-main);
}

.btn-primary-sm {
    background: rgba(255,255,255,0.03);
    color: var(--text-main);
    padding: 8px 16px;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
}
.btn-primary-sm:hover {
    border-color: var(--accent-teal);
    color: var(--accent-teal);
}

/* --- Navigation System --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(9, 11, 14, 0.8);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    width: 90%;
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
}

.navbar .logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.navbar .logo span {
    color: var(--accent-teal);
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 16px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-main);
}

.menu-toggle {
    display: none;
    font-size: 1.3rem;
    color: var(--text-main);
    cursor: pointer;
}

/* --- Hero Layout --- */
.hero-section {
    padding-top: 150px;
    min-height: 85vh;
    display: flex;
    align-items: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    padding: 0;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 10px;
}

.hero-text h2 {
    font-size: 1.6rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 25px;
}

.hero-text p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.hero-text p strong {
    color: var(--text-main);
}

.hero-meta-details {
    margin-bottom: 35px;
    display: flex;
    gap: 25px;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.hero-meta-details i {
    color: var(--accent-blue);
    margin-right: 6px;
}

.hero-cta {
    margin-bottom: 35px;
}

.hero-socials a {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-right: 20px;
    transition: color 0.3s ease;
}

.hero-socials a:hover {
    color: var(--accent-teal);
}

/* Stable Layout Graph Stack Visual */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.tech-stack-hex {
    position: relative;
    width: 280px;
    height: 280px;
}

.hex-node {
    position: absolute;
    width: 65px;
    height: 65px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: var(--accent-teal);
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    animation: floating 4s ease-in-out infinite;
}

.hex-node:nth-child(1) { top: 10%; left: 40%; animation-delay: 0s; }
.hex-node:nth-child(2) { top: 40%; left: 10%; animation-delay: 0.5s; color: var(--accent-blue); }
.hex-node:nth-child(3) { top: 40%; left: 70%; animation-delay: 1s; }
.hex-node:nth-child(4) { top: 75%; left: 25%; animation-delay: 1.5s; }
.hex-node:nth-child(5) { top: 75%; left: 55%; animation-delay: 2s; color: var(--accent-blue); }

@keyframes floating {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); border-color: rgba(0, 242, 254, 0.4); }
}

/* --- Metrics Grid --- */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 35px 25px;
    border-radius: 6px;
    transition: var(--transition-smooth);
}

.metric-card:hover {
    border-color: rgba(0, 242, 254, 0.3);
    transform: translateY(-2px);
}

.metric-num {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.metric-card:hover .metric-num {
    color: var(--accent-teal);
}

.metric-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* --- Timeline Component --- */
.timeline {
    position: relative;
    max-width: 900px;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 1px;
    background: var(--border-color);
    top: 5px;
    bottom: 5px;
    left: 20px;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    padding-left: 55px;
}

.timeline-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--accent-teal);
    border-radius: 50%;
    left: 16px;
    top: 6px;
    z-index: 2;
}

.timeline-date {
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 6px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 35px;
    border-radius: 6px;
}

.timeline-content h3 {
    font-size: 1.4rem;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}

.timeline-content h4 {
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.role-desc {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.achieve-list {
    list-style: none;
}

.achieve-list li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 12px;
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

.achieve-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-teal);
}

/* --- Interactive Showcase Layout --- */
.portfolio-tabs {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 35px;
    gap: 12px;
    flex-wrap: wrap;
}

.tab-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition-smooth);
}

.tab-btn.active, .tab-btn:hover {
    border-color: var(--text-main);
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.02);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

/* Secure Opacity Class prevents tab switching layout crashes */
.portfolio-item.hidden-element {
    display: none !important;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 35px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
}

.card-badge {
    align-self: flex-start;
    background: rgba(255,255,255,0.03);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 4px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.card-meta {
    font-size: 0.85rem;
    color: var(--accent-blue);
    margin-bottom: 15px;
}

.card p {
    color: var(--text-muted);
    line-height: 1.5;
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.tech-tags {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tech-tags span {
    background: #0d1017;
    color: var(--text-main);
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

/* --- Technical Skills Matrix --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.skill-category {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 40px;
    border-radius: 6px;
}

.skill-category h3 {
    font-size: 1.15rem;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}
.skill-category h3 i {
    color: var(--accent-teal);
}

.skill-bar-item {
    margin-bottom: 20px;
}

.skill-bar-item span {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.bar-bg {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.04);
    border-radius: 2px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--text-main);
    border-radius: 2px;
}

/* Clean Dual Grid Overlay Block for Education */
.education-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
}

.edu-column h3 {
    margin-bottom: 20px;
    font-size: 1.15rem;
}
.edu-column h3 i {
    color: var(--accent-blue);
    margin-right: 8px;
}

.edu-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 25px;
    margin-bottom: 15px;
}

.edu-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
}

.edu-card .univ {
    color: var(--accent-teal);
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 2px;
}

.edu-card .date-tag {
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 6px;
}

.edu-card .modules {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 10px;
}

/* --- Enterprise Contact Frame & Footer --- */
.footer-section {
    background: #05070a;
    border-top: 1px solid var(--border-color);
    padding-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 50px;
    margin-bottom: 40px;
}

.footer-info h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.footer-info p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 30px;
}

.contact-details p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
}

.contact-details i {
    color: var(--accent-blue);
    font-size: 1.1rem;
    width: 15px;
}

.contact-details a {
    color: var(--text-main);
    text-decoration: none;
}

/* Modern Form Elements */
.footer-form form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.footer-form input, .footer-form textarea {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 14px;
    border-radius: 4px;
    font-family: var(--font-stack);
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.footer-form input:focus, .footer-form textarea:focus {
    outline: none;
    border-color: var(--text-muted);
}

.footer-divider {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin-bottom: 30px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding-bottom: 35px;
}

.bottom-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 15px;
}

.bottom-links a:hover {
    color: var(--text-main);
}

/* --- Viewport Adaptive Canvas Configurations --- */
@media (max-width: 992px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-text h1 { font-size: 2.8rem; }
    .hero-meta-details { justify-content: center; }
    .hero-cta { display: flex; justify-content: center; }
    .hero-visual { display: none; }
    .skills-grid, .education-container { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .container { padding: 50px 0; }
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: var(--bg-dark);
        border-bottom: 1px solid var(--border-color);
        padding: 20px 0;
    }
    .nav-links.mobile-active { display: flex; }
    .nav-links li { margin: 12px 0; }
    .menu-toggle { display: block; }
    .portfolio-tabs { flex-wrap: wrap; }
    .footer-grid { gap: 30px; }
    .input-group { grid-template-columns: 1fr; }
    .timeline::after { left: 15px; }
    .timeline-item { padding-left: 40px; }
    .timeline-dot { left: 11px; }
}