/* Tproc.net 2025 - Personal Website */
/* Main Stylesheet */

/* ============================================
    CSS VARIABLES (DRACULA THEME COLORS)
   ============================================ */
:root {
    --bg-primary: #282a36;      /* Main background */
    --bg-secondary: #1e1f29;    /* Cards, navbar */
    --bg-tertiary: #383a59;     /* Hover states, borders */
    --text-primary: #f8f8f2;    /* Main text */
    --text-secondary: #6272a4;  /* Secondary text */
    --accent-purple: #bd93f9;   /* Primary accent */
    --accent-pink: #ff79c6;     /* Secondary accent */
    --accent-cyan: #8be9fd;     /* Tertiary accent */
    --accent-green: #50fa7b;    /* Code highlights */
}

/* ============================================
    GLOBAL RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* ============================================
    TYPOGRAPHY
   ============================================ */
h1 {
    color: var(--accent-purple);
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
}

h2 {
    color: var(--accent-cyan);
    margin: 1.5rem 0 1rem;
}

h3 {
    color: var(--accent-pink);
    margin: 1rem 0 0.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* ============================================
    NAVIGATION BAR
   ============================================ */
.navbar {
    background-color: var(--bg-secondary);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-purple);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    flex-wrap: nowrap;
    align-items: center;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover {
    background-color: var(--bg-tertiary);
    color: var(--accent-purple);
}

.nav-link.active {
    color: var(--accent-purple);
    background-color: var(--bg-tertiary);
}

/* Hamburger Menu Icon (hidden on desktop) */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--accent-purple);
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Hamburger animation when active */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ============================================
    MAIN CONTAINER & PAGE SYSTEM
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* ============================================
    HERO SECTION
   ============================================ */
.hero {
    text-align: center;
    padding: 3rem 0 0 0;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.hero .tagline {
    font-size: 1.3rem;
    color: var(--accent-cyan);
    margin-bottom: 1rem;
}

/* ============================================
    BUTTONS
   ============================================ */
.discord-join-btn {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    color: var(--text-primary);
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(189, 147, 249, 0.4);
    margin: 1rem 0;
}

.discord-join-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(189, 147, 249, 0.6);
}

.discord-join-btn:active {
    transform: translateY(-1px);
}

.back-btn {
    background-color: var(--bg-secondary);
    color: var(--accent-purple);
    border: 1px solid var(--accent-purple);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background-color: var(--accent-purple);
    color: var(--bg-primary);
}

/* ============================================
    BLOG SECTION
   ============================================ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.blog-card {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--bg-tertiary);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(189, 147, 249, 0.3);
    border-color: var(--accent-purple);
}

.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-card h3 {
    margin-top: 0;
    color: var(--accent-purple);
}

.blog-card .date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.blog-card .excerpt {
    color: var(--text-primary);
    line-height: 1.6;
}

/* Blog Post View */
article {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--bg-tertiary);
}

article img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1rem 0;
}

/* ============================================
    PHOTO GALLERY
   ============================================ */
.photo-gallery {
    columns: 3;
    column-gap: 1.5rem;
    margin-top: 2rem;
}

.photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    background-color: var(--bg-secondary);
    border: 1px solid var(--bg-tertiary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 1.5rem;
    break-inside: avoid; /* Prevent breaking across columns */
    display: inline-block;
    width: 100%;
}

.photo-item:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(189, 147, 249, 0.4);
    border-color: var(--accent-purple);
}

.photo-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.photo-item .photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--text-primary);
    padding: 2rem 1rem 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.photo-item:hover .photo-caption {
    transform: translateY(0);
}

/* ============================================
    CODE BLOCKS
   ============================================ */
code {
    background-color: var(--bg-primary);
    color: var(--accent-green);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

pre {
    background-color: var(--bg-primary);
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1rem 0;
}

pre code {
    background: none;
    padding: 0;
}

/* ============================================
    FULLSCREEN IMAGE MODAL
   ============================================ */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.image-modal.active {
    display: flex;
}

.image-modal img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(189, 147, 249, 0.5);
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: var(--accent-purple);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    background: none;
    border: none;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-close:hover {
    color: var(--accent-pink);
    transform: rotate(90deg);
}

.image-modal-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(30, 31, 41, 0.9);
    color: var(--text-primary);
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    border: 1px solid var(--accent-purple);
}

/* ============================================
    FOOTER
   ============================================ */
footer {
    background-color: var(--bg-secondary);
    text-align: center;
    padding: 1.5rem;
    margin-top: 3rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--bg-tertiary);

}
footer a {
    color: var(--accent-purple);
    text-decoration: none;
    transition: color 0.3s ease;
}

/* ============================================
    RESPONSIVE DESIGN - TABLET & MOBILE
   ============================================ */

/* Tablets and smaller devices */
@media (max-width: 768px) {
    /* Show hamburger menu */
    .hamburger {
        display: flex;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-brand {
        font-size: 1.1rem;
    }
    
    .nav-brand h3 {
        font-size: 0.8rem !important;
    }
    
    /* Mobile menu dropdown */
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-secondary);
        flex-direction: column;
        gap: 0;
        padding: 0;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        opacity: 0;
        visibility: hidden;
    }
    
    .nav-menu.active {
        max-height: 300px;
        padding: 1rem 0;
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-link {
        display: block;
        width: 100%;
        padding: 0.8rem 1rem;
        text-align: center;
    }
    
    /* Adjust spacing */
    .container {
        padding: 1rem;
    }
    
    /* Responsive buttons */
    .discord-join-btn {
        padding: 0.9rem 2rem;
        font-size: 1rem;
        width: 100%;
        max-width: 400px;
    }
    
    /* Single column blog grid */
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Two column photo gallery */
    .photo-gallery {
        columns: 2;
        column-gap: 1rem;
    }
    
    /* Smaller typography */
    h1 {
        font-size: 1.8rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero .tagline {
        font-size: 1.1rem;
    }
    
    article {
        padding: 1rem;
    }
    
    /* About page responsive fixes */
    #about section {
        max-width: 100% !important;
        padding: 20px 10px !important;
    }
    
    /* Stack profile elements vertically */
    #about div[style*="display: flex"] {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 15px !important;
    }
    
    /* Smaller profile picture */
    #about img[style*="width: 200px"] {
        width: 120px !important;
        height: 120px !important;
    }
    
    /* Responsive TryHackMe iframe */
    #about iframe {
        width: 100% !important;
        max-width: 100% !important;
        height: 120px !important;
    }
    
    /* Center all text */
    #about div[style*="text-align: left"],
    #about div[style*="text-align: right"] {
        text-align: center !important;
    }
    
    #about div[style*="display: inline-block"] {
        display: block !important;
        text-align: center !important;
        max-width: 100% !important;
    }
    
    #about p {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }
    
    /* Single column for certificates and badges */
    #about div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 !important;
    }
    
    /* Responsive certificate */
    #about img[style*="width: 360px"] {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Responsive badge images */
    #about div[style*="grid-template-columns"] img {
        width: 100% !important;
        max-width: 300px !important;
        margin: 0 auto !important;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .nav-brand {
        font-size: 0.95rem;
    }
    
    .nav-brand h3 {
        font-size: 0.7rem !important;
    }
    
    /* Single column photo gallery */
    .photo-gallery {
        columns: 1;
    }
    
    /* Even smaller typography */
    .hero h1 {
        font-size: 1.6rem;
    }
    
    .hero .tagline {
        font-size: 1rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.2rem;
    }
    
    /* Smaller hero image */
    .hero img[style*="width: 100px"] {
        width: 80px !important;
        height: 80px !important;
    }
    
    /* Smaller about page profile */
    #about img[style*="width: 120px"] {
        width: 100px !important;
        height: 100px !important;
    }
    
    /* Smaller Discord button */
    .discord-join-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }
}