* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, Verdana, sans-serif;
    background-color: #FFFFFF;
    background-image: url('data:image/svg+xml,%3Csvg width="20" height="20" xmlns="http://www.w3.org/2000/svg"%3E%3Crect width="20" height="20" fill="%23f0f0f0"/%3E%3Crect width="10" height="10" fill="%23e0e0e0"/%3E%3Crect x="10" y="10" width="10" height="10" fill="%23e0e0e0"/%3E%3C/svg%3E');
    overflow-x: hidden;
    width: 100%;
}

.navlink {
    display: block;
    padding: 5px;
    margin: 3px 0;
    text-decoration: none;
    color: #000099;
    font-weight: bold;
    font-size: 14px;
    background: linear-gradient(to bottom, #FFFFFF, #CCCCFF);
    border: 1px solid #000099;
    text-align: center;
}

.navlink:hover {
    background: linear-gradient(to bottom, #FFFF99, #FFCC00);
    color: #CC0000;
}

.skill-bar {
    width: 200px;
    height: 20px;
    background-color: #CCCCCC;
    border: 2px solid #000000;
    display: inline-block;
    margin-right: 10px;
}

.skill-level {
    height: 100%;
    background: linear-gradient(to right, #00FF00, #00CC00);
    animation: fillBar 2s ease-in-out;
}

@keyframes fillBar {
    from { width: 0%; }
}

.button {
    background: linear-gradient(to bottom, #CCCCFF, #9999FF);
    border: 2px outset #666666;
    padding: 5px 15px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
}

.button:hover {
    background: linear-gradient(to bottom, #FFCC99, #FF9966);
}

.button:active {
    border-style: inset;
}

input[type="text"], textarea {
    border: 2px inset #999999;
    padding: 3px;
    font-family: Arial, sans-serif;
    font-size: 12px;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.blink {
    animation: blink 1s infinite;
}

marquee {
    padding: 10px 0;
}

a {
    color: #0000FF;
    text-decoration: underline;
}

a:visited {
    color: #800080;
}

a:hover {
    color: #FF0000;
    text-decoration: none;
}

table {
    font-size: 14px;
    max-width: 100%;
    table-layout: fixed;
    word-wrap: break-word;
}

hr {
    border: 0;
    height: 2px;
    /* background: linear-gradient(to right, transparent, #003366, transparent); */
}

h1, h2, h3 {
    text-shadow: 2px 2px 4px #999999;
}

#clock {
    color: #CC0000;
    padding: 10px;
    background: linear-gradient(to bottom, #FFFFCC, #FFFF99);
    border: 2px solid #999999;
}

img {
    image-rendering: pixelated;
}

#scrollToTop {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    border: 3px solid #003366;
    outline: none;
    background: linear-gradient(to bottom, #FFFF00, #FFCC00);
    color: #003366;
    cursor: pointer;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    font-family: Arial, Verdana, sans-serif;
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.5);
}

#scrollToTop:hover {
    background: linear-gradient(to bottom, #FF9900, #FF6600);
    color: #FFFFFF;
}

#scrollToTop:active {
    box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    transform: translateY(2px);
}

@media screen and (max-width: 1024px) {
    body {
        font-size: 14px;
    }
    
    table[width="100%"] {
        width: 100% !important;
    }
    
    table[width="200"] {
        width: 100% !important;
        display: block;
    }
    
    marquee font {
        font-size: 3 !important;
    }
    
    #scrollToTop {
        bottom: 20px;
        right: 20px;
        padding: 10px 15px;
        font-size: 14px;
    }
}

@media screen and (max-width: 768px) {
    body {
        font-size: 15px;
        width: 100vw;
        overflow-x: hidden;
    }
    
    table {
        width: 100% !important;
        max-width: 100% !important;
        table-layout: fixed !important;
        word-wrap: break-word !important;
    }
    
    table, tbody, tr {
        display: block !important;
        width: 100% !important;
    }
    
    td {
        display: block !important;
        width: 100% !important;
        overflow-x: hidden !important;
    }
    
    td[width="200"] {
        display: none !important;
    }
    
    td[valign="top"] {
        display: block !important;
        width: 100% !important;
    }
    
    .navlink {
        font-size: 15px;
        padding: 8px;
        margin: 5px 0;
        display: block;
        width: 100%;
    }
    
    .skill-bar {
        width: 60% !important;
        max-width: 150px;
    }
    
    img {
        max-width: 100% !important;
        height: auto !important;
        width: auto !important;
    }
    
    .profile-photo {
        width: 100px !important;
        height: 100px !important;
    }
    
    input[type="text"] {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 16px;
        box-sizing: border-box;
    }
    
    textarea {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 16px;
        box-sizing: border-box;
    }
    
    font[size="6"] {
        font-size: 26px !important;
    }
    
    font[size="5"] {
        font-size: 22px !important;
    }
    
    font[size="4"] {
        font-size: 18px !important;
    }
    
    font[size="3"] {
        font-size: 15px !important;
    }
    
    font[size="2"] {
        font-size: 14px !important;
    }
    
    marquee {
        font-size: 15px !important;
        width: 100% !important;
    }
    
    marquee font {
        font-size: 15px !important;
    }
    
    #scrollToTop {
        bottom: 15px;
        right: 15px;
        padding: 8px 12px;
        font-size: 14px;
    }
    
    table[cellpadding="20"] td {
        padding: 10px !important;
    }
    
    table[cellpadding="10"] td {
        padding: 8px !important;
    }
    
    table[cellpadding="5"] td {
        padding: 5px !important;
    }
    
    .button {
        width: 100%;
        max-width: 100%;
        margin: 5px 0;
        box-sizing: border-box;
        font-size: 15px;
    }
    
    ul, ol {
        padding-left: 20px;
        margin: 10px 0;
        font-size: 15px;
    }
    
    p {
        word-wrap: break-word;
        overflow-wrap: break-word;
        font-size: 15px;
    }
    
    a {
        word-wrap: break-word;
        overflow-wrap: break-word;
        font-size: 15px;
    }
    
    li {
        font-size: 15px;
        margin: 5px 0;
    }
    
    b, strong {
        font-size: inherit;
    }
}

@media screen and (max-width: 480px) {
    body {
        font-size: 14px;
        width: 100vw;
        overflow-x: hidden;
    }
    
    table {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    td[width="200"] {
        display: none !important;
    }
    
    td {
        overflow-x: hidden !important;
        word-wrap: break-word !important;
    }
    
    font[size="6"] {
        font-size: 24px !important;
    }
    
    font[size="5"] {
        font-size: 20px !important;
    }
    
    font[size="4"] {
        font-size: 17px !important;
    }
    
    font[size="3"] {
        font-size: 14px !important;
    }
    
    font[size="2"] {
        font-size: 13px !important;
    }
    
    .skill-bar {
        width: 50% !important;
        max-width: 120px;
    }
    
    table[cellpadding="20"] td {
        padding: 8px !important;
    }
    
    table[cellpadding="10"] td {
        padding: 5px !important;
    }
    
    table[cellpadding="5"] td {
        padding: 3px !important;
    }
    
    #clock, #counter {
        font-size: 13px !important;
        padding: 5px !important;
    }
    
    #scrollToTop {
        bottom: 10px;
        right: 10px;
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .navlink {
        font-size: 14px;
        padding: 8px;
        width: 100%;
    }
    
    marquee {
        font-size: 13px !important;
        width: 100% !important;
    }
    
    marquee font {
        font-size: 13px !important;
    }
    
    input[type="text"], textarea {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        font-size: 15px;
    }
    
    ul, ol {
        padding-left: 15px;
        font-size: 14px;
    }
    
    li {
        font-size: 14px;
        margin: 5px 0;
    }
    
    p {
        font-size: 14px;
    }
    
    a {
        word-break: break-all;
        font-size: 14px;
    }
    
    .profile-photo {
        width: 100px !important;
        height: 100px !important;
    }
    
    .button {
        font-size: 14px;
    }
    
    b, strong {
        font-size: inherit;
    }
}

@media screen and (min-width: 1440px) {
    body {
        font-size: 16px;
    }
    
    body > table {
        max-width: 1400px;
        margin: 0 auto;
    }
}

@media print {
    #scrollToTop {
        display: none !important;
    }
    
    marquee {
        display: none !important;
    }
    
    .navlink {
        color: #000 !important;
        background: none !important;
    }
}

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.popup-overlay.active {
    display: flex;
}

.popup-content {
    background: linear-gradient(to bottom, #FFFFFF, #E6F2FF);
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    margin: 20px;
    animation: popupSlideIn 0.5s ease-out;
}

@keyframes popupSlideIn {
    from {
        transform: scale(0.7) translateY(-50px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.popup-header {
    background: linear-gradient(to bottom, #035db7, #0055AA);
    padding: 15px;
    text-align: center;
    border-radius: 10px 10px 0 0;
    border-bottom: 3px solid #FFCC00;
}

.popup-header font {
    color: #FFFF00 !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.popup-body {
    padding: 20px;
    text-align: center;
}

.popup-body p {
    margin: 12px 0;
    line-height: 1.6;
}

.popup-footer {
    padding: 15px;
    text-align: center;
    border-top: 2px solid #CCCCCC;
}

.popup-button {
    background: linear-gradient(to bottom, #FFCC00, #FF9900);
    border: 3px outset #CC6600;
    padding: 10px 30px;
    font-size: 16px;
    font-weight: bold;
    color: #003366;
    cursor: pointer;
    border-radius: 8px;
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.3);
    font-family: Arial, Verdana, sans-serif;
}

.popup-button:hover {
    background: linear-gradient(to bottom, #FF9900, #FF6600);
    color: #FFFFFF;
    border-color: #CC0000;
}

.popup-button:active {
    border-style: inset;
    box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
}

@media screen and (max-width: 768px) {
    .popup-content {
        max-width: 90%;
        margin: 10px;
    }
    
    .popup-header {
        padding: 12px;
    }
    
    .popup-body {
        padding: 15px;
    }
    
    .popup-body p {
        font-size: 14px;
    }
    
    .popup-button {
        padding: 8px 20px;
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    .popup-content {
        max-width: 95%;
    }
    
    .popup-header {
        padding: 10px;
    }
    
    .popup-header font {
        font-size: 16px !important;
    }
    
    .popup-body {
        padding: 12px;
    }
    
    .popup-body p {
        font-size: 13px;
        margin: 10px 0;
    }
    
    .popup-button {
        padding: 8px 18px;
        font-size: 13px;
        width: 100%;
    }
}


.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    color: #003366;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    transform: translateY(-3px) scale(1.1);
}

.social-icon svg {
    width: 24px;
    height: 24px;
}

body.modern-mode .social-icon {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #00ffff;
    backdrop-filter: blur(10px);
}

body.modern-mode .social-icon:hover {
    background: linear-gradient(135deg, rgba(255, 0, 150, 0.4), rgba(0, 255, 255, 0.4));
    color: #ffffff;
    border-color: rgba(255, 0, 150, 0.5);
    box-shadow: 0 8px 24px rgba(255, 0, 150, 0.4);
}

@media screen and (max-width: 768px) {
    .social-links {
        gap: 12px;
    }
    
    .social-icon {
        width: 40px;
        height: 40px;
    }
    
    .social-icon svg {
        width: 22px;
        height: 22px;
    }
}

@media screen and (max-width: 480px) {
    .social-links {
        gap: 10px;
    }
    
    .social-icon {
        width: 38px;
        height: 38px;
    }
    
    .social-icon svg {
        width: 20px;
        height: 20px;
    }
}
