/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Courier New', Courier, monospace;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Sidebar Navigation */
.sidebar {
    width: 220px;
    background-color: #e8e8e8;
    background-image: radial-gradient(circle, #999 1px, transparent 1px);
    background-size: 8px 8px;
    border-right: 2px solid #333;
    padding: 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.nav-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
    background-color: #fff;
    padding: 8px 12px;
    border: 2px solid #333;
    display: inline-block;
}

.nav-menu {
    list-style: none;
}

.nav-menu li {
    margin-bottom: 12px;
}

.nav-menu a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    background-color: #fff;
    padding: 6px 10px;
    display: inline-block;
    border: 1px solid transparent;
}

.nav-menu a:hover {
    color: #000;
    border: 1px solid #333;
    text-decoration: underline;
}

/* Main Content */
.main-content {
    margin-left: 220px;
    flex: 1;
    padding: 40px;
}

/* Hero Section */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 40px;
    background-color: #fff;
    border: 2px solid #333;
    margin-bottom: 0;
    min-height: 300px;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            #f9f9f9 10px,
            #f9f9f9 11px
        );
}

.hero-text {
    flex: 1;
    padding-right: 40px;
}

.hero-title {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #000;
}

.hero-description {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.hero-image {
    width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-placeholder {
    width: 180px;
    height: 180px;
    border: 2px solid #333;
    background-color: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-pic {
    width: 180px;
    height: 180px;
    border: 2px solid #333;
    border-radius: 50%;
    object-fit: cover;
}

/* Grid Container */
.grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    margin-bottom: 0;
}

.grid-item {
    background-color: #fff;
    border: 2px solid #333;
    border-top: none;
    padding: 40px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.grid-container .grid-item:first-child {
    grid-column: 1 / -1;
}

.grid-item:nth-child(2),
.grid-item:nth-child(4) {
    border-right: none;
}

/* Skills Building Layout */
.skills-building {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.skills-floor {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid #333;
    border-left: 6px solid #333;
    position: relative;
}

.floor-label {
    display: inline-block;
    padding: 6px 12px;
    background-color: #333;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 10px;
}

.skill-badge {
    display: inline-block;
    padding: 8px 16px;
    background-color: #fff;
    border: 2px solid #333;
    font-size: 13px;
    font-weight: bold;
    color: #333;
    transition: all 0.2s;
    cursor: default;
}

.skill-badge:hover {
    background-color: #333;
    color: #fff;
    transform: translateY(-2px);
}

/* Subtle diagonal stripe pattern for all sections */
.grid-item {
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            #f9f9f9 10px,
            #f9f9f9 11px
        );
}

/* CTF Team Section */
.ctf-team-section {
    margin-top: 20px;
    margin-bottom: 10px;
}

.ctf-team-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none !important;
    transition: all 0.2s;
}

.contact-links .ctf-team-link {
    text-decoration: none !important;
}

.ctf-team-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #333;
    object-fit: cover;
    transition: all 0.2s;
}

.ctf-team-link:hover .ctf-team-logo {
    transform: scale(1.05);
    border-color: #000;
}

.ctf-team-info {
    line-height: 1.2;
}

.ctf-team-info h3 {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.4;
    transition: all 0.2s;
    text-decoration: none !important;
}

.ctf-subtitle {
    font-size: 13px;
    font-weight: normal;
    color: #666;
}

.ctf-team-link:hover .ctf-team-info h3 {
    color: #000;
    text-decoration: none !important;
}

.contact-links {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.contact-links p {
    font-size: 14px;
    margin-bottom: 8px;
}

.contact-links a {
    color: #333;
    text-decoration: underline;
}

.contact-links a:hover {
    color: #000;
}

.contact-links a.btn {
    text-decoration: none !important;
}

.contact-links a.btn:hover {
    background-color: #333;
    color: #fff !important;
}

.contact-links p:has(a.btn) {
    text-align: center;
}

.grid-item h2 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #000;
}

.grid-item p {
    font-size: 14px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 30px;
    flex: 1;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: 2px solid #333;
    background-color: transparent;
    color: #333;
    text-decoration: none !important;
    font-size: 14px;
    font-family: 'Courier New', Courier, monospace;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: #333;
    transition: left 0.3s ease;
    z-index: -1;
}

.btn:hover::before {
    left: 0;
}

.btn:hover {
    color: #fff;
    text-decoration: none !important;
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    
    .sidebar {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    
    .hero {
        flex-direction: column;
        padding: 30px 20px;
    }
    
    .hero-text {
        padding-right: 0;
        margin-bottom: 30px;
        display: flex;
        flex-direction: column;
    }
    
    .hero-title {
        font-size: 36px;
        order: 1;
    }
    
    .hero-description {
        order: 2;
    }
    
    .ctf-team-section {
        display: flex;
        justify-content: center;
    }
    
    .contact-links {
        order: 4;
        margin-bottom: 30px;
    }
    
    .contact-links p:last-child {
        text-align: center;
        margin-top: 20px;
    }
    
    .ctf-team-section {
        margin-top: 20px;
        padding-bottom: 15px;
    }
    
    .ctf-team-logo {
        width: 50px;
        height: 50px;
    }
    
    .ctf-team-info h3 {
        font-size: 16px;
    }
    
    .ctf-team-info p {
        font-size: 12px;
    }
    
    .hero-image {
        width: 150px;
        margin: 0 auto;
    }
    
    .avatar-placeholder {
        width: 150px;
        height: 150px;
    }
    
    .grid-container {
        grid-template-columns: 1fr;
    }
    
    .grid-item {
        border-right: 2px solid #333 !important;
        padding: 30px 20px;
        min-height: 250px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }
    
    .hero-description {
        font-size: 14px;
    }
    
    .grid-item {
        padding: 20px 15px;
    }
    
    .grid-item h2 {
        font-size: 20px;
    }
    
    .grid-item p {
        font-size: 13px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* Page Header Styles */
.page-header {
    background-color: #fff;
    border: 2px solid #333;
    padding: 40px;
    margin-bottom: 30px;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            #f9f9f9 10px,
            #f9f9f9 11px
        );
}

.page-header h1 {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #000;
}

.page-header p {
    font-size: 16px;
    color: #333;
    line-height: 1.8;
}

/* Content Section Styles */
.content-section {
    background-color: #fff;
    border: 2px solid #333;
    padding: 40px;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            #f9f9f9 10px,
            #f9f9f9 11px
        );
}

.project-item,
.achievement-item,
.cert-item,
.update-item,
.contact-info {
    padding: 30px 0;
    border-bottom: 1px solid #ddd;
}

.project-item:last-child,
.achievement-item:last-child,
.cert-item:last-child,
.update-item:last-child,
.contact-info:last-child {
    border-bottom: none;
}

.project-item h3,
.achievement-item h3,
.cert-item h3,
.update-item h3,
.contact-info h3 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #000;
}

.project-item p,
.achievement-item p,
.cert-item p,
.update-item p,
.contact-info p {
    font-size: 14px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 15px;
}

.achievement-date,
.cert-issuer,
.cert-date,
.update-date {
    font-size: 13px;
    color: #666;
    font-style: italic;
}

.contact-info a {
    color: #333;
    text-decoration: underline;
}

.contact-info a:hover {
    color: #000;
}

@media (max-width: 768px) {
    .page-header {
        padding: 30px 20px;
    }
    
    .page-header h1 {
        font-size: 32px;
    }
    
    .content-section {
        padding: 30px 20px;
    }
    
    .project-item,
    .achievement-item,
    .cert-item,
    .update-item,
    .contact-info {
        padding: 20px 0;
    }
}

/* Image Styles */
.project-image {
    width: 100%;
    height: 300px;
    object-fit: contain;
    border: 2px solid #333;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
    margin-bottom: 20px;
    display: block;
    background-color: #fff;
    transition: transform 0.2s ease;
}

.project-image:hover {
    transform: scale(1.02);
}

.achievement-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border: 2px solid #333;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
    margin-bottom: 20px;
    display: block;
    transition: transform 0.2s ease;
}

.achievement-image:hover {
    transform: scale(1.02);
}

.cert-image {
    width: 100%;
    height: 250px;
    object-fit: contain;
    border: 2px solid #333;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
    margin-bottom: 20px;
    display: block;
    background-color: #fff;
    padding: 20px;
    transition: transform 0.2s ease;
}

.cert-image:hover {
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .profile-pic {
        width: 150px;
        height: 150px;
    }
    
    .project-image {
        height: auto;
        min-height: 200px;
        object-fit: contain;
        background-color: #fff;
    }
    
    .achievement-image {
        height: 200px;
    }
    
    .cert-image {
        height: 250px;
    }
}

/* Section Title Styles */
.section-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #000;
    padding-bottom: 10px;
    border-bottom: 2px solid #333;
}

.section-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 30px;
    font-style: italic;
}

@media (max-width: 768px) {
    .section-title {
        font-size: 24px;
    }
}

/* Projects Grid Layout */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 40px;
    margin-top: 30px;
}

.projects-grid .project-item {
    padding: 0 0 40px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.projects-grid .project-item:nth-last-child(-n+2) {
    border-bottom: none;
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .projects-grid .project-item:last-child {
        border-bottom: none;
    }
    
    .projects-grid .project-item:nth-last-child(-n+2) {
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
}

/* Achievements Grid Layout */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 40px;
    margin-top: 30px;
}

.achievements-grid .achievement-item {
    padding: 0 0 40px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.achievements-grid .achievement-item:nth-last-child(-n+3) {
    border-bottom: none;
}

/* Certifications Grid Layout */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 40px;
    margin-top: 30px;
}

.certifications-grid .cert-item {
    padding: 0 0 40px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.certifications-grid .cert-item h3,
.certifications-grid .cert-item .cert-issuer {
    text-align: center;
}

.certifications-grid .cert-item .btn {
    margin-top: auto;
}

.certifications-grid .cert-item:nth-last-child(-n+3) {
    border-bottom: none;
}

@media (max-width: 1024px) {
    .achievements-grid,
    .certifications-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .achievements-grid .achievement-item:nth-last-child(-n+3),
    .certifications-grid .cert-item:nth-last-child(-n+3) {
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .achievements-grid .achievement-item:nth-last-child(-n+2),
    .certifications-grid .cert-item:nth-last-child(-n+2) {
        border-bottom: none;
    }
}

@media (max-width: 768px) {
    .achievements-grid,
    .certifications-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .achievements-grid .achievement-item:last-child,
    .certifications-grid .cert-item:last-child {
        border-bottom: none;
    }
    
    .achievements-grid .achievement-item:nth-last-child(-n+2),
    .achievements-grid .achievement-item:nth-last-child(-n+3) {
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .certifications-grid .cert-item:nth-last-child(-n+2),
    .certifications-grid .cert-item:nth-last-child(-n+3) {
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
}

/* Updates Images Grid */
.update-images-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.update-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border: 2px solid #333;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
    display: block;
}

@media (max-width: 768px) {
    .update-images-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .update-image {
        height: 250px;
    }
}

/* Center achievement titles */
.achievement-item h3,
.cert-item h3 {
    text-align: center;
}

/* CTF Box Styles */
.ctf-box {
    max-width: 400px;
    margin: 0 auto;
}

.ctf-link {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 30px;
    background-color: #fff;
    border: 3px solid #333;
    text-decoration: none;
    transition: all 0.3s;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            #f9f9f9 10px,
            #f9f9f9 11px
        );
}

.ctf-link:hover {
    transform: translateY(-2px);
    box-shadow: 4px 4px 0px #333;
}

.ctf-logo-container {
    width: 80px;
    height: 80px;
    border: 2px solid #333;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ctf-logo-square {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.ctf-info h3 {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin: 0 0 5px 0;
    text-align: left;
}

.ctf-info p {
    font-size: 14px;
    color: #666;
    margin: 0 0 10px 0;
}

.ctf-arrow {
    font-size: 14px;
    color: #333;
    font-weight: bold;
    transition: all 0.3s;
}

.ctf-link:hover .ctf-arrow {
    color: #000;
}

@media (max-width: 768px) {
    .ctf-link {
        padding: 20px;
        gap: 15px;
    }
    
    .ctf-logo-container {
        width: 60px;
        height: 60px;
    }
    
    .ctf-logo-square {
        width: 45px;
        height: 45px;
    }
    
    .ctf-info h3 {
        font-size: 20px;
    }
}

/* 404 Page Styles */
.not-found-body {
    display: flex !important;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: 'Courier New', Courier, monospace;
}

/* Override default body styles for 404 page */
body.not-found-body {
    display: flex !important;
    flex-direction: row !important;
    min-height: 100vh !important;
}

/* Hide sidebar on 404 page */
body.not-found-body .sidebar {
    display: none !important;
}

/* Ensure main content takes full width on 404 page */
body.not-found-body .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 0 !important;
}

.not-found-main {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

.not-found-container {
    text-align: center;
    padding: 20px;
    max-width: 600px;
    width: 100%;
}

.error-code {
    font-size: 80px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    text-shadow: 4px 4px 0px rgba(0,0,0,0.1);
}

.crying-face {
    margin: 20px 0;
}

.error-image {
    width: 200px;
    height: 200px;
    object-fit: contain;
    border-radius: 10px;
    display: block;
    margin: 0 auto;
}

.error-title {
    font-size: 28px;
    color: #333;
    margin: 20px 0 15px;
}

.desperate-message {
    background-color: #fff;
    border: 3px solid #333;
    padding: 20px;
    margin: 20px 0;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            #f9f9f9 10px,
            #f9f9f9 11px
        );
}

.main-message {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
}

.hire-me {
    font-size: 24px;
    color: #333;
    margin: 15px 0;
}

.blessing {
    font-size: 14px;
    color: #333;
    font-style: italic;
    margin: 10px 0;
}

.funny-note {
    font-size: 13px;
    color: #666;
    margin-top: 10px;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 25px 0 0 0;
    flex-wrap: wrap;
}

.primary-btn {
    background-color: #333;
    color: #fff !important;
}

.hire-btn {
    background-color: #4CAF50;
    border-color: #4CAF50;
    color: #fff !important;
}

.hire-btn:hover {
    background-color: #45a049;
    border-color: #45a049;
}

@media (max-width: 768px) {
    .error-code {
        font-size: 60px;
    }
    
    .error-title {
        font-size: 22px;
    }
    
    .hire-me {
        font-size: 20px;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .desperate-message {
        padding: 15px;
        margin: 15px 0;
    }
    
    .error-image {
        width: 160px;
        height: 160px;
    }
    
    .not-found-container {
        padding: 15px;
    }
}
